#include <PSDL_Scope.h>
Inheritance diagram for TAO_PSDL_Scope:
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 | |
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> |
|
|
|
|
|
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. |
|
|
|
|
|
Reimplemented in TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Root_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope. |
|
|
|
Reimplemented in TAO_PSDL_Interface_Scope, and TAO_PSDL_Module_Scope. |
|
|
|
Reimplemented in TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, and TAO_PSDL_Root_Scope. |
|
|
|
|
|
Reimplemented in TAO_PSDL_Exception_Scope, and TAO_PSDL_Op_Dcl_Scope. |
|
|
|
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. |
|
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. |
|
Reimplemented in TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Root_Scope, and TAO_PSDL_Simple_Scope. |
|
|
|
|
|
Reimplemented in TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Root_Scope, and TAO_PSDL_Struct_Scope. |
|
|
|
Reimplemented in TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Root_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope. |
|
|
|
As the name suggests, check if the identifier name is already used for something else in the sc |
|
This is to check if a forward declaration has been done already. |
|
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). |
|
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. |
|
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. |
|
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. |
|
|
|
|
|
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. |
|
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. |
|
|
|
Get the pointer to the TAO_PSDL_Stream for the stub header.
|
|
Get the pointer to the TAO_PSDL_Stream for the stub implementation file. |
|
Get the pointer to the TAO_PSDL_Stream for the stub inline file. |
|
|
|
These methods help write the header files that needs to be included and other initialization part to the stubs. |
|
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. |
|
Return a unique instance.
|
|
Reimplemented in TAO_PSDL_Exception_Scope, TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope. |
|
Reimplemented in TAO_PSDL_Exception_Scope, TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope. |
|
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. |
|
Return the top scope.
|
|
This wont be necessary in the final version .. its helpful to print the symbol table to the std output for now. |
|
Push the scope that is passed into the stack of scopes.
|
|
Methods to save and retrieve the identifier values.
|
|
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. |
|
Accessor methods to the name of the current interface.
|
|
Set interface scope to the previous one.
|
|
Set module scope to the previous one.
|
|
Accessor methods to the name of the name_space: Module name.
|
|
Set the root scope the very first time.
|
|
Method used to set the scope back to the previous one.
|
|
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. |
|
|
|
|
|
|
|
Save the psdl_scopes for use while writing to stubs. |
|
Identifier used for the save_identifier and get_identifier methods. |
|
Reimplemented in TAO_PSDL_Exception_Scope, TAO_PSDL_Interface_Scope, TAO_PSDL_Module_Scope, TAO_PSDL_Simple_Scope, and TAO_PSDL_Struct_Scope. |
|
|
|
Arrays to save the module and interface names.
|
|
Save for use while writing to stubs.
|
|
Pointers to the TAO_PSDL_Streams for the stub header, implementation and inline files. |
|
|
|
|
|
Array of TAO_PSDL_Scope pointers to be used with the singleton instance. |
|
Count of the members in the psdl_scope_.
|
|
Pointer to the instance of the TAO_PSDL_Root_Scope.
|
|
Name of the filename that is passed to the compiler psdl_tao.
|