langmap_generator.h

Go to the documentation of this file.
00001 /*
00002  * Distributed under the OpenDDS License.
00003  * See: http://www.opendds.org/license.html
00004  */
00005 
00006 #ifndef langmap_generator_H
00007 #define langmap_generator_H
00008 
00009 #include "dds_generator.h"
00010 
00011 class GeneratorBase;
00012 
00013 /// Generate code for the IDL -> Programming Language mapping
00014 /// For example, IDL structs -> C++ structs, etc.
00015 /// Enabled by the -L* command line options
00016 class langmap_generator : public dds_generator {
00017 
00018 public:
00019   langmap_generator() : generator_(0) {}
00020   void init();
00021 
00022 private:
00023   bool gen_const(UTL_ScopedName* name, bool nestedInInteface,
00024                  AST_Constant* constant);
00025 
00026   bool gen_enum(AST_Enum*, UTL_ScopedName* name,
00027                 const std::vector<AST_EnumVal*>& contents, const char* repoid);
00028 
00029   bool gen_struct(AST_Structure*, UTL_ScopedName* name,
00030                   const std::vector<AST_Field*>& fields,
00031                   AST_Type::SIZE_TYPE size, const char* repoid);
00032 
00033   bool gen_struct_fwd(UTL_ScopedName* name,
00034                       AST_Type::SIZE_TYPE size);
00035 
00036   bool gen_typedef(AST_Typedef*, UTL_ScopedName* name, AST_Type* type, const char* repoid);
00037 
00038   bool gen_union(AST_Union*, UTL_ScopedName* name,
00039                  const std::vector<AST_UnionBranch*>& branches,
00040                  AST_Type* discriminator,
00041                  const char* repoid);
00042 
00043   bool gen_union_fwd(AST_UnionFwd*, UTL_ScopedName* name,
00044                      AST_Type::SIZE_TYPE size);
00045 
00046   bool gen_interf_fwd(UTL_ScopedName* name);
00047 
00048   GeneratorBase* generator_;
00049 };
00050 
00051 #endif

Generated on Fri Feb 12 20:05:23 2016 for OpenDDS by  doxygen 1.4.7