psdl_module_visitor.cpp

来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C++ 代码 · 共 53 行

CPP
53
字号
// -*- C++ -*-
// PSDL_Module_Visitor.cpp,v 1.1 2002/07/25 15:25:51 pgontla Exp

#include "PSDL_Module_Visitor.h"
#include "PSDL_Scope.h"
#include "PSDL_Stream.h"

ACE_RCSID (PSS, PSDL_Module_Visitor, "PSDL_Module_Visitor.cpp,v 1.1 2002/07/25 15:25:51 pgontla Exp")

TAO_PSDL_Module_Visitor::TAO_PSDL_Module_Visitor (void)
{
}

TAO_PSDL_Module_Visitor::~TAO_PSDL_Module_Visitor (void)
{
}

int
TAO_PSDL_Module_Visitor::visit_module (TAO_PSDL_Module *module)
{
  // Get a pointer to PSDL_Stream of the stub header.
  TAO_PSDL_Stream *ps_sh = TAO_PSDL_Scope::instance ()->get_sh ();

  // The visitor method for the modules. We invoke the accept method
  // of the TAO_PSDL_Module. This method is going to invoke the chain
  // of visitor methods for members in the module scope.
  *ps_sh << "TAO_NAMESPACE "
         << module->identifier_name ().c_str ()
         << " {";

  ps_sh->nl ();

  ps_sh->incr_indent ();
  TAO_PSDL_Scope::instance ()->set_name_space (module->identifier_name ());

  if (module->specification ()->accept (this) == -1)
    {
      ACE_ERROR_RETURN ((LM_ERROR,
                         "(%N:%l) PSDL_Module_Visitor::"
                         "visit_module - "
                         "codegen for scope failed\n"), -1);
    }

  ps_sh->decr_indent ();
  ps_sh->nl ();

  *ps_sh << "} TAO_NAMESPACE_CLOSE // module "
         << module->identifier_name ().c_str ()
         << "\n\n";

  return 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?