utils: ipc: Include <string> in generated headers where needed
Depending on the types used in the IPA interface, generated headers may use the std::string class. Include <string> when needed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
This commit is contained in:
parent
ac1c57fcf5
commit
0e333755ff
3 changed files with 7 additions and 3 deletions
|
@ -15,6 +15,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
{% if has_map %}#include <map>{% endif %}
|
{% if has_map %}#include <map>{% endif %}
|
||||||
|
{% if has_string %}#include <string>{% endif %}
|
||||||
{% if has_array %}#include <vector>{% endif %}
|
{% if has_array %}#include <vector>{% endif %}
|
||||||
|
|
||||||
#include <libcamera/ipa/ipa_interface.h>
|
#include <libcamera/ipa/ipa_interface.h>
|
||||||
|
|
|
@ -14,12 +14,13 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
{% if has_map %}#include <map>{% endif %}
|
||||||
|
{% if has_string %}#include <string>{% endif %}
|
||||||
|
{% if has_array %}#include <vector>{% endif %}
|
||||||
|
|
||||||
#include <libcamera/ipa/core_ipa_interface.h>
|
#include <libcamera/ipa/core_ipa_interface.h>
|
||||||
#include <libcamera/ipa/ipa_interface.h>
|
#include <libcamera/ipa/ipa_interface.h>
|
||||||
|
|
||||||
{% if has_map %}#include <map>{% endif %}
|
|
||||||
{% if has_array %}#include <vector>{% endif %}
|
|
||||||
|
|
||||||
namespace libcamera {
|
namespace libcamera {
|
||||||
{%- if has_namespace %}
|
{%- if has_namespace %}
|
||||||
{% for ns in namespace %}
|
{% for ns in namespace %}
|
||||||
|
|
|
@ -467,6 +467,7 @@ class Generator(generator.Generator):
|
||||||
'enums': self.module.enums,
|
'enums': self.module.enums,
|
||||||
'has_array': len([x for x in self.module.kinds.keys() if x[0] == 'a']) > 0,
|
'has_array': len([x for x in self.module.kinds.keys() if x[0] == 'a']) > 0,
|
||||||
'has_map': len([x for x in self.module.kinds.keys() if x[0] == 'm']) > 0,
|
'has_map': len([x for x in self.module.kinds.keys() if x[0] == 'm']) > 0,
|
||||||
|
'has_string': len([x for x in self.module.kinds.keys() if x[0] == 's']) > 0,
|
||||||
'has_namespace': self.module.mojom_namespace != '',
|
'has_namespace': self.module.mojom_namespace != '',
|
||||||
'interface_event': GetEventInterface(self.module.interfaces),
|
'interface_event': GetEventInterface(self.module.interfaces),
|
||||||
'interface_main': GetMainInterface(self.module.interfaces),
|
'interface_main': GetMainInterface(self.module.interfaces),
|
||||||
|
@ -486,6 +487,7 @@ class Generator(generator.Generator):
|
||||||
'enums_gen_header': [x for x in self.module.enums if x.attributes is None or 'skipHeader' not in x.attributes],
|
'enums_gen_header': [x for x in self.module.enums if x.attributes is None or 'skipHeader' not in x.attributes],
|
||||||
'has_array': len([x for x in self.module.kinds.keys() if x[0] == 'a']) > 0,
|
'has_array': len([x for x in self.module.kinds.keys() if x[0] == 'a']) > 0,
|
||||||
'has_map': len([x for x in self.module.kinds.keys() if x[0] == 'm']) > 0,
|
'has_map': len([x for x in self.module.kinds.keys() if x[0] == 'm']) > 0,
|
||||||
|
'has_string': len([x for x in self.module.kinds.keys() if x[0] == 's']) > 0,
|
||||||
'structs_gen_header': [x for x in self.module.structs if x.attributes is None or 'skipHeader' not in x.attributes],
|
'structs_gen_header': [x for x in self.module.structs if x.attributes is None or 'skipHeader' not in x.attributes],
|
||||||
'structs_gen_serializer': [x for x in self.module.structs if x.attributes is None or 'skipSerdes' not in x.attributes],
|
'structs_gen_serializer': [x for x in self.module.structs if x.attributes is None or 'skipSerdes' not in x.attributes],
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue