#include <value_writer_generator.h>
 | 
| bool  | gen_enum (AST_Enum *, UTL_ScopedName *name, const std::vector< AST_EnumVal *> &contents, const char *repoid) | 
|   | 
| bool  | gen_typedef (AST_Typedef *, UTL_ScopedName *, AST_Type *, const char *) | 
|   | 
| 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_union (AST_Union *, UTL_ScopedName *, const std::vector< AST_UnionBranch *> &, AST_Type *, const char *) | 
|   | 
| 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) | 
|   | 
Definition at line 14 of file value_writer_generator.h.
 
◆ gen_enum()
  
  
      
        
          | bool value_writer_generator::gen_enum  | 
          ( | 
          AST_Enum *  | 
          ,  | 
         
        
           | 
           | 
          UTL_ScopedName *  | 
          name,  | 
         
        
           | 
           | 
          const std::vector< AST_EnumVal *> &  | 
          contents,  | 
         
        
           | 
           | 
          const char *  | 
          repoid  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
virtual   | 
  
 
Reimplemented from dds_generator.
Definition at line 201 of file value_writer_generator.cpp.
References Function::addArg(), be_global, canonical_name(), Function::endArgs(), module_scope(), scoped(), and write().
  206   be_global->add_include(
"dds/DCPS/ValueWriter.h", BE_GlobalData::STREAM_H);
   209   const bool use_cxx11 = 
be_global->language_mapping() == BE_GlobalData::LANGMAP_CXX11;
   215     write.addArg(
"value_writer", 
"OpenDDS::DCPS::ValueWriter&");
   216     write.addArg(
"value", 
"const " + type_name + 
"&");
   220       "  switch (value) {\n";
   221     for (std::vector<AST_EnumVal*>::const_iterator pos = contents.begin(), limit = contents.end();
   222          pos != limit; ++pos) {
   223       AST_EnumVal* 
const val = *pos;
   224       const std::string value_name = (use_cxx11 ? (type_name + 
"::") : 
module_scope(
name))
   225         + val->local_name()->get_string();
   227         "  case " << value_name << 
":\n"   228         "    value_writer.write_enum(\"" << 
canonical_name(val) << 
"\", " << value_name << 
");\n" std::string module_scope(UTL_ScopedName *sn)
 
std::string canonical_name(UTL_ScopedName *sn)
 
std::string scoped(UTL_ScopedName *sn, EscapeContext ec=EscapeContext_Normal)
 
BE_GlobalData * be_global
 
::DDS::ReturnCode_t write(in<%SCOPED%> instance_data, in ::DDS::InstanceHandle_t handle)
 
 
 
 
◆ gen_struct()
  
  
      
        
          | bool value_writer_generator::gen_struct  | 
          ( | 
          AST_Structure *  | 
          node,  | 
         
        
           | 
           | 
          UTL_ScopedName *  | 
          name,  | 
         
        
           | 
           | 
          const std::vector< AST_Field *> &  | 
          fields,  | 
         
        
           | 
           | 
          AST_Type::SIZE_TYPE  | 
          size,  | 
         
        
           | 
           | 
          const char *  | 
          repoid  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
virtual   | 
  
 
Implements dds_generator.
Definition at line 245 of file value_writer_generator.cpp.
References Function::addArg(), be_global, canonical_name(), Function::endArgs(), scoped(), and write().
  251   be_global->add_include(
"dds/DCPS/ValueWriter.h", BE_GlobalData::STREAM_H);
   254   const bool use_cxx11 = 
be_global->language_mapping() == BE_GlobalData::LANGMAP_CXX11;
   255   const std::string accessor_suffix = use_cxx11 ? 
"()" : 
"";
   261     write.addArg(
"value_writer", 
"OpenDDS::DCPS::ValueWriter&");
   262     write.addArg(
"value", 
"const " + type_name + 
"&");
   266       "  value_writer.begin_struct();\n";
   267     for (std::vector<AST_Field*>::const_iterator pos = fields.begin(), limit = fields.end();
   268          pos != limit; ++pos) {
   269       AST_Field* 
const field = *pos;
   270       const std::string field_name = field->local_name()->get_string();
   273         "  value_writer.begin_struct_member(XTypes::MemberDescriptorImpl(\"" << idl_name << 
"\", "   274         << (
be_global->is_key(field) ? 
"true" : 
"false") <<  
"));\n";
   275       generate_write(
"value." + field_name + accessor_suffix, field->field_type(), 
"i");
   277         "  value_writer.end_struct_member();\n";
   280       "  value_writer.end_struct();\n";
 
std::string canonical_name(UTL_ScopedName *sn)
 
std::string scoped(UTL_ScopedName *sn, EscapeContext ec=EscapeContext_Normal)
 
BE_GlobalData * be_global
 
::DDS::ReturnCode_t write(in<%SCOPED%> instance_data, in ::DDS::InstanceHandle_t handle)
 
 
 
 
◆ gen_typedef()
  
  
      
        
          | bool value_writer_generator::gen_typedef  | 
          ( | 
          AST_Typedef *  | 
          ,  | 
         
        
           | 
           | 
          UTL_ScopedName *  | 
          ,  | 
         
        
           | 
           | 
          AST_Type *  | 
          ,  | 
         
        
           | 
           | 
          const char *  | 
            | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
virtual   | 
  
 
 
◆ gen_union()
  
  
      
        
          | bool value_writer_generator::gen_union  | 
          ( | 
          AST_Union *  | 
          u,  | 
         
        
           | 
           | 
          UTL_ScopedName *  | 
          name,  | 
         
        
           | 
           | 
          const std::vector< AST_UnionBranch *> &  | 
          branches,  | 
         
        
           | 
           | 
          AST_Type *  | 
          discriminator,  | 
         
        
           | 
           | 
          const char *  | 
            | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
virtual   | 
  
 
Implements dds_generator.
Definition at line 287 of file value_writer_generator.cpp.
References Function::addArg(), be_global, Function::endArgs(), generateSwitchForUnion(), scoped(), and write().
  293   be_global->add_include(
"dds/DCPS/ValueWriter.h", BE_GlobalData::STREAM_H);
   301     write.addArg(
"value_writer", 
"OpenDDS::DCPS::ValueWriter&");
   302     write.addArg(
"value", 
"const " + type_name + 
"&");
   306       "  value_writer.begin_union();\n"   307       "  value_writer.begin_discriminator();\n";
   308     generate_write(
"value._d()" , discriminator, 
"i");
   310       "  value_writer.end_discriminator();\n";
   313                            discriminator, 
"", 
"", type_name.c_str(),
   316       "  value_writer.end_union();\n";
 
std::string scoped(UTL_ScopedName *sn, EscapeContext ec=EscapeContext_Normal)
 
bool generateSwitchForUnion(AST_Union *u, const char *switchExpr, CommonFn commonFn, const std::vector< AST_UnionBranch *> &branches, AST_Type *discriminator, const char *statementPrefix, const char *namePrefix="", const char *uni="", bool forceDisableDefault=false, bool parens=true, bool breaks=true, CommonFn commonFn2=0)
returns true if a default: branch was generated (no default: label in IDL) 
 
BE_GlobalData * be_global
 
::DDS::ReturnCode_t write(in<%SCOPED%> instance_data, in ::DDS::InstanceHandle_t handle)
 
 
 
 
The documentation for this class was generated from the following files: