#include <PSDL_Root_Scope.h>
Public Member Functions | |
TAO_PSDL_Root_Scope (void) | |
~TAO_PSDL_Root_Scope (void) | |
int | add_module (ACE_CString identifier) |
int | add_interface (ACE_CString identifier) |
int | add_struct (ACE_CString identifier) |
int | add_typedef (ACE_CString identifier, ACE_CString identifier_type) |
int | add_const_decl (ACE_CString identifier, ACE_CString identifier_type) |
int | add_except_decl (ACE_CString identifier, ACE_CString identifier_type) |
int | add_op_dcl (ACE_CString identifier) |
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) |
int | get_module_name (const ACE_CString &identifier_name, ACE_CString &module_name) |
int | get_interface_name (const ACE_CString &identifier_name, ACE_CString &interface_name) |
TAO_PSDL_Scope * | parent_scope (void) |
Public methods to return the scopes needed. | |
Scope_Map * | scope_map (void) |
Return the pointer to Scope_Map of the instance. | |
Protected Attributes | |
Scope_Map | root_scope_map_ |
Definition at line 32 of file PSDL_Root_Scope.h.
TAO_PSDL_Root_Scope::TAO_PSDL_Root_Scope | ( | void | ) |
Definition at line 9 of file PSDL_Root_Scope.cpp.
: root_scope_map_ () { }
TAO_PSDL_Root_Scope::~TAO_PSDL_Root_Scope | ( | void | ) |
Definition at line 14 of file PSDL_Root_Scope.cpp.
{ }
int TAO_PSDL_Root_Scope::add_const_decl | ( | ACE_CString | identifier, | |
ACE_CString | identifier_type | |||
) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 50 of file PSDL_Root_Scope.cpp.
{ return TAO_PSDL_Scope::instance ()->add_const_decl_to_scope (identifier, identifier_type, this); }
int TAO_PSDL_Root_Scope::add_except_decl | ( | ACE_CString | identifier, | |
ACE_CString | identifier_type | |||
) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 59 of file PSDL_Root_Scope.cpp.
{ return TAO_PSDL_Scope::instance ()->add_except_decl_to_scope (identifier, identifier_type, this); }
int TAO_PSDL_Root_Scope::add_interface | ( | ACE_CString | identifier | ) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 26 of file PSDL_Root_Scope.cpp.
{ // Add the actual interface. return TAO_PSDL_Scope::instance ()->add_interface_to_scope (interface_name, this); }
int TAO_PSDL_Root_Scope::add_module | ( | ACE_CString | identifier | ) | [virtual] |
Methods to be able to add the respective types to the Root Scope.
Reimplemented from TAO_PSDL_Scope.
Definition at line 19 of file PSDL_Root_Scope.cpp.
{ return TAO_PSDL_Scope::instance ()->add_module_to_scope (identifier, this); }
int TAO_PSDL_Root_Scope::add_op_dcl | ( | ACE_CString | identifier | ) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 68 of file PSDL_Root_Scope.cpp.
{ return TAO_PSDL_Scope::instance ()->add_op_dcl_to_scope (identifier, this); }
int TAO_PSDL_Root_Scope::add_struct | ( | ACE_CString | identifier | ) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 34 of file PSDL_Root_Scope.cpp.
{ return TAO_PSDL_Scope::instance ()->add_struct_to_scope (struct_name, this); }
int TAO_PSDL_Root_Scope::add_typedef | ( | ACE_CString | identifier, | |
ACE_CString | identifier_type | |||
) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 41 of file PSDL_Root_Scope.cpp.
{ return TAO_PSDL_Scope::instance ()->add_typedef_to_scope (identifier, identifier_type, this); }
void TAO_PSDL_Root_Scope::dump | ( | CORBA::ULong | depth | ) | [virtual] |
Function to help indent the output of the parse tree.
Reimplemented from TAO_PSDL_Scope.
Definition at line 75 of file PSDL_Root_Scope.cpp.
{ ACE_DEBUG ((LM_DEBUG, "ROOT_SCOPE")); depth = depth + 5; for (Scope_Map_Iterator i = this->root_scope_map_.begin (); i != this->root_scope_map_.end (); ++i) { TAO_PSDL_Scope::instance ()->print_depth (depth); ACE_DEBUG ((LM_DEBUG, "%s (module)\n", (*i).ext_id_.c_str ())); (*i).int_id_->dump (depth); } }
int TAO_PSDL_Root_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 95 of file PSDL_Root_Scope.cpp.
{ for (Scope_Map_Iterator i = this->root_scope_map_.begin (); i != this->root_scope_map_.end (); ++i) { if (ACE_OS::strcmp (identifier_name.c_str (), (*i).ext_id_.c_str ()) == 0) { identifier_type = (*i).int_id_->identifier_type (); return 0; } else { if ((*i).int_id_->find (identifier_name, identifier_type) == 0) { return 0; } } } return -1; }
int TAO_PSDL_Root_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 121 of file PSDL_Root_Scope.cpp.
{ for (Scope_Map_Iterator i = this->root_scope_map_.begin (); i != this->root_scope_map_.end (); ++i) { if (ACE_OS::strcmp (identifier_name.c_str (), (*i).ext_id_.c_str ()) == 0) { return 0; } else { if ((*i).int_id_->find (identifier_name) == 0) { return 0; } } } return -1; }
int TAO_PSDL_Root_Scope::get_interface_name | ( | const ACE_CString & | identifier_name, | |
ACE_CString & | interface_name | |||
) | [virtual] |
To get the name of the interface to which an identifier_name belongs. returns '0' on succes and '-1' on failure.
Reimplemented from TAO_PSDL_Scope.
Definition at line 170 of file PSDL_Root_Scope.cpp.
{ for (Scope_Map_Iterator i = this->root_scope_map_.begin (); i != this->root_scope_map_.end (); ++i) { if (ACE_OS::strcmp (identifier_name.c_str (), (*i).ext_id_.c_str ()) == 0) { interface_name = (*i).int_id_->interface_name (); return 0; } else { if ((*i).int_id_->get_interface_name (identifier_name, interface_name) == 0) { return 0; } } } return -1; }
int TAO_PSDL_Root_Scope::get_module_name | ( | const ACE_CString & | identifier_name, | |
ACE_CString & | module_name | |||
) | [virtual] |
To get the name of the module to which an identifier_name belongs. returns '0' on succes and '-1' on failure.
Reimplemented from TAO_PSDL_Scope.
Definition at line 144 of file PSDL_Root_Scope.cpp.
{ for (Scope_Map_Iterator i = this->root_scope_map_.begin (); i != this->root_scope_map_.end (); ++i) { if (ACE_OS::strcmp (identifier_name.c_str (), (*i).ext_id_.c_str ()) == 0) { module_name = (*i).int_id_->module_name (); return 0; } else { if ((*i).int_id_->get_module_name (identifier_name, module_name) == 0) { return 0; } } } return -1; }
TAO_PSDL_Scope * TAO_PSDL_Root_Scope::parent_scope | ( | void | ) | [virtual] |
Public methods to return the scopes needed.
Reimplemented from TAO_PSDL_Scope.
Definition at line 196 of file PSDL_Root_Scope.cpp.
{
return 0;
}
Scope_Map * TAO_PSDL_Root_Scope::scope_map | ( | void | ) | [virtual] |
Return the pointer to Scope_Map of the instance.
Reimplemented from TAO_PSDL_Scope.
Definition at line 202 of file PSDL_Root_Scope.cpp.
{ return &this->root_scope_map_; }
Scope_Map TAO_PSDL_Root_Scope::root_scope_map_ [protected] |
Definition at line 79 of file PSDL_Root_Scope.h.