00001 /* -*- c++ -*- */ 00002 // ifr_visitor.cpp,v 1.14 2005/06/20 16:24:05 gmaxey Exp 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 ACE_RCSID (IFR_Service, 00010 ifr_visitor, 00011 "ifr_visitor.cpp,v 1.14 2005/06/20 16:24:05 gmaxey Exp") 00012 00013 ifr_visitor::ifr_visitor (void) 00014 : lock_ (0) 00015 { 00016 // Create the appropriate lock. 00017 if (be_global->enable_locking ()) 00018 { 00019 ACE_NEW (this->lock_, 00020 ACE_Lock_Adapter<TAO_SYNCH_MUTEX> ()); 00021 } 00022 else 00023 { 00024 ACE_NEW (this->lock_, 00025 ACE_Lock_Adapter<ACE_SYNCH_NULL_MUTEX> ()); 00026 } 00027 } 00028 00029 ifr_visitor::~ifr_visitor (void) 00030 { 00031 delete this->lock_; 00032 } 00033 00034 // All the visit methods. Each concrete ifr visitors will 00035 // override some subset of these. 00036 00037 int 00038 ifr_visitor::visit_decl (AST_Decl *) 00039 { 00040 return 0; 00041 } 00042 00043 int 00044 ifr_visitor::visit_scope (UTL_Scope *) 00045 { 00046 return 0; 00047 } 00048 00049 int 00050 ifr_visitor::visit_type (AST_Type *) 00051 { 00052 return 0; 00053 } 00054 00055 int 00056 ifr_visitor::visit_predefined_type (AST_PredefinedType *) 00057 { 00058 return 0; 00059 } 00060 00061 int 00062 ifr_visitor::visit_module (AST_Module *) 00063 { 00064 return 0; 00065 } 00066 00067 int 00068 ifr_visitor::visit_interface (AST_Interface *) 00069 { 00070 return 0; 00071 } 00072 00073 int 00074 ifr_visitor::visit_interface_fwd (AST_InterfaceFwd *) 00075 { 00076 return 0; 00077 } 00078 00079 int 00080 ifr_visitor::visit_valuebox (AST_ValueBox *) 00081 { 00082 return 0; 00083 } 00084 00085 int 00086 ifr_visitor::visit_valuetype (AST_ValueType *) 00087 { 00088 return 0; 00089 } 00090 00091 int 00092 ifr_visitor::visit_valuetype_fwd (AST_ValueTypeFwd *) 00093 { 00094 return 0; 00095 } 00096 00097 int 00098 ifr_visitor::visit_component (AST_Component *) 00099 { 00100 return 0; 00101 } 00102 00103 int 00104 ifr_visitor::visit_component_fwd (AST_ComponentFwd *) 00105 { 00106 return 0; 00107 } 00108 00109 int 00110 ifr_visitor::visit_eventtype (AST_EventType *) 00111 { 00112 return 0; 00113 } 00114 00115 int 00116 ifr_visitor::visit_eventtype_fwd (AST_EventTypeFwd *) 00117 { 00118 return 0; 00119 } 00120 00121 int 00122 ifr_visitor::visit_home (AST_Home *) 00123 { 00124 return 0; 00125 } 00126 00127 int 00128 ifr_visitor::visit_factory (AST_Factory *) 00129 { 00130 return 0; 00131 } 00132 00133 int 00134 ifr_visitor::visit_structure (AST_Structure *) 00135 { 00136 return 0; 00137 } 00138 00139 int 00140 ifr_visitor::visit_structure_fwd (AST_StructureFwd *) 00141 { 00142 return 0; 00143 } 00144 00145 int 00146 ifr_visitor::visit_exception (AST_Exception *) 00147 { 00148 return 0; 00149 } 00150 00151 int 00152 ifr_visitor::visit_expression (AST_Expression *) 00153 { 00154 return 0; 00155 } 00156 00157 int 00158 ifr_visitor::visit_enum (AST_Enum *) 00159 { 00160 return 0; 00161 } 00162 00163 int 00164 ifr_visitor::visit_operation (AST_Operation *) 00165 { 00166 return 0; 00167 } 00168 00169 int 00170 ifr_visitor::visit_field (AST_Field *) 00171 { 00172 return 0; 00173 } 00174 00175 int 00176 ifr_visitor::visit_argument (AST_Argument *) 00177 { 00178 return 0; 00179 } 00180 00181 int 00182 ifr_visitor::visit_attribute (AST_Attribute *) 00183 { 00184 return 0; 00185 } 00186 00187 int 00188 ifr_visitor::visit_union (AST_Union *) 00189 { 00190 return 0; 00191 } 00192 00193 int 00194 ifr_visitor::visit_union_fwd (AST_UnionFwd *) 00195 { 00196 return 0; 00197 } 00198 00199 int 00200 ifr_visitor::visit_union_branch (AST_UnionBranch *) 00201 { 00202 return 0; 00203 } 00204 00205 int 00206 ifr_visitor::visit_union_label (AST_UnionLabel *) 00207 { 00208 return 0; 00209 } 00210 00211 int 00212 ifr_visitor::visit_constant (AST_Constant *) 00213 { 00214 return 0; 00215 } 00216 00217 int 00218 ifr_visitor::visit_enum_val (AST_EnumVal *) 00219 { 00220 return 0; 00221 } 00222 00223 int 00224 ifr_visitor::visit_array (AST_Array *) 00225 { 00226 return 0; 00227 } 00228 00229 int 00230 ifr_visitor::visit_sequence (AST_Sequence *) 00231 { 00232 return 0; 00233 } 00234 00235 int 00236 ifr_visitor::visit_string (AST_String *) 00237 { 00238 return 0; 00239 } 00240 00241 int 00242 ifr_visitor::visit_typedef (AST_Typedef *) 00243 { 00244 return 0; 00245 } 00246 00247 int 00248 ifr_visitor::visit_root (AST_Root *) 00249 { 00250 return 0; 00251 } 00252 00253 int 00254 ifr_visitor::visit_native (AST_Native *) 00255 { 00256 return 0; 00257 } 00258 00259 ACE_Lock & 00260 ifr_visitor::lock (void) const 00261 { 00262 return *this->lock_; 00263 } 00264