⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 psdl_node.h

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 H
📖 第 1 页 / 共 5 页
字号:
/* -*- C++ -*- */
// PSDL_Node.h,v 1.1 2002/07/25 15:25:51 pgontla Exp
//
// ============================================================================
//
// = LIBRARY
//    PSS
//
// = FILENAME
//    PSDL_Node
//
// = DESCRIPTION
//    This class is the base type for all the type of possible nodes
//    in the parse tree.
//
// = AUTHOR
//    Priyanka Gontla <gontla_p@ociweb.com>
//
// ============================================================================

#ifndef TAO_PSDL_NODE_H
#define TAO_PSDL_NODE_H

#include "psdl_export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "PSDL_Scope.h"

#include "tao/corbafwd.h"
#include "ace/SString.h"


class TAO_PSDL_Node_Visitor;
class TAO_PSDL_Scope_Visitor;

class TAO_String_Manager;

class TAO_PSDL_Export TAO_PSDL_Node
{
public:

  // Constructor and destructor
  TAO_PSDL_Node (void);

  virtual ~TAO_PSDL_Node (void);

  // This method is for applying the visitor pattern. When the control
  // reaches a particular node, since we donot know the type of the
  // node, we invoke the accept method. Each derived classes accept
  // method, will invoke the corresponding visitor method which does
  // the needful for that particular type of the node.
  virtual int accept (TAO_PSDL_Node_Visitor *visitor) = 0;

  // Needed when writing to stubs.
  virtual int type_of_node (void) const;

  // Accessors to the identifiers for use while building the ASTs
  ACE_CString get_identifier_type (void);
  ACE_CString get_identifier_value (void);
  void set_identifier (ACE_CString identifier);

  // Set the predefined_type_ to 1 to indicate that the type is a
  // predefined type.
  void set_predefined_type (void);

  /// Accessor methods.
  TAO_PSDL_Scope *psdl_scope (void);
  TAO_PSDL_Scope_Visitor *psdl_scope_visitor (void);

protected :

  int type_;

  // Array to carry the temporary identifier_type and identifier_value
  // before they are added to the related scope. ie,. to the ASTs
  ACE_Array_Base <ACE_CString> identifiers_;

  // Index to keep track of the present member of the identifiers_
  // array.
  CORBA::ULong count_;

  // Check if the type of the identifier is a predefined one.
  // The default value is that any identifier_type is a user-defined
  // one i.e. if the value is zero, it is a user-defined type. When
  // the identifier_type is actually a predefined one, its value is to
  // be changed to 1.
  CORBA::Boolean predefined_type_;
  /// Pointer to psdl_scope_
  TAO_PSDL_Scope *psdl_scope_;

  // Pointer to the base visitor class
  TAO_PSDL_Scope_Visitor *psdl_scope_visitor_;
};

// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Specification : public TAO_PSDL_Node
{
  // This class is for psdl_specification s.
public:
  TAO_PSDL_Specification (TAO_PSDL_Node *definition);
  TAO_PSDL_Specification (TAO_PSDL_Node *definition,
                          TAO_PSDL_Node *specification);

  virtual ~TAO_PSDL_Specification (void);

  /// Get the values.
  TAO_PSDL_Node *definition (void) const;
  TAO_PSDL_Node *specification (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *definition_;
  TAO_PSDL_Node *specification_;

};

// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Definition : public TAO_PSDL_Node
{
  // For psdl_definition
public:
  TAO_PSDL_Definition (TAO_PSDL_Node *definition_type);

  virtual ~TAO_PSDL_Definition (void);

  /// Get the value
  TAO_PSDL_Node *definition_type (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *definition_type_;
};

// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Module : public TAO_PSDL_Node
{
  // for psdl_module
public:
  TAO_PSDL_Module (int type,
                   TAO_PSDL_Node *identifier,
                   TAO_PSDL_Node *specification);

  virtual ~TAO_PSDL_Module (void);

  /// Get the value
  TAO_PSDL_Node *identifier (void) const;
  TAO_PSDL_Node *specification (void) const;

  void set_identifier_name (ACE_CString);
  ACE_CString identifier_name (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *identifier_;
  TAO_PSDL_Node *specification_;
  ACE_CString module_name_;
};

// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Abstract_Storagetype : public TAO_PSDL_Node
{
  // For abstract_storagetype
public:
  TAO_PSDL_Abstract_Storagetype (TAO_PSDL_Node *storagetype_dcl);

  virtual ~TAO_PSDL_Abstract_Storagetype (void);

  /// Get the value
  TAO_PSDL_Node *storagetype_dcl (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *storagetype_dcl_;
};

// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Abstract_Storagetype_Dcl : public TAO_PSDL_Node
{
public:

  TAO_PSDL_Abstract_Storagetype_Dcl (TAO_PSDL_Node *abs_storagetype_header);

  TAO_PSDL_Abstract_Storagetype_Dcl (TAO_PSDL_Node *abs_storagetype_header,
                                     TAO_PSDL_Node *abs_storagetype_body);

  virtual ~TAO_PSDL_Abstract_Storagetype_Dcl (void);

  /// Get the value
  TAO_PSDL_Node *abs_storagetype_header (void) const;
  TAO_PSDL_Node *abs_storagetype_body (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *abs_storagetype_header_;
  TAO_PSDL_Node *abs_storagetype_body_;

};

// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Abstract_Storagetype_Fwd_Dcl : public TAO_PSDL_Node
{
public:
  TAO_PSDL_Abstract_Storagetype_Fwd_Dcl (TAO_PSDL_Node *identifer);

  virtual ~TAO_PSDL_Abstract_Storagetype_Fwd_Dcl (void);

  /// Get the value
  TAO_PSDL_Node *identifier (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *identifier_;
};

// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Abstract_Storagetype_Header : public TAO_PSDL_Node
{
public:

  TAO_PSDL_Abstract_Storagetype_Header (TAO_PSDL_Node *identifer);
  TAO_PSDL_Abstract_Storagetype_Header (TAO_PSDL_Node *identifer,
                                        TAO_PSDL_Node *abs_storagetype_inh_spec);

  virtual ~TAO_PSDL_Abstract_Storagetype_Header (void);

  /// Get the value
  TAO_PSDL_Node *identifier (void) const;
  TAO_PSDL_Node *abs_storagetype_inh_spec (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *identifier_;
  TAO_PSDL_Node *abs_storagetype_inh_spec_;
};

// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Abstract_Storagetype_Body : public TAO_PSDL_Node
{
public:

  TAO_PSDL_Abstract_Storagetype_Body (TAO_PSDL_Node *abs_storagetype_member);
  TAO_PSDL_Abstract_Storagetype_Body (TAO_PSDL_Node *abs_storagetype_member,
                                      TAO_PSDL_Node *abs_storagetype_body);

  virtual ~TAO_PSDL_Abstract_Storagetype_Body (void);

  /// Get the value
  TAO_PSDL_Node *abs_storagetype_member (void) const;
  TAO_PSDL_Node *abs_storagetype_body (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *abs_storagetype_member_;
  TAO_PSDL_Node *abs_storagetype_body_;
};

// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Abstract_Storagetype_Member : public TAO_PSDL_Node
{
public:

  TAO_PSDL_Abstract_Storagetype_Member (TAO_PSDL_Node *declaration);
  virtual ~TAO_PSDL_Abstract_Storagetype_Member (void);

  /// Get the value
  TAO_PSDL_Node *declaration (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *declaration_;
};

// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Abstract_Storagetype_Inh_Spec : public TAO_PSDL_Node
{
public:

  TAO_PSDL_Abstract_Storagetype_Inh_Spec (TAO_PSDL_Node *abs_storagetype_name);
  virtual ~TAO_PSDL_Abstract_Storagetype_Inh_Spec (void);

  /// Get the value
  TAO_PSDL_Node *abs_storagetype_name (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *abs_storagetype_name_;
};

// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Abstract_Storagetype_Name : public TAO_PSDL_Node
{
public:

  TAO_PSDL_Abstract_Storagetype_Name (TAO_PSDL_Node *scoped_name);
  TAO_PSDL_Abstract_Storagetype_Name (TAO_PSDL_Node *scoped_name,
                                      TAO_PSDL_Node *abs_storagetype_name);
  virtual ~TAO_PSDL_Abstract_Storagetype_Name (void);

  /// Get the value
  TAO_PSDL_Node *scoped_name (void) const;
  TAO_PSDL_Node *abs_storagetype_name (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *scoped_name_;
  TAO_PSDL_Node *abs_storagetype_name_;
};

/// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Psdl_State_Dcl : public TAO_PSDL_Node
{
public:

  TAO_PSDL_Psdl_State_Dcl (TAO_PSDL_Node *key_word,
                           TAO_PSDL_Node *psdl_state_type_spec,
                           TAO_PSDL_Node *simple_declarator);

  TAO_PSDL_Psdl_State_Dcl (TAO_PSDL_Node *psdl_state_type_spec,
                           TAO_PSDL_Node *simple_declarator);

  virtual ~TAO_PSDL_Psdl_State_Dcl (void);

  /// Get the value
  TAO_PSDL_Node *psdl_state_type_spec (void) const;
  TAO_PSDL_Node *simple_declarator (void) const;
  TAO_PSDL_Node *key_word (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *key_word_;
  TAO_PSDL_Node *psdl_state_type_spec_;
  TAO_PSDL_Node *simple_declarator_;
};

/// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Psdl_State_Type_Spec : public TAO_PSDL_Node
{
public:

  TAO_PSDL_Psdl_State_Type_Spec (TAO_PSDL_Node *type_spec);

  virtual ~TAO_PSDL_Psdl_State_Type_Spec (void);

  /// Get the value
  TAO_PSDL_Node *type_spec (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *type_spec_;
};

/// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Abstract_Storagetype_Ref_Type : public TAO_PSDL_Node
{
public:

  TAO_PSDL_Abstract_Storagetype_Ref_Type (TAO_PSDL_Node *key_word,
                                          TAO_PSDL_Node *abs_storagetype_name);

  TAO_PSDL_Abstract_Storagetype_Ref_Type (TAO_PSDL_Node *abs_storagetype_name);

  virtual ~TAO_PSDL_Abstract_Storagetype_Ref_Type (void);

  /// Get the value
  TAO_PSDL_Node *key_word (void) const;
  TAO_PSDL_Node *abs_storagetype_name (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *key_word_;
  TAO_PSDL_Node *abs_storagetype_name_;
};

/// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Abstract_Storagehome : public TAO_PSDL_Node
{
public:

  TAO_PSDL_Abstract_Storagehome (TAO_PSDL_Node *abs_storagehome_dcl);

  virtual ~TAO_PSDL_Abstract_Storagehome (void);

  /// Get the value
  TAO_PSDL_Node *abs_storagehome_dcl (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *abs_storagehome_dcl_;
};

/// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Abstract_Storagehome_Fwd_Dcl : public TAO_PSDL_Node
{
public:

  TAO_PSDL_Abstract_Storagehome_Fwd_Dcl (TAO_PSDL_Node *identifier);

  virtual ~TAO_PSDL_Abstract_Storagehome_Fwd_Dcl (void);

  /// Get the value
  TAO_PSDL_Node *identifier (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *identifier_;
};

/// ****************************************************************

class TAO_PSDL_Export TAO_PSDL_Abstract_Storagehome_Dcl : public TAO_PSDL_Node
{
public:

  TAO_PSDL_Abstract_Storagehome_Dcl (TAO_PSDL_Node *abs_storagehome_header);

  TAO_PSDL_Abstract_Storagehome_Dcl (TAO_PSDL_Node *abs_storagehome_header,
                                     TAO_PSDL_Node *abs_storagehome_body);

  virtual ~TAO_PSDL_Abstract_Storagehome_Dcl (void);

  /// Get the value
  TAO_PSDL_Node *abs_storagehome_header (void) const;
  TAO_PSDL_Node *abs_storagehome_body (void) const;

  /// = The Node methods.
  int accept (TAO_PSDL_Node_Visitor *visitor);

private:
  /// The values
  TAO_PSDL_Node *abs_storagehome_header_;
  TAO_PSDL_Node *abs_storagehome_body_;
};

⌨️ 快捷键说明

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