Public Member Functions | Protected Attributes

TAO_PSDL_Exception_Scope Class Reference

#include <PSDL_Exception_Scope.h>

Inheritance diagram for TAO_PSDL_Exception_Scope:
Inheritance graph
[legend]
Collaboration diagram for TAO_PSDL_Exception_Scope:
Collaboration graph
[legend]

List of all members.

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_Scopeparent_scope (void)
 Return the pointer to the parent scope.
Scope_Mapscope_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_Scopeparent_scope_
ACE_CString identifier_type_
ACE_CString module_name_
ACE_CString interface_name_

Detailed Description

Definition at line 31 of file PSDL_Exception_Scope.h.


Constructor & Destructor Documentation

TAO_PSDL_Exception_Scope::TAO_PSDL_Exception_Scope ( TAO_PSDL_Scope parent_scope  ) 

Definition at line 9 of file PSDL_Exception_Scope.cpp.

  : scope_map_ (),
    parent_scope_ (parent_scope)
{
  // Constructor.
}


Member Function Documentation

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.

{
  // Add member declarations to this scope.
  return TAO_PSDL_Scope::instance ()->add_member_decl_to_scope (identifier,
                                                                identifier_type,
                                                                this);
}

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.

{
  depth = depth + 5;

  for (Scope_Map_Iterator i = this->scope_map_.begin ();
       i != this->scope_map_.end ();
       ++i)
    {
      this->print_depth (depth);
      ACE_DEBUG ((LM_DEBUG,
                  "%s (%s)\n",
                  (*i).ext_id_.c_str (), (*i).int_id_));
    }
}

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.

{
  for (Scope_Map_Iterator i = this->scope_map_.begin ();
       i != this->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)
            {
              // #@@@@ deal
              //      identifier_type = identifier_info->type;
              return 0;
            }
        }
    }

  return -1;
}

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.

{
  for (Scope_Map_Iterator i = this->scope_map_.begin ();
       i != this->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;
}

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.

{
  return this->identifier_type_;
}

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.

{
  return this->interface_name_;
}

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.

{
  return this->module_name_;
}

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.

{
  return this->parent_scope_;
}

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.

{
  return &this->scope_map_;
}


Member Data Documentation

Definition at line 63 of file PSDL_Exception_Scope.h.

Reimplemented from TAO_PSDL_Scope.

Definition at line 65 of file PSDL_Exception_Scope.h.

Definition at line 64 of file PSDL_Exception_Scope.h.

Definition at line 62 of file PSDL_Exception_Scope.h.

Definition at line 61 of file PSDL_Exception_Scope.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines