#include <PSDL_Exception_Scope.h>
Inheritance diagram for TAO_PSDL_Exception_Scope:
Public Member Functions | |
TAO_PSDL_Exception_Scope (TAO_PSDL_Scope *parent_scope) | |
int | add_member_decl (ACE_CString identifier, ACE_CString identifier_type) |
void | dump (CORBA::ULong depth) |
Function to help indent the output of the parse tree. | |
int | find (const ACE_CString &identifier_name, ACE_CString &identifier_type) |
Function to find the TAO_PSDL_Scope for the given identifier_name. | |
int | find (const ACE_CString &identifier_name) |
TAO_PSDL_Scope * | parent_scope (void) |
Return the pointer to the parent scope. | |
Scope_Map * | scope_map (void) |
Return the pointer to Scope_Map of the instance. | |
ACE_CString | identifier_type (void) |
ACE_CString | module_name (void) |
ACE_CString | interface_name (void) |
Protected Attributes | |
Scope_Map | scope_map_ |
TAO_PSDL_Scope * | parent_scope_ |
ACE_CString | identifier_type_ |
ACE_CString | module_name_ |
ACE_CString | interface_name_ |
Definition at line 31 of file PSDL_Exception_Scope.h.
TAO_PSDL_Exception_Scope::TAO_PSDL_Exception_Scope | ( | TAO_PSDL_Scope * | parent_scope | ) |
Definition at line 9 of file PSDL_Exception_Scope.cpp.
00010 : scope_map_ (), 00011 parent_scope_ (parent_scope) 00012 { 00013 // Constructor. 00014 }
int TAO_PSDL_Exception_Scope::add_member_decl | ( | ACE_CString | identifier, | |
ACE_CString | identifier_type | |||
) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 17 of file PSDL_Exception_Scope.cpp.
References TAO_PSDL_Scope::add_member_decl_to_scope(), identifier_type(), and TAO_PSDL_Scope::instance().
00019 { 00020 // Add member declarations to this scope. 00021 return TAO_PSDL_Scope::instance ()->add_member_decl_to_scope (identifier, 00022 identifier_type, 00023 this); 00024 }
void TAO_PSDL_Exception_Scope::dump | ( | CORBA::ULong | depth | ) | [virtual] |
Function to help indent the output of the parse tree.
Reimplemented from TAO_PSDL_Scope.
Definition at line 27 of file PSDL_Exception_Scope.cpp.
References ACE_DEBUG, ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::end(), LM_DEBUG, and scope_map_.
00028 { 00029 depth = depth + 5; 00030 00031 for (Scope_Map_Iterator i = this->scope_map_.begin (); 00032 i != this->scope_map_.end (); 00033 ++i) 00034 { 00035 this->print_depth (depth); 00036 ACE_DEBUG ((LM_DEBUG, 00037 "%s (%s)\n", 00038 (*i).ext_id_.c_str (), (*i).int_id_)); 00039 } 00040 }
int TAO_PSDL_Exception_Scope::find | ( | const ACE_CString & | identifier_name | ) | [virtual] |
Function to check if a particular identifier_name exists in the scope.
Reimplemented from TAO_PSDL_Scope.
Definition at line 69 of file PSDL_Exception_Scope.cpp.
References ACE_String_Base< CHAR >::c_str(), ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::end(), scope_map_, and ACE_OS::strcmp().
00070 { 00071 for (Scope_Map_Iterator i = this->scope_map_.begin (); 00072 i != this->scope_map_.end (); 00073 ++i) 00074 { 00075 if (ACE_OS::strcmp (identifier_name.c_str (), (*i).ext_id_.c_str ()) == 0) 00076 { 00077 return 0; 00078 } 00079 else 00080 { 00081 if ((*i).int_id_->find (identifier_name) == 0) 00082 { 00083 // #@@@@ deal 00084 // identifier_type = identifier_info->type; 00085 return 0; 00086 } 00087 } 00088 } 00089 00090 return -1; 00091 }
int TAO_PSDL_Exception_Scope::find | ( | const ACE_CString & | identifier_name, | |
ACE_CString & | identifier_type | |||
) | [virtual] |
Function to find the TAO_PSDL_Scope for the given identifier_name.
Reimplemented from TAO_PSDL_Scope.
Definition at line 43 of file PSDL_Exception_Scope.cpp.
References ACE_String_Base< CHAR >::c_str(), ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::end(), identifier_type(), scope_map_, and ACE_OS::strcmp().
00045 { 00046 for (Scope_Map_Iterator i = this->scope_map_.begin (); 00047 i != this->scope_map_.end (); 00048 ++i) 00049 { 00050 if (ACE_OS::strcmp (identifier_name.c_str (), (*i).ext_id_.c_str ()) == 0) 00051 { 00052 identifier_type = (*i).int_id_->identifier_type (); 00053 return 0; 00054 } 00055 else 00056 { 00057 if ((*i).int_id_->find (identifier_name, 00058 identifier_type) == 0) 00059 { 00060 return 0; 00061 } 00062 } 00063 } 00064 00065 return -1; 00066 }
ACE_CString TAO_PSDL_Exception_Scope::identifier_type | ( | void | ) | [virtual] |
Each identifier will have an instance of a derived type of TAO_PSDL_Scope *.. the following method is an accessor to the type of the identifier name
Reimplemented from TAO_PSDL_Scope.
Definition at line 106 of file PSDL_Exception_Scope.cpp.
References identifier_type_.
Referenced by add_member_decl(), and find().
00107 { 00108 return this->identifier_type_; 00109 }
ACE_CString TAO_PSDL_Exception_Scope::interface_name | ( | void | ) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 118 of file PSDL_Exception_Scope.cpp.
References interface_name_.
00119 { 00120 return this->interface_name_; 00121 }
ACE_CString TAO_PSDL_Exception_Scope::module_name | ( | void | ) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 112 of file PSDL_Exception_Scope.cpp.
References module_name_.
00113 { 00114 return this->module_name_; 00115 }
TAO_PSDL_Scope * TAO_PSDL_Exception_Scope::parent_scope | ( | void | ) | [virtual] |
Return the pointer to the parent scope.
Reimplemented from TAO_PSDL_Scope.
Definition at line 94 of file PSDL_Exception_Scope.cpp.
References parent_scope_.
00095 { 00096 return this->parent_scope_; 00097 }
Scope_Map * TAO_PSDL_Exception_Scope::scope_map | ( | void | ) | [virtual] |
Return the pointer to Scope_Map of the instance.
Reimplemented from TAO_PSDL_Scope.
Definition at line 100 of file PSDL_Exception_Scope.cpp.
References scope_map_.
00101 { 00102 return &this->scope_map_; 00103 }
ACE_CString TAO_PSDL_Exception_Scope::interface_name_ [protected] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 65 of file PSDL_Exception_Scope.h.
Referenced by interface_name().
ACE_CString TAO_PSDL_Exception_Scope::module_name_ [protected] |
TAO_PSDL_Scope* TAO_PSDL_Exception_Scope::parent_scope_ [protected] |
Scope_Map TAO_PSDL_Exception_Scope::scope_map_ [protected] |
Definition at line 61 of file PSDL_Exception_Scope.h.
Referenced by dump(), find(), and scope_map().