#include <PSDL_Interface_Scope.h>
Public Member Functions | |
TAO_PSDL_Interface_Scope (TAO_PSDL_Scope *parent_scope) | |
~TAO_PSDL_Interface_Scope (void) | |
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_exception (ACE_CString identifier) |
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) |
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) |
Private Attributes | |
Scope_Map | interface_scope_ |
TAO_PSDL_Scope * | parent_scope_ |
ACE_CString | identifier_type_ |
ACE_CString | module_name_ |
ACE_CString | interface_name_ |
Definition at line 31 of file PSDL_Interface_Scope.h.
TAO_PSDL_Interface_Scope::TAO_PSDL_Interface_Scope | ( | TAO_PSDL_Scope * | parent_scope | ) |
Definition at line 9 of file PSDL_Interface_Scope.cpp.
: interface_scope_ (), parent_scope_ (parent_scope) { // Constructor }
TAO_PSDL_Interface_Scope::~TAO_PSDL_Interface_Scope | ( | void | ) |
Definition at line 16 of file PSDL_Interface_Scope.cpp.
{
// destructor
}
int TAO_PSDL_Interface_Scope::add_const_decl | ( | ACE_CString | identifier, | |
ACE_CString | identifier_type | |||
) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 45 of file PSDL_Interface_Scope.cpp.
{ return TAO_PSDL_Scope::instance ()->add_const_decl_to_scope (identifier, identifier_type, this); }
int TAO_PSDL_Interface_Scope::add_except_decl | ( | ACE_CString | identifier, | |
ACE_CString | identifier_type | |||
) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 54 of file PSDL_Interface_Scope.cpp.
{ return TAO_PSDL_Scope::instance ()->add_except_decl_to_scope (identifier, identifier_type, this); }
int TAO_PSDL_Interface_Scope::add_exception | ( | ACE_CString | identifier | ) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 63 of file PSDL_Interface_Scope.cpp.
{ return TAO_PSDL_Scope::instance ()->add_exception_to_scope (identifier, this); }
int TAO_PSDL_Interface_Scope::add_interface | ( | ACE_CString | identifier | ) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 22 of file PSDL_Interface_Scope.cpp.
{ return TAO_PSDL_Scope::instance ()->add_interface_to_scope (interface_name, this); }
int TAO_PSDL_Interface_Scope::add_op_dcl | ( | ACE_CString | identifier | ) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 70 of file PSDL_Interface_Scope.cpp.
{ return TAO_PSDL_Scope::instance ()->add_op_dcl_to_scope (identifier, this); }
int TAO_PSDL_Interface_Scope::add_struct | ( | ACE_CString | identifier | ) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 29 of file PSDL_Interface_Scope.cpp.
{ return TAO_PSDL_Scope::instance ()->add_struct_to_scope (struct_name, this); }
int TAO_PSDL_Interface_Scope::add_typedef | ( | ACE_CString | identifier, | |
ACE_CString | identifier_type | |||
) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 36 of file PSDL_Interface_Scope.cpp.
{ return TAO_PSDL_Scope::instance ()->add_typedef_to_scope (identifier, identifier_type, this); }
void TAO_PSDL_Interface_Scope::dump | ( | CORBA::ULong | depth | ) | [virtual] |
Function to help indent the output of the parse tree.
Reimplemented from TAO_PSDL_Scope.
Definition at line 77 of file PSDL_Interface_Scope.cpp.
{ depth = depth + 5; for (Scope_Map_Iterator i = this->interface_scope_.begin (); i != this->interface_scope_.end (); ++i) { this->print_depth (depth); ACE_DEBUG ((LM_DEBUG, "%s (interface/exception/struct)\n", (*i).ext_id_.c_str ())); (*i).int_id_->dump (depth); } }
int TAO_PSDL_Interface_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 94 of file PSDL_Interface_Scope.cpp.
{ for (Scope_Map_Iterator i = this->interface_scope_.begin (); i != this->interface_scope_.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_Interface_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 120 of file PSDL_Interface_Scope.cpp.
{ for (Scope_Map_Iterator i = this->interface_scope_.begin (); i != this->interface_scope_.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) { // #@@@@ deal // identifier_type = identifier_info->type; return 0; } } } return -1; }
int TAO_PSDL_Interface_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 171 of file PSDL_Interface_Scope.cpp.
{ for (Scope_Map_Iterator i = this->interface_scope_.begin (); i != this->interface_scope_.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_Interface_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 145 of file PSDL_Interface_Scope.cpp.
{ for (Scope_Map_Iterator i = this->interface_scope_.begin (); i != this->interface_scope_.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; }
ACE_CString TAO_PSDL_Interface_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 209 of file PSDL_Interface_Scope.cpp.
{ return this->identifier_type_; }
ACE_CString TAO_PSDL_Interface_Scope::interface_name | ( | void | ) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 221 of file PSDL_Interface_Scope.cpp.
{ return this->interface_name_; }
ACE_CString TAO_PSDL_Interface_Scope::module_name | ( | void | ) | [virtual] |
Reimplemented from TAO_PSDL_Scope.
Definition at line 215 of file PSDL_Interface_Scope.cpp.
{ return this->module_name_; }
TAO_PSDL_Scope * TAO_PSDL_Interface_Scope::parent_scope | ( | void | ) | [virtual] |
Return the pointer to the parent scope.
Reimplemented from TAO_PSDL_Scope.
Definition at line 197 of file PSDL_Interface_Scope.cpp.
{ return this->parent_scope_; }
Scope_Map * TAO_PSDL_Interface_Scope::scope_map | ( | void | ) | [virtual] |
Return the pointer to Scope_Map of the instance.
Reimplemented from TAO_PSDL_Scope.
Definition at line 203 of file PSDL_Interface_Scope.cpp.
{ return &this->interface_scope_; }
Definition at line 88 of file PSDL_Interface_Scope.h.
Reimplemented from TAO_PSDL_Scope.
Definition at line 90 of file PSDL_Interface_Scope.h.
Definition at line 86 of file PSDL_Interface_Scope.h.
Definition at line 89 of file PSDL_Interface_Scope.h.
Definition at line 87 of file PSDL_Interface_Scope.h.