OpenDDS  Snapshot(2023/04/28-20:55)
itl_generator.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*
3  *
4  *
5  * Distributed under the OpenDDS License.
6  * See: http://www.opendds.org/license.html
7  */
8 
9 #ifndef itl_generator_H
10 #define itl_generator_H
11 
12 #include "dds_generator.h"
13 
14 class itl_generator : public dds_generator {
15 public:
17  : level_(0)
18  , count_(0)
19  {}
20 
21  bool do_included_files() const { return true; }
22 
23  void gen_prologue();
24  void gen_epilogue();
25 
26  bool gen_enum(AST_Enum*, UTL_ScopedName* name,
27  const std::vector<AST_EnumVal*>& contents, const char* repoid);
28 
29  bool gen_struct(AST_Structure* node, UTL_ScopedName* name,
30  const std::vector<AST_Field*>& fields,
31  AST_Type::SIZE_TYPE size, const char* repoid);
32 
33  bool gen_typedef(AST_Typedef*, UTL_ScopedName*, AST_Type*, const char*);
34 
35  bool gen_union(AST_Union*, UTL_ScopedName*, const std::vector<AST_UnionBranch*>&,
36  AST_Type*, const char*);
37 
38  struct Open {
40 
42  : generator(g)
43  { }
44  };
45 
46  struct Close {
48 
50  : generator(g)
51  { }
52  };
53 
54  struct Indent {
56 
58  : generator(g)
59  { }
60  };
61 
62  int level_;
63 
64 private:
65  size_t count_;
66 
67  void new_type();
68 };
69 
70 #endif
itl_generator * generator
Definition: itl_generator.h:47
Open(itl_generator *g)
Definition: itl_generator.h:41
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)
Close(itl_generator *g)
Definition: itl_generator.h:49
bool gen_enum(AST_Enum *, UTL_ScopedName *name, const std::vector< AST_EnumVal *> &contents, const char *repoid)
const char *const name
Definition: debug.cpp:60
itl_generator * generator
Definition: itl_generator.h:55
bool do_included_files() const
Definition: itl_generator.h:21
itl_generator * generator
Definition: itl_generator.h:39
bool gen_union(AST_Union *, UTL_ScopedName *, const std::vector< AST_UnionBranch *> &, AST_Type *, const char *)
Indent(itl_generator *g)
Definition: itl_generator.h:57