- Main Page
- Classes
- Files

- Search for |

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# TAO_PSDL_Scope Class Reference

`#include <PSDL_Scope.h>`

Inheritance diagram for TAO_PSDL_Scope:

[legend]
Collaboration diagram for TAO_PSDL_Scope:

[legend]
List of all members.

## Public Member Functions
| TAO_PSDL_Scope (void)
virtual | ~TAO_PSDL_Scope (void)
virtual int | add_module (ACE_CString identifier)
virtual int | add_interface (ACE_CString identifier)
virtual int | add_struct (ACE_CString identifier)
virtual int | add_typedef (ACE_CString identifier, ACE_CString identifier_type)
virtual int | add_const_decl (ACE_CString identifier, ACE_CString identifier_type)
virtual int | add_except_decl (ACE_CString identifier, ACE_CString identifier_type)
virtual int | add_exception (ACE_CString identifier)
virtual int | add_op_dcl (ACE_CString identifier)
virtual int | add_member_decl (ACE_CString identifier, ACE_CString identifier_type)
virtual TAO_PSDL_Scope * | pop_top_scope (void)
| Return the top scope.
virtual void | push_scope (TAO_PSDL_Scope *scope)
| Push the scope that is passed into the stack of scopes.
virtual TAO_PSDL_Scope * | parent_scope (void)
| Return the pointer to the parent scope.
virtual Scope_Map * | scope_map (void)
| Return the pointer to Scope_Map of the instance.
virtual void | dump (CORBA::ULong depth)
| Function to help indent the output of the parse tree.
virtual int | find (const ACE_CString &identifier_name, ACE_CString &identifier_type)
| Function to find the TAO_PSDL_Scope for the given identifier_name.
virtual int | find (const ACE_CString &identifier_name)
virtual int | get_module_name (const ACE_CString &identifier_name, ACE_CString &module_name)
virtual int | get_interface_name (const ACE_CString &identifier_name, ACE_CString &interface_name)
virtual ACE_CString | identifier_type (void)
virtual ACE_CString | module_name (void)
virtual ACE_CString | interface_name (void)
int | add_module_to_scope (ACE_CString identifier, TAO_PSDL_Scope *scope)
int | add_interface_to_scope (ACE_CString identifier, TAO_PSDL_Scope *scope)
int | add_interface_dcl_to_scope (ACE_CString identifier, TAO_PSDL_Scope *scope)
int | add_struct_to_scope (ACE_CString identifier, TAO_PSDL_Scope *scope)
int | add_typedef_to_scope (ACE_CString identifier, ACE_CString identifier_type, TAO_PSDL_Scope *scope)
int | add_const_decl_to_scope (ACE_CString identifier, ACE_CString identifier_type, TAO_PSDL_Scope *scope)
int | add_except_decl_to_scope (ACE_CString identifier, ACE_CString identifier_type, TAO_PSDL_Scope *scope)
int | add_exception_to_scope (ACE_CString identifier, TAO_PSDL_Scope *scope)
int | add_scoped_decl_to_scope (ACE_CString identifier, ACE_CString identifier_type, TAO_PSDL_Scope *scope)
int | add_enum_decl_to_scope (ACE_CString identifier, ACE_CString identifier_type, TAO_PSDL_Scope *scope)
int | add_op_dcl_to_scope (ACE_CString identifier, TAO_PSDL_Scope *scope)
int | add_member_decl_to_scope (ACE_CString identifier, ACE_CString identifier_type, TAO_PSDL_Scope *scope)
void | set_root_scope (void)
| Set the root scope the very first time.
void | set_stub_prefix (const char *filename)
const ACE_CString & | get_stub_prefix (void)
void | header_initialization (TAO_PSDL_Stream *ps_sh)
void | stub_initialization (TAO_PSDL_Stream *ps_si)
TAO_PSDL_Stream * | get_sh (void)
| Get the pointer to the TAO_PSDL_Stream for the stub header.
TAO_PSDL_Stream * | get_si (void)
TAO_PSDL_Stream * | get_sinline (void)
int | check_identifier (ACE_CString identifier, TAO_PSDL_Scope *scope)
void | check_name_in_scope (ACE_CString identifier, TAO_PSDL_Scope *scope)
void | print_depth (CORBA::ULong depth)
void | set_scope (void)
| Method used to set the scope back to the previous one.
void | set_interface_scope (void)
| Set interface scope to the previous one.
void | set_module_scope (void)
| Set module scope to the previous one.
void | save_identifier (ACE_CString identifier)
| Methods to save and retrieve the identifier values.
ACE_CString | get_identifier (void)
void | set_name_space (ACE_CString name_space)
| Accessor methods to the name of the name_space: Module name.
ACE_CString | get_name_space (void)
void | set_interface_name (ACE_CString interface_name)
| Accessor methods to the name of the current interface.
ACE_CString | get_interface_name (void)
void | to_lower_case (ACE_CString &identifier)
ACE_CString | convert_str (int identifier_type)
## Static Public Member Functions
static TAO_PSDL_Scope * | instance (void)
| Return a unique instance.
## Private Attributes
TAO_PSDL_Scope ** | psdl_scope_
ACE_Array_Base< TAO_PSDL_Scope * > | ast_scope_
ACE_Array_Base< ACE_CString > | module_names_
| Arrays to save the module and interface names.
ACE_Array_Base< ACE_CString > | interface_names_
unsigned long | psdl_scope_top_
| Count of the members in the psdl_scope_.
TAO_PSDL_Root_Scope * | root_scope_
| Pointer to the instance of the TAO_PSDL_Root_Scope.
ACE_CString | identifier_
ACE_CString | name_space_
| Save for use while writing to stubs.
ACE_CString | interface_name_
ACE_CString | stub_prefix_
| Name of the filename that is passed to the compiler psdl_tao.
TAO_PSDL_Stream * | ps_sh_
TAO_PSDL_Stream * | ps_si_
TAO_PSDL_Stream * | ps_sin_
## Friends
class | TAO_Singleton< TAO_PSDL_Scope, TAO_SYNCH_MUTEX >

## Constructor & Destructor Documentation

TAO_PSDL_Scope::TAO_PSDL_Scope | ( | void |  | ) |

TAO_PSDL_Scope::~TAO_PSDL_Scope | ( | void |  | ) | `[virtual]`

## Member Function Documentation

int TAO_PSDL_Scope::add_const_decl | ( | ACE_CString | identifier,
|  | ACE_CString | identifier_type |
| ) |  |  | `[virtual]`

Reimplemented in TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Op_Dcl_Scope, TAO_PSDL_Root_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope.

int TAO_PSDL_Scope::add_const_decl_to_scope | ( | ACE_CString | identifier,
|  | ACE_CString | identifier_type,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

int TAO_PSDL_Scope::add_enum_decl_to_scope | ( | ACE_CString | identifier,
|  | ACE_CString | identifier_type,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

int TAO_PSDL_Scope::add_except_decl | ( | ACE_CString | identifier,
|  | ACE_CString | identifier_type |
| ) |  |  | `[virtual]`

Reimplemented in TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Root_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope.

int TAO_PSDL_Scope::add_except_decl_to_scope | ( | ACE_CString | identifier,
|  | ACE_CString | identifier_type,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

int TAO_PSDL_Scope::add_exception | ( | ACE_CString | identifier | ) | `[virtual]`

Reimplemented in TAO_PSDL_Interface_Scope, and TAO_PSDL_Module_Scope.

int TAO_PSDL_Scope::add_exception_to_scope | ( | ACE_CString | identifier,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

int TAO_PSDL_Scope::add_interface | ( | ACE_CString | identifier | ) | `[virtual]`

Reimplemented in TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, and TAO_PSDL_Root_Scope.

int TAO_PSDL_Scope::add_interface_dcl_to_scope | ( | ACE_CString | identifier,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

int TAO_PSDL_Scope::add_interface_to_scope | ( | ACE_CString | identifier,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

int TAO_PSDL_Scope::add_member_decl | ( | ACE_CString | identifier,
|  | ACE_CString | identifier_type |
| ) |  |  | `[virtual]`

Reimplemented in TAO_PSDL_Exception_Scope, and TAO_PSDL_Op_Dcl_Scope.

int TAO_PSDL_Scope::add_member_decl_to_scope | ( | ACE_CString | identifier,
|  | ACE_CString | identifier_type,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

int TAO_PSDL_Scope::add_module | ( | ACE_CString | identifier | ) | `[virtual]`

The add functions are overridden by the derived classes to add the respective types in their scopes. The return value is a '0' if successful and '-1' if it ends up as a failure.

Reimplemented in TAO_PSDL_Module_Scope, TAO_PSDL_Root_Scope, and TAO_PSDL_Struct_Scope.

int TAO_PSDL_Scope::add_module_to_scope | ( | ACE_CString | identifier,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

As the function name implies, the following methods help add the respective types to the scope passed in. The return value is a '0' on success and '-1' on a failure.

int TAO_PSDL_Scope::add_op_dcl | ( | ACE_CString | identifier | ) | `[virtual]`

Reimplemented in TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Root_Scope, and TAO_PSDL_Simple_Scope.

int TAO_PSDL_Scope::add_op_dcl_to_scope | ( | ACE_CString | identifier,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

int TAO_PSDL_Scope::add_scoped_decl_to_scope | ( | ACE_CString | identifier,
|  | ACE_CString | identifier_type,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

int TAO_PSDL_Scope::add_struct | ( | ACE_CString | identifier | ) | `[virtual]`

Reimplemented in TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Root_Scope, and TAO_PSDL_Struct_Scope.

int TAO_PSDL_Scope::add_struct_to_scope | ( | ACE_CString | identifier,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

int TAO_PSDL_Scope::add_typedef | ( | ACE_CString | identifier,
|  | ACE_CString | identifier_type |
| ) |  |  | `[virtual]`

Reimplemented in TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Root_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope.

int TAO_PSDL_Scope::add_typedef_to_scope | ( | ACE_CString | identifier,
|  | ACE_CString | identifier_type,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

int TAO_PSDL_Scope::check_identifier | ( | ACE_CString | identifier,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

As the name suggests, check if the identifier name is already used for something else in the sc

void TAO_PSDL_Scope::check_name_in_scope | ( | ACE_CString | identifier,
|  | TAO_PSDL_Scope * | scope |
| ) |  |  |

This is to check if a forward declaration has been done already.

ACE_CString TAO_PSDL_Scope::convert_str | ( | int | identifier_type | ) |

Helper method to convert the int value of the identifier type to its string equivalent based on the conversion values generated by the Yacc Parser (please see PSDL_y.h for the conversion values).

void TAO_PSDL_Scope::dump | ( | CORBA::ULong | depth | ) | `[virtual]`

Function to help indent the output of the parse tree.

Reimplemented in TAO_PSDL_Exception_Scope, TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Op_Dcl_Scope, TAO_PSDL_Root_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope.

int TAO_PSDL_Scope::find | ( | const ACE_CString & | identifier_name | ) | `[virtual]`

Function to check if a particular identifier_name exists in the scope.

Reimplemented in TAO_PSDL_Exception_Scope, TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Root_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope.

int TAO_PSDL_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 in TAO_PSDL_Exception_Scope, TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Root_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope.

ACE_CString TAO_PSDL_Scope::get_identifier | ( | void |  | ) |

ACE_CString TAO_PSDL_Scope::get_interface_name | ( | void |  | ) |

int TAO_PSDL_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 in TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, and TAO_PSDL_Root_Scope.

int TAO_PSDL_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 in TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, and TAO_PSDL_Root_Scope.

ACE_CString TAO_PSDL_Scope::get_name_space | ( | void |  | ) |

TAO_PSDL_Stream * TAO_PSDL_Scope::get_sh | ( | void |  | ) |

Get the pointer to the TAO_PSDL_Stream for the stub header.

TAO_PSDL_Stream * TAO_PSDL_Scope::get_si | ( | void |  | ) |

Get the pointer to the TAO_PSDL_Stream for the stub implementation file.

TAO_PSDL_Stream * TAO_PSDL_Scope::get_sinline | ( | void |  | ) |

Get the pointer to the TAO_PSDL_Stream for the stub inline file.

const ACE_CString & TAO_PSDL_Scope::get_stub_prefix | ( | void |  | ) |

void TAO_PSDL_Scope::header_initialization | ( | TAO_PSDL_Stream * | ps_sh | ) |

These methods help write the header files that needs to be included and other initialization part to the stubs.

ACE_CString TAO_PSDL_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 in TAO_PSDL_Exception_Scope, TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope.

TAO_PSDL_Scope * TAO_PSDL_Scope::instance | ( | void |  | ) | `[static]`

Return a unique instance.

ACE_CString TAO_PSDL_Scope::interface_name | ( | void |  | ) | `[virtual]`

Reimplemented in TAO_PSDL_Exception_Scope, TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope.

ACE_CString TAO_PSDL_Scope::module_name | ( | void |  | ) | `[virtual]`

Reimplemented in TAO_PSDL_Exception_Scope, TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope.

TAO_PSDL_Scope * TAO_PSDL_Scope::parent_scope | ( | void |  | ) | `[virtual]`

Return the pointer to the parent scope.

Reimplemented in TAO_PSDL_Exception_Scope, TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Op_Dcl_Scope, TAO_PSDL_Root_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope.

TAO_PSDL_Scope * TAO_PSDL_Scope::pop_top_scope | ( | void |  | ) | `[virtual]`

Return the top scope.

void TAO_PSDL_Scope::print_depth | ( | CORBA::ULong | depth | ) |

This wont be necessary in the final version .. its helpful to print the symbol table to the std output for now.

void TAO_PSDL_Scope::push_scope | ( | TAO_PSDL_Scope * | scope | ) | `[virtual]`

Push the scope that is passed into the stack of scopes.

void TAO_PSDL_Scope::save_identifier | ( | ACE_CString | identifier | ) |

Methods to save and retrieve the identifier values.

Scope_Map * TAO_PSDL_Scope::scope_map | ( | void |  | ) | `[virtual]`

Return the pointer to Scope_Map of the instance.

Reimplemented in TAO_PSDL_Exception_Scope, TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Op_Dcl_Scope, TAO_PSDL_Root_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope.

void TAO_PSDL_Scope::set_interface_name | ( | ACE_CString | interface_name | ) |

Accessor methods to the name of the current interface.

void TAO_PSDL_Scope::set_interface_scope | ( | void |  | ) |

Set interface scope to the previous one.

void TAO_PSDL_Scope::set_module_scope | ( | void |  | ) |

Set module scope to the previous one.

void TAO_PSDL_Scope::set_name_space | ( | ACE_CString | name_space | ) |

Accessor methods to the name of the name_space: Module name.

void TAO_PSDL_Scope::set_root_scope | ( | void |  | ) |

Set the root scope the very first time.

void TAO_PSDL_Scope::set_scope | ( | void |  | ) |

Method used to set the scope back to the previous one.

void TAO_PSDL_Scope::set_stub_prefix | ( | const char * | filename | ) |

Set and get the name of the stub that has to be generated. The name is based on the input file that is passed to the compiler.

void TAO_PSDL_Scope::stub_initialization | ( | TAO_PSDL_Stream * | ps_si | ) |

void TAO_PSDL_Scope::to_lower_case | ( | ACE_CString & | identifier | ) |

## Friends And Related Function Documentation

friend class TAO_Singleton< TAO_PSDL_Scope, TAO_SYNCH_MUTEX >`[friend]`

## Member Data Documentation

ACE_Array_Base<TAO_PSDL_Scope *> TAO_PSDL_Scope::ast_scope_`[private]`

Save the psdl_scopes for use while writing to stubs.

ACE_CString TAO_PSDL_Scope::identifier_`[private]`

Identifier used for the save_identifier and get_identifier methods.

ACE_CString TAO_PSDL_Scope::interface_name_`[private]`

Reimplemented in TAO_PSDL_Exception_Scope, TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope.

ACE_Array_Base<ACE_CString> TAO_PSDL_Scope::interface_names_`[private]`

ACE_Array_Base<ACE_CString> TAO_PSDL_Scope::module_names_`[private]`

Arrays to save the module and interface names.

ACE_CString TAO_PSDL_Scope::name_space_`[private]`

Save for use while writing to stubs.

TAO_PSDL_Stream* TAO_PSDL_Scope::ps_sh_`[private]`

Pointers to the TAO_PSDL_Streams for the stub header, implementation and inline files.

TAO_PSDL_Stream* TAO_PSDL_Scope::ps_si_`[private]`

TAO_PSDL_Stream* TAO_PSDL_Scope::ps_sin_`[private]`

TAO_PSDL_Scope** TAO_PSDL_Scope::psdl_scope_`[private]`

Array of TAO_PSDL_Scope pointers to be used with the singleton instance.

unsigned long TAO_PSDL_Scope::psdl_scope_top_`[private]`

Count of the members in the psdl_scope_.

TAO_PSDL_Root_Scope* TAO_PSDL_Scope::root_scope_`[private]`

Pointer to the instance of the TAO_PSDL_Root_Scope.

ACE_CString TAO_PSDL_Scope::stub_prefix_`[private]`

Name of the filename that is passed to the compiler psdl_tao.

The documentation for this class was generated from the following files:

- PSDL_Scope.h
- PSDL_Scope.cpp