OpenDDS
Snapshot(2023/04/07-19:43)
|
#include <marshal_generator.h>
Public Member Functions | |
bool | gen_enum (AST_Enum *node, UTL_ScopedName *name, const std::vector< AST_EnumVal *> &contents, const char *repoid) |
bool | gen_struct (AST_Structure *node, UTL_ScopedName *name, const std::vector< AST_Field *> &fields, AST_Type::SIZE_TYPE size, const char *repoid) |
bool | gen_typedef (AST_Typedef *node, UTL_ScopedName *name, AST_Type *base, const char *repoid) |
bool | gen_union (AST_Union *node, UTL_ScopedName *name, const std::vector< AST_UnionBranch *> &branches, AST_Type *discriminator, const char *repoid) |
![]() | |
virtual | ~dds_generator ()=0 |
virtual bool | do_included_files () const |
virtual void | gen_prologue () |
virtual void | gen_epilogue () |
virtual bool | gen_const (UTL_ScopedName *, bool, AST_Constant *) |
virtual bool | gen_struct_fwd (UTL_ScopedName *, AST_Type::SIZE_TYPE) |
virtual bool | gen_interf (AST_Interface *, UTL_ScopedName *, bool, const std::vector< AST_Interface *> &, const std::vector< AST_Interface *> &, const std::vector< AST_Attribute *> &, const std::vector< AST_Operation *> &, const char *) |
virtual bool | gen_interf_fwd (UTL_ScopedName *) |
virtual bool | gen_native (AST_Native *, UTL_ScopedName *, const char *) |
virtual bool | gen_union_fwd (AST_UnionFwd *, UTL_ScopedName *, AST_Type::SIZE_TYPE) |
Static Public Member Functions | |
static void | generate_dheader_code (const std::string &code, bool dheader_required, bool is_ser_func=true) |
static void | gen_field_getValueFromSerialized (AST_Structure *node, const std::string &clazz) |
![]() | |
static std::string | get_tag_name (const std::string &base_name, bool nested_key_only=false) |
static std::string | get_xtag_name (UTL_ScopedName *name) |
static bool | cxx_escaped (const std::string &s) |
static std::string | valid_var_name (const std::string &str) |
static std::string | to_string (Identifier *id, EscapeContext ec=EscapeContext_Normal) |
static std::string | scoped_helper (UTL_ScopedName *sn, const char *sep, EscapeContext cxt=EscapeContext_Normal) |
static std::string | module_scope_helper (UTL_ScopedName *sn, const char *sep, EscapeContext cxt=EscapeContext_Normal) |
Private Member Functions | |
void | gen_union_default (AST_UnionBranch *branch, const std::string &varname) |
Definition at line 13 of file marshal_generator.h.
|
virtual |
Reimplemented from dds_generator.
Definition at line 164 of file marshal_generator.cpp.
References ACE_ASSERT, Function::addArg(), OpenDDS::DCPS::align(), OpenDDS::DCPS::Encoding::align(), OpenDDS::DCPS::array_count(), array_element_count(), be_global, Fields::begin(), bounded_arg(), canonical_name(), AstTypeClassification::CL_ARRAY, AstTypeClassification::CL_BOUNDED, AstTypeClassification::CL_ENUM, AstTypeClassification::CL_INTERFACE, AstTypeClassification::CL_PRIMITIVE, AstTypeClassification::CL_SEQUENCE, AstTypeClassification::CL_STRING, AstTypeClassification::CL_STRUCTURE, AstTypeClassification::CL_UNION, AstTypeClassification::CL_UNKNOWN, AstTypeClassification::CL_WIDE, AstTypeClassification::classify(), OpenDDS::STUN::encoding(), Fields::end(), Function::endArgs(), extensibilitykind_final, extensibilitykind_mutable, generate_dheader_code(), dds_generator::get_tag_name(), getWrapper(), NestedForLoops::index_, Intro::join(), be_util::misc_error_and_abort(), name, OpenDDS::DCPS::ref(), AstTypeClassification::resolveActualType(), scoped(), OpenDDS::DCPS::serialized_size(), OpenDDS::DCPS::set_default(), struct_has_explicit_keys(), tryconstructfailaction_trim, tryconstructfailaction_use_default, FieldInfo::type_, type_to_default(), dds_generator::valid_var_name(), value, WD_INPUT, and WD_OUTPUT.
|
static |
Definition at line 3328 of file marshal_generator.cpp.
References Function::addArg(), be_global, Fields::begin(), canonical_name(), AstTypeClassification::CL_ARRAY, AstTypeClassification::CL_ENUM, AstTypeClassification::CL_SCALAR, AstTypeClassification::CL_SEQUENCE, AstTypeClassification::CL_STRING, AstTypeClassification::CL_STRUCTURE, AstTypeClassification::classify(), Fields::end(), Function::endArgs(), extensibilitykind_final, extensibilitykind_mutable, FieldFilter_KeyOnly, FieldFilter_NestedKeyOnly, generate_dheader_code(), generateSwitchBody(), generateSwitchForUnion(), dds_generator::get_tag_name(), getWrapper(), OPENDDS_IDL_STR, FieldInfo::ptr_, AstTypeClassification::resolveActualType(), scoped(), dds_generator::scoped_helper(), OpenDDS::DCPS::serialized_size(), to_cxx_type(), OpenDDS::DCPS::to_dds_string(), WD_INPUT, and WD_OUTPUT.
Referenced by metaclass_generator::gen_enum().
|
virtual |
Implements dds_generator.
Definition at line 3168 of file marshal_generator.cpp.
References ACE_TEXT_ALWAYS_CHAR, Function::addArg(), FieldInfo::arr_, be_global, OpenDDS::STUN::encoding(), Function::endArgs(), FieldFilter_All, FieldFilter_KeyOnly, FieldFilter_NestedKeyOnly, FieldInfo::is_new(), Intro::join(), scoped(), FieldInfo::seq_, OpenDDS::DCPS::serialized_size(), OpenDDS::DCPS::set_default(), and type_to_default().
|
virtual |
Implements dds_generator.
Definition at line 1876 of file marshal_generator.cpp.
References ACE_TEXT_ALWAYS_CHAR, Function::addArg(), FieldInfo::anonymous(), be_global, TopicKeys::begin(), Fields::begin(), bounded_arg(), ACE_String_Base< char >::c_str(), AstTypeClassification::CL_BOUNDED, AstTypeClassification::CL_ENUM, AstTypeClassification::CL_PRIMITIVE, AstTypeClassification::CL_SEQUENCE, AstTypeClassification::CL_STRING, AstTypeClassification::CL_UNKNOWN, AstTypeClassification::CL_WIDE, AstTypeClassification::classify(), TopicKeys::count(), OpenDDS::STUN::encoding(), TopicKeys::end(), Fields::end(), Function::endArgs(), extensibilitykind_appendable, extensibilitykind_final, extensibilitykind_mutable, FieldFilter_All, FieldFilter_KeyOnly, FieldFilter_NestedKeyOnly, generate_dheader_code(), get_struct_field(), getWrapper(), insert_cxx11_accessor_parens(), TopicKeys::InvalidType, OpenDDS::XTypes::is_key(), Intro::join(), name, FieldInfo::name_, TopicKeys::Iterator::path(), AstTypeClassification::resolveActualType(), TopicKeys::root_type(), scoped(), FieldInfo::scoped_type_, OpenDDS::DCPS::serialized_size(), tryconstructfailaction_trim, tryconstructfailaction_use_default, FieldInfo::type_, type_to_default(), OpenDDS::DataRepresentation::unaligned, TopicKeys::UnionType, WD_INPUT, WD_OUTPUT, OpenDDS::DataRepresentation::xcdr1, OpenDDS::DataRepresentation::xcdr2, and OpenDDS::DataRepresentation::xml.
|
virtual |
Implements dds_generator.
Definition at line 3859 of file marshal_generator.cpp.
References Function::addArg(), OpenDDS::DCPS::array_count(), be_global, AstTypeClassification::CL_ENUM, AstTypeClassification::classify(), Function::endArgs(), extensibilitykind_final, extensibilitykind_mutable, FieldFilter_KeyOnly, FieldFilter_NestedKeyOnly, generate_dheader_code(), generateSwitchForUnion(), getWrapper(), OPENDDS_HAS_EXPLICIT_INTS, AstTypeClassification::resolveActualType(), scoped(), OpenDDS::DCPS::serialized_size(), OpenDDS::DCPS::set_default(), tryconstructfailaction_use_default, type_to_default(), WD_INPUT, and WD_OUTPUT.
|
private |
Definition at line 4105 of file marshal_generator.cpp.
References be_global, AstTypeClassification::CL_ARRAY, AstTypeClassification::CL_SEQUENCE, AstTypeClassification::CL_STRUCTURE, AstTypeClassification::CL_UNION, AstTypeClassification::classify(), getWrapper(), AstTypeClassification::resolveActualType(), scoped(), type_to_default(), and WD_INPUT.
|
static |
Definition at line 3154 of file marshal_generator.cpp.
References be_global.
Referenced by gen_enum(), gen_field_getValueFromSerialized(), metaclass_generator::gen_struct(), gen_typedef(), metaclass_generator::gen_typedef(), gen_union(), and metaclass_generator::gen_union().