00001 /* -*- C++ -*- */ 00002 // PSDL_Struct_Visitor.h,v 1.2 2003/07/21 23:51:30 dhinton Exp 00003 // 00004 // ============================================================================ 00005 // 00006 // = LIBRARY 00007 // PSS 00008 // 00009 // = FILENAME 00010 // PSDL_Struct_Visitor.h 00011 // 00012 // = AUTHOR 00013 // Priyanka Gontla <gontla_p@ociweb.com> 00014 // 00015 // ============================================================================ 00016 00017 #ifndef TAO_PSDL_STRUCT_VISITOR_H 00018 #define TAO_PSDL_STRUCT_VISITOR_H 00019 00020 #include /**/ "ace/pre.h" 00021 00022 #include "PSDL_Node_Visitor.h" 00023 00024 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00025 # pragma once 00026 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00027 00028 class TAO_PSDL_Struct_Visitor : public TAO_PSDL_Node_Visitor 00029 { 00030 public: 00031 00032 TAO_PSDL_Struct_Visitor (); 00033 00034 ~TAO_PSDL_Struct_Visitor (); 00035 00036 int visit_identifier (TAO_PSDL_Identifier *identifier); 00037 00038 int visit_type_spec (TAO_PSDL_Type_Spec *type_spec); 00039 00040 int visit_declarator (TAO_PSDL_Declarator *declarator); 00041 00042 // For structs 00043 int visit_predefined_type (TAO_PSDL_Predefined_Type *predefined_type); 00044 00045 // Generate the code that should go into the stub implementation 00046 // file for the type_declarators. 00047 void gen_code_for_si (void); 00048 00049 // Generate the code that should go into the stub inline 00050 // file for the type_declarators. 00051 void gen_code_for_sinline (void); 00052 00053 private: 00054 void print_class_for_structure (ACE_CString struct_name); 00055 00056 // Counter to help print the type_specs and declarators of a 00057 // structure. 00058 int identifiers_count_; 00059 00060 // structure_name 00061 const char *struct_name_; 00062 }; 00063 00064 #include /**/ "ace/post.h" 00065 00066 #endif /* TAO_PSDL_STRUCT_VISITOR_H */