00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef dds_visitor_H 00009 #define dds_visitor_H 00010 00011 #include "ast_visitor.h" 00012 #include "be_extern.h" 00013 00014 #include "tao/Basic_Types.h" 00015 #include "tao/Version.h" 00016 00017 #include <set> 00018 #include <string> 00019 00020 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00021 # pragma once 00022 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00023 00024 class AST_Finder; 00025 00026 class dds_visitor : public ast_visitor { 00027 public: 00028 dds_visitor(AST_Decl* scope, bool java_ts_only); 00029 00030 virtual ~dds_visitor(); 00031 00032 virtual int visit_decl(AST_Decl* d); 00033 00034 virtual int visit_scope(UTL_Scope* node); 00035 00036 virtual int visit_type(AST_Type* node); 00037 00038 virtual int visit_predefined_type(AST_PredefinedType* node); 00039 00040 virtual int visit_module(AST_Module* node); 00041 00042 virtual int visit_interface(AST_Interface* node); 00043 00044 virtual int visit_interface_fwd(AST_InterfaceFwd* node); 00045 00046 virtual int visit_valuetype(AST_ValueType* node); 00047 00048 virtual int visit_valuetype_fwd(AST_ValueTypeFwd* node); 00049 00050 virtual int visit_component(AST_Component* node); 00051 00052 virtual int visit_component_fwd(AST_ComponentFwd* node); 00053 00054 virtual int visit_eventtype(AST_EventType* node); 00055 00056 virtual int visit_eventtype_fwd(AST_EventTypeFwd* node); 00057 00058 virtual int visit_home(AST_Home* node); 00059 00060 virtual int visit_factory(AST_Factory* node); 00061 00062 virtual int visit_structure(AST_Structure* node); 00063 00064 virtual int visit_structure_fwd(AST_StructureFwd* node); 00065 00066 virtual int visit_exception(AST_Exception* node); 00067 00068 virtual int visit_expression(AST_Expression* node); 00069 00070 virtual int visit_enum(AST_Enum* node); 00071 00072 virtual int visit_operation(AST_Operation* node); 00073 00074 virtual int visit_field(AST_Field* node); 00075 00076 virtual int visit_argument(AST_Argument* node); 00077 00078 virtual int visit_attribute(AST_Attribute* node); 00079 00080 virtual int visit_union(AST_Union* node); 00081 00082 virtual int visit_union_fwd(AST_UnionFwd* node); 00083 00084 virtual int visit_union_branch(AST_UnionBranch* node); 00085 00086 virtual int visit_union_label(AST_UnionLabel* node); 00087 00088 virtual int visit_constant(AST_Constant* node); 00089 00090 virtual int visit_enum_val(AST_EnumVal* node); 00091 00092 virtual int visit_array(AST_Array* node); 00093 00094 virtual int visit_sequence(AST_Sequence* node); 00095 00096 virtual int visit_string(AST_String* node); 00097 00098 virtual int visit_typedef(AST_Typedef* node); 00099 00100 virtual int visit_root(AST_Root* node); 00101 00102 virtual int visit_native(AST_Native* node); 00103 00104 virtual int visit_valuebox(AST_ValueBox* node); 00105 00106 virtual int visit_template_module (AST_Template_Module* node); 00107 00108 virtual int visit_template_module_inst (AST_Template_Module_Inst* node); 00109 00110 virtual int visit_template_module_ref (AST_Template_Module_Ref* node); 00111 00112 virtual int visit_param_holder(AST_Param_Holder* node); 00113 00114 virtual int visit_porttype(AST_PortType* node); 00115 00116 virtual int visit_provides(AST_Provides* node); 00117 00118 virtual int visit_uses(AST_Uses* node); 00119 00120 virtual int visit_publishes(AST_Publishes* node); 00121 00122 virtual int visit_emits(AST_Emits* node); 00123 00124 virtual int visit_consumes(AST_Consumes* node); 00125 00126 virtual int visit_extended_port(AST_Extended_Port* node); 00127 00128 virtual int visit_mirror_port(AST_Mirror_Port* node); 00129 00130 virtual int visit_connector(AST_Connector* node); 00131 00132 virtual int visit_finder(AST_Finder* node); 00133 00134 protected: 00135 AST_Decl* scope_; 00136 bool error_; 00137 bool java_ts_only_; 00138 }; 00139 00140 #endif /* dds_visitor_H */