itl_generator.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /*
00003  *
00004  *
00005  * Distributed under the OpenDDS License.
00006  * See: http://www.opendds.org/license.html
00007  */
00008 
00009 #ifndef itl_generator_H
00010 #define itl_generator_H
00011 
00012 #include "dds_generator.h"
00013 
00014 class itl_generator : public dds_generator {
00015 public:
00016   itl_generator()
00017     : level_(0)
00018     , count_(0)
00019   {}
00020 
00021   bool do_included_files() const { return true; }
00022 
00023   void gen_prologue();
00024   void gen_epilogue();
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_typedef(AST_Typedef*, UTL_ScopedName*, AST_Type*, const char*);
00034 
00035   bool gen_union(AST_Union*, UTL_ScopedName*, const std::vector<AST_UnionBranch*>&,
00036                  AST_Type*, const char*);
00037 
00038   struct Open {
00039     itl_generator* generator;
00040 
00041     Open (itl_generator* g)
00042       : generator(g)
00043     { }
00044   };
00045 
00046   struct Close {
00047     itl_generator* generator;
00048 
00049     Close (itl_generator* g)
00050       : generator(g)
00051     { }
00052   };
00053 
00054   struct Indent {
00055     itl_generator* generator;
00056 
00057     Indent (itl_generator* g)
00058       : generator(g)
00059     { }
00060   };
00061 
00062   int level_;
00063 
00064 private:
00065   size_t count_;
00066 
00067   void new_type();
00068 };
00069 
00070 #endif

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