composite_generator Class Reference

#include <dds_generator.h>

Inheritance diagram for composite_generator:

Inheritance graph
[legend]
Collaboration diagram for composite_generator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void gen_prologue ()
void gen_epilogue ()
bool gen_const (UTL_ScopedName *name, bool nestedInInteface, AST_Constant *constant)
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_struct_fwd (UTL_ScopedName *name, AST_Type::SIZE_TYPE size)
bool gen_typedef (AST_Typedef *node, UTL_ScopedName *name, AST_Type *base, const char *repoid)
bool gen_interf (AST_Interface *node, UTL_ScopedName *name, bool local, const std::vector< AST_Interface * > &inherits, const std::vector< AST_Interface * > &inherits_flat, const std::vector< AST_Attribute * > &attrs, const std::vector< AST_Operation * > &ops, const char *repoid)
bool gen_interf_fwd (UTL_ScopedName *name)
bool gen_native (AST_Native *node, UTL_ScopedName *name, const char *repoid)
bool gen_union (AST_Union *node, UTL_ScopedName *name, const std::vector< AST_UnionBranch * > &branches, AST_Type *discriminator, const char *repoid)
bool gen_union_fwd (AST_UnionFwd *, UTL_ScopedName *name, AST_Type::SIZE_TYPE size)
template<typename InputIterator>
 composite_generator (InputIterator begin, InputIterator end)
void add_generator (dds_generator *gen)

Private Attributes

std::vector< dds_generator * > components_

Detailed Description

Definition at line 89 of file dds_generator.h.


Constructor & Destructor Documentation

template<typename InputIterator>
composite_generator::composite_generator ( InputIterator  begin,
InputIterator  end 
) [inline]

Definition at line 127 of file dds_generator.h.

00128   : components_(begin, end) {}


Member Function Documentation

void composite_generator::add_generator ( dds_generator gen  )  [inline]

Definition at line 130 of file dds_generator.h.

References components_.

Referenced by dds_visitor::dds_visitor().

00130 { components_.push_back(gen); }

bool composite_generator::gen_const ( UTL_ScopedName *  name,
bool  nestedInInteface,
AST_Constant *  constant 
) [virtual]

Reimplemented from dds_generator.

Definition at line 68 of file dds_generator.cpp.

References components_.

Referenced by dds_visitor::visit_constant().

00070 {
00071   for (vector<dds_generator*>::iterator it(components_.begin());
00072        it != components_.end(); ++it) {
00073     if (!constant->imported() || (*it)->do_included_files())
00074       if (!(*it)->gen_const(name, nestedInInteface, constant))
00075         return false;
00076   }
00077 
00078   return true;
00079 }

bool composite_generator::gen_enum ( AST_Enum *  node,
UTL_ScopedName *  name,
const std::vector< AST_EnumVal * > &  contents,
const char *  repoid 
) [virtual]

Reimplemented from dds_generator.

Definition at line 81 of file dds_generator.cpp.

References components_.

Referenced by dds_visitor::visit_enum().

00083 {
00084   for (vector<dds_generator*>::iterator it(components_.begin());
00085        it != components_.end(); ++it) {
00086     if (!node->imported() || (*it)->do_included_files())
00087       if (!(*it)->gen_enum(node, name, contents, repoid))
00088         return false;
00089   }
00090 
00091   return true;
00092 }

void composite_generator::gen_epilogue (  )  [virtual]

Reimplemented from dds_generator.

Definition at line 60 of file dds_generator.cpp.

References components_.

Referenced by dds_visitor::visit_root().

00061 {
00062   for (vector<dds_generator*>::iterator it(components_.begin());
00063        it != components_.end(); ++it) {
00064     (*it)->gen_epilogue();
00065   }
00066 }

bool composite_generator::gen_interf ( AST_Interface *  node,
UTL_ScopedName *  name,
bool  local,
const std::vector< AST_Interface * > &  inherits,
const std::vector< AST_Interface * > &  inherits_flat,
const std::vector< AST_Attribute * > &  attrs,
const std::vector< AST_Operation * > &  ops,
const char *  repoid 
) [virtual]

Reimplemented from dds_generator.

Definition at line 133 of file dds_generator.cpp.

References components_.

Referenced by dds_visitor::visit_interface().

00138 {
00139   for (vector<dds_generator*>::iterator it(components_.begin());
00140        it != components_.end(); ++it) {
00141     if (!node->imported() || (*it)->do_included_files())
00142       if (!(*it)->gen_interf(node, name, local, inherits, inh_flat,
00143                              attrs, ops, repoid))
00144       return false;
00145   }
00146 
00147   return true;
00148 }

bool composite_generator::gen_interf_fwd ( UTL_ScopedName *  name  )  [virtual]

Reimplemented from dds_generator.

Definition at line 150 of file dds_generator.cpp.

References components_.

Referenced by dds_visitor::visit_interface_fwd().

00151 {
00152   for (vector<dds_generator*>::iterator it(components_.begin());
00153        it != components_.end(); ++it) {
00154     if (!(*it)->gen_interf_fwd(name))
00155       return false;
00156   }
00157 
00158   return true;
00159 }

bool composite_generator::gen_native ( AST_Native *  node,
UTL_ScopedName *  name,
const char *  repoid 
) [virtual]

Reimplemented from dds_generator.

Definition at line 161 of file dds_generator.cpp.

References components_.

Referenced by dds_visitor::visit_native().

00162 {
00163   for (vector<dds_generator*>::iterator it(components_.begin());
00164        it != components_.end(); ++it) {
00165     if (!node->imported() || (*it)->do_included_files())
00166       if (!(*it)->gen_native(node, name, repoid))
00167         return false;
00168   }
00169 
00170   return true;
00171 }

void composite_generator::gen_prologue (  )  [virtual]

Reimplemented from dds_generator.

Definition at line 52 of file dds_generator.cpp.

References components_.

Referenced by dds_visitor::visit_root().

00053 {
00054   for (vector<dds_generator*>::iterator it(components_.begin());
00055        it != components_.end(); ++it) {
00056     (*it)->gen_prologue();
00057   }
00058 }

bool composite_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 94 of file dds_generator.cpp.

References components_.

Referenced by dds_visitor::visit_structure().

00097 {
00098   for (vector<dds_generator*>::iterator it(components_.begin());
00099        it != components_.end(); ++it) {
00100     if (!node->imported() || (*it)->do_included_files())
00101       if (!(*it)->gen_struct(node, name, fields, size, repoid))
00102         return false;
00103   }
00104 
00105   return true;
00106 }

bool composite_generator::gen_struct_fwd ( UTL_ScopedName *  name,
AST_Type::SIZE_TYPE  size 
) [virtual]

Reimplemented from dds_generator.

Definition at line 108 of file dds_generator.cpp.

References components_.

Referenced by dds_visitor::visit_structure_fwd().

00110 {
00111   for (vector<dds_generator*>::iterator it(components_.begin());
00112        it != components_.end(); ++it) {
00113     if (!(*it)->gen_struct_fwd(name, size))
00114       return false;
00115   }
00116 
00117   return true;
00118 }

bool composite_generator::gen_typedef ( AST_Typedef *  node,
UTL_ScopedName *  name,
AST_Type *  base,
const char *  repoid 
) [virtual]

Implements dds_generator.

Definition at line 120 of file dds_generator.cpp.

References components_.

Referenced by dds_visitor::visit_typedef().

00122 {
00123   for (vector<dds_generator*>::iterator it(components_.begin());
00124        it != components_.end(); ++it) {
00125     if (!node->imported() || (*it)->do_included_files())
00126       if (!(*it)->gen_typedef(node, name, base, repoid))
00127         return false;
00128   }
00129 
00130   return true;
00131 }

bool composite_generator::gen_union ( AST_Union *  node,
UTL_ScopedName *  name,
const std::vector< AST_UnionBranch * > &  branches,
AST_Type *  discriminator,
const char *  repoid 
) [virtual]

Implements dds_generator.

Definition at line 173 of file dds_generator.cpp.

References components_.

Referenced by dds_visitor::visit_union().

00178 {
00179   for (vector<dds_generator*>::iterator it(components_.begin());
00180        it != components_.end(); ++it) {
00181     if (!node->imported() || (*it)->do_included_files())
00182       if (!(*it)->gen_union(node, name, branches, discriminator, repoid))
00183         return false;
00184   }
00185 
00186   return true;
00187 }

bool composite_generator::gen_union_fwd ( AST_UnionFwd *  ,
UTL_ScopedName *  name,
AST_Type::SIZE_TYPE  size 
) [virtual]

Reimplemented from dds_generator.

Definition at line 189 of file dds_generator.cpp.

References components_.

Referenced by dds_visitor::visit_union_fwd().

00191 {
00192   for (vector<dds_generator*>::iterator it(components_.begin());
00193        it != components_.end(); ++it) {
00194     if (!(*it)->gen_union_fwd(uf, name, size))
00195       return false;
00196   }
00197 
00198   return true;
00199 }


Member Data Documentation

std::vector<dds_generator*> composite_generator::components_ [private]

Definition at line 133 of file dds_generator.h.

Referenced by add_generator(), gen_const(), gen_enum(), gen_epilogue(), gen_interf(), gen_interf_fwd(), gen_native(), gen_prologue(), gen_struct(), gen_struct_fwd(), gen_typedef(), gen_union(), and gen_union_fwd().


The documentation for this class was generated from the following files:
Generated on Fri Feb 12 20:05:55 2016 for OpenDDS by  doxygen 1.4.7