00001 /* -*- c++ -*- */ 00002 // $Id: ifr_visitor.cpp 88831 2010-02-04 09:25:13Z johnnyw $ 00003 00004 #include "ifr_visitor.h" 00005 #include "ace/Lock_Adapter_T.h" 00006 #include "ace/Synch_Traits.h" 00007 #include "ace/Null_Mutex.h" 00008 00009 ifr_visitor::ifr_visitor (void) 00010 : lock_ (0) 00011 { 00012 // Create the appropriate lock. 00013 if (be_global->enable_locking ()) 00014 { 00015 ACE_NEW (this->lock_, 00016 ACE_Lock_Adapter<TAO_SYNCH_MUTEX> ()); 00017 } 00018 else 00019 { 00020 ACE_NEW (this->lock_, 00021 ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX> ()); 00022 } 00023 } 00024 00025 ifr_visitor::~ifr_visitor (void) 00026 { 00027 delete this->lock_; 00028 } 00029 00030 // All the visit methods. Each concrete ifr visitors will 00031 // override some subset of these. 00032 00033 int 00034 ifr_visitor::visit_decl (AST_Decl *) 00035 { 00036 return 0; 00037 } 00038 00039 int 00040 ifr_visitor::visit_scope (UTL_Scope *) 00041 { 00042 return 0; 00043 } 00044 00045 int 00046 ifr_visitor::visit_type (AST_Type *) 00047 { 00048 return 0; 00049 } 00050 00051 int 00052 ifr_visitor::visit_predefined_type (AST_PredefinedType *) 00053 { 00054 return 0; 00055 } 00056 00057 int 00058 ifr_visitor::visit_module (AST_Module *) 00059 { 00060 return 0; 00061 } 00062 00063 int 00064 ifr_visitor::visit_interface (AST_Interface *) 00065 { 00066 return 0; 00067 } 00068 00069 int 00070 ifr_visitor::visit_interface_fwd (AST_InterfaceFwd *) 00071 { 00072 return 0; 00073 } 00074 00075 int 00076 ifr_visitor::visit_valuebox (AST_ValueBox *) 00077 { 00078 return 0; 00079 } 00080 00081 int 00082 ifr_visitor::visit_valuetype (AST_ValueType *) 00083 { 00084 return 0; 00085 } 00086 00087 int 00088 ifr_visitor::visit_valuetype_fwd (AST_ValueTypeFwd *) 00089 { 00090 return 0; 00091 } 00092 00093 int 00094 ifr_visitor::visit_component (AST_Component *) 00095 { 00096 return 0; 00097 } 00098 00099 int 00100 ifr_visitor::visit_component_fwd (AST_ComponentFwd *) 00101 { 00102 return 0; 00103 } 00104 00105 int 00106 ifr_visitor::visit_template_module (AST_Template_Module *) 00107 { 00108 return 0; 00109 } 00110 00111 int 00112 ifr_visitor::visit_template_module_inst (AST_Template_Module_Inst *) 00113 { 00114 return 0; 00115 } 00116 00117 int 00118 ifr_visitor::visit_template_module_ref (AST_Template_Module_Ref *) 00119 { 00120 return 0; 00121 } 00122 00123 int 00124 ifr_visitor::visit_param_holder(AST_Param_Holder *) 00125 { 00126 return 0; 00127 } 00128 00129 00130 int ifr_visitor::visit_porttype (AST_PortType *) 00131 { 00132 return 0; 00133 } 00134 00135 int 00136 ifr_visitor::visit_provides (AST_Provides *) 00137 { 00138 return 0; 00139 } 00140 00141 int 00142 ifr_visitor::visit_uses (AST_Uses *) 00143 { 00144 return 0; 00145 } 00146 00147 int 00148 ifr_visitor::visit_publishes (AST_Publishes *) 00149 { 00150 return 0; 00151 } 00152 00153 int 00154 ifr_visitor::visit_emits (AST_Emits *) 00155 { 00156 return 0; 00157 } 00158 00159 int 00160 ifr_visitor::visit_consumes (AST_Consumes *) 00161 { 00162 return 0; 00163 } 00164 00165 int 00166 ifr_visitor::visit_extended_port (AST_Extended_Port *) 00167 { 00168 return 0; 00169 } 00170 00171 int 00172 ifr_visitor::visit_mirror_port (AST_Mirror_Port *) 00173 { 00174 return 0; 00175 } 00176 00177 int 00178 ifr_visitor::visit_connector (AST_Connector *) 00179 { 00180 return 0; 00181 } 00182 00183 int 00184 ifr_visitor::visit_eventtype (AST_EventType *) 00185 { 00186 return 0; 00187 } 00188 00189 int 00190 ifr_visitor::visit_eventtype_fwd (AST_EventTypeFwd *) 00191 { 00192 return 0; 00193 } 00194 00195 int 00196 ifr_visitor::visit_home (AST_Home *) 00197 { 00198 return 0; 00199 } 00200 00201 int 00202 ifr_visitor::visit_factory (AST_Factory *) 00203 { 00204 return 0; 00205 } 00206 00207 int 00208 ifr_visitor::visit_finder (AST_Finder *) 00209 { 00210 return 0; 00211 } 00212 00213 int 00214 ifr_visitor::visit_structure (AST_Structure *) 00215 { 00216 return 0; 00217 } 00218 00219 int 00220 ifr_visitor::visit_structure_fwd (AST_StructureFwd *) 00221 { 00222 return 0; 00223 } 00224 00225 int 00226 ifr_visitor::visit_exception (AST_Exception *) 00227 { 00228 return 0; 00229 } 00230 00231 int 00232 ifr_visitor::visit_expression (AST_Expression *) 00233 { 00234 return 0; 00235 } 00236 00237 int 00238 ifr_visitor::visit_enum (AST_Enum *) 00239 { 00240 return 0; 00241 } 00242 00243 int 00244 ifr_visitor::visit_operation (AST_Operation *) 00245 { 00246 return 0; 00247 } 00248 00249 int 00250 ifr_visitor::visit_field (AST_Field *) 00251 { 00252 return 0; 00253 } 00254 00255 int 00256 ifr_visitor::visit_argument (AST_Argument *) 00257 { 00258 return 0; 00259 } 00260 00261 int 00262 ifr_visitor::visit_attribute (AST_Attribute *) 00263 { 00264 return 0; 00265 } 00266 00267 int 00268 ifr_visitor::visit_union (AST_Union *) 00269 { 00270 return 0; 00271 } 00272 00273 int 00274 ifr_visitor::visit_union_fwd (AST_UnionFwd *) 00275 { 00276 return 0; 00277 } 00278 00279 int 00280 ifr_visitor::visit_union_branch (AST_UnionBranch *) 00281 { 00282 return 0; 00283 } 00284 00285 int 00286 ifr_visitor::visit_union_label (AST_UnionLabel *) 00287 { 00288 return 0; 00289 } 00290 00291 int 00292 ifr_visitor::visit_constant (AST_Constant *) 00293 { 00294 return 0; 00295 } 00296 00297 int 00298 ifr_visitor::visit_enum_val (AST_EnumVal *) 00299 { 00300 return 0; 00301 } 00302 00303 int 00304 ifr_visitor::visit_array (AST_Array *) 00305 { 00306 return 0; 00307 } 00308 00309 int 00310 ifr_visitor::visit_sequence (AST_Sequence *) 00311 { 00312 return 0; 00313 } 00314 00315 int 00316 ifr_visitor::visit_string (AST_String *) 00317 { 00318 return 0; 00319 } 00320 00321 int 00322 ifr_visitor::visit_typedef (AST_Typedef *) 00323 { 00324 return 0; 00325 } 00326 00327 int 00328 ifr_visitor::visit_root (AST_Root *) 00329 { 00330 return 0; 00331 } 00332 00333 int 00334 ifr_visitor::visit_native (AST_Native *) 00335 { 00336 return 0; 00337 } 00338 00339 ACE_Lock & 00340 ifr_visitor::lock (void) const 00341 { 00342 return *this->lock_; 00343 } 00344