dds_visitor.cpp File Reference

#include "ast_argument.h"
#include "ast_attribute.h"
#include "ast_component_fwd.h"
#include "ast_enum.h"
#include "ast_enum_val.h"
#include "ast_eventtype.h"
#include "ast_eventtype_fwd.h"
#include "ast_exception.h"
#include "ast_factory.h"
#include "ast_home.h"
#include "ast_interface.h"
#include "ast_module.h"
#include "ast_native.h"
#include "ast_operation.h"
#include "ast_predefined_type.h"
#include "ast_root.h"
#include "ast_sequence.h"
#include "ast_structure.h"
#include "ast_union.h"
#include "ast_valuetype.h"
#include "ast_valuetype_fwd.h"
#include "utl_identifier.h"
#include "utl_string.h"
#include "utl_exceptlist.h"
#include "utl_err.h"
#include "nr_extern.h"
#include "dds_visitor.h"
#include "metaclass_generator.h"
#include "ts_generator.h"
#include "marshal_generator.h"
#include "keys_generator.h"
#include "wireshark_generator.h"
#include "itl_generator.h"
#include "v8_generator.h"
#include "langmap_generator.h"
#include <iostream>
#include <vector>
#include <fstream>

Include dependency graph for dds_visitor.cpp:

Go to the source code of this file.

Functions

composite_generator gen_target_ (&generators_[0],&generators_[N_MAP])
template<typename T>
void scope2vector (vector< T * > &v, UTL_Scope *s, AST_Decl::NodeType nt)
bool field_check_anon (AST_Field *f, const char *ct, const char *cn)

Variables

marshal_generator mar_gen_
keys_generator key_gen_
ts_generator ts_gen_
metaclass_generator mc_gen_
wireshark_generator ws_gen_
itl_generator itl_gen_
v8_generator v8_gen_
langmap_generator lm_gen_
dds_generatorgenerators_ [] = {&mar_gen_, &key_gen_, &ts_gen_, &mc_gen_, &ws_gen_, &itl_gen_}
const size_t N_MAP = sizeof(generators_) / sizeof(generators_[0])


Function Documentation

bool @85::field_check_anon ( AST_Field *  f,
const char *  ct,
const char *  cn 
) [static]

Definition at line 81 of file dds_visitor.cpp.

Referenced by dds_visitor::visit_structure(), and dds_visitor::visit_union().

00082   {
00083     AST_Decl::NodeType nt = f->field_type()->node_type();
00084     if (nt == AST_Decl::NT_array || nt == AST_Decl::NT_sequence) {
00085       std::cerr << "ERROR: field " << f->local_name()->get_string()
00086                 << " in " << ct << " " << cn << " has an anonymous type.\n";
00087       return false;
00088     }
00089     return true;
00090   }

composite_generator @85::gen_target_ ( generators_[0],
generators_[N_MAP] 
) [static]

Referenced by dds_visitor::dds_visitor(), dds_visitor::visit_constant(), dds_visitor::visit_enum(), dds_visitor::visit_interface(), dds_visitor::visit_interface_fwd(), dds_visitor::visit_native(), dds_visitor::visit_root(), dds_visitor::visit_structure(), dds_visitor::visit_structure_fwd(), dds_visitor::visit_typedef(), dds_visitor::visit_union(), and dds_visitor::visit_union_fwd().

template<typename T>
void @85::scope2vector ( vector< T * > &  v,
UTL_Scope *  s,
AST_Decl::NodeType  nt 
) [static]

Definition at line 68 of file dds_visitor.cpp.

Referenced by dds_visitor::visit_enum(), and dds_visitor::visit_interface().

00069   {
00070     UTL_ScopeActiveIterator it(s, UTL_Scope::IK_decls);
00071 
00072     for (; !it.is_done(); it.next()) {
00073       AST_Decl* item = it.item();
00074 
00075       if (item->node_type() == nt) {
00076         v.push_back(T::narrow_from_decl(item));
00077       }
00078     }
00079   }


Variable Documentation

dds_generator* generators_[] = {&mar_gen_, &key_gen_, &ts_gen_, &mc_gen_, &ws_gen_, &itl_gen_} [static]

Definition at line 62 of file dds_visitor.cpp.

itl_generator itl_gen_ [static]

Definition at line 58 of file dds_visitor.cpp.

keys_generator key_gen_ [static]

Definition at line 54 of file dds_visitor.cpp.

langmap_generator lm_gen_ [static]

Definition at line 60 of file dds_visitor.cpp.

Referenced by dds_visitor::dds_visitor().

marshal_generator mar_gen_ [static]

Definition at line 53 of file dds_visitor.cpp.

metaclass_generator mc_gen_ [static]

Definition at line 56 of file dds_visitor.cpp.

const size_t N_MAP = sizeof(generators_) / sizeof(generators_[0]) [static]

Definition at line 63 of file dds_visitor.cpp.

ts_generator ts_gen_ [static]

Definition at line 55 of file dds_visitor.cpp.

v8_generator v8_gen_ [static]

Definition at line 59 of file dds_visitor.cpp.

Referenced by dds_visitor::dds_visitor().

wireshark_generator ws_gen_ [static]

Definition at line 57 of file dds_visitor.cpp.


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