diff options
author | Klement Sekera <ksekera@cisco.com> | 2018-05-03 14:27:42 +0200 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2018-05-04 07:22:12 +0000 |
commit | 8b6b5ab7dba7cb5fe738c887e27c65bee6a2f600 (patch) | |
tree | fd01e7c690d260eda1794b145c4cfb15384dd757 /src/vpp-api/vapi/vapi_cpp_gen.py | |
parent | dbc38ee7e53ca9bf7e6912a950a802c2db87f47d (diff) |
VAPI: support VLAs in type definitions
Change-Id: I8d54415972d6644190857175b0e895c5319ce7b6
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vpp-api/vapi/vapi_cpp_gen.py')
-rwxr-xr-x | src/vpp-api/vapi/vapi_cpp_gen.py | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/vpp-api/vapi/vapi_cpp_gen.py b/src/vpp-api/vapi/vapi_cpp_gen.py index 3010f3e1919..e83e151a879 100755 --- a/src/vpp-api/vapi/vapi_cpp_gen.py +++ b/src/vpp-api/vapi/vapi_cpp_gen.py @@ -10,38 +10,22 @@ from vapi_json_parser import JsonParser class CppField(CField): - def __init__( - self, - field_name, - field_type, - array_len=None, - nelem_field=None): - super(CppField, self).__init__( - field_name, field_type, array_len, nelem_field) + pass class CppStruct(CStruct): - def __init__(self, name, fields): - super(CppStruct, self).__init__(name, fields) + pass class CppSimpleType (CSimpleType): - def __init__(self, name): - super(CppSimpleType, self).__init__(name) + pass class CppStructType (CStructType, CppStruct): - def __init__(self, definition, typedict, field_class): - super(CppStructType, self).__init__(definition, typedict, field_class) + pass class CppMessage (CMessage): - def __init__(self, logger, definition, typedict, - struct_type_class, simple_type_class, field_class): - super(CppMessage, self).__init__( - logger, definition, typedict, struct_type_class, - simple_type_class, field_class) - def get_swap_to_be_template_instantiation(self): return "\n".join([ "template <> inline void vapi_swap_to_be<%s>(%s *msg)" % |