OpenDDS
Snapshot(2023/04/28-20:55)
|
#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, const std::string &qualifier="") |
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 155 of file marshal_generator.cpp.
References Function::addArg(), OpenDDS::DCPS::align(), OpenDDS::DCPS::Encoding::align(), 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, RefWrapper::classic_array_copy(), RefWrapper::classic_array_copy_, AstTypeClassification::classify(), deepest_named_type(), RefWrapper::done(), OpenDDS::STUN::encoding(), Fields::end(), Function::endArgs(), extensibilitykind_final, extensibilitykind_mutable, generate_dheader_code(), RefWrapper::generate_tag(), getWrapper(), NestedForLoops::index_, RefWrapper::is_const_, Intro::join(), be_util::misc_error_and_abort(), name, needs_nested_key_only(), RefWrapper::nested_key_only_, RefWrapper::ref(), AstTypeClassification::resolveActualType(), scoped(), RefWrapper::seq_check_empty(), RefWrapper::seq_get_buffer(), RefWrapper::seq_get_length(), RefWrapper::seq_resize(), OpenDDS::DCPS::serialized_size(), OpenDDS::DCPS::set_default(), tryconstructfailaction_trim, tryconstructfailaction_use_default, FieldInfo::type_, RefWrapper::type_name_, type_to_default(), RefWrapper::typedef_node_, value, RefWrapper::value_access(), WD_INPUT, WD_OUTPUT, and RefWrapper::wrapped_type_name().
|
static |
Definition at line 2982 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(), deepest_named_type(), Fields::end(), Function::endArgs(), extensibilitykind_final, extensibilitykind_mutable, field_type_name(), FieldFilter_KeyOnly, FieldFilter_NestedKeyOnly, generate_dheader_code(), generateSwitchBody(), generateSwitchForUnion(), dds_generator::get_tag_name(), getWrapper(), name, 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 2822 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 1557 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(), RefWrapper::done(), OpenDDS::STUN::encoding(), TopicKeys::end(), Fields::end(), Function::endArgs(), extensibilitykind_appendable, extensibilitykind_final, extensibilitykind_mutable, field_type_name(), FieldFilter_All, FieldFilter_KeyOnly, FieldFilter_NestedKeyOnly, generate_dheader_code(), get_struct_field(), getWrapper(), insert_cxx11_accessor_parens(), TopicKeys::InvalidType, Intro::join(), name, FieldInfo::name_, RefWrapper::nested_key_only_, TopicKeys::Iterator::path(), RefWrapper::ref(), AstTypeClassification::resolveActualType(), TopicKeys::root_type(), scoped(), FieldInfo::scoped_type_, OpenDDS::DCPS::serialized_size(), RefWrapper::stream(), 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 3493 of file marshal_generator.cpp.
References Function::addArg(), FieldInfo::arr_, be_global, AstTypeClassification::CL_ENUM, AstTypeClassification::classify(), Function::endArgs(), extensibilitykind_final, extensibilitykind_mutable, FieldFilter_KeyOnly, FieldFilter_NestedKeyOnly, generate_dheader_code(), generateSwitchForUnion(), getWrapper(), FieldInfo::is_new(), OPENDDS_HAS_EXPLICIT_INTS, AstTypeClassification::resolveActualType(), scoped(), FieldInfo::seq_, OpenDDS::DCPS::serialized_size(), OpenDDS::DCPS::set_default(), tryconstructfailaction_use_default, type_to_default(), WD_INPUT, and WD_OUTPUT.
|
private |
Definition at line 3751 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 2808 of file marshal_generator.cpp.
References be_global.
Referenced by gen_enum(), gen_field_getValueFromSerialized(), gen_typedef(), metaclass_generator::gen_typedef(), gen_union(), metaclass_generator::gen_union(), and generate_anon_fields().