TAO_PSDL_Module_Visitor Class Reference

#include <PSDL_Module_Visitor.h>

Inheritance diagram for TAO_PSDL_Module_Visitor:

Inheritance graph
[legend]
Collaboration diagram for TAO_PSDL_Module_Visitor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_PSDL_Module_Visitor ()
 ~TAO_PSDL_Module_Visitor ()
int visit_module (TAO_PSDL_Module *node)

Constructor & Destructor Documentation

TAO_PSDL_Module_Visitor::TAO_PSDL_Module_Visitor  ) 
 

Definition at line 10 of file PSDL_Module_Visitor.cpp.

00011 {
00012 }

TAO_PSDL_Module_Visitor::~TAO_PSDL_Module_Visitor  ) 
 

Definition at line 14 of file PSDL_Module_Visitor.cpp.

00015 {
00016 }


Member Function Documentation

int TAO_PSDL_Module_Visitor::visit_module TAO_PSDL_Module node  )  [virtual]
 

Reimplemented from TAO_PSDL_Node_Visitor.

Definition at line 19 of file PSDL_Module_Visitor.cpp.

References TAO_PSDL_Node::accept(), ACE_ERROR_RETURN, TAO_PSDL_Stream::decr_indent(), TAO_PSDL_Scope::get_sh(), TAO_PSDL_Module::identifier_name(), TAO_PSDL_Stream::incr_indent(), TAO_PSDL_Scope::instance(), LM_ERROR, TAO_PSDL_Stream::nl(), TAO_PSDL_Scope::set_name_space(), and TAO_PSDL_Module::specification().

00020 {
00021   // Get a pointer to PSDL_Stream of the stub header.
00022   TAO_PSDL_Stream *ps_sh = TAO_PSDL_Scope::instance ()->get_sh ();
00023 
00024   // The visitor method for the modules. We invoke the accept method
00025   // of the TAO_PSDL_Module. This method is going to invoke the chain
00026   // of visitor methods for members in the module scope.
00027   *ps_sh << "TAO_NAMESPACE "
00028          << module->identifier_name ().c_str ()
00029          << " {";
00030 
00031   ps_sh->nl ();
00032 
00033   ps_sh->incr_indent ();
00034   TAO_PSDL_Scope::instance ()->set_name_space (module->identifier_name ());
00035 
00036   if (module->specification ()->accept (this) == -1)
00037     {
00038       ACE_ERROR_RETURN ((LM_ERROR,
00039                          "(%N:%l) PSDL_Module_Visitor::"
00040                          "visit_module - "
00041                          "codegen for scope failed\n"), -1);
00042     }
00043 
00044   ps_sh->decr_indent ();
00045   ps_sh->nl ();
00046 
00047   *ps_sh << "} TAO_NAMESPACE_CLOSE // module "
00048          << module->identifier_name ().c_str ()
00049          << "\n\n";
00050 
00051   return 0;
00052 }


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 14:09:24 2006 for TAO_PSS by doxygen 1.3.6