diff options
author | gokhale <asgokhale@users.noreply.github.com> | 1998-06-18 13:03:02 +0000 |
---|---|---|
committer | gokhale <asgokhale@users.noreply.github.com> | 1998-06-18 13:03:02 +0000 |
commit | d390c2dd3ece730c4aa679260914f77c138fed6a (patch) | |
tree | 5ca8c196f359f7d4abd86490a5d7fd83e5e36330 /TAO/TAO_IDL/be_include | |
parent | aaecbedb1d5fda5b558ec9da329df7c138862726 (diff) | |
download | ATCD-d390c2dd3ece730c4aa679260914f77c138fed6a.tar.gz |
*** empty log message ***
Diffstat (limited to 'TAO/TAO_IDL/be_include')
139 files changed, 7316 insertions, 3976 deletions
diff --git a/TAO/TAO_IDL/be_include/be_visitor_args.h b/TAO/TAO_IDL/be_include/be_visitor_args.h deleted file mode 100644 index 95772b59119..00000000000 --- a/TAO/TAO_IDL/be_include/be_visitor_args.h +++ /dev/null @@ -1,606 +0,0 @@ -// -// $Id$ -// - -// ============================================================================ -// -// = LIBRARY -// TAO IDL -// -// = FILENAME -// be_visitor_args.h -// -// = DESCRIPTION -// Visitors for generation of code for Arguments -// -// = AUTHOR -// Aniruddha Gokhale and Carlos O' Ryan -// -// ============================================================================ - -#ifndef _BE_VISITOR_ARGS_H -#define _BE_VISITOR_ARGS_H - -#include "be_visitor_decl.h" - -class be_visitor_args : public be_visitor_decl -{ - // - // = TITLE - // Generates the code for arguments output. - // - // = DESCRIPTION - // At several stages in the code generation a node of type - // "be_operation" is visited, and the code for its arguments must - // be generated. - // Sometimes the argument declarations must be generated (such as - // in the class declaration), other the arguments names (such as - // in method invocations). - // This class implements some common functionality required across all - // argument visitors - // -public: - be_visitor_args (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_args (void); - // destructor - - //= helper - virtual const char *type_name (be_type *type, const char *suffix=0); - // helper that produces either a nested name for header files or full name - // for others - - virtual AST_Argument::Direction direction (void); - // return the direction of the argument node - - virtual int visit_argument (be_argument *node); - // must be overridden by derived classes -}; - -class be_visitor_args_arglist : public be_visitor_args -{ - // - // = TITLE - // Generates the code for arguments output. - // - // = DESCRIPTION - // At several stages in the code generation a node of type - // "be_operation" is visited, and the code for its arguments must - // be generated. - // Sometimes the argument declarations must be generated (such as - // in the class declaration), other the arguments names (such as - // in method invocations). - // This class implements the declaration output, in other words, - // it outputs both the arguments and their types. - // -public: - be_visitor_args_arglist (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_args_arglist (void); - // destructor - - virtual int visit_argument (be_argument *node); - // visit the argument node - - // =visit all the nodes that can be the types for the argument - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit the enum node - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward - - virtual int visit_native (be_native *node); - // visit native node - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_union (be_union *node); - // visit union type - - virtual int visit_typedef (be_typedef *node); - // visit the typedef type - -}; - -// ************************************************************ -// class be_visitor_args_pre_docall_cs -// ************************************************************ -class be_visitor_args_pre_docall_cs : public be_visitor_args -{ - // - // = TITLE - // be_visitor_args_docall_cs - // - // = DESCRIPTION - // Code to be generated when making the do_static_call - // -public: - be_visitor_args_pre_docall_cs (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_args_pre_docall_cs (void); - // destructor - - virtual int void_return_type (void); - // return true if the operation return type is void - - virtual int visit_argument (be_argument *node); - // visit the argument node - - // =visit all the nodes that can be the types for the argument - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_union (be_union *node); - // visit union type - - virtual int visit_typedef (be_typedef *node); - // visit the typedef type - -}; - -// ************************************************************ -// class be_visitor_args_docall_cs -// ************************************************************ -class be_visitor_args_docall_cs : public be_visitor_args -{ - // - // = TITLE - // be_visitor_args_docall_cs - // - // = DESCRIPTION - // Code to be generated when making the do_static_call - // -public: - be_visitor_args_docall_cs (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_args_docall_cs (void); - // destructor - - virtual int visit_argument (be_argument *node); - // visit the argument node - - // =visit all the nodes that can be the types for the argument - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit the enum node - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_union (be_union *node); - // visit union type - - virtual int visit_typedef (be_typedef *node); - // visit the typedef type - -}; - -// ************************************************************ -// class be_visitor_args_post_docall_cs -// ************************************************************ -class be_visitor_args_post_docall_cs : public be_visitor_args -{ - // - // = TITLE - // be_visitor_args_post_docall_cs - // - // = DESCRIPTION - // Code to be generated after the do_static_call is done - // -public: - be_visitor_args_post_docall_cs (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_args_post_docall_cs (void); - // destructor - - virtual int visit_argument (be_argument *node); - // visit the argument node - - // =visit all the nodes that can be the types for the argument - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward - - virtual int visit_typedef (be_typedef *node); - // visit the typedef type -}; - -// ************************************************************ -// class be_visitor_args_vardecl_ss -// ************************************************************ -class be_visitor_args_vardecl_ss : public be_visitor_args -{ - // - // = TITLE - // be_visitor_args_vardecl_ss - // - // = DESCRIPTION - // Visitor for variable declaration for argument - // -public: - be_visitor_args_vardecl_ss (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_args_vardecl_ss (void); - // destructor - - virtual int visit_argument (be_argument *node); - // visit the argument node - - // =visit all the nodes that can be the types for the argument - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit the enum node - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_union (be_union *node); - // visit union type - - virtual int visit_typedef (be_typedef *node); - // visit the typedef type - -}; - -// ************************************************************ -// class be_visitor_args_pre_upcall_ss -// ************************************************************ -class be_visitor_args_pre_upcall_ss : public be_visitor_args -{ - // - // = TITLE - // be_visitor_args_upcall_ss - // - // = DESCRIPTION - // Visitor for passing argument to the upcall - // -public: - be_visitor_args_pre_upcall_ss (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_args_pre_upcall_ss (void); - // destructor - - virtual int visit_argument (be_argument *node); - // visit the argument node - - // =visit all the nodes that can be the types for the argument - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit the enum node - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_union (be_union *node); - // visit union type - - virtual int visit_typedef (be_typedef *node); - // visit the typedef type - -}; - -// ************************************************************ -// class be_visitor_args_upcall_ss -// ************************************************************ -class be_visitor_args_upcall_ss : public be_visitor_args -{ - // - // = TITLE - // be_visitor_args_upcall_ss - // - // = DESCRIPTION - // Visitor for passing argument to the upcall - // -public: - be_visitor_args_upcall_ss (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_args_upcall_ss (void); - // destructor - - virtual int visit_argument (be_argument *node); - // visit the argument node - - // =visit all the nodes that can be the types for the argument - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit the enum node - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_union (be_union *node); - // visit union type - - virtual int visit_typedef (be_typedef *node); - // visit the typedef type - -}; - -// ************************************************************ -// class be_visitor_args_marshal_ss -// ************************************************************ -class be_visitor_args_marshal_ss : public be_visitor_args -{ - // - // = TITLE - // be_visitor_args_marshal_ss - // - // = DESCRIPTION - // Visitor for passing argument to the marshaling/demarshaling routine - // -public: - be_visitor_args_marshal_ss (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_args_marshal_ss (void); - // destructor - - virtual int visit_argument (be_argument *node); - // visit the argument node - - // =visit all the nodes that can be the types for the argument - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit the enum node - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_union (be_union *node); - // visit union type - - virtual int visit_typedef (be_typedef *node); - // visit the typedef type - -}; - -// ************************************************************ -// class be_visitor_args_post_upcall_ss -// ************************************************************ -class be_visitor_args_post_upcall_ss : public be_visitor_args -{ - // - // = TITLE - // be_visitor_args_post_upcall_ss - // - // = DESCRIPTION - // Visitor for post processing after upcall - // -public: - be_visitor_args_post_upcall_ss (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_args_post_upcall_ss (void); - // destructor - - virtual int visit_argument (be_argument *node); - // visit the argument node - - // =visit all the nodes that can be the types for the argument - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit the enum node - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_union (be_union *node); - // visit union type - - virtual int visit_typedef (be_typedef *node); - // visit the typedef type - -}; - -// ************************************************************ -// class be_visitor_args_post_marshal_ss -// ************************************************************ -class be_visitor_args_post_marshal_ss : public be_visitor_args -{ - // - // = TITLE - // be_visitor_args_post_marshal_ss - // - // = DESCRIPTION - // Visitor for post processing after marshal - // -public: - be_visitor_args_post_marshal_ss (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_args_post_marshal_ss (void); - // destructor - - virtual int visit_argument (be_argument *node); - // visit the argument node - - // =visit all the nodes that can be the types for the argument - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit the enum node - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_union (be_union *node); - // visit union type - - virtual int visit_typedef (be_typedef *node); - // visit the typedef type - -}; - -#endif // _BE_VISITOR_ARGS_H diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument.h b/TAO/TAO_IDL/be_include/be_visitor_argument.h new file mode 100644 index 00000000000..6b4a6c0ed63 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument.h @@ -0,0 +1,38 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// be_visitor_args.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments. These are used for the +// interpretive styled stubs and skeletons +// +// = AUTHOR +// Aniruddha Gokhale and Carlos O' Ryan +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARGUMENT_H) +#define _BE_VISITOR_ARGUMENT_H + +#include "be_visitor_decl.h" +#include "be_visitor_argument/argument.h" +#include "be_visitor_argument/arglist.h" +#include "be_visitor_argument/pre_docall_cs.h" +#include "be_visitor_argument/docall_cs.h" +#include "be_visitor_argument/post_docall_cs.h" +#include "be_visitor_argument/vardecl_ss.h" +#include "be_visitor_argument/pre_upcall_ss.h" +#include "be_visitor_argument/upcall_ss.h" +#include "be_visitor_argument/post_upcall_ss.h" +#include "be_visitor_argument/marshal_ss.h" +#include "be_visitor_argument/post_marshal_ss.h" + +#endif /* _BE_VISITOR_ARGUMENT_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/arglist.h b/TAO/TAO_IDL/be_include/be_visitor_argument/arglist.h new file mode 100644 index 00000000000..7042280a22e --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/arglist.h @@ -0,0 +1,88 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// arglist.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments as parameter lists in the +// operation signature +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARGUMENT_ARGLIST_H_) +#define _BE_VISITOR_ARGUMENT_ARGLIST_H_ + +class be_visitor_args_arglist : public be_visitor_args +{ + // + // = TITLE + // Generates the code for arguments output. + // + // = DESCRIPTION + // At several stages in the code generation a node of type + // "be_operation" is visited, and the code for its arguments must + // be generated. + // Sometimes the argument declarations must be generated (such as + // in the class declaration), other the arguments names (such as + // in method invocations). + // This class implements the declaration output, in other words, + // it outputs both the arguments and their types. + // +public: + be_visitor_args_arglist (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args_arglist (void); + // destructor + + virtual int visit_argument (be_argument *node); + // visit the argument node + + // =visit all the nodes that can be the types for the argument + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit the enum node + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + + virtual int visit_native (be_native *node); + // visit native node + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_union (be_union *node); + // visit union type + + virtual int visit_typedef (be_typedef *node); + // visit the typedef type + +}; + +#endif /* _BE_VISITOR_ARGUMENT_ARGLIST_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/argument.h b/TAO/TAO_IDL/be_include/be_visitor_argument/argument.h new file mode 100644 index 00000000000..537811f8b94 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/argument.h @@ -0,0 +1,59 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// argument.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARGUMENT_ARGUMENT_H_) +#define _BE_VISITOR_ARGUMENT_ARGUMENT_H_ + +class be_visitor_args : public be_visitor_decl +{ + // + // = TITLE + // Generates the code for arguments output. + // + // = DESCRIPTION + // At several stages in the code generation a node of type + // "be_operation" is visited, and the code for its arguments must + // be generated. + // Sometimes the argument declarations must be generated (such as + // in the class declaration), other the arguments names (such as + // in method invocations). + // This class implements some common functionality required across all + // argument visitors + // +public: + be_visitor_args (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args (void); + // destructor + + //= helper + virtual const char *type_name (be_type *type, const char *suffix=0); + // helper that produces either a nested name for header files or full name + // for others + + virtual AST_Argument::Direction direction (void); + // return the direction of the argument node + + virtual int visit_argument (be_argument *node); + // must be overridden by derived classes +}; + +#endif /* _BE_VISITOR_ARGUMENT_ARGUMENT_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/docall_cs.h b/TAO/TAO_IDL/be_include/be_visitor_argument/docall_cs.h new file mode 100644 index 00000000000..0b876370660 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/docall_cs.h @@ -0,0 +1,81 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// docall_cs.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments for passing the arguments +// to the docall in the client side stub. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARGUMENT_DOCALL_CS_H_) +#define _BE_VISITOR_ARGUMENT_DOCALL_CS_H_ + +// ************************************************************ +// class be_visitor_args_docall_cs +// ************************************************************ +class be_visitor_args_docall_cs : public be_visitor_args +{ + // + // = TITLE + // be_visitor_args_docall_cs + // + // = DESCRIPTION + // Code to be generated when making the do_static_call + // +public: + be_visitor_args_docall_cs (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args_docall_cs (void); + // destructor + + virtual int visit_argument (be_argument *node); + // visit the argument node + + // =visit all the nodes that can be the types for the argument + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit the enum node + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_union (be_union *node); + // visit union type + + virtual int visit_typedef (be_typedef *node); + // visit the typedef type + +}; + +#endif /* _BE_VISITOR_ARGUMENT_DOCALL_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/marshal_ss.h b/TAO/TAO_IDL/be_include/be_visitor_argument/marshal_ss.h new file mode 100644 index 00000000000..ea26a66fde3 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/marshal_ss.h @@ -0,0 +1,81 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// marshal_ss.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments. This generates the +// code to pass the arguments to the call to the marshaler/demarshaler +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARGUMENT_MARSHAL_SS_H_) +#define _BE_VISITOR_ARGUMENT_MARSHAL_SS_H_ + +// ************************************************************ +// class be_visitor_args_marshal_ss +// ************************************************************ +class be_visitor_args_marshal_ss : public be_visitor_args +{ + // + // = TITLE + // be_visitor_args_marshal_ss + // + // = DESCRIPTION + // Visitor for passing argument to the marshaling/demarshaling routine + // +public: + be_visitor_args_marshal_ss (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args_marshal_ss (void); + // destructor + + virtual int visit_argument (be_argument *node); + // visit the argument node + + // =visit all the nodes that can be the types for the argument + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit the enum node + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_union (be_union *node); + // visit union type + + virtual int visit_typedef (be_typedef *node); + // visit the typedef type + +}; + +#endif /* _BE_VISITOR_ARGUMENT_MARSHAL_SS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/post_docall_cs.h b/TAO/TAO_IDL/be_include/be_visitor_argument/post_docall_cs.h new file mode 100644 index 00000000000..e292de4fa0a --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/post_docall_cs.h @@ -0,0 +1,59 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// post_docall_cs.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments for docall post processing +// in the client side stub. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARGUMENT_POST_DOCALL_CS_H_) +#define _BE_VISITOR_ARGUMENT_POST_DOCALL_CS_H_ + +// ************************************************************ +// class be_visitor_args_post_docall_cs +// ************************************************************ +class be_visitor_args_post_docall_cs : public be_visitor_args +{ + // + // = TITLE + // be_visitor_args_post_docall_cs + // + // = DESCRIPTION + // Code to be generated after the do_static_call is done + // +public: + be_visitor_args_post_docall_cs (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args_post_docall_cs (void); + // destructor + + virtual int visit_argument (be_argument *node); + // visit the argument node + + // =visit all the nodes that can be the types for the argument + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + + virtual int visit_typedef (be_typedef *node); + // visit the typedef type +}; + +#endif /* _BE_VISITOR_ARGUMENT_POST_DOCALL_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/post_marshal_ss.h b/TAO/TAO_IDL/be_include/be_visitor_argument/post_marshal_ss.h new file mode 100644 index 00000000000..4988ff66ad2 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/post_marshal_ss.h @@ -0,0 +1,81 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// post_marshal_ss.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments. This generates the +// code that does post-marshal processing (cleaning up) for arguments +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARGUMENT_POST_MARSHAL_SS_H_) +#define _BE_VISITOR_ARGUMENT_POST_MARSHAL_SS_H_ + +// ************************************************************ +// class be_visitor_args_post_marshal_ss +// ************************************************************ +class be_visitor_args_post_marshal_ss : public be_visitor_args +{ + // + // = TITLE + // be_visitor_args_post_marshal_ss + // + // = DESCRIPTION + // Visitor for post processing after marshal + // +public: + be_visitor_args_post_marshal_ss (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args_post_marshal_ss (void); + // destructor + + virtual int visit_argument (be_argument *node); + // visit the argument node + + // =visit all the nodes that can be the types for the argument + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit the enum node + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_union (be_union *node); + // visit union type + + virtual int visit_typedef (be_typedef *node); + // visit the typedef type + +}; + +#endif /* _BE_VISITOR_ARGUMENT_POST_MARSHAL_SS_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h b/TAO/TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h new file mode 100644 index 00000000000..7b87ba9bf35 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/post_upcall_ss.h @@ -0,0 +1,82 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// post_upcall_ss.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments. This generates the +// code for post upcall processing of the arguments +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + + +#if !defined (_BE_VISITOR_ARGUMENT_POST_UPCALL_SS_H_) +#define _BE_VISITOR_ARGUMENT_POST_UPCALL_SS_H_ + +// ************************************************************ +// class be_visitor_args_post_upcall_ss +// ************************************************************ +class be_visitor_args_post_upcall_ss : public be_visitor_args +{ + // + // = TITLE + // be_visitor_args_post_upcall_ss + // + // = DESCRIPTION + // Visitor for post processing after upcall + // +public: + be_visitor_args_post_upcall_ss (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args_post_upcall_ss (void); + // destructor + + virtual int visit_argument (be_argument *node); + // visit the argument node + + // =visit all the nodes that can be the types for the argument + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit the enum node + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_union (be_union *node); + // visit union type + + virtual int visit_typedef (be_typedef *node); + // visit the typedef type + +}; + +#endif /* _BE_VISITOR_ARGUMENT_POST_UPCALL_SS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/pre_docall_cs.h b/TAO/TAO_IDL/be_include/be_visitor_argument/pre_docall_cs.h new file mode 100644 index 00000000000..f5238423590 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/pre_docall_cs.h @@ -0,0 +1,81 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// pre_docall_cs.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments for pre docall processing +// in client side stub that uses interpretive marshaling. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARGUMENT_PRE_DOCALL_CS_H_) +#define _BE_VISITOR_ARGUMENT_PRE_DOCALL_CS_H_ + +// ************************************************************ +// class be_visitor_args_pre_docall_cs +// ************************************************************ +class be_visitor_args_pre_docall_cs : public be_visitor_args +{ + // + // = TITLE + // be_visitor_args_docall_cs + // + // = DESCRIPTION + // Code to be generated when making the do_static_call + // +public: + be_visitor_args_pre_docall_cs (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args_pre_docall_cs (void); + // destructor + + virtual int void_return_type (void); + // return true if the operation return type is void + + virtual int visit_argument (be_argument *node); + // visit the argument node + + // =visit all the nodes that can be the types for the argument + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_union (be_union *node); + // visit union type + + virtual int visit_typedef (be_typedef *node); + // visit the typedef type + +}; + +#endif /* _BE_VISITOR_ARGUMENT_PRE_DOCALL_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/pre_upcall_ss.h b/TAO/TAO_IDL/be_include/be_visitor_argument/pre_upcall_ss.h new file mode 100644 index 00000000000..24bf3e88054 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/pre_upcall_ss.h @@ -0,0 +1,81 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// pre_upcall_ss.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments. This generates the +// pre upcall processing of arguments in the server-side skeleton. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARGUMENT_PRE_UPCALL_SS_H_) +#define _BE_VISITOR_ARGUMENT_PRE_UPCALL_SS_H_ + +// ************************************************************ +// class be_visitor_args_pre_upcall_ss +// ************************************************************ +class be_visitor_args_pre_upcall_ss : public be_visitor_args +{ + // + // = TITLE + // be_visitor_args_upcall_ss + // + // = DESCRIPTION + // Visitor for passing argument to the upcall + // +public: + be_visitor_args_pre_upcall_ss (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args_pre_upcall_ss (void); + // destructor + + virtual int visit_argument (be_argument *node); + // visit the argument node + + // =visit all the nodes that can be the types for the argument + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit the enum node + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_union (be_union *node); + // visit union type + + virtual int visit_typedef (be_typedef *node); + // visit the typedef type + +}; + +#endif /* _BE_VISITOR_ARGUMENT_PRE_UPCALL_SS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/upcall_ss.h b/TAO/TAO_IDL/be_include/be_visitor_argument/upcall_ss.h new file mode 100644 index 00000000000..5bd504fcded --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/upcall_ss.h @@ -0,0 +1,81 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// upcall_ss.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments. This generates the +// passing of arguments to the upcall. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARGUMENT_UPCALL_SS_H_) +#define _BE_VISITOR_ARGUMENT_UPCALL_SS_H_ + +// ************************************************************ +// class be_visitor_args_upcall_ss +// ************************************************************ +class be_visitor_args_upcall_ss : public be_visitor_args +{ + // + // = TITLE + // be_visitor_args_upcall_ss + // + // = DESCRIPTION + // Visitor for passing argument to the upcall + // +public: + be_visitor_args_upcall_ss (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args_upcall_ss (void); + // destructor + + virtual int visit_argument (be_argument *node); + // visit the argument node + + // =visit all the nodes that can be the types for the argument + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit the enum node + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_union (be_union *node); + // visit union type + + virtual int visit_typedef (be_typedef *node); + // visit the typedef type + +}; + +#endif /* _BE_VISITOR_ARGUMENT_UPCALL_SS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/vardecl_ss.h b/TAO/TAO_IDL/be_include/be_visitor_argument/vardecl_ss.h new file mode 100644 index 00000000000..40018f1f0e2 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/vardecl_ss.h @@ -0,0 +1,81 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// vardecl_ss.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments. This generates the +// variable declartion for the argument in the server-sde skeleton +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARGUMENT_VARDECL_SS_H_) +#define _BE_VISITOR_ARGUMENT_VARDECL_SS_H_ + +// ************************************************************ +// class be_visitor_args_vardecl_ss +// ************************************************************ +class be_visitor_args_vardecl_ss : public be_visitor_args +{ + // + // = TITLE + // be_visitor_args_vardecl_ss + // + // = DESCRIPTION + // Visitor for variable declaration for argument + // +public: + be_visitor_args_vardecl_ss (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args_vardecl_ss (void); + // destructor + + virtual int visit_argument (be_argument *node); + // visit the argument node + + // =visit all the nodes that can be the types for the argument + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit the enum node + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_union (be_union *node); + // visit union type + + virtual int visit_typedef (be_typedef *node); + // visit the typedef type + +}; + +#endif /* _BE_VISITOR_ARGUMENT_VARDECL_SS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_array.h b/TAO/TAO_IDL/be_include/be_visitor_array.h index 1aed4d15daa..2f461c49cd4 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_array.h +++ b/TAO/TAO_IDL/be_include/be_visitor_array.h @@ -18,139 +18,17 @@ // // ============================================================================ -#ifndef _BE_VISITOR_ARRAY_H -#define _BE_VISITOR_ARRAY_H +#if !defined (TAO_BE_VISITOR_ARRAY_H) +#define TAO_BE_VISITOR_ARRAY_H #include "be_visitor_decl.h" - - -// ************************************************************ -// class be_visitor_array_ch -// ************************************************************ - -class be_visitor_array_ch : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_array_ch - // - // = DESCRIPTION - // Code to be generated for arrays in the client header file - // -public: - be_visitor_array_ch (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_array_ch (void); - // destructor - - virtual int visit_array (be_array *node); - // visit the array node - -}; - -// ************************************************************ -// class be_visitor_array_ci -// ************************************************************ - -class be_visitor_array_ci : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_array_ci - // - // = DESCRIPTION - // Code to be generated for arrays in the client inline file - // -public: - be_visitor_array_ci (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_array_ci (void); - // destructor - - virtual int visit_array (be_array *node); - // visit the array node - -}; - -// ************************************************************ -// class be_visitor_array_cs -// ************************************************************ - -class be_visitor_array_cs : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_array_cs - // - // = DESCRIPTION - // Code to be generated for arrays in the client stub file - // -public: - be_visitor_array_cs (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_array_cs (void); - // destructor - - virtual int visit_array (be_array *node); - // visit the array node - -}; - -// ************************************************************ -// class be_visitor_array_cs -// ************************************************************ - -class be_visitor_array_any_op_ch : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_array_any_op_ch - // - // = DESCRIPTION - // This is a concrete visitor for array that generates the Any operator - // declarations - // - -public: - be_visitor_array_any_op_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_array_any_op_ch (void); - // destructor - - virtual int visit_array (be_array *node); - // visit array - -}; - -// ************************************************************ -// class be_visitor_array_cs -// ************************************************************ - -class be_visitor_array_any_op_cs : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_array_any_op_cs - // - // = DESCRIPTION - // This is a concrete visitor for array that generates the Any operator - // implementations - // - -public: - be_visitor_array_any_op_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_array_any_op_cs (void); - // destructor - - virtual int visit_array (be_array *node); - // visit array - -}; - -#endif +// generic visitor +#include "be_visitor_array/array.h" +// concrete visitors +#include "be_visitor_array/array_ch.h" +#include "be_visitor_array/array_ci.h" +#include "be_visitor_array/array_cs.h" +#include "be_visitor_array/any_op_ch.h" +#include "be_visitor_array/any_op_cs.h" + +#endif /* TAO_BE_VISITOR_ARRAY_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_array/any_op_ch.h new file mode 100644 index 00000000000..dffce321f77 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_array/any_op_ch.h @@ -0,0 +1,52 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_ch.h +// +// = DESCRIPTION +// Visitors for generation of code for Arrays in client header. This one +// generates the Any operators. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARRAY_ANY_OP_CH_H_) +#define _BE_VISITOR_ARRAY_ANY_OP_CH_H_ + +// ************************************************************ +// class be_visitor_array_any_op_ch +// ************************************************************ + +class be_visitor_array_any_op_ch : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_array_any_op_ch + // + // = DESCRIPTION + // This is a concrete visitor for array that generates the Any operator + // declarations + // + +public: + be_visitor_array_any_op_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_array_any_op_ch (void); + // destructor + + virtual int visit_array (be_array *node); + // visit array + +}; + +#endif /* _BE_VISITOR_ARRAY_ANY_OP_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/any_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_array/any_op_cs.h new file mode 100644 index 00000000000..fc3c814c0d6 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_array/any_op_cs.h @@ -0,0 +1,52 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_cs.h +// +// = DESCRIPTION +// Visitors for generation of code for Arrays in client stubs. This one +// generates the Any operators. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARRAY_ANY_OP_CS_H_) +#define _BE_VISITOR_ARRAY_ANY_OP_CS_H_ + +// ************************************************************ +// class be_visitor_array_cs +// ************************************************************ + +class be_visitor_array_any_op_cs : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_array_any_op_cs + // + // = DESCRIPTION + // This is a concrete visitor for array that generates the Any operator + // implementations + // + +public: + be_visitor_array_any_op_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_array_any_op_cs (void); + // destructor + + virtual int visit_array (be_array *node); + // visit array + +}; + +#endif /* _BE_VISITOR_ARRAY_ANY_OP_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/array.h b/TAO/TAO_IDL/be_include/be_visitor_array/array.h new file mode 100644 index 00000000000..0a9510ce383 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_array/array.h @@ -0,0 +1,84 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// array.h +// +// = DESCRIPTION +// Visitors for generation of code for Arrays. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARRAY_ARRAY_H_) +#define _BE_VISITOR_ARRAY_ARRAY_H_ + +// ************************************************************ +// class be_visitor_array +// ************************************************************ + +class be_visitor_array : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_array + // + // = DESCRIPTION + // This is a generic visitor for arrays + // + // +public: + be_visitor_array (be_visitor_context *ctx); + // Constructor + + ~be_visitor_array (void); + // destructor + + virtual int visit_array (be_array *); + // visit the array node + + // = Visitor methods on array types + + virtual int visit_enum (be_enum *node); + // visit an enum + + virtual int visit_interface (be_interface *node); + // visit an interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit an interface forward node + + virtual int visit_predefined_type (be_predefined_type *node); + // visit a predefined type node + + virtual int visit_sequence (be_sequence *node); + // visit sequence + + virtual int visit_string (be_string *node); + // visit string + + virtual int visit_structure (be_structure *node); + // visit structure + + virtual int visit_typedef (be_typedef *node); + // visit typedef + + virtual int visit_union (be_union *node); + // visit union + +protected: + + int visit_node (be_type *); + // helper that does the common job + +}; + +#endif /* _BE_VISITOR_ARRAY_ARRAY_H_*/ diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/array_ch.h b/TAO/TAO_IDL/be_include/be_visitor_array/array_ch.h new file mode 100644 index 00000000000..7a859d85527 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_array/array_ch.h @@ -0,0 +1,49 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// array_ch.h +// +// = DESCRIPTION +// Visitors for generation of code for Arrays in client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARRAY_CH_H_) +#define _BE_VISITOR_ARRAY_CH_H_ + +// ************************************************************ +// class be_visitor_array_ch +// ************************************************************ + +class be_visitor_array_ch : public be_visitor_array +{ + // + // = TITLE + // be_visitor_array_ch + // + // = DESCRIPTION + // Code to be generated for arrays in the client header file + // +public: + be_visitor_array_ch (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_array_ch (void); + // destructor + + virtual int visit_array (be_array *node); + // visit the array node + +}; + +#endif /* _BE_VISITOR_ARRAY_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/array_ci.h b/TAO/TAO_IDL/be_include/be_visitor_array/array_ci.h new file mode 100644 index 00000000000..3cb5f06cb6d --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_array/array_ci.h @@ -0,0 +1,49 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// array_ci.h +// +// = DESCRIPTION +// Visitors for generation of code for Arrays in client inline. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARRAY_CI_H_) +#define _BE_VISITOR_ARRAY_CI_H_ + +// ************************************************************ +// class be_visitor_array_ci +// ************************************************************ + +class be_visitor_array_ci : public be_visitor_array +{ + // + // = TITLE + // be_visitor_array_ci + // + // = DESCRIPTION + // Code to be generated for arrays in the client inline file + // +public: + be_visitor_array_ci (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_array_ci (void); + // destructor + + virtual int visit_array (be_array *node); + // visit the array node + +}; + +#endif /* _BE_VISITOR_ARRAY_CI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_array/array_cs.h b/TAO/TAO_IDL/be_include/be_visitor_array/array_cs.h new file mode 100644 index 00000000000..101ce40ce31 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_array/array_cs.h @@ -0,0 +1,49 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// array_cs.h +// +// = DESCRIPTION +// Visitors for generation of code for Arrays in client stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ARRAY_CS_H_) +#define _BE_VISITOR_ARRAY_CS_H_ + +// ************************************************************ +// class be_visitor_array_cs +// ************************************************************ + +class be_visitor_array_cs : public be_visitor_array +{ + // + // = TITLE + // be_visitor_array_cs + // + // = DESCRIPTION + // Code to be generated for arrays in the client stub file + // +public: + be_visitor_array_cs (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_array_cs (void); + // destructor + + virtual int visit_array (be_array *node); + // visit the array node + +}; + +#endif /* _BE_VISITOR_ARRAY_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_attribute.h b/TAO/TAO_IDL/be_include/be_visitor_attribute.h index 6db40e2a693..0e9fb275ae6 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_attribute.h +++ b/TAO/TAO_IDL/be_include/be_visitor_attribute.h @@ -24,33 +24,6 @@ #include "be_visitor.h" #include "be_visitor_scope.h" - -// ************************************************************ -// Attribute visitor -// ************************************************************ - -class be_visitor_attribute : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_attribute - // - // = DESCRIPTION - // This is a concrete visitor to generate code for attributes. We have one - // class for mapping into the client and server. - // - // -public: - be_visitor_attribute (be_visitor_context *ctx); - // constructor - - ~be_visitor_attribute (void); - // destructor - - virtual int visit_attribute (be_attribute *node); - // visit attribute. We provide code for this method in the derived class - -}; - +#include "be_visitor_attribute/attribute.h" #endif diff --git a/TAO/TAO_IDL/be_include/be_visitor_attribute/attribute.h b/TAO/TAO_IDL/be_include/be_visitor_attribute/attribute.h new file mode 100644 index 00000000000..c330de69537 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_attribute/attribute.h @@ -0,0 +1,52 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// attribute.h +// +// = DESCRIPTION +// Visitor for the Attribute class. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ATTRIBUTE_ATTRIBUTE_H) +#define _BE_VISITOR_ATTRIBUTE_ATTRIBUTE_H + +// ************************************************************ +// Attribute visitor +// ************************************************************ + +class be_visitor_attribute : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_attribute + // + // = DESCRIPTION + // This is a concrete visitor to generate code for attributes. We have one + // class for mapping into the client and server. + // + // +public: + be_visitor_attribute (be_visitor_context *ctx); + // constructor + + ~be_visitor_attribute (void); + // destructor + + virtual int visit_attribute (be_attribute *node); + // visit attribute. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_ATTRIBUTE_ATTRIBUTE_H*/ diff --git a/TAO/TAO_IDL/be_include/be_visitor_constant.h b/TAO/TAO_IDL/be_include/be_visitor_constant.h index f91580e3dd0..4bd864c7aa3 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_constant.h +++ b/TAO/TAO_IDL/be_include/be_visitor_constant.h @@ -24,56 +24,7 @@ #include "be_visitor.h" #include "be_visitor_scope.h" - -class be_visitor_constant_ch : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_constant_ch - // - // = DESCRIPTION - // This is the visitor for constant for the header file - // - // -public: - be_visitor_constant_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_constant_ch (void); - // destructor - - virtual int visit_constant (be_constant *node); - // visit constant. - -}; - -class be_visitor_constant_cs : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_constant_cs - // - // = DESCRIPTION - // This is the visitor for constant for the impl file - // - // -public: - be_visitor_constant_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_constant_cs (void); - // destructor - - virtual int visit_constant (be_constant *node); - // visit constant - - // = special methods - - virtual int gen_nested_namespace_begin (be_module *node); - // generate the nested namespace begins - - virtual int gen_nested_namespace_end (be_module *node); - // generate the nested namespace ends -}; +#include "be_visitor_constant/constant_ch.h" +#include "be_visitor_constant/constant_cs.h" #endif // TAO_BE_VISITOR_CONSTANT_H diff --git a/TAO/TAO_IDL/be_include/be_visitor_constant/constant_ch.h b/TAO/TAO_IDL/be_include/be_visitor_constant/constant_ch.h new file mode 100644 index 00000000000..3d6113ddbd6 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_constant/constant_ch.h @@ -0,0 +1,47 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// constant_ch.h +// +// = DESCRIPTION +// Concrete visitor for the constant class generating code in the client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_CONSTANT_CONSTANT_CH_H_) +#define _BE_VISITOR_CONSTANT_CONSTANT_CH_H_ + +class be_visitor_constant_ch : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_constant_ch + // + // = DESCRIPTION + // This is the visitor for constant for the header file + // + // +public: + be_visitor_constant_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_constant_ch (void); + // destructor + + virtual int visit_constant (be_constant *node); + // visit constant. + +}; + +#endif /* _BE_VISITOR_CONSTANT_CONSTANT_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_constant/constant_cs.h b/TAO/TAO_IDL/be_include/be_visitor_constant/constant_cs.h new file mode 100644 index 00000000000..104614536a1 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_constant/constant_cs.h @@ -0,0 +1,54 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// constant_cs.h +// +// = DESCRIPTION +// Concrete visitor for the constant class generating code in the client stub. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_CONSTANT_CONSTANT_CS_H_) +#define _BE_VISITOR_CONSTANT_CONSTANT_CS_H_ + +class be_visitor_constant_cs : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_constant_cs + // + // = DESCRIPTION + // This is the visitor for constant for the impl file + // + // +public: + be_visitor_constant_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_constant_cs (void); + // destructor + + virtual int visit_constant (be_constant *node); + // visit constant + + // = special methods + + virtual int gen_nested_namespace_begin (be_module *node); + // generate the nested namespace begins + + virtual int gen_nested_namespace_end (be_module *node); + // generate the nested namespace ends +}; + +#endif /* _BE_VISITOR_CONSTANT_CONSTANT_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_enum.h b/TAO/TAO_IDL/be_include/be_visitor_enum.h index bd8779d7349..070cceda0b0 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_enum.h +++ b/TAO/TAO_IDL/be_include/be_visitor_enum.h @@ -24,102 +24,9 @@ #include "be_visitor.h" #include "be_visitor_scope.h" +#include "be_visitor_enum/enum_ch.h" +#include "be_visitor_enum/enum_cs.h" +#include "be_visitor_enum/any_op_ch.h" +#include "be_visitor_enum/any_op_cs.h" -class be_visitor_enum_ch : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_enum_ch - // - // = DESCRIPTION - // This is the base visitor for enum for the header file - // - // -public: - be_visitor_enum_ch (be_visitor_context *ctx); - // conenumor - - ~be_visitor_enum_ch (void); - // deenumor - - virtual int visit_enum (be_enum *node); - // visit enum. - - // =visit operations on syntactically valid elements in our scope - - virtual int visit_enum_val (be_enum_val *node); - // visit enum_val - - // = helper - - virtual int post_process (void); - // generate a comma after each element is processed -}; - -class be_visitor_enum_cs : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_enum_cs - // - // = DESCRIPTION - // This is the visitor for enum for the impl file - // - // -public: - be_visitor_enum_cs (be_visitor_context *ctx); - // conenumor - - ~be_visitor_enum_cs (void); - // deenumor - - virtual int visit_enum (be_enum *node); - // visit enum and generate the typecode - -}; - -class be_visitor_enum_any_op_ch : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_enum_any_op_ch - // - // = DESCRIPTION - // This is a concrete visitor for enum that generates the Any operator - // declarations - // - -public: - be_visitor_enum_any_op_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_enum_any_op_ch (void); - // destructor - - virtual int visit_enum (be_enum *node); - // visit enum -}; - -class be_visitor_enum_any_op_cs : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_enum_any_op_cs - // - // = DESCRIPTION - // This is a concrete visitor for enum that generates the Any operator - // implementations - // - -public: - be_visitor_enum_any_op_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_enum_any_op_cs (void); - // destructor - - virtual int visit_enum (be_enum *node); - // visit enum -}; - -#endif // TAO_BE_VISITOR_ENUM_H +#endif /* TAO_BE_VISITOR_ENUM_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_enum/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_enum/any_op_ch.h new file mode 100644 index 00000000000..469e661bb2c --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_enum/any_op_ch.h @@ -0,0 +1,47 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_ch.h +// +// = DESCRIPTION +// Concrete visitor for Enums generating code for the Any operators +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ENUM_ANY_OP_CH_H_) +#define _BE_VISITOR_ENUM_ANY_OP_CH_H_ + +class be_visitor_enum_any_op_ch : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_enum_any_op_ch + // + // = DESCRIPTION + // This is a concrete visitor for enum that generates the Any operator + // declarations + // + +public: + be_visitor_enum_any_op_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_enum_any_op_ch (void); + // destructor + + virtual int visit_enum (be_enum *node); + // visit enum +}; + +#endif /* _BE_VISITOR_ENUM_ANY_OP_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_enum/any_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_enum/any_op_cs.h new file mode 100644 index 00000000000..aab50eb6305 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_enum/any_op_cs.h @@ -0,0 +1,47 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_cs.h +// +// = DESCRIPTION +// Concrete visitor for Enums generating code for the Any operators +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ENUM_ANY_OP_CS_H_) +#define _BE_VISITOR_ENUM_ANY_OP_CS_H_ + +class be_visitor_enum_any_op_cs : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_enum_any_op_cs + // + // = DESCRIPTION + // This is a concrete visitor for enum that generates the Any operator + // implementations + // + +public: + be_visitor_enum_any_op_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_enum_any_op_cs (void); + // destructor + + virtual int visit_enum (be_enum *node); + // visit enum +}; + +#endif /* _BE_VISITOR_ENUM_ANY_OP_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_enum/enum_ch.h b/TAO/TAO_IDL/be_include/be_visitor_enum/enum_ch.h new file mode 100644 index 00000000000..bd1effe5e0e --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_enum/enum_ch.h @@ -0,0 +1,56 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// enum_ch.h +// +// = DESCRIPTION +// Concrete visitor for Enums generating code in the client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ENUM_ENUM_CH_H_) +#define _BE_VISITOR_ENUM_ENUM_CH_H_ + +class be_visitor_enum_ch : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_enum_ch + // + // = DESCRIPTION + // This is the base visitor for enum for the header file + // + // +public: + be_visitor_enum_ch (be_visitor_context *ctx); + // conenumor + + ~be_visitor_enum_ch (void); + // deenumor + + virtual int visit_enum (be_enum *node); + // visit enum. + + // =visit operations on syntactically valid elements in our scope + + virtual int visit_enum_val (be_enum_val *node); + // visit enum_val + + // = helper + + virtual int post_process (void); + // generate a comma after each element is processed +}; + +#endif /* _BE_VISITOR_ENUM_ENUM_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_enum/enum_cs.h b/TAO/TAO_IDL/be_include/be_visitor_enum/enum_cs.h new file mode 100644 index 00000000000..f1684ff1d01 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_enum/enum_cs.h @@ -0,0 +1,47 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// enum_cs.h +// +// = DESCRIPTION +// Concrete visitor for Enums generating code in the client stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ENUM_ENUM_CS_H_) +#define _BE_VISITOR_ENUM_ENUM_CS_H_ + +class be_visitor_enum_cs : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_enum_cs + // + // = DESCRIPTION + // This is the visitor for enum for the impl file + // + // +public: + be_visitor_enum_cs (be_visitor_context *ctx); + // conenumor + + ~be_visitor_enum_cs (void); + // deenumor + + virtual int visit_enum (be_enum *node); + // visit enum and generate the typecode + +}; + +#endif /* _BE_VISITOR_ENUM_ENUM_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_exception.h b/TAO/TAO_IDL/be_include/be_visitor_exception.h index a569cec9eb8..7d5069ddc63 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_exception.h +++ b/TAO/TAO_IDL/be_include/be_visitor_exception.h @@ -24,258 +24,13 @@ #include "be_visitor.h" #include "be_visitor_scope.h" - -class be_visitor_exception : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_exception - // - // = DESCRIPTION - // This is the base visitor for exception - // - // -public: - be_visitor_exception (be_visitor_context *ctx); - // ctor - - ~be_visitor_exception (void); - // dtor - - virtual int visit_exception (be_exception *node); - // visit exception. We provide code for this method in the derived class - - // =visit operations on syntactically valid elements in our scope - - virtual int visit_field (be_field *node); - // visit field -}; - -class be_visitor_exception_ch : public be_visitor_exception -{ - // - // = TITLE - // be_visitor_exception_ch - // - // = DESCRIPTION - // This is a concrete visitor to generate the client header for exception - // - // -public: - be_visitor_exception_ch (be_visitor_context *ctx); - // constructureor - - ~be_visitor_exception_ch (void); - // destructureor - - virtual int visit_exception (be_exception *node); - // visit exception. We provide code for this method in the derived class - -}; - -class be_visitor_exception_ci : public be_visitor_exception -{ - // - // = TITLE - // be_visitor_exception_ci - // - // = DESCRIPTION - // This is a concrete visitor to generate the client inline for exception - // - // -public: - be_visitor_exception_ci (be_visitor_context *ctx); - // ctor - - ~be_visitor_exception_ci (void); - // dtor - - virtual int visit_exception (be_exception *node); - // visit exception. We provide code for this method in the derived class - -}; - -class be_visitor_exception_cs : public be_visitor_exception -{ - // - // = TITLE - // be_visitor_exception_cs - // - // = DESCRIPTION - // This is a concrete visitor to generate the client stubs for exception - // - // -public: - be_visitor_exception_cs (be_visitor_context *ctx); - // ctor - - ~be_visitor_exception_cs (void); - // dtor - - virtual int visit_exception (be_exception *node); - // visit exception. We provide code for this method in the derived class - -}; - -class be_visitor_exception_ctor : public be_visitor_scope -{ - // =TITLE - // be_visitor_exception_ctor - // - // =DESCRIPTION - // generation of the special constructor -public: - be_visitor_exception_ctor (be_visitor_context *ctx); - // ctor - - ~be_visitor_exception_ctor (void); - // dtor - - virtual int post_process (void); - // post processing after each element - - virtual int visit_exception (be_exception *node); - // visit exception. We provide code for this method in the derived class - - virtual int visit_field (be_field *node); - // visit the argument node - - // =visit all the nodes that can be the types for the field - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit the enum node - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_union (be_union *node); - // visit union type - - virtual int visit_typedef (be_typedef *node); - // visit the typedef type - -}; - -class be_visitor_exception_ctor_assign : public be_visitor_scope -{ - // =TITLE - // be_visitor_exception_ctor_assign - // - // =DESCRIPTION - // generation of the assignment statements in -public: - be_visitor_exception_ctor_assign (be_visitor_context *ctx); - // ctor - - ~be_visitor_exception_ctor_assign (void); - // dtor - - virtual int visit_exception (be_exception *node); - // visit exception. - - virtual int visit_field (be_field *node); - // visit the field node - - // =visit all the nodes that can be the types for the field - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit the enum node - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_union (be_union *node); - // visit union type - - virtual int visit_typedef (be_typedef *node); - // visit the typedef type - -}; - -class be_visitor_exception_any_op_ch : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_exception_any_op_ch - // - // = DESCRIPTION - // This is a concrete visitor for exception that generates the Any operator - // declarations - // - -public: - be_visitor_exception_any_op_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_exception_any_op_ch (void); - // destructor - - virtual int visit_exception (be_exception *node); - // visit exception - - virtual int visit_field (be_field *node); - // visit field -}; - -class be_visitor_exception_any_op_cs : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_exception_any_op_cs - // - // = DESCRIPTION - // This is a concrete visitor for exception that generates the Any operator - // implementations - // - -public: - be_visitor_exception_any_op_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_exception_any_op_cs (void); - // destructor - - virtual int visit_exception (be_exception *node); - // visit exception - - virtual int visit_field (be_field *node); - // visit field -}; - -#endif // TAO_BE_VISITOR_EXCEPTION_H +#include "be_visitor_exception/exception.h" +#include "be_visitor_exception/exception_ch.h" +#include "be_visitor_exception/exception_ci.h" +#include "be_visitor_exception/exception_cs.h" +#include "be_visitor_exception/ctor.h" +#include "be_visitor_exception/ctor_assign.h" +#include "be_visitor_exception/any_op_ch.h" +#include "be_visitor_exception/any_op_cs.h" + +#endif /* TAO_BE_VISITOR_EXCEPTION_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_exception/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_exception/any_op_ch.h new file mode 100644 index 00000000000..6ad35719449 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_exception/any_op_ch.h @@ -0,0 +1,51 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_ch.h +// +// = DESCRIPTION +// Visitor for Exceptions. +// For code generation of Any operator in client header +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_EXCEPTION_ANY_OP_CH_H_) +#define _BE_VISITOR_EXCEPTION_ANY_OP_CH_H_ + +class be_visitor_exception_any_op_ch : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_exception_any_op_ch + // + // = DESCRIPTION + // This is a concrete visitor for exception that generates the Any operator + // declarations + // + +public: + be_visitor_exception_any_op_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_exception_any_op_ch (void); + // destructor + + virtual int visit_exception (be_exception *node); + // visit exception + + virtual int visit_field (be_field *node); + // visit field +}; + +#endif /* _BE_VISITOR_EXCEPTION_ANY_OP_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_exception/any_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_exception/any_op_cs.h new file mode 100644 index 00000000000..dc96479b918 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_exception/any_op_cs.h @@ -0,0 +1,51 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_cs.h +// +// = DESCRIPTION +// Visitor for Exceptions. +// For code generation of Any operator in client stubs +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_EXCEPTION_ANY_OP_CS_H_) +#define _BE_VISITOR_EXCEPTION_ANY_OP_CS_H_ + +class be_visitor_exception_any_op_cs : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_exception_any_op_cs + // + // = DESCRIPTION + // This is a concrete visitor for exception that generates the Any operator + // implementations + // + +public: + be_visitor_exception_any_op_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_exception_any_op_cs (void); + // destructor + + virtual int visit_exception (be_exception *node); + // visit exception + + virtual int visit_field (be_field *node); + // visit field +}; + +#endif /* _BE_VISITOR_EXCEPTION_ANY_OP_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_exception/ctor.h b/TAO/TAO_IDL/be_include/be_visitor_exception/ctor.h new file mode 100644 index 00000000000..ac774c1388e --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_exception/ctor.h @@ -0,0 +1,83 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// ctor.h +// +// = DESCRIPTION +// Visitor for Exceptions. +// For code generation for the special constructor for exceptions +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_EXCEPTION_CTOR_H_) +#define _BE_VISITOR_EXCEPTION_CTOR_H_ + +class be_visitor_exception_ctor : public be_visitor_scope +{ + // =TITLE + // be_visitor_exception_ctor + // + // =DESCRIPTION + // generation of the special constructor +public: + be_visitor_exception_ctor (be_visitor_context *ctx); + // ctor + + ~be_visitor_exception_ctor (void); + // dtor + + virtual int post_process (void); + // post processing after each element + + virtual int visit_exception (be_exception *node); + // visit exception. We provide code for this method in the derived class + + virtual int visit_field (be_field *node); + // visit the argument node + + // =visit all the nodes that can be the types for the field + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit the enum node + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_union (be_union *node); + // visit union type + + virtual int visit_typedef (be_typedef *node); + // visit the typedef type + +}; + +#endif /* _BE_VISITOR_EXCEPTION_CTOR_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_exception/ctor_assign.h b/TAO/TAO_IDL/be_include/be_visitor_exception/ctor_assign.h new file mode 100644 index 00000000000..e40610ac2fb --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_exception/ctor_assign.h @@ -0,0 +1,81 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// ctor_assign.h +// +// = DESCRIPTION +// Visitor for Exceptions. +// For code generation for the special constructor and assignment operator +// for exceptions. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_EXCEPTION_CTOR_ASSIGN_H_) +#define _BE_VISITOR_EXCEPTION_CTOR_ASSIGN_H_ + +class be_visitor_exception_ctor_assign : public be_visitor_scope +{ + // =TITLE + // be_visitor_exception_ctor_assign + // + // =DESCRIPTION + // generation of the assignment statements in +public: + be_visitor_exception_ctor_assign (be_visitor_context *ctx); + // ctor + + ~be_visitor_exception_ctor_assign (void); + // dtor + + virtual int visit_exception (be_exception *node); + // visit exception. + + virtual int visit_field (be_field *node); + // visit the field node + + // =visit all the nodes that can be the types for the field + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit the enum node + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_union (be_union *node); + // visit union type + + virtual int visit_typedef (be_typedef *node); + // visit the typedef type + +}; + +#endif /* _BE_VISITOR_EXCEPTION_CTOR_ASSIGN_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_exception/exception.h b/TAO/TAO_IDL/be_include/be_visitor_exception/exception.h new file mode 100644 index 00000000000..f7e4bab2d26 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_exception/exception.h @@ -0,0 +1,52 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// exception.h +// +// = DESCRIPTION +// Visitor for Exceptions. +// This is the generic (common) visitor for all exceptions. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_EXCEPTION_EXCEPTION_H_) +#define _BE_VISITOR_EXCEPTION_EXCEPTION_H_ + +class be_visitor_exception : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_exception + // + // = DESCRIPTION + // This is the base visitor for exception + // + // +public: + be_visitor_exception (be_visitor_context *ctx); + // ctor + + ~be_visitor_exception (void); + // dtor + + virtual int visit_exception (be_exception *node); + // visit exception. We provide code for this method in the derived class + + // =visit operations on syntactically valid elements in our scope + + virtual int visit_field (be_field *node); + // visit field +}; + +#endif /* _BE_VISITOR_EXCEPTION_EXCEPTION_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_exception/exception_ch.h b/TAO/TAO_IDL/be_include/be_visitor_exception/exception_ch.h new file mode 100644 index 00000000000..9211782a96e --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_exception/exception_ch.h @@ -0,0 +1,48 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// exception_ch.h +// +// = DESCRIPTION +// Visitor for Exceptions. +// For code generation in client header +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_EXCEPTION_EXCEPTION_CH_H_) +#define _BE_VISITOR_EXCEPTION_EXCEPTION_CH_H_ + +class be_visitor_exception_ch : public be_visitor_exception +{ + // + // = TITLE + // be_visitor_exception_ch + // + // = DESCRIPTION + // This is a concrete visitor to generate the client header for exception + // + // +public: + be_visitor_exception_ch (be_visitor_context *ctx); + // constructureor + + ~be_visitor_exception_ch (void); + // destructureor + + virtual int visit_exception (be_exception *node); + // visit exception. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_EXCEPTION_EXCEPTION_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_exception/exception_ci.h b/TAO/TAO_IDL/be_include/be_visitor_exception/exception_ci.h new file mode 100644 index 00000000000..67ca3e1c449 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_exception/exception_ci.h @@ -0,0 +1,48 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// exception_ci.h +// +// = DESCRIPTION +// Visitor for Exceptions. +// For code generation in client inline. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_EXCEPTION_EXCEPTION_CI_H_) +#define _BE_VISITOR_EXCEPTION_EXCEPTION_CI_H_ + +class be_visitor_exception_ci : public be_visitor_exception +{ + // + // = TITLE + // be_visitor_exception_ci + // + // = DESCRIPTION + // This is a concrete visitor to generate the client inline for exception + // + // +public: + be_visitor_exception_ci (be_visitor_context *ctx); + // ctor + + ~be_visitor_exception_ci (void); + // dtor + + virtual int visit_exception (be_exception *node); + // visit exception. + +}; + +#endif /* _BE_VISITOR_EXCEPTION_EXCEPTION_CI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_exception/exception_cs.h b/TAO/TAO_IDL/be_include/be_visitor_exception/exception_cs.h new file mode 100644 index 00000000000..0b1edd4cc6c --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_exception/exception_cs.h @@ -0,0 +1,48 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// exception_cs.h +// +// = DESCRIPTION +// Visitor for Exceptions. +// For code generation in client stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_EXCEPTION_EXCEPTION_CS_H_) +#define _BE_VISITOR_EXCEPTION_EXCEPTION_CS_H_ + +class be_visitor_exception_cs : public be_visitor_exception +{ + // + // = TITLE + // be_visitor_exception_cs + // + // = DESCRIPTION + // This is a concrete visitor to generate the client stubs for exception + // + // +public: + be_visitor_exception_cs (be_visitor_context *ctx); + // ctor + + ~be_visitor_exception_cs (void); + // dtor + + virtual int visit_exception (be_exception *node); + // visit exception. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_EXCEPTION_EXCEPTION_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_exception/exception_ctor.h b/TAO/TAO_IDL/be_include/be_visitor_exception/exception_ctor.h new file mode 100644 index 00000000000..94ad9534889 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_exception/exception_ctor.h @@ -0,0 +1,83 @@ +/* -*- C++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// exception_ctor.h +// +// = DESCRIPTION +// Visitor for Exceptions. +// For code generation for the special constructor for exceptions +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_EXCEPTION_EXCEPTION_CTOR_H_) +#define _BE_VISITOR_EXCEPTION_EXCEPTION_CTOR_H_ + +class be_visitor_exception_ctor : public be_visitor_scope +{ + // =TITLE + // be_visitor_exception_ctor + // + // =DESCRIPTION + // generation of the special constructor +public: + be_visitor_exception_ctor (be_visitor_context *ctx); + // ctor + + ~be_visitor_exception_ctor (void); + // dtor + + virtual int post_process (void); + // post processing after each element + + virtual int visit_exception (be_exception *node); + // visit exception. We provide code for this method in the derived class + + virtual int visit_field (be_field *node); + // visit the argument node + + // =visit all the nodes that can be the types for the field + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit the enum node + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_union (be_union *node); + // visit union type + + virtual int visit_typedef (be_typedef *node); + // visit the typedef type + +}; + +#endif /* _BE_VISITOR_EXCEPTION_EXCEPTION_CTOR_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_field.h b/TAO/TAO_IDL/be_include/be_visitor_field.h index 9846554bccc..e1af83716e5 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_field.h +++ b/TAO/TAO_IDL/be_include/be_visitor_field.h @@ -14,7 +14,7 @@ // Concrete visitor for the base "BE_Field" node // // = AUTHOR -// Aniruddha Gokhale and Carlos O'Ryan +// Aniruddha Gokhale // // ============================================================================ @@ -23,140 +23,8 @@ #include "be_visitor_decl.h" -class be_visitor_field_ch : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_field_ch - // - // = DESCRIPTION - // This is a concrete visitor for the be_field node for the client header. - // -public: - be_visitor_field_ch (be_visitor_context *ctx); - // constructor +#include "be_visitor_field/field_ch.h" +#include "be_visitor_field/field_ci.h" +#include "be_visitor_field/field_cs.h" - ~be_visitor_field_ch (void); - // destructor - - virtual int visit_field (be_field *node); - // visit the field node - - // =visit operations on all possible data types that a field can be - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit enum type - - virtual int visit_interface (be_interface *node); - // visit interface type - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward type - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_typedef (be_typedef *node); - // visit typedefed type - - virtual int visit_union (be_union *node); - // visit union type - -}; - -class be_visitor_field_ci : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_field_ci - // - // = DESCRIPTION - // This is a concrete visitor for the be_field node for the client inline - // file - // -public: - be_visitor_field_ci (be_visitor_context *ctx); - // constructor - - ~be_visitor_field_ci (void); - // destructor - - virtual int visit_field (be_field *node); - // visit the field node - - // =visit operations on all possible data types that a field can be and for - // which inline code must be generated - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_typedef (be_typedef *node); - // visit typedefed type - - virtual int visit_union (be_union *node); - // visit union type - -}; - -class be_visitor_field_cs : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_field_cs - // - // = DESCRIPTION - // This is a concrete visitor for the be_field node for the client stubs - // file - // -public: - be_visitor_field_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_field_cs (void); - // destructor - - virtual int visit_field (be_field *node); - // visit the field node - - // =visit operations on all possible data types that a field can be and impl - // code must be generated - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit enum type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_typedef (be_typedef *node); - // visit typedefed type - - virtual int visit_union (be_union *node); - // visit union type - -}; - -#endif // TAO_BE_VISITOR_FIELD_H +#endif /* TAO_BE_VISITOR_FIELD_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_field/field_ch.h b/TAO/TAO_IDL/be_include/be_visitor_field/field_ch.h new file mode 100644 index 00000000000..aa72105c520 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_field/field_ch.h @@ -0,0 +1,78 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// field_ch.h +// +// = DESCRIPTION +// Concrete visitor for the base "BE_Field" node +// This generates code for structure members in the client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_FIELD_CH_H_) +#define _BE_VISITOR_FIELD_CH_H_ + +class be_visitor_field_ch : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_field_ch + // + // = DESCRIPTION + // This is a concrete visitor for the be_field node for the client header. + // +public: + be_visitor_field_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_field_ch (void); + // destructor + + virtual int visit_field (be_field *node); + // visit the field node + + // =visit operations on all possible data types that a field can be + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit enum type + + virtual int visit_interface (be_interface *node); + // visit interface type + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward type + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_typedef (be_typedef *node); + // visit typedefed type + + virtual int visit_union (be_union *node); + // visit union type + +}; + +#endif /* _BE_VISITOR_FIELD_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_field/field_ci.h b/TAO/TAO_IDL/be_include/be_visitor_field/field_ci.h new file mode 100644 index 00000000000..0e2c3797a5e --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_field/field_ci.h @@ -0,0 +1,65 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// field_ci.h +// +// = DESCRIPTION +// Concrete visitor for the base "BE_Field" node +// This generates code for structure members in the client inline. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_FIELD_CI_H_) +#define _BE_VISITOR_FIELD_CI_H_ + +class be_visitor_field_ci : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_field_ci + // + // = DESCRIPTION + // This is a concrete visitor for the be_field node for the client inline + // file + // +public: + be_visitor_field_ci (be_visitor_context *ctx); + // constructor + + ~be_visitor_field_ci (void); + // destructor + + virtual int visit_field (be_field *node); + // visit the field node + + // =visit operations on all possible data types that a field can be and for + // which inline code must be generated + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_typedef (be_typedef *node); + // visit typedefed type + + virtual int visit_union (be_union *node); + // visit union type + +}; + +#endif /* _BE_VISITOR_FIELD_CI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_field/field_cs.h b/TAO/TAO_IDL/be_include/be_visitor_field/field_cs.h new file mode 100644 index 00000000000..7edaae3b4c2 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_field/field_cs.h @@ -0,0 +1,68 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// field_cs.h +// +// = DESCRIPTION +// Concrete visitor for the base "BE_Field" node +// This generates code for structure members in the client stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_FIELD_CS_H_) +#define _BE_VISITOR_FIELD_CS_H_ + +class be_visitor_field_cs : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_field_cs + // + // = DESCRIPTION + // This is a concrete visitor for the be_field node for the client stubs + // file + // +public: + be_visitor_field_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_field_cs (void); + // destructor + + virtual int visit_field (be_field *node); + // visit the field node + + // =visit operations on all possible data types that a field can be and impl + // code must be generated + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit enum type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_typedef (be_typedef *node); + // visit typedefed type + + virtual int visit_union (be_union *node); + // visit union type + +}; + +#endif /* _BE_VISITOR_FIELD_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface.h b/TAO/TAO_IDL/be_include/be_visitor_interface.h index 14aa6d95166..4aac0f9050a 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_interface.h +++ b/TAO/TAO_IDL/be_include/be_visitor_interface.h @@ -23,322 +23,18 @@ #include "be_visitor_scope.h" - -// = DESCRIPTION -// Interface code generation is complex, the client stubs require -// two different class and the server also require other two. -// Only one of them includes whatever nested typedefs, exceptions -// and or structures are defined in the interface. -// To break this complexity a different visitor is used for each -// case. -// -// = NOTE -// Visitors were added recently into the compiler, so some -// code is still generated using the old "state oriented" approach; -// notably only the _collocated class is actually generated using -// the visitor, in the other cases (the interface class and the -// skeleton class) we still call back the old code generation -// methods. -// - -class be_visitor_interface : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_interface - // - // = DESCRIPTION - // This is a concrete visitor for interface that abstracts all common tasks - // - -public: - be_visitor_interface (be_visitor_context *ctx); - // constructor - - ~be_visitor_interface (void); - // destructor - - virtual int visit_interface (be_interface *node); - // visit the interface node - - // =visit methods on all elements syntactically valid in a Interface scope - - virtual int visit_attribute (be_attribute *node); - // visit attribute - - virtual int visit_constant (be_constant *node); - // visit a constant - - virtual int visit_enum (be_enum *node); - // visit an enum - - virtual int visit_exception (be_exception *node); - // visit an exception - - virtual int visit_operation (be_operation *node); - // visit operation - - virtual int visit_structure (be_structure *node); - // visit a structure - - virtual int visit_union (be_union *node); - // visit a union - - virtual int visit_typedef (be_typedef *node); - // visit the typedef node - -}; - -// we need derived interface visitors for the client and server header files. For -// the others, they use the default interface visitor - -class be_visitor_interface_ch : public be_visitor_interface -{ - // - // = TITLE - // be_visitor_interface_ch - // - // = DESCRIPTION - // This is a concrete visitor to generate the client header for interface - // - // -public: - be_visitor_interface_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_interface_ch (void); - // destructor - - virtual int visit_interface (be_interface *node); - // set the right context and make a visitor - -}; - -class be_visitor_interface_ci : public be_visitor_interface -{ - // - // = TITLE - // be_visitor_interface_ci - // - // = DESCRIPTION - // This is a concrete visitor to generate the client inline for interface - // - // -public: - be_visitor_interface_ci (be_visitor_context *ctx); - // constructor - - ~be_visitor_interface_ci (void); - // destructor - - virtual int visit_interface (be_interface *node); - // set the right context and make a visitor - -}; - -class be_visitor_interface_cs : public be_visitor_interface -{ - // - // = TITLE - // be_visitor_interface_cs - // - // = DESCRIPTION - // This is a concrete visitor to generate the client stubs for interface - // - // -public: - be_visitor_interface_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_interface_cs (void); - // destructor - - virtual int visit_interface (be_interface *node); - // set the right context and make a visitor -}; - -class be_visitor_interface_sh : public be_visitor_interface -{ - // - // = TITLE - // be_visitor_interface_sh - // - // = DESCRIPTION - // This is a concrete visitor to generate the server header for interface - // - // -public: - be_visitor_interface_sh (be_visitor_context *ctx); - // constructor - - ~be_visitor_interface_sh (void); - // destructor - - virtual int visit_interface (be_interface *node); - // set the right context and make a visitor -}; - -class be_visitor_interface_si : public be_visitor_interface -{ - // - // = TITLE - // be_visitor_interface_si - // - // = DESCRIPTION - // This is a concrete visitor to generate the server inline for interface - // - // -public: - be_visitor_interface_si (be_visitor_context *ctx); - // constructor - - ~be_visitor_interface_si (void); - // destructor - - virtual int visit_interface (be_interface *node); - // set the right context and make a visitor -}; - -class be_visitor_interface_ss : public be_visitor_interface -{ - // - // = TITLE - // be_visitor_interface_ss - // - // = DESCRIPTION - // This is a concrete visitor to generate the server skeletons for interface - // - // -public: - be_visitor_interface_ss (be_visitor_context *ctx); - // constructor - - ~be_visitor_interface_ss (void); - // destructor - - virtual int visit_interface (be_interface *node); - // set the right context and make a visitor -}; - -class be_visitor_interface_collocated_sh : public be_visitor_interface -{ - // = TITLE - // Generate the "collocated" class declaration. - -public: - be_visitor_interface_collocated_sh (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_interface_collocated_sh (void); - // destructor - - virtual int visit_interface (be_interface *node); - // visit an interface - -}; - -class be_visitor_interface_collocated_ss : public be_visitor_interface -{ - // = TITLE - // Generate the "collocated" class declaration. - -public: - be_visitor_interface_collocated_ss (be_visitor_context *ctx); - // constructor - - virtual ~be_visitor_interface_collocated_ss (void); - // destructor - - virtual int visit_interface (be_interface *node); - // visit interface - -}; - -class be_visitor_interface_any_op_ch : public be_visitor_interface -{ - // - // = TITLE - // be_visitor_interface_any_op_ch - // - // = DESCRIPTION - // This is a concrete visitor for interface that generates the Any operator - // declarations - // - -public: - be_visitor_interface_any_op_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_interface_any_op_ch (void); - // destructor - - virtual int visit_interface (be_interface *node); - // visit interface -}; - -class be_visitor_interface_any_op_cs : public be_visitor_interface -{ - // - // = TITLE - // be_visitor_interface_any_op_cs - // - // = DESCRIPTION - // This is a concrete visitor for interface that generates the Any operator - // implementations - // - -public: - be_visitor_interface_any_op_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_interface_any_op_cs (void); - // destructor - - virtual int visit_interface (be_interface *node); - // visit interface -}; - -class be_visitor_interface_tie_sh : public be_visitor_interface -{ - // - // = TITLE - // be_visitor_interface_tie_sh - // - // = DESCRIPTION - // This is a concrete visitor to generate the server header for the TIE class - // - // -public: - be_visitor_interface_tie_sh (be_visitor_context *ctx); - // constructor - - ~be_visitor_interface_tie_sh (void); - // destructor - - virtual int visit_interface (be_interface *node); - // set the right context and make a visitor -}; - -class be_visitor_interface_tie_si : public be_visitor_interface -{ - // - // = TITLE - // be_visitor_interface_tie_si - // - // = DESCRIPTION - // This is a concrete visitor to generate the server inline for operations - // of the TIE class - // - // -public: - be_visitor_interface_tie_si (be_visitor_context *ctx); - // constructor - - ~be_visitor_interface_tie_si (void); - // destructor - - virtual int visit_interface (be_interface *node); - // set the right context and make a visitor -}; - -#endif // _BE_VISITOR_INTERFACE_H +#include "be_visitor_interface/interface.h" +#include "be_visitor_interface/interface_ch.h" +#include "be_visitor_interface/interface_ci.h" +#include "be_visitor_interface/interface_cs.h" +#include "be_visitor_interface/interface_sh.h" +#include "be_visitor_interface/interface_si.h" +#include "be_visitor_interface/interface_ss.h" +#include "be_visitor_interface/collocated_sh.h" +#include "be_visitor_interface/collocated_ss.h" +#include "be_visitor_interface/any_op_ch.h" +#include "be_visitor_interface/any_op_cs.h" +#include "be_visitor_interface/tie_sh.h" +#include "be_visitor_interface/tie_si.h" + +#endif /* _BE_VISITOR_INTERFACE_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_ch.h new file mode 100644 index 00000000000..4e635bfd8a3 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_ch.h @@ -0,0 +1,47 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_ch.h +// +// = DESCRIPTION +// Concrete visitor for the Interface node. +// This one provides code generation for the Any operators +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_ANY_OP_CH_H_) +#define _BE_INTERFACE_ANY_OP_CH_H_ + +class be_visitor_interface_any_op_ch : public be_visitor_interface +{ + // + // = TITLE + // be_visitor_interface_any_op_ch + // + // = DESCRIPTION + // This is a concrete visitor for interface that generates the Any operator + // declarations + // + +public: + be_visitor_interface_any_op_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_interface_any_op_ch (void); + // destructor + + virtual int visit_interface (be_interface *node); + // visit interface +}; + +#endif /* _BE_INTERFACE_ANY_OP_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_cs.h new file mode 100644 index 00000000000..012aca9d3f8 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/any_op_cs.h @@ -0,0 +1,47 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_cs.h +// +// = DESCRIPTION +// Concrete visitor for the Interface node. +// This one provides code generation for the Any operators +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_ANY_OP_CS_H_) +#define _BE_INTERFACE_ANY_OP_CS_H_ + +class be_visitor_interface_any_op_cs : public be_visitor_interface +{ + // + // = TITLE + // be_visitor_interface_any_op_cs + // + // = DESCRIPTION + // This is a concrete visitor for interface that generates the Any operator + // implementations + // + +public: + be_visitor_interface_any_op_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_interface_any_op_cs (void); + // destructor + + virtual int visit_interface (be_interface *node); + // visit interface +}; + +#endif /* _BE_INTERFACE_ANY_OP_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/collocated_sh.h b/TAO/TAO_IDL/be_include/be_visitor_interface/collocated_sh.h new file mode 100644 index 00000000000..a96c5a6701d --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/collocated_sh.h @@ -0,0 +1,42 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// collocated_sh.h +// +// = DESCRIPTION +// Concrete visitor for the Interface node. +// This provides code generation for collocated classes in server header +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_COLLOCATED_SH_H_) +#define _BE_INTERFACE_COLLOCATED_SH_H_ + +class be_visitor_interface_collocated_sh : public be_visitor_interface +{ + // = TITLE + // Generate the "collocated" class declaration. + +public: + be_visitor_interface_collocated_sh (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_interface_collocated_sh (void); + // destructor + + virtual int visit_interface (be_interface *node); + // visit an interface + +}; + +#endif /* _BE_INTERFACE_COLLOCATED_SH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/collocated_ss.h b/TAO/TAO_IDL/be_include/be_visitor_interface/collocated_ss.h new file mode 100644 index 00000000000..ad49cbb1448 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/collocated_ss.h @@ -0,0 +1,42 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// collocated_ss.h +// +// = DESCRIPTION +// Concrete visitor for the Interface node. +// This provides code generation for collocated classes in server skeleton +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_COLLOCATED_SS_H_) +#define _BE_INTERFACE_COLLOCATED_SS_H_ + +class be_visitor_interface_collocated_ss : public be_visitor_interface +{ + // = TITLE + // Generate the "collocated" class declaration. + +public: + be_visitor_interface_collocated_ss (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_interface_collocated_ss (void); + // destructor + + virtual int visit_interface (be_interface *node); + // visit interface + +}; + +#endif /* _BE_INTERFACE_COLLOCATED_SS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/interface.h b/TAO/TAO_IDL/be_include/be_visitor_interface/interface.h new file mode 100644 index 00000000000..086c8f1b56b --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/interface.h @@ -0,0 +1,91 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// interface.h +// +// = DESCRIPTION +// Concrete visitor for the Interface node. +// This one provides the generic visitor for interfaces from which others +// will inherit. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_INTERFACE_H_) +#define _BE_INTERFACE_INTERFACE_H_ + +// = DESCRIPTION +// Interface code generation is complex, the client stubs require +// two different class and the server also require other two. +// Only one of them includes whatever nested typedefs, exceptions +// and or structures are defined in the interface. +// To break this complexity a different visitor is used for each +// case. +// +// = NOTE +// Visitors were added recently into the compiler, so some +// code is still generated using the old "state oriented" approach; +// notably only the _collocated class is actually generated using +// the visitor, in the other cases (the interface class and the +// skeleton class) we still call back the old code generation +// methods. +// + +class be_visitor_interface : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_interface + // + // = DESCRIPTION + // This is a concrete visitor for interface that abstracts all common tasks + // + +public: + be_visitor_interface (be_visitor_context *ctx); + // constructor + + ~be_visitor_interface (void); + // destructor + + virtual int visit_interface (be_interface *node); + // visit the interface node + + // =visit methods on all elements syntactically valid in a Interface scope + + virtual int visit_attribute (be_attribute *node); + // visit attribute + + virtual int visit_constant (be_constant *node); + // visit a constant + + virtual int visit_enum (be_enum *node); + // visit an enum + + virtual int visit_exception (be_exception *node); + // visit an exception + + virtual int visit_operation (be_operation *node); + // visit operation + + virtual int visit_structure (be_structure *node); + // visit a structure + + virtual int visit_union (be_union *node); + // visit a union + + virtual int visit_typedef (be_typedef *node); + // visit the typedef node + +}; + +#endif /* _BE_INTERFACE_INTERFACE_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ch.h b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ch.h new file mode 100644 index 00000000000..7dc997f7f15 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ch.h @@ -0,0 +1,50 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// interface_ch.h +// +// = DESCRIPTION +// Concrete visitor for the Interface node. +// This one provides code generation for interfaces in the client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_INTERFACE_CH_H_) +#define _BE_INTERFACE_INTERFACE_CH_H_ + +// we need derived interface visitors for the client and server header files. For +// the others, they use the default interface visitor + +class be_visitor_interface_ch : public be_visitor_interface +{ + // + // = TITLE + // be_visitor_interface_ch + // + // = DESCRIPTION + // This is a concrete visitor to generate the client header for interface + // + // +public: + be_visitor_interface_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_interface_ch (void); + // destructor + + virtual int visit_interface (be_interface *node); + // set the right context and make a visitor + +}; + +#endif /* _BE_INTERFACE_INTERFACE_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ci.h b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ci.h new file mode 100644 index 00000000000..4eff86b2099 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ci.h @@ -0,0 +1,47 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// interface_ci.h +// +// = DESCRIPTION +// Concrete visitor for the Interface node. +// This one provides code generation for interfaces in the client inline. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_INTERFACE_CI_H_) +#define _BE_INTERFACE_INTERFACE_CI_H_ + +class be_visitor_interface_ci : public be_visitor_interface +{ + // + // = TITLE + // be_visitor_interface_ci + // + // = DESCRIPTION + // This is a concrete visitor to generate the client inline for interface + // + // +public: + be_visitor_interface_ci (be_visitor_context *ctx); + // constructor + + ~be_visitor_interface_ci (void); + // destructor + + virtual int visit_interface (be_interface *node); + // set the right context and make a visitor + +}; + +#endif /* _BE_INTERFACE_INTERFACE_CI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_cs.h b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_cs.h new file mode 100644 index 00000000000..7acede89420 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_cs.h @@ -0,0 +1,46 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// interface_cs.h +// +// = DESCRIPTION +// Concrete visitor for the Interface node. +// This one provides code generation for interfaces in the client stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_INTERFACE_CS_H_) +#define _BE_INTERFACE_INTERFACE_CS_H_ + +class be_visitor_interface_cs : public be_visitor_interface +{ + // + // = TITLE + // be_visitor_interface_cs + // + // = DESCRIPTION + // This is a concrete visitor to generate the client stubs for interface + // + // +public: + be_visitor_interface_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_interface_cs (void); + // destructor + + virtual int visit_interface (be_interface *node); + // set the right context and make a visitor +}; + +#endif /* _BE_INTERFACE_INTERFACE_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_sh.h b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_sh.h new file mode 100644 index 00000000000..a2f09833147 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_sh.h @@ -0,0 +1,46 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// interface_sh.h +// +// = DESCRIPTION +// Concrete visitor for the Interface node. +// This provides for code generation in the server header +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_INTERFACE_SH_H_) +#define _BE_INTERFACE_INTERFACE_SH_H_ + +class be_visitor_interface_sh : public be_visitor_interface +{ + // + // = TITLE + // be_visitor_interface_sh + // + // = DESCRIPTION + // This is a concrete visitor to generate the server header for interface + // + // +public: + be_visitor_interface_sh (be_visitor_context *ctx); + // constructor + + ~be_visitor_interface_sh (void); + // destructor + + virtual int visit_interface (be_interface *node); + // set the right context and make a visitor +}; + +#endif /* _BE_INTERFACE_INTERFACE_SH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_si.h b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_si.h new file mode 100644 index 00000000000..e8c7bae245c --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_si.h @@ -0,0 +1,46 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// interface_si.h +// +// = DESCRIPTION +// Concrete visitor for the Interface node. +// This provides for code generation in the server inline +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_INTERFACE_SI_H_) +#define _BE_INTERFACE_INTERFACE_SI_H_ + +class be_visitor_interface_si : public be_visitor_interface +{ + // + // = TITLE + // be_visitor_interface_si + // + // = DESCRIPTION + // This is a concrete visitor to generate the server inline for interface + // + // +public: + be_visitor_interface_si (be_visitor_context *ctx); + // constructor + + ~be_visitor_interface_si (void); + // destructor + + virtual int visit_interface (be_interface *node); + // set the right context and make a visitor +}; + +#endif /* _BE_INTERFACE_INTERFACE_SI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ss.h b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ss.h new file mode 100644 index 00000000000..78c5d48cbab --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ss.h @@ -0,0 +1,46 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// interface_ss.h +// +// = DESCRIPTION +// Concrete visitor for the Interface node. +// This provides for code generation in the server skeleton +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_INTERFACE_SS_H_) +#define _BE_INTERFACE_INTERFACE_SS_H_ + +class be_visitor_interface_ss : public be_visitor_interface +{ + // + // = TITLE + // be_visitor_interface_ss + // + // = DESCRIPTION + // This is a concrete visitor to generate the server skeletons for interface + // + // +public: + be_visitor_interface_ss (be_visitor_context *ctx); + // constructor + + ~be_visitor_interface_ss (void); + // destructor + + virtual int visit_interface (be_interface *node); + // set the right context and make a visitor +}; + +#endif /* _BE_INTERFACE_INTERFACE_SS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/tie_sh.h b/TAO/TAO_IDL/be_include/be_visitor_interface/tie_sh.h new file mode 100644 index 00000000000..c9417e04d22 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/tie_sh.h @@ -0,0 +1,46 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// tie_sh.h +// +// = DESCRIPTION +// Concrete visitor for the Interface node. +// This one provides the code generation for TIE classes +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_TIE_SH_H_) +#define _BE_INTERFACE_TIE_SH_H_ + +class be_visitor_interface_tie_sh : public be_visitor_interface +{ + // + // = TITLE + // be_visitor_interface_tie_sh + // + // = DESCRIPTION + // This is a concrete visitor to generate the server header for the TIE class + // + // +public: + be_visitor_interface_tie_sh (be_visitor_context *ctx); + // constructor + + ~be_visitor_interface_tie_sh (void); + // destructor + + virtual int visit_interface (be_interface *node); + // set the right context and make a visitor +}; + +#endif /* _BE_INTERFACE_TIE_SH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/tie_si.h b/TAO/TAO_IDL/be_include/be_visitor_interface/tie_si.h new file mode 100644 index 00000000000..51221dfedc5 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/tie_si.h @@ -0,0 +1,47 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// tie_si.h +// +// = DESCRIPTION +// Concrete visitor for the Interface node. +// This one provides the code generation for TIE classes +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_TIE_SI_H_) +#define _BE_INTERFACE_TIE_SI_H_ + +class be_visitor_interface_tie_si : public be_visitor_interface +{ + // + // = TITLE + // be_visitor_interface_tie_si + // + // = DESCRIPTION + // This is a concrete visitor to generate the server inline for operations + // of the TIE class + // + // +public: + be_visitor_interface_tie_si (be_visitor_context *ctx); + // constructor + + ~be_visitor_interface_tie_si (void); + // destructor + + virtual int visit_interface (be_interface *node); + // set the right context and make a visitor +}; + +#endif /* _BE_INTERFACE_TIE_SI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface_fwd.h b/TAO/TAO_IDL/be_include/be_visitor_interface_fwd.h index b24a9942e39..e139af36707 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_interface_fwd.h +++ b/TAO/TAO_IDL/be_include/be_visitor_interface_fwd.h @@ -25,48 +25,7 @@ #include "be_visitor.h" #include "be_visitor_scope.h" -class be_visitor_interface_fwd_ch : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_interface_fwd_ch - // - // = DESCRIPTION - // This is the visitor for interface_fwd for the header file - // - // -public: - be_visitor_interface_fwd_ch (be_visitor_context *ctx); - // constructor +#include "be_visitor_interface_fwd/interface_fwd_ch.h" +#include "be_visitor_interface_fwd/interface_fwd_ci.h" - ~be_visitor_interface_fwd_ch (void); - // destructor - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface_fwd. - -}; - -class be_visitor_interface_fwd_ci : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_interface_fwd_ci - // - // = DESCRIPTION - // This is the visitor for interface_fwd for the inline file - // - // -public: - be_visitor_interface_fwd_ci (be_visitor_context *ctx); - // constructor - - ~be_visitor_interface_fwd_ci (void); - // destructor - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface_fwd - -}; - -#endif // TAO_BE_VISITOR_INTERFACE_FWD_H +#endif /* TAO_BE_VISITOR_INTERFACE_FWD_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/interface_fwd_ch.h b/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/interface_fwd_ch.h new file mode 100644 index 00000000000..788faa611db --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/interface_fwd_ch.h @@ -0,0 +1,47 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// interface_fwd_ch.h +// +// = DESCRIPTION +// Concrete visitor for the Interface Forward node. +// This one provides code generation for interface forward node. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_INTERFACE_FWD_CH_H_) +#define _BE_INTERFACE_INTERFACE_FWD_CH_H_ + +class be_visitor_interface_fwd_ch : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_interface_fwd_ch + // + // = DESCRIPTION + // This is the visitor for interface_fwd for the header file + // + // +public: + be_visitor_interface_fwd_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_interface_fwd_ch (void); + // destructor + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface_fwd. + +}; + +#endif /* _BE_INTERFACE_INTERFACE_FWD_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/interface_fwd_ci.h b/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/interface_fwd_ci.h new file mode 100644 index 00000000000..a53bd7d7a05 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/interface_fwd_ci.h @@ -0,0 +1,47 @@ +// +// $Id$ +// +/* -*- c++ -*- */ +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// interface_fwd_ci.h +// +// = DESCRIPTION +// Concrete visitor for the Interface Forward node. +// This one provides code generation for interface forward node. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_INTERFACE_INTERFACE_FWD_CI_H_) +#define _BE_INTERFACE_INTERFACE_FWD_CI_H_ + +class be_visitor_interface_fwd_ci : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_interface_fwd_ci + // + // = DESCRIPTION + // This is the visitor for interface_fwd for the inline file + // + // +public: + be_visitor_interface_fwd_ci (be_visitor_context *ctx); + // constructor + + ~be_visitor_interface_fwd_ci (void); + // destructor + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface_fwd + +}; + +#endif /* _BE_INTERFACE_INTERFACE_FWD_CH_I_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_module.h b/TAO/TAO_IDL/be_include/be_visitor_module.h index 272af5bad45..9ccf934e2f5 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_module.h +++ b/TAO/TAO_IDL/be_include/be_visitor_module.h @@ -25,121 +25,11 @@ #include "be_visitor.h" #include "be_visitor_scope.h" -class be_visitor_module : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_module - // - // = DESCRIPTION - // This is a concrete visitor for module that abstracts all common tasks - // - -public: - be_visitor_module (be_visitor_context *ctx); - // constructor - - ~be_visitor_module (void); - // destructor - - // =visit methods on all elements syntactically valid in a Module scope - - virtual int visit_constant (be_constant *node); - // visit a constant - - virtual int visit_enum (be_enum *node); - // visit an enum - - virtual int visit_exception (be_exception *node); - // visit an exception - - virtual int visit_interface (be_interface *node); - // visit an interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit an interface - - virtual int visit_module (be_module *node); - // visit a module - - virtual int visit_structure (be_structure *node); - // visit a structure - - virtual int visit_union (be_union *node); - // visit a union - - virtual int visit_typedef (be_typedef *node); - // visit the typedef node - -}; - +#include "be_visitor_module/module.h" // we need derived module visitors for the client and server header files. For // the others, they use the default module visitor - -class be_visitor_module_ch : public be_visitor_module -{ - // - // = TITLE - // be_visitor_module_ch - // - // = DESCRIPTION - // This is a concrete visitor to generate the client header for module - // - // -public: - be_visitor_module_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_module_ch (void); - // destructor - - virtual int visit_module (be_module *node); - // visit module. We provide code for this method in the derived class - -}; - -class be_visitor_module_sh : public be_visitor_module -{ - // - // = TITLE - // be_visitor_module_sh - // - // = DESCRIPTION - // This is a concrete visitor to generate the server header for module - // - // -public: - be_visitor_module_sh (be_visitor_context *ctx); - // constructor - - ~be_visitor_module_sh (void); - // destructor - - virtual int visit_module (be_module *node); - // visit module. We provide code for this method in the derived class - -}; - -class be_visitor_module_any_op : public be_visitor_module -{ - // - // = TITLE - // be_visitor_module_any_op - // - // = DESCRIPTION - // This is a concrete visitor for module that generates the Any operator - // declarations and implementations - // - -public: - be_visitor_module_any_op (be_visitor_context *ctx); - // constructor - - ~be_visitor_module_any_op (void); - // destructor - - virtual int visit_module (be_module *node); - // visit module -}; +#include "be_visitor_module/module_ch.h" +#include "be_visitor_module/module_sh.h" +#include "be_visitor_module/any_op.h" #endif // TAO_BE_VISITOR_MODULE_H diff --git a/TAO/TAO_IDL/be_include/be_visitor_module/any_op.h b/TAO/TAO_IDL/be_include/be_visitor_module/any_op.h new file mode 100644 index 00000000000..ab941bc345b --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_module/any_op.h @@ -0,0 +1,49 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op.h +// +// = DESCRIPTION +// Concrete visitor for the Module class +// This one provides visitors to generate the Any operators for elements in +// the Module's scope. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_MODULE_ANY_OP_H_) +#define _BE_VISITOR_MODULE_ANY_OP_H_ + +class be_visitor_module_any_op : public be_visitor_module +{ + // + // = TITLE + // be_visitor_module_any_op + // + // = DESCRIPTION + // This is a concrete visitor for module that generates the Any operator + // declarations and implementations + // + +public: + be_visitor_module_any_op (be_visitor_context *ctx); + // constructor + + ~be_visitor_module_any_op (void); + // destructor + + virtual int visit_module (be_module *node); + // visit module +}; + +#endif /* _BE_VISITOR_MODULE_ANY_OP_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_module/module.h b/TAO/TAO_IDL/be_include/be_visitor_module/module.h new file mode 100644 index 00000000000..58c4f951cb8 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_module/module.h @@ -0,0 +1,74 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// module.h +// +// = DESCRIPTION +// Concrete visitor for the Module class +// This one provides the generic visitor for the Module node. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_MODULE_MODULE_H_) +#define _BE_VISITOR_MODULE_MODULE_H_ + +class be_visitor_module : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_module + // + // = DESCRIPTION + // This is a concrete visitor for module that abstracts all common tasks + // + +public: + be_visitor_module (be_visitor_context *ctx); + // constructor + + ~be_visitor_module (void); + // destructor + + // =visit methods on all elements syntactically valid in a Module scope + + virtual int visit_constant (be_constant *node); + // visit a constant + + virtual int visit_enum (be_enum *node); + // visit an enum + + virtual int visit_exception (be_exception *node); + // visit an exception + + virtual int visit_interface (be_interface *node); + // visit an interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit an interface + + virtual int visit_module (be_module *node); + // visit a module + + virtual int visit_structure (be_structure *node); + // visit a structure + + virtual int visit_union (be_union *node); + // visit a union + + virtual int visit_typedef (be_typedef *node); + // visit the typedef node + +}; + +#endif /* _BE_VISITOR_MODULE_MODULE_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_module/module_ch.h b/TAO/TAO_IDL/be_include/be_visitor_module/module_ch.h new file mode 100644 index 00000000000..f001d3e4900 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_module/module_ch.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// module_ch.h +// +// = DESCRIPTION +// Concrete visitor for the Module class +// This provides code generation for the module in the client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_MODULE_MODULE_CH_H_) +#define _BE_VISITOR_MODULE_MODULE_CH_H_ + +class be_visitor_module_ch : public be_visitor_module +{ + // + // = TITLE + // be_visitor_module_ch + // + // = DESCRIPTION + // This is a concrete visitor to generate the client header for module + // + // +public: + be_visitor_module_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_module_ch (void); + // destructor + + virtual int visit_module (be_module *node); + // visit module. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_MODULE_MODULE_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_module/module_sh.h b/TAO/TAO_IDL/be_include/be_visitor_module/module_sh.h new file mode 100644 index 00000000000..0ee2c25379c --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_module/module_sh.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// module_sh.h +// +// = DESCRIPTION +// Concrete visitor for the Module class +// This provides code generation for the module in the server header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_MODULE_MODULE_SH_H_) +#define _BE_VISITOR_MODULE_MODULE_SH_H_ + +class be_visitor_module_sh : public be_visitor_module +{ + // + // = TITLE + // be_visitor_module_sh + // + // = DESCRIPTION + // This is a concrete visitor to generate the server header for module + // + // +public: + be_visitor_module_sh (be_visitor_context *ctx); + // constructor + + ~be_visitor_module_sh (void); + // destructor + + virtual int visit_module (be_module *node); + // visit module. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_MODULE_MODULE_SH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation.h b/TAO/TAO_IDL/be_include/be_visitor_operation.h index 414d848311c..0fdcd877f9e 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation.h @@ -24,816 +24,27 @@ #include "be_visitor.h" #include "be_visitor_scope.h" - -// ************************************************************ -// Operation visitor for client header -// ************************************************************ - -class be_visitor_operation_ch : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_operation_ch - // - // = DESCRIPTION - // This is a concrete visitor to generate the client header for operation - // - // -public: - be_visitor_operation_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_ch (void); - // destructor - - virtual int visit_operation (be_operation *node); - // visit operation. We provide code for this method in the derived class - -}; - -// ************************************************************ -// Operation visitor for client stubs -// ************************************************************ - -class be_visitor_operation_cs : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_operation_cs - // - // = DESCRIPTION - // This is a concrete visitor to generate the client stubs for operation - // - // -public: - be_visitor_operation_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_cs (void); - // destructor - - virtual int visit_operation (be_operation *node); - // visit operation. - - virtual int visit_argument (be_argument *node); - // visit argument to generate ParamData entries - - virtual int post_process (void); - // stuff to output after every member of the scope is handled -}; - -// ************************************************************ -// Operation visitor for server header -// ************************************************************ - -class be_visitor_operation_sh : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_operation_sh - // - // = DESCRIPTION - // This is a concrete visitor to generate the server header for operation - // - // -public: - be_visitor_operation_sh (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_sh (void); - // destructor - - virtual int visit_operation (be_operation *node); - // visit operation. We provide code for this method in the derived class - -}; - -// ************************************************************ -// Operation visitor for server skeletons -// ************************************************************ - -class be_visitor_operation_ss : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_operation_ss - // - // = DESCRIPTION - // This is a concrete visitor to generate the server skeletons for operation - // - // -public: - be_visitor_operation_ss (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_ss (void); - // destructor - - virtual int visit_operation (be_operation *node); - // visit operation. We provide code for this method in the derived class - - virtual int visit_argument (be_argument *node); - // visit argument to generate ParamData entries - - virtual int post_process (void); - // stuff to output after every member of the scope is handled -}; - -// ************************************************************ -// Operation visitor for server header in the collocated class -// ************************************************************ - -class be_visitor_operation_collocated_sh : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_operation_collocated_sh - // - // = DESCRIPTION - // This is a concrete visitor to generate the server header for operation - // in the collocated class - // - // -public: - be_visitor_operation_collocated_sh (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_collocated_sh (void); - // destructor - - virtual int visit_operation (be_operation *node); - // visit operation node. - -}; - -// ***************************************************************** -// Operation visitor for server skeletons for the collocated class -// ***************************************************************** - -class be_visitor_operation_collocated_ss : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_operation_ss - // - // = DESCRIPTION - // This is a concrete visitor to generate the server skeletons for - // operation in the collocated class - // - // -public: - be_visitor_operation_collocated_ss (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_collocated_ss (void); - // destructor - - virtual int visit_operation (be_operation *node); - // visit operation node. - -}; - -// *********************************************************************** -// Operation visitor for operation declaration inside the TIE class -// *********************************************************************** - -class be_visitor_operation_tie_sh : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_operation_tie_sh - // - // = DESCRIPTION - // This is a concrete visitor to generate the operaton inside a TIE class - // - // -public: - be_visitor_operation_tie_sh (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_tie_sh (void); - // destructor - - virtual int visit_operation (be_operation *node); - // set the right context and make a visitor -}; - -// *********************************************************************** -// Operation visitor for operation declaration inside the TIE class -// *********************************************************************** - -class be_visitor_operation_tie_si : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_operation_tie_ss - // - // = DESCRIPTION - // This is a concrete visitor to generate the operaton inside a TIE class - // - // -public: - be_visitor_operation_tie_si (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_tie_si (void); - // destructor - - virtual int visit_operation (be_operation *node); - // set the right context and make a visitor -}; - -// *********************************************************************** -// Operation visitor for return types in the signature of the operation -// *********************************************************************** - -class be_visitor_operation_rettype : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_operation_ch - // - // = DESCRIPTION - // This is a visitor to generate operation return types - // - // -public: - be_visitor_operation_rettype (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_rettype (void); - // destructor - - int visit_array (be_array *node); - // visit an array node - - int visit_enum (be_enum *node); - // visit an enum node - - int visit_interface (be_interface *node); - // visit an interface node - - int visit_interface_fwd (be_interface_fwd *node); - // visit an interface node - - int visit_native (be_native *node); - // visit native type - - int visit_predefined_type (be_predefined_type *node); - // visit a predefined type node - - int visit_sequence (be_sequence *node); - // visit a sequence node - - int visit_string (be_string *node); - // visit a sequence node - - int visit_structure (be_structure *node); - // visit a structure node - - int visit_typedef (be_typedef *node); - // visit a typedef node - - int visit_union (be_union *node); - // visit a union node - -}; - -// ****************************************************************************** -// Operation visitor for argument list - generates parameters in the signature -// ****************************************************************************** - -class be_visitor_operation_arglist : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_operaion_arglist - // - // = DESCRIPTION - // This is a visitor to generate operation argument list - // - // -public: - be_visitor_operation_arglist (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_arglist (void); - // destructor - - int visit_operation (be_operation *node); - // visit the operation - - int visit_argument (be_argument *node); - // visit each argument - -}; - -// ************************************************************ -// Operation visitor for return type variable declaration -// ************************************************************ - -class be_visitor_operation_rettype_vardecl_cs :public be_visitor_decl -{ - // - // = TITLE - // be_visitor_operation_rettype_vardecl_cs - // - // = DESCRIPTION - // This is a visitor to generate a variable declaration ofr an operation - // return type - // -public: - be_visitor_operation_rettype_vardecl_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_rettype_vardecl_cs (void); - // destructor - - int visit_array (be_array *node); - // visit an array node - - int visit_enum (be_enum *node); - // visit an enum node - - int visit_interface (be_interface *node); - // visit an interface node - - int visit_interface_fwd (be_interface_fwd *node); - // visit an interface node - - int visit_predefined_type (be_predefined_type *node); - // visit a predefined type node - - int visit_sequence (be_sequence *node); - // visit a sequence node - - int visit_string (be_string *node); - // visit a sequence node - - int visit_structure (be_structure *node); - // visit a structure node - - int visit_typedef (be_typedef *node); - // visit a typedef node - - int visit_union (be_union *node); - // visit a union node - -}; - -// ************************************************************ -// Operation visitor for preprocessing before do_static_call is invoked -// ************************************************************ - -class be_visitor_operation_rettype_pre_docall_cs :public be_visitor_decl -{ - // - // = TITLE - // be_visitor_operation_rettype_pre_docall_cs - // - // = DESCRIPTION - // This is a visitor to generate any pre processing before the do_static_call is - // made - // -public: - be_visitor_operation_rettype_pre_docall_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_rettype_pre_docall_cs (void); - // destructor - - int visit_array (be_array *node); - // visit an array node - - int visit_interface (be_interface *node); - // visit an interface node - - int visit_interface_fwd (be_interface_fwd *node); - // visit an interface node - - int visit_predefined_type (be_predefined_type *node); - // visit a predefined type node - - int visit_sequence (be_sequence *node); - // visit a sequence node - - int visit_structure (be_structure *node); - // visit a structure node - - int visit_typedef (be_typedef *node); - // visit a typedef node - - int visit_union (be_union *node); - // visit a union node - -}; - -// ************************************************************ -// Operation visitor for passing return variable to do_static_call -// ************************************************************ - -class be_visitor_operation_rettype_docall_cs :public be_visitor_decl -{ - // - // = TITLE - // be_visitor_operation_rettype_docall_cs - // - // = DESCRIPTION - // This is a visitor to generate a variable declaration ofr an operation - // return type - // -public: - be_visitor_operation_rettype_docall_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_rettype_docall_cs (void); - // destructor - - int visit_array (be_array *node); - // visit an array node - - int visit_enum (be_enum *node); - // visit an enum node - - int visit_interface (be_interface *node); - // visit an interface node - - int visit_interface_fwd (be_interface_fwd *node); - // visit an interface node - - int visit_predefined_type (be_predefined_type *node); - // visit a predefined type node - - int visit_sequence (be_sequence *node); - // visit a sequence node - - int visit_string (be_string *node); - // visit a sequence node - - int visit_structure (be_structure *node); - // visit a structure node - - int visit_typedef (be_typedef *node); - // visit a typedef node - - int visit_union (be_union *node); - // visit a union node - -}; - -// ************************************************************ -// Operation visitor for postprocessing after do_static_call is invoked -// ************************************************************ - -class be_visitor_operation_rettype_post_docall_cs :public be_visitor_decl -{ - // - // = TITLE - // be_visitor_operation_rettype_psot_docall_cs - // - // = DESCRIPTION - // This is a visitor to generate any post processing after the do_static_call is - // made - // -public: - be_visitor_operation_rettype_post_docall_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_rettype_post_docall_cs (void); - // destructor - - int visit_interface (be_interface *node); - // visit an interface node - - int visit_interface_fwd (be_interface_fwd *node); - // visit an interface node -}; - -// ************************************************************ -// Operation visitor for returning the return val -// ************************************************************ - -class be_visitor_operation_rettype_return_cs :public be_visitor_decl -{ - // - // = TITLE - // be_visitor_operation_rettype_return_cs - // - // = DESCRIPTION - // This is a visitor to generate a variable declaration ofr an operation - // return type - // -public: - be_visitor_operation_rettype_return_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_rettype_return_cs (void); - // destructor - - int visit_array (be_array *node); - // visit an array node - - int visit_enum (be_enum *node); - // visit an enum node - - int visit_interface (be_interface *node); - // visit an interface node - - int visit_interface_fwd (be_interface_fwd *node); - // visit an interface node - - int visit_predefined_type (be_predefined_type *node); - // visit a predefined type node - - int visit_sequence (be_sequence *node); - // visit a sequence node - - int visit_string (be_string *node); - // visit a sequence node - - int visit_structure (be_structure *node); - // visit a structure node - - int visit_typedef (be_typedef *node); - // visit a typedef node - - int visit_union (be_union *node); - // visit a union node - -}; - -// ****************************************************************************** -// Visitor for -// ****************************************************************************** - -class be_visitor_operation_exceptlist_cs : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_operaion_exceptlist_cs - // - // = DESCRIPTION - // This is a visitor to generate operation exception list to be provided to - // the do_static_call - // - // -public: - be_visitor_operation_exceptlist_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_exceptlist_cs (void); - // destructor - - int visit_operation (be_operation *node); - // visit the operation - -}; - -// ************************************************************ -// generic operation visitor for docall, upcall, pre/post -// ************************************************************ - -class be_visitor_operation_argument : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_operation_argument - // - // = DESCRIPTION - // This is a visitor to generate a variable declaration ofr an operation - // return type - // -public: - be_visitor_operation_argument (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_argument (void); - // destructor - - int post_process (void); - // stuff to o/p after each element of the scope is handled - - int visit_operation (be_operation *node); - // visit the operation - - int visit_argument (be_argument *node); - // visit argument - -}; - -// ************************************************************ -// Operation visitor for return type variable declaration in the server -// skeleton -// ************************************************************ - -class be_visitor_operation_rettype_vardecl_ss :public be_visitor_decl -{ - // - // = TITLE - // be_visitor_operation_rettype_vardecl_ss - // - // = DESCRIPTION - // This is a visitor to generate a variable declaration ofr an operation - // return type in the server skeleton - // -public: - be_visitor_operation_rettype_vardecl_ss (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_rettype_vardecl_ss (void); - // destructor - - int visit_array (be_array *node); - // visit an array node - - int visit_enum (be_enum *node); - // visit an enum node - - int visit_interface (be_interface *node); - // visit an interface node - - int visit_interface_fwd (be_interface_fwd *node); - // visit an interface node - - int visit_predefined_type (be_predefined_type *node); - // visit a predefined type node - - int visit_sequence (be_sequence *node); - // visit a sequence node - - int visit_string (be_string *node); - // visit a sequence node - - int visit_structure (be_structure *node); - // visit a structure node - - int visit_typedef (be_typedef *node); - // visit a typedef node - - int visit_union (be_union *node); - // visit a union node - -}; - -// *********************************************************************** -// Operation visitor for passing return type to the marshal/demarshal routine -// inside the server skeleton -// *********************************************************************** - -class be_visitor_operation_rettype_marshal_ss : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_operation_rettype_marshal_ss - // - // = DESCRIPTION - // This is a visitor to pass return type to the marshal/demarshal routines - // - // -public: - be_visitor_operation_rettype_marshal_ss (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_rettype_marshal_ss (void); - // destructor - - int visit_array (be_array *node); - // visit an array node - - int visit_enum (be_enum *node); - // visit an enum node - - int visit_interface (be_interface *node); - // visit an interface node - - int visit_interface_fwd (be_interface_fwd *node); - // visit an interface node - - int visit_predefined_type (be_predefined_type *node); - // visit a predefined type node - - int visit_sequence (be_sequence *node); - // visit a sequence node - - int visit_string (be_string *node); - // visit a sequence node - - int visit_structure (be_structure *node); - // visit a structure node - - int visit_typedef (be_typedef *node); - // visit a typedef node - - int visit_union (be_union *node); - // visit a union node - -}; - -// *********************************************************************** -// Operation visitor for assignment to return types in an upcall -// *********************************************************************** - -class be_visitor_operation_rettype_assign_ss : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_operation_ch - // - // = DESCRIPTION - // This is a visitor to generate code that assigns to the return type - // variable in the upcall - // - // -public: - be_visitor_operation_rettype_assign_ss (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_rettype_assign_ss (void); - // destructor - - int visit_array (be_array *node); - // visit an array node - - int visit_enum (be_enum *node); - // visit an enum node - - int visit_interface (be_interface *node); - // visit an interface node - - int visit_interface_fwd (be_interface_fwd *node); - // visit an interface node - - int visit_predefined_type (be_predefined_type *node); - // visit a predefined type node - - int visit_sequence (be_sequence *node); - // visit a sequence node - - int visit_string (be_string *node); - // visit a sequence node - - int visit_structure (be_structure *node); - // visit a structure node - - int visit_typedef (be_typedef *node); - // visit a typedef node - - int visit_union (be_union *node); - // visit a union node - -}; - -// *********************************************************************** -// Operation visitor for post upcall processing of return types -// *********************************************************************** - -class be_visitor_operation_rettype_post_upcall_ss : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_operation_rettype_post_upcall_ss - // - // = DESCRIPTION - // This is a visitor for post processing after an upcall - // - // -public: - be_visitor_operation_rettype_post_upcall_ss (be_visitor_context *ctx); - // constructor - - ~be_visitor_operation_rettype_post_upcall_ss (void); - // destructor - - int visit_array (be_array *node); - // visit an array node - - int visit_enum (be_enum *node); - // visit an enum node - - int visit_interface (be_interface *node); - // visit an interface node - - int visit_interface_fwd (be_interface_fwd *node); - // visit an interface node - - int visit_predefined_type (be_predefined_type *node); - // visit a predefined type node - - int visit_sequence (be_sequence *node); - // visit a sequence node - - int visit_string (be_string *node); - // visit a sequence node - - int visit_structure (be_structure *node); - // visit a structure node - - int visit_typedef (be_typedef *node); - // visit a typedef node - - int visit_union (be_union *node); - // visit a union node - -}; +#include "be_visitor_operation/operation_ch.h" +#include "be_visitor_operation/operation_cs.h" +#include "be_visitor_operation/operation_sh.h" +#include "be_visitor_operation/operation_ss.h" +#include "be_visitor_operation/tie_sh.h" +#include "be_visitor_operation/tie_si.h" +#include "be_visitor_operation/collocated_sh.h" +#include "be_visitor_operation/collocated_ss.h" +#include "be_visitor_operation/arglist.h" +#include "be_visitor_operation/rettype.h" +#include "be_visitor_operation/rettype_vardecl_cs.h" +#include "be_visitor_operation/rettype_pre_docall_cs.h" +#include "be_visitor_operation/rettype_pre_docall_cs.h" +#include "be_visitor_operation/rettype_docall_cs.h" +#include "be_visitor_operation/rettype_post_docall_cs.h" +#include "be_visitor_operation/rettype_return_cs.h" +#include "be_visitor_operation/exceptlist_cs.h" +#include "be_visitor_operation/argument.h" +#include "be_visitor_operation/rettype_vardecl_ss.h" +#include "be_visitor_operation/rettype_assign_ss.h" +#include "be_visitor_operation/rettype_post_upcall_ss.h" +#include "be_visitor_operation/rettype_marshal_ss.h" #endif // TAO_BE_VISITOR_OPERATION_H diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/arglist.h b/TAO/TAO_IDL/be_include/be_visitor_operation/arglist.h new file mode 100644 index 00000000000..42f418a97ed --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/arglist.h @@ -0,0 +1,54 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// arglist.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This generates the +// operation signature. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_ARGLIST_H_) +#define _BE_VISITOR_OPERATION_ARGLIST_H_ + +// ****************************************************************************** +// Operation visitor for argument list - generates parameters in the signature +// ****************************************************************************** + +class be_visitor_operation_arglist : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_operaion_arglist + // + // = DESCRIPTION + // This is a visitor to generate operation argument list + // + // +public: + be_visitor_operation_arglist (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_arglist (void); + // destructor + + int visit_operation (be_operation *node); + // visit the operation + + int visit_argument (be_argument *node); + // visit each argument + +}; + +#endif /* _BE_VISITOR_OPERATION_ARGLIST_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/argument.h b/TAO/TAO_IDL/be_include/be_visitor_operation/argument.h new file mode 100644 index 00000000000..6fc51da3ca7 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/argument.h @@ -0,0 +1,57 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// argument.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This is a generic visitor +// that calls visitors for the Argument class. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_ARGUMENT_H_) +#define _BE_VISITOR_OPERATION_ARGUMENT_H_ + +// ************************************************************ +// generic operation visitor for docall, upcall, pre/post +// ************************************************************ + +class be_visitor_operation_argument : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_operation_argument + // + // = DESCRIPTION + // This is a visitor to generate a variable declaration ofr an operation + // return type + // +public: + be_visitor_operation_argument (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_argument (void); + // destructor + + int post_process (void); + // stuff to o/p after each element of the scope is handled + + int visit_operation (be_operation *node); + // visit the operation + + int visit_argument (be_argument *node); + // visit argument + +}; + +#endif /* _BE_VISITOR_OPERATION_ARGUMENT_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/collocated_sh.h b/TAO/TAO_IDL/be_include/be_visitor_operation/collocated_sh.h new file mode 100644 index 00000000000..dc31959e345 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/collocated_sh.h @@ -0,0 +1,52 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// collocated_ch.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations for the collocated case +// inside of the servant header +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_COLLOCATED_SH_H_) +#define _BE_VISITOR_OPERATION_COLLOCATED_SH_H_ + +// ************************************************************ +// Operation visitor for server header in the collocated class +// ************************************************************ + +class be_visitor_operation_collocated_sh : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_operation_collocated_sh + // + // = DESCRIPTION + // This is a concrete visitor to generate the server header for operation + // in the collocated class + // + // +public: + be_visitor_operation_collocated_sh (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_collocated_sh (void); + // destructor + + virtual int visit_operation (be_operation *node); + // visit operation node. + +}; + +#endif /* _BE_VISITOR_OPERATION_COLLOCATED_SH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/collocated_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/collocated_ss.h new file mode 100644 index 00000000000..48b7966e9aa --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/collocated_ss.h @@ -0,0 +1,52 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// collocated_ss.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations for the collocated case +// inside of the servant skeleton +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_COLLOCATED_SS_H_) +#define _BE_VISITOR_OPERATION_COLLOCATED_SS_H_ + +// ***************************************************************** +// Operation visitor for server skeletons for the collocated class +// ***************************************************************** + +class be_visitor_operation_collocated_ss : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_operation_ss + // + // = DESCRIPTION + // This is a concrete visitor to generate the server skeletons for + // operation in the collocated class + // + // +public: + be_visitor_operation_collocated_ss (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_collocated_ss (void); + // destructor + + virtual int visit_operation (be_operation *node); + // visit operation node. + +}; + +#endif /* _BE_VISITOR_OPERATION_COLLOCATED_SS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/exceptlist_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/exceptlist_cs.h new file mode 100644 index 00000000000..32c9e1c3d22 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/exceptlist_cs.h @@ -0,0 +1,52 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// exceptlist_cs.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This generates the tables +// for the exceptions used by the stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_EXCEPTIONLIST_CS_H_) +#define _BE_VISITOR_OPERATION_EXCEPTIONLIST_CS_H_ + +// ****************************************************************************** +// Visitor for generating the exception list +// ****************************************************************************** + +class be_visitor_operation_exceptlist_cs : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_operaion_exceptlist_cs + // + // = DESCRIPTION + // This is a visitor to generate operation exception list to be provided to + // the do_static_call + // + // +public: + be_visitor_operation_exceptlist_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_exceptlist_cs (void); + // destructor + + int visit_operation (be_operation *node); + // visit the operation + +}; + +#endif /* _BE_VISITOR_OPERATION_EXCEPTIONLIST_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/operation_ch.h b/TAO/TAO_IDL/be_include/be_visitor_operation/operation_ch.h new file mode 100644 index 00000000000..e039623dd5d --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/operation_ch.h @@ -0,0 +1,50 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// operation_ch.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations in client header +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_OPERATION_CH_H_) +#define _BE_VISITOR_OPERATION_OPERATION_CH_H_ + +// ************************************************************ +// Operation visitor for client header +// ************************************************************ + +class be_visitor_operation_ch : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_operation_ch + // + // = DESCRIPTION + // This is a concrete visitor to generate the client header for operation + // + // +public: + be_visitor_operation_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_ch (void); + // destructor + + virtual int visit_operation (be_operation *node); + // visit operation. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_OPERATION_OPERATION_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/operation_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/operation_cs.h new file mode 100644 index 00000000000..1228b684e21 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/operation_cs.h @@ -0,0 +1,55 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// operation_cs.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations in client stubs +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_OPERATION_CS_H_) +#define _BE_VISITOR_OPERATION_OPERATION_CS_H_ + +// ************************************************************ +// Operation visitor for client stubs +// ************************************************************ + +class be_visitor_operation_cs : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_operation_cs + // + // = DESCRIPTION + // This is a concrete visitor to generate the client stubs for operation + // + // +public: + be_visitor_operation_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_cs (void); + // destructor + + virtual int visit_operation (be_operation *node); + // visit operation. + + virtual int visit_argument (be_argument *node); + // visit argument to generate ParamData entries + + virtual int post_process (void); + // stuff to output after every member of the scope is handled +}; + +#endif /* _BE_VISITOR_OPERATION_OPERATION_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/operation_sh.h b/TAO/TAO_IDL/be_include/be_visitor_operation/operation_sh.h new file mode 100644 index 00000000000..702a0dc2251 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/operation_sh.h @@ -0,0 +1,50 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// operation_sh.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations in server header +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_OPERATION_SH_H_) +#define _BE_VISITOR_OPERATION_OPERATION_SH_H_ + +// ************************************************************ +// Operation visitor for server header +// ************************************************************ + +class be_visitor_operation_sh : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_operation_sh + // + // = DESCRIPTION + // This is a concrete visitor to generate the server header for operation + // + // +public: + be_visitor_operation_sh (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_sh (void); + // destructor + + virtual int visit_operation (be_operation *node); + // visit operation. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_OPERATION_OPERATION_SH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/operation_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/operation_ss.h new file mode 100644 index 00000000000..14cf41e7863 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/operation_ss.h @@ -0,0 +1,55 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// operation_ss.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations in server skeletons +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_OPERATION_SS_H_) +#define _BE_VISITOR_OPERATION_OPERATION_SS_H_ + +// ************************************************************ +// Operation visitor for server skeletons +// ************************************************************ + +class be_visitor_operation_ss : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_operation_ss + // + // = DESCRIPTION + // This is a concrete visitor to generate the server skeletons for operation + // + // +public: + be_visitor_operation_ss (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_ss (void); + // destructor + + virtual int visit_operation (be_operation *node); + // visit operation. We provide code for this method in the derived class + + virtual int visit_argument (be_argument *node); + // visit argument to generate ParamData entries + + virtual int post_process (void); + // stuff to output after every member of the scope is handled +}; + +#endif /* _BE_VISITOR_OPERATION_OPERATION_SS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/rettype.h b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype.h new file mode 100644 index 00000000000..9a4fc0a8ac3 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype.h @@ -0,0 +1,81 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// rettype.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This generates the return +// type of the operation +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_RETTYPE_H_) +#define _BE_VISITOR_OPERATION_RETTYPE_H_ + +// *********************************************************************** +// Operation visitor for return types in the signature of the operation +// *********************************************************************** + +class be_visitor_operation_rettype : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_operation_ch + // + // = DESCRIPTION + // This is a visitor to generate operation return types + // + // +public: + be_visitor_operation_rettype (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_rettype (void); + // destructor + + int visit_array (be_array *node); + // visit an array node + + int visit_enum (be_enum *node); + // visit an enum node + + int visit_interface (be_interface *node); + // visit an interface node + + int visit_interface_fwd (be_interface_fwd *node); + // visit an interface node + + int visit_native (be_native *node); + // visit native type + + int visit_predefined_type (be_predefined_type *node); + // visit a predefined type node + + int visit_sequence (be_sequence *node); + // visit a sequence node + + int visit_string (be_string *node); + // visit a sequence node + + int visit_structure (be_structure *node); + // visit a structure node + + int visit_typedef (be_typedef *node); + // visit a typedef node + + int visit_union (be_union *node); + // visit a union node + +}; + +#endif /* _BE_VISITOR_OPERATION_RETTYPE_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_assign_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_assign_ss.h new file mode 100644 index 00000000000..ff35c744e62 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_assign_ss.h @@ -0,0 +1,80 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// rettype_assign_ss.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This generates the +// assignment of the return value of the upcall to the return type variabel +// inside the server-skeleton. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_RETTYPE_ASSIGN_SS_H_) +#define _BE_VISITOR_OPERATION_RETTYPE_ASSIGN_SS_H_ + +// *********************************************************************** +// Operation visitor for assignment to return types in an upcall +// *********************************************************************** + +class be_visitor_operation_rettype_assign_ss : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_operation_ch + // + // = DESCRIPTION + // This is a visitor to generate code that assigns to the return type + // variable in the upcall + // + // +public: + be_visitor_operation_rettype_assign_ss (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_rettype_assign_ss (void); + // destructor + + int visit_array (be_array *node); + // visit an array node + + int visit_enum (be_enum *node); + // visit an enum node + + int visit_interface (be_interface *node); + // visit an interface node + + int visit_interface_fwd (be_interface_fwd *node); + // visit an interface node + + int visit_predefined_type (be_predefined_type *node); + // visit a predefined type node + + int visit_sequence (be_sequence *node); + // visit a sequence node + + int visit_string (be_string *node); + // visit a sequence node + + int visit_structure (be_structure *node); + // visit a structure node + + int visit_typedef (be_typedef *node); + // visit a typedef node + + int visit_union (be_union *node); + // visit a union node + +}; + +#endif /* _BE_VISITOR_OPERATION_RETTYPE_ASSIGN_SS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_docall_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_docall_cs.h new file mode 100644 index 00000000000..eb3b287ce9c --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_docall_cs.h @@ -0,0 +1,79 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// rettype_docall_cs.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This generates the code +// for passing the return type variable to the docall +// made. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_RETTYPE_DOCALL_CS_H_) +#define _BE_VISITOR_OPERATION_RETTYPE_DOCALL_CS_H_ + +// ************************************************************ +// Operation visitor for passing return variable to do_static_call +// ************************************************************ + +class be_visitor_operation_rettype_docall_cs :public be_visitor_decl +{ + // + // = TITLE + // be_visitor_operation_rettype_docall_cs + // + // = DESCRIPTION + // This is a visitor to generate a variable declaration ofr an operation + // return type + // +public: + be_visitor_operation_rettype_docall_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_rettype_docall_cs (void); + // destructor + + int visit_array (be_array *node); + // visit an array node + + int visit_enum (be_enum *node); + // visit an enum node + + int visit_interface (be_interface *node); + // visit an interface node + + int visit_interface_fwd (be_interface_fwd *node); + // visit an interface node + + int visit_predefined_type (be_predefined_type *node); + // visit a predefined type node + + int visit_sequence (be_sequence *node); + // visit a sequence node + + int visit_string (be_string *node); + // visit a sequence node + + int visit_structure (be_structure *node); + // visit a structure node + + int visit_typedef (be_typedef *node); + // visit a typedef node + + int visit_union (be_union *node); + // visit a union node + +}; + +#endif /* _BE_VISITOR_OPERATION_RETTYPE_DOCALL_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_marshal_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_marshal_ss.h new file mode 100644 index 00000000000..b3f95579a6a --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_marshal_ss.h @@ -0,0 +1,79 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// rettype_marshal_ss.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This generates the code +// for passing the return type variable to the marshaler. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_RETTYPE_MARSHAL_SS_H_) +#define _BE_VISITOR_OPERATION_RETTYPE_MARSHAL_SSH_ + +// *********************************************************************** +// Operation visitor for passing return type to the marshal/demarshal routine +// inside the server skeleton +// *********************************************************************** + +class be_visitor_operation_rettype_marshal_ss : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_operation_rettype_marshal_ss + // + // = DESCRIPTION + // This is a visitor to pass return type to the marshal/demarshal routines + // + // +public: + be_visitor_operation_rettype_marshal_ss (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_rettype_marshal_ss (void); + // destructor + + int visit_array (be_array *node); + // visit an array node + + int visit_enum (be_enum *node); + // visit an enum node + + int visit_interface (be_interface *node); + // visit an interface node + + int visit_interface_fwd (be_interface_fwd *node); + // visit an interface node + + int visit_predefined_type (be_predefined_type *node); + // visit a predefined type node + + int visit_sequence (be_sequence *node); + // visit a sequence node + + int visit_string (be_string *node); + // visit a sequence node + + int visit_structure (be_structure *node); + // visit a structure node + + int visit_typedef (be_typedef *node); + // visit a typedef node + + int visit_union (be_union *node); + // visit a union node + +}; + +#endif /* _BE_VISITOR_OPERATION_RETTYPE_MARSHAL_SSH_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_post_docall_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_post_docall_cs.h new file mode 100644 index 00000000000..e2299617a35 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_post_docall_cs.h @@ -0,0 +1,54 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// rettype_post_docall_cs.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This generates the code +// for post processing of the return type variable after the docall is +// made. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_RETTYPE_POST_DOCALL_CS_H_) +#define _BE_VISITOR_OPERATION_RETTYPE_POST_DOCALL_CS_H_ + +// ************************************************************ +// Operation visitor for postprocessing after do_static_call is invoked +// ************************************************************ + +class be_visitor_operation_rettype_post_docall_cs :public be_visitor_decl +{ + // + // = TITLE + // be_visitor_operation_rettype_psot_docall_cs + // + // = DESCRIPTION + // This is a visitor to generate any post processing after the do_static_call is + // made + // +public: + be_visitor_operation_rettype_post_docall_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_rettype_post_docall_cs (void); + // destructor + + int visit_interface (be_interface *node); + // visit an interface node + + int visit_interface_fwd (be_interface_fwd *node); + // visit an interface node +}; + +#endif /* _BE_VISITOR_OPERATION_RETTYPE_POST_DOCALL_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_post_upcall_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_post_upcall_ss.h new file mode 100644 index 00000000000..6cfbd7566ed --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_post_upcall_ss.h @@ -0,0 +1,79 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// rettype_post_upcall_ss.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This generates the code +// for post processing of the return type variable after the upcall is +// made. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_RETTYPE_POST_UPCALL_SS_H_) +#define _BE_VISITOR_OPERATION_RETTYPE_POST_UPCALL_SS_H_ + +// *********************************************************************** +// Operation visitor for post upcall processing of return types +// *********************************************************************** + +class be_visitor_operation_rettype_post_upcall_ss : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_operation_rettype_post_upcall_ss + // + // = DESCRIPTION + // This is a visitor for post processing after an upcall + // + // +public: + be_visitor_operation_rettype_post_upcall_ss (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_rettype_post_upcall_ss (void); + // destructor + + int visit_array (be_array *node); + // visit an array node + + int visit_enum (be_enum *node); + // visit an enum node + + int visit_interface (be_interface *node); + // visit an interface node + + int visit_interface_fwd (be_interface_fwd *node); + // visit an interface node + + int visit_predefined_type (be_predefined_type *node); + // visit a predefined type node + + int visit_sequence (be_sequence *node); + // visit a sequence node + + int visit_string (be_string *node); + // visit a sequence node + + int visit_structure (be_structure *node); + // visit a structure node + + int visit_typedef (be_typedef *node); + // visit a typedef node + + int visit_union (be_union *node); + // visit a union node + +}; + +#endif /* _BE_VISITOR_OPERATION_RETTYPE_POST_UPCALL_SS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_pre_docall_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_pre_docall_cs.h new file mode 100644 index 00000000000..acb296f6ac9 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_pre_docall_cs.h @@ -0,0 +1,73 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// rettype_pre_docall_cs.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This generates the code +// for pre processing of the return type variable before the docall is +// made. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_RETTYPE_PRE_DOCALL_CS_H_) +#define _BE_VISITOR_OPERATION_RETTYPE_PRE_DOCALL_CS_H_ + +// ************************************************************ +// Operation visitor for preprocessing before do_static_call is invoked +// ************************************************************ + +class be_visitor_operation_rettype_pre_docall_cs :public be_visitor_decl +{ + // + // = TITLE + // be_visitor_operation_rettype_pre_docall_cs + // + // = DESCRIPTION + // This is a visitor to generate any pre processing before the do_static_call is + // made + // +public: + be_visitor_operation_rettype_pre_docall_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_rettype_pre_docall_cs (void); + // destructor + + int visit_array (be_array *node); + // visit an array node + + int visit_interface (be_interface *node); + // visit an interface node + + int visit_interface_fwd (be_interface_fwd *node); + // visit an interface node + + int visit_predefined_type (be_predefined_type *node); + // visit a predefined type node + + int visit_sequence (be_sequence *node); + // visit a sequence node + + int visit_structure (be_structure *node); + // visit a structure node + + int visit_typedef (be_typedef *node); + // visit a typedef node + + int visit_union (be_union *node); + // visit a union node + +}; + +#endif /* _BE_VISITOR_OPERATION_RETTYPE_PRE_DOCALL_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_return_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_return_cs.h new file mode 100644 index 00000000000..ec9b8383342 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_return_cs.h @@ -0,0 +1,78 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// rettype_return_cs.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This generates the return +// statement for returning the return type variable in the client stub. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_RETTYPE_RETURN_CS_H_) +#define _BE_VISITOR_OPERATION_RETTYPE_CS_H_ + +// ************************************************************ +// Operation visitor for returning the return val +// ************************************************************ + +class be_visitor_operation_rettype_return_cs :public be_visitor_decl +{ + // + // = TITLE + // be_visitor_operation_rettype_return_cs + // + // = DESCRIPTION + // This is a visitor to generate a variable declaration ofr an operation + // return type + // +public: + be_visitor_operation_rettype_return_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_rettype_return_cs (void); + // destructor + + int visit_array (be_array *node); + // visit an array node + + int visit_enum (be_enum *node); + // visit an enum node + + int visit_interface (be_interface *node); + // visit an interface node + + int visit_interface_fwd (be_interface_fwd *node); + // visit an interface node + + int visit_predefined_type (be_predefined_type *node); + // visit a predefined type node + + int visit_sequence (be_sequence *node); + // visit a sequence node + + int visit_string (be_string *node); + // visit a sequence node + + int visit_structure (be_structure *node); + // visit a structure node + + int visit_typedef (be_typedef *node); + // visit a typedef node + + int visit_union (be_union *node); + // visit a union node + +}; + +#endif /* _BE_VISITOR_OPERATION_RETTYPE_RETURN_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_vardecl_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_vardecl_cs.h new file mode 100644 index 00000000000..ca9b7ba99e7 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_vardecl_cs.h @@ -0,0 +1,78 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// rettype_vardecl_cs.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This generates the return +// type variable declaration in the client side stub. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_RETTYPE_VARDECL_CS_H_) +#define _BE_VISITOR_OPERATION_RETTYPE_VARDECL_CS_H_ + +// ************************************************************ +// Operation visitor for return type variable declaration +// ************************************************************ + +class be_visitor_operation_rettype_vardecl_cs :public be_visitor_decl +{ + // + // = TITLE + // be_visitor_operation_rettype_vardecl_cs + // + // = DESCRIPTION + // This is a visitor to generate a variable declaration ofr an operation + // return type + // +public: + be_visitor_operation_rettype_vardecl_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_rettype_vardecl_cs (void); + // destructor + + int visit_array (be_array *node); + // visit an array node + + int visit_enum (be_enum *node); + // visit an enum node + + int visit_interface (be_interface *node); + // visit an interface node + + int visit_interface_fwd (be_interface_fwd *node); + // visit an interface node + + int visit_predefined_type (be_predefined_type *node); + // visit a predefined type node + + int visit_sequence (be_sequence *node); + // visit a sequence node + + int visit_string (be_string *node); + // visit a sequence node + + int visit_structure (be_structure *node); + // visit a structure node + + int visit_typedef (be_typedef *node); + // visit a typedef node + + int visit_union (be_union *node); + // visit a union node + +}; + +#endif /* _BE_VISITOR_OPERATION_RETTYPE_VARDECL_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_vardecl_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_vardecl_ss.h new file mode 100644 index 00000000000..57678e6371b --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_vardecl_ss.h @@ -0,0 +1,79 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// rettype_vardecl_ss.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This generates the return +// type variable declaration in the server side skeleton. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_RETTYPE_VARDECL_SS_H_) +#define _BE_VISITOR_OPERATION_RETTYPE_VARDECL_SS_H_ + +// ************************************************************ +// Operation visitor for return type variable declaration in the server +// skeleton +// ************************************************************ + +class be_visitor_operation_rettype_vardecl_ss :public be_visitor_decl +{ + // + // = TITLE + // be_visitor_operation_rettype_vardecl_ss + // + // = DESCRIPTION + // This is a visitor to generate a variable declaration ofr an operation + // return type in the server skeleton + // +public: + be_visitor_operation_rettype_vardecl_ss (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_rettype_vardecl_ss (void); + // destructor + + int visit_array (be_array *node); + // visit an array node + + int visit_enum (be_enum *node); + // visit an enum node + + int visit_interface (be_interface *node); + // visit an interface node + + int visit_interface_fwd (be_interface_fwd *node); + // visit an interface node + + int visit_predefined_type (be_predefined_type *node); + // visit a predefined type node + + int visit_sequence (be_sequence *node); + // visit a sequence node + + int visit_string (be_string *node); + // visit a sequence node + + int visit_structure (be_structure *node); + // visit a structure node + + int visit_typedef (be_typedef *node); + // visit a typedef node + + int visit_union (be_union *node); + // visit a union node + +}; + +#endif /* _BE_VISITOR_OPERATION_RETTYPE_VARDECL_SS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/tie_sh.h b/TAO/TAO_IDL/be_include/be_visitor_operation/tie_sh.h new file mode 100644 index 00000000000..f5329bfe963 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/tie_sh.h @@ -0,0 +1,50 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// tie_sh.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations for the TIE class inside +// the server header +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_TIE_SH_H_) +#define _BE_VISITOR_OPERATION_TIE_SH_H_ + +// *********************************************************************** +// Operation visitor for operation declaration inside the TIE class +// *********************************************************************** + +class be_visitor_operation_tie_sh : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_operation_tie_sh + // + // = DESCRIPTION + // This is a concrete visitor to generate the operaton inside a TIE class + // + // +public: + be_visitor_operation_tie_sh (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_tie_sh (void); + // destructor + + virtual int visit_operation (be_operation *node); + // set the right context and make a visitor +}; + +#endif /* _BE_VISITOR_OPERATION_TIE_SH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/tie_si.h b/TAO/TAO_IDL/be_include/be_visitor_operation/tie_si.h new file mode 100644 index 00000000000..f6168878069 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/tie_si.h @@ -0,0 +1,50 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// tie_si.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations for the TIE class inside +// the server inline +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_OPERATION_TIE_SI_H_) +#define _BE_VISITOR_OPERATION_TIE_SI_H_ + +// *********************************************************************** +// Operation visitor for operation declaration inside the TIE class +// *********************************************************************** + +class be_visitor_operation_tie_si : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_operation_tie_ss + // + // = DESCRIPTION + // This is a concrete visitor to generate the operaton inside a TIE class + // + // +public: + be_visitor_operation_tie_si (be_visitor_context *ctx); + // constructor + + ~be_visitor_operation_tie_si (void); + // destructor + + virtual int visit_operation (be_operation *node); + // set the right context and make a visitor +}; + +#endif /* _BE_VISITOR_OPERATION_TIE_SI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_root.h b/TAO/TAO_IDL/be_include/be_visitor_root.h index 68d3dcf4867..b18ad225c15 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_root.h +++ b/TAO/TAO_IDL/be_include/be_visitor_root.h @@ -25,208 +25,13 @@ #include "be_visitor.h" #include "be_visitor_scope.h" -class be_visitor_root : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_root - // - // = DESCRIPTION - // This is a concrete visitor for root that abstracts all common tasks - // - -public: - be_visitor_root (be_visitor_context *ctx); - // constructor - - ~be_visitor_root (void); - // destructor - - virtual int visit_root (be_root *node); - // visit root - - // =visit methods on all elements syntactically valid in a Root scope - - virtual int visit_constant (be_constant *node); - // visit a constant - - virtual int visit_enum (be_enum *node); - // visit an enum - - virtual int visit_exception (be_exception *node); - // visit an exception - - virtual int visit_interface (be_interface *node); - // visit an interface - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit an interface - - virtual int visit_module (be_module *node); - // visit a module - - virtual int visit_structure (be_structure *node); - // visit a structure - - virtual int visit_union (be_union *node); - // visit a union - - virtual int visit_typedef (be_typedef *node); - // visit the typedef node - - // =helper. This is used by derived clases to set the right context - - virtual int init (void); - // will be overridden by derived classes that set the appropriate context -}; - -class be_visitor_root_ch : public be_visitor_root -{ - // - // = TITLE - // be_visitor_root_ch - // - // = DESCRIPTION - // This is a concrete visitor to generate the client header for root - // - // -public: - be_visitor_root_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_root_ch (void); - // destructor - - virtual int init (void); - // set the right context and make a visitor -}; - -class be_visitor_root_ci : public be_visitor_root -{ - // - // = TITLE - // be_visitor_root_ci - // - // = DESCRIPTION - // This is a concrete visitor to generate the client inline for root - // - // -public: - be_visitor_root_ci (be_visitor_context *ctx); - // constructor - - ~be_visitor_root_ci (void); - // destructor - - virtual int init (void); - // set the right context and make a visitor -}; - -class be_visitor_root_cs : public be_visitor_root -{ - // - // = TITLE - // be_visitor_root_cs - // - // = DESCRIPTION - // This is a concrete visitor to generate the client stubs for root - // - // -public: - be_visitor_root_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_root_cs (void); - // destructor - - virtual int init (void); - // set the right context and make a visitor -}; - -class be_visitor_root_sh : public be_visitor_root -{ - // - // = TITLE - // be_visitor_root_sh - // - // = DESCRIPTION - // This is a concrete visitor to generate the server header for root - // - // -public: - be_visitor_root_sh (be_visitor_context *ctx); - // constructor - - ~be_visitor_root_sh (void); - // destructor - - virtual int init (void); - // set the right context and make a visitor -}; - -class be_visitor_root_si : public be_visitor_root -{ - // - // = TITLE - // be_visitor_root_si - // - // = DESCRIPTION - // This is a concrete visitor to generate the server inline for root - // - // -public: - be_visitor_root_si (be_visitor_context *ctx); - // constructor - - ~be_visitor_root_si (void); - // destructor - - virtual int init (void); - // set the right context and make a visitor -}; - -class be_visitor_root_ss : public be_visitor_root -{ - // - // = TITLE - // be_visitor_root_ss - // - // = DESCRIPTION - // This is a concrete visitor to generate the server skeletons for root - // - // -public: - be_visitor_root_ss (be_visitor_context *ctx); - // constructor - - ~be_visitor_root_ss (void); - // destructor - - virtual int init (void); - // set the right context and make a visitor -}; - - -class be_visitor_root_any_op : public be_visitor_root -{ - // - // = TITLE - // be_visitor_root_any_op - // - // = DESCRIPTION - // This is a concrete visitor for root that generates the Any operator - // declarations and implementations - // - -public: - be_visitor_root_any_op (be_visitor_context *ctx); - // constructor - - ~be_visitor_root_any_op (void); - // destructor - - virtual int visit_root (be_root *node); - // visit root -}; +#include "be_visitor_root/root.h" +#include "be_visitor_root/root_ch.h" +#include "be_visitor_root/root_ci.h" +#include "be_visitor_root/root_cs.h" +#include "be_visitor_root/root_sh.h" +#include "be_visitor_root/root_si.h" +#include "be_visitor_root/root_ss.h" +#include "be_visitor_root/any_op.h" #endif // TAO_BE_VISITOR_ROOT_H diff --git a/TAO/TAO_IDL/be_include/be_visitor_root/any_op.h b/TAO/TAO_IDL/be_include/be_visitor_root/any_op.h new file mode 100644 index 00000000000..55bea266f7b --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_root/any_op.h @@ -0,0 +1,49 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op.h +// +// = DESCRIPTION +// Concrete visitor for the Root class +// This one provides code generation for the Any operators for elements of +// the Root scope. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ROOT_ANY_OP_H_) +#define _BE_VISITOR_ROOT_ANY_OP_H_ + +class be_visitor_root_any_op : public be_visitor_root +{ + // + // = TITLE + // be_visitor_root_any_op + // + // = DESCRIPTION + // This is a concrete visitor for root that generates the Any operator + // declarations and implementations + // + +public: + be_visitor_root_any_op (be_visitor_context *ctx); + // constructor + + ~be_visitor_root_any_op (void); + // destructor + + virtual int visit_root (be_root *node); + // visit root +}; + +#endif /* _BE_VISITOR_ROOT_ANY_OP_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_root/root.h b/TAO/TAO_IDL/be_include/be_visitor_root/root.h new file mode 100644 index 00000000000..106bf26355d --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_root/root.h @@ -0,0 +1,81 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// root.h +// +// = DESCRIPTION +// Concrete visitor for the Root class +// This one provides the generic visitor for the Root node. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ROOT_ROOT_H_) +#define _BE_VISITOR_ROOT_ROOT_H_ + +class be_visitor_root : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_root + // + // = DESCRIPTION + // This is a concrete visitor for root that abstracts all common tasks + // + +public: + be_visitor_root (be_visitor_context *ctx); + // constructor + + ~be_visitor_root (void); + // destructor + + virtual int visit_root (be_root *node); + // visit root + + // =visit methods on all elements syntactically valid in a Root scope + + virtual int visit_constant (be_constant *node); + // visit a constant + + virtual int visit_enum (be_enum *node); + // visit an enum + + virtual int visit_exception (be_exception *node); + // visit an exception + + virtual int visit_interface (be_interface *node); + // visit an interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit an interface + + virtual int visit_module (be_module *node); + // visit a module + + virtual int visit_structure (be_structure *node); + // visit a structure + + virtual int visit_union (be_union *node); + // visit a union + + virtual int visit_typedef (be_typedef *node); + // visit the typedef node + + // =helper. This is used by derived clases to set the right context + + virtual int init (void); + // will be overridden by derived classes that set the appropriate context +}; + +#endif /* _BE_VISITOR_ROOT_ROOT_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_root/root_ch.h b/TAO/TAO_IDL/be_include/be_visitor_root/root_ch.h new file mode 100644 index 00000000000..47dd1f09b56 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_root/root_ch.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// root_ch.h +// +// = DESCRIPTION +// Concrete visitor for the Root class +// This one provides code generation for elements of the Root node in the +// client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ROOT_ROOT_CH_H_) +#define _BE_VISITOR_ROOT_ROOT_CH_H_ + +class be_visitor_root_ch : public be_visitor_root +{ + // + // = TITLE + // be_visitor_root_ch + // + // = DESCRIPTION + // This is a concrete visitor to generate the client header for root + // + // +public: + be_visitor_root_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_root_ch (void); + // destructor + + virtual int init (void); + // set the right context and make a visitor +}; + +#endif /* _BE_VISITOR_ROOT_ROOT_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_root/root_ci.h b/TAO/TAO_IDL/be_include/be_visitor_root/root_ci.h new file mode 100644 index 00000000000..1362397511b --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_root/root_ci.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// root_ci.h +// +// = DESCRIPTION +// Concrete visitor for the Root class +// This one provides code generation for elements of the Root node in the +// client inline. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ROOT_ROOT_CI_H_) +#define _BE_VISITOR_ROOT_ROOT_CI_H_ + +class be_visitor_root_ci : public be_visitor_root +{ + // + // = TITLE + // be_visitor_root_ci + // + // = DESCRIPTION + // This is a concrete visitor to generate the client inline for root + // + // +public: + be_visitor_root_ci (be_visitor_context *ctx); + // constructor + + ~be_visitor_root_ci (void); + // destructor + + virtual int init (void); + // set the right context and make a visitor +}; + +#endif /* _BE_VISITOR_ROOT_ROOT_CI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_root/root_cs.h b/TAO/TAO_IDL/be_include/be_visitor_root/root_cs.h new file mode 100644 index 00000000000..e8462a0df49 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_root/root_cs.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// root_cs.h +// +// = DESCRIPTION +// Concrete visitor for the Root class +// This one provides code generation for elements of the Root node in the +// client stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ROOT_ROOT_CS_H_) +#define _BE_VISITOR_ROOT_ROOT_CS_H_ + +class be_visitor_root_cs : public be_visitor_root +{ + // + // = TITLE + // be_visitor_root_cs + // + // = DESCRIPTION + // This is a concrete visitor to generate the client stubs for root + // + // +public: + be_visitor_root_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_root_cs (void); + // destructor + + virtual int init (void); + // set the right context and make a visitor +}; + +#endif /* _BE_VISITOR_ROOT_ROOT_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_root/root_sh.h b/TAO/TAO_IDL/be_include/be_visitor_root/root_sh.h new file mode 100644 index 00000000000..45a15201de8 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_root/root_sh.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// root_sh.h +// +// = DESCRIPTION +// Concrete visitor for the Root class +// This one provides code generation for elements of the Root node in the +// server header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ROOT_ROOT_SH_H_) +#define _BE_VISITOR_ROOT_ROOT_SH_H_ + +class be_visitor_root_sh : public be_visitor_root +{ + // + // = TITLE + // be_visitor_root_sh + // + // = DESCRIPTION + // This is a concrete visitor to generate the server header for root + // + // +public: + be_visitor_root_sh (be_visitor_context *ctx); + // constructor + + ~be_visitor_root_sh (void); + // destructor + + virtual int init (void); + // set the right context and make a visitor +}; + +#endif /* _BE_VISITOR_ROOT_ROOT_SH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_root/root_si.h b/TAO/TAO_IDL/be_include/be_visitor_root/root_si.h new file mode 100644 index 00000000000..5ff6648ebb8 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_root/root_si.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// root_si.h +// +// = DESCRIPTION +// Concrete visitor for the Root class +// This one provides code generation for elements of the Root node in the +// server inline. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ROOT_ROOT_SI_H_) +#define _BE_VISITOR_ROOT_ROOT_SI_H_ + +class be_visitor_root_si : public be_visitor_root +{ + // + // = TITLE + // be_visitor_root_si + // + // = DESCRIPTION + // This is a concrete visitor to generate the server inline for root + // + // +public: + be_visitor_root_si (be_visitor_context *ctx); + // constructor + + ~be_visitor_root_si (void); + // destructor + + virtual int init (void); + // set the right context and make a visitor +}; + +#endif /* _BE_VISITOR_ROOT_ROOT_SI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_root/root_ss.h b/TAO/TAO_IDL/be_include/be_visitor_root/root_ss.h new file mode 100644 index 00000000000..412f93df56b --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_root/root_ss.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// root_ss.h +// +// = DESCRIPTION +// Concrete visitor for the Root class +// This one provides code generation for elements of the Root node in the +// server skeletons. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_ROOT_ROOT_SS_H_) +#define _BE_VISITOR_ROOT_ROOT_SS_H_ + +class be_visitor_root_ss : public be_visitor_root +{ + // + // = TITLE + // be_visitor_root_ss + // + // = DESCRIPTION + // This is a concrete visitor to generate the server skeletons for root + // + // +public: + be_visitor_root_ss (be_visitor_context *ctx); + // constructor + + ~be_visitor_root_ss (void); + // destructor + + virtual int init (void); + // set the right context and make a visitor +}; + +#endif /* _BE_VISITOR_ROOT_ROOT_SS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_sequence.h b/TAO/TAO_IDL/be_include/be_visitor_sequence.h index da412d0b9e4..1cda7cdae2f 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_sequence.h +++ b/TAO/TAO_IDL/be_include/be_visitor_sequence.h @@ -8,251 +8,15 @@ #include "be_visitor_decl.h" -class be_visitor_sequence_ch : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_sequence_ch - // - // = DESCRIPTION - // This is a concrete visitor to generate the client header for - // sequences - // -public: - be_visitor_sequence_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_sequence_ch (void); - // destructor - - virtual int visit_sequence (be_sequence *node); - // visit sequence node - - virtual int gen_base_sequence_class (be_sequence *node); - // generate the base sequence class - - virtual int gen_var_defn (be_sequence *node); - // generate the var defn - - virtual int gen_out_defn (be_sequence *node); - // generate the out defn -}; - -class be_visitor_sequence_ci : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_sequence_ci - // - // = DESCRIPTION - // This is a concrete visitor to generate the client inline for - // sequences. The only purpose is to generate the implementation for the - // _var and _out classes - // -public: - be_visitor_sequence_ci (be_visitor_context *ctx); - // constructor - - ~be_visitor_sequence_ci (void); - // destructor - - virtual int visit_sequence (be_sequence *node); - // visit sequence node - - virtual int gen_var_impl (be_sequence *node); - // generate the var impl - - virtual int gen_out_impl (be_sequence *node); - // generate the out impl -}; - -class be_visitor_sequence_cs : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_sequence_cs - // - // = DESCRIPTION - // This is a concrete visitor to generate the client stubs for - // sequences - // -public: - be_visitor_sequence_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_sequence_cs (void); - // destructor - - virtual int visit_sequence (be_sequence *node); - // visit sequence node - - virtual int gen_base_sequence_class (be_sequence *node); - // generate the base sequence class - -}; - +#include "be_visitor_sequence/sequence_ch.h" +#include "be_visitor_sequence/sequence_ci.h" +#include "be_visitor_sequence/sequence_cs.h" // =helper visitors to generate the base type and element type - -class be_visitor_sequence_base : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_sequence_base - // - // = DESCRIPTION - // This is a concrete visitor to generate the template parameters - // for a TAO_*_Sequence instantiation. - // - // = BUGS - // The class name is misleading, eventually this class could be - // used to generate code in other files, not only the client - // header. - // The visitor factory should provide a factory method that builds - // this class on the fly. - // -public: - be_visitor_sequence_base (be_visitor_context *ctx); - // Constructor - - ~be_visitor_sequence_base (void); - // destructor - - // = Visitor methods. - virtual int visit_predefined_type (be_predefined_type *node); - virtual int visit_interface (be_interface *node); - virtual int visit_interface_fwd (be_interface_fwd *node); - virtual int visit_structure (be_structure *node); - virtual int visit_enum (be_enum *node); - virtual int visit_exception (be_exception *node); - virtual int visit_union (be_union *node); - virtual int visit_array (be_array *node); - virtual int visit_string (be_string *node); - virtual int visit_sequence (be_sequence *node); - virtual int visit_typedef (be_typedef *node); - -protected: - int visit_node (be_type *); - // helper that does the common job - -}; - -class be_visitor_sequence_buffer_type : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_sequence_buffer_type - // - // = DESCRIPTION - // This is a concrete visitor to generate the buffer type - // for a TAO_*_Sequence instantiation. - // -public: - be_visitor_sequence_buffer_type (be_visitor_context *ctx); - // Constructor - - ~be_visitor_sequence_buffer_type (void); - // destructor - - // = Visitor methods. - virtual int visit_predefined_type (be_predefined_type *node); - virtual int visit_interface (be_interface *node); - virtual int visit_interface_fwd (be_interface_fwd *node); - virtual int visit_structure (be_structure *node); - virtual int visit_enum (be_enum *node); - virtual int visit_exception (be_exception *node); - virtual int visit_union (be_union *node); - virtual int visit_array (be_array *node); - virtual int visit_string (be_string *node); - virtual int visit_sequence (be_sequence *node); - virtual int visit_typedef (be_typedef *node); - -protected: - int visit_node (be_type *); - // helper that does the common job - -}; - -class be_visitor_sequence_elemtype : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_sequence_elemtype - // - // = DESCRIPTION - // This is a concrete visitor to generate the return type for the - // [] operators - // - // = NOTES - // This class may eventually go away when the _var and _out classes are - // generated using templates -public: - be_visitor_sequence_elemtype (be_visitor_context *ctx); - // Constructor - - ~be_visitor_sequence_elemtype (void); - // destructor - - // = Visitors - virtual int visit_predefined_type (be_predefined_type *node); - virtual int visit_interface (be_interface *node); - virtual int visit_interface_fwd (be_interface_fwd *node); - virtual int visit_structure (be_structure *node); - virtual int visit_enum (be_enum *node); - virtual int visit_exception (be_exception *node); - virtual int visit_union (be_union *node); - virtual int visit_array (be_array *node); - virtual int visit_sequence (be_sequence *node); - virtual int visit_typedef (be_typedef *node); - virtual int visit_string (be_string *node); - -protected: - int visit_node (be_type *); - // helper that does the common job - -}; - -class be_visitor_sequence_any_op_ch : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_sequence_any_op_ch - // - // = DESCRIPTION - // This is a concrete visitor for sequence that generates the Any operator - // declarations - // - -public: - be_visitor_sequence_any_op_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_sequence_any_op_ch (void); - // destructor - - virtual int visit_sequence (be_sequence *node); - // visit sequence -}; - -class be_visitor_sequence_any_op_cs : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_sequence_any_op_cs - // - // = DESCRIPTION - // This is a concrete visitor for sequence that generates the Any operator - // implementations - // - -public: - be_visitor_sequence_any_op_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_sequence_any_op_cs (void); - // destructor - - virtual int visit_sequence (be_sequence *node); - // visit sequence -}; +#include "be_visitor_sequence/sequence_base.h" +#include "be_visitor_sequence/buffer_type.h" +#include "be_visitor_sequence/elemtype.h" +// = any operators +#include "be_visitor_sequence/any_op_ch.h" +#include "be_visitor_sequence/any_op_cs.h" #endif /* TAO_BE_VISITOR_SEQUENCE_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_sequence/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_sequence/any_op_ch.h new file mode 100644 index 00000000000..b0b1f8a666e --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_sequence/any_op_ch.h @@ -0,0 +1,49 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_ch.h +// +// = DESCRIPTION +// Concrete visitor for the Sequence class +// This one provides code generation for the Any operators for the Sequence +// node in the client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_SEQUENCE_ANY_OP_CH_H_) +#define _BE_VISITOR_SEQUENCE_ANY_OP_CH_H_ + +class be_visitor_sequence_any_op_ch : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_sequence_any_op_ch + // + // = DESCRIPTION + // This is a concrete visitor for sequence that generates the Any operator + // declarations + // + +public: + be_visitor_sequence_any_op_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_sequence_any_op_ch (void); + // destructor + + virtual int visit_sequence (be_sequence *node); + // visit sequence +}; + +#endif /* _BE_VISITOR_SEQUENCE_ANY_OP_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_sequence/any_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_sequence/any_op_cs.h new file mode 100644 index 00000000000..4252635baef --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_sequence/any_op_cs.h @@ -0,0 +1,49 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_cs.h +// +// = DESCRIPTION +// Concrete visitor for the Sequence class +// This one provides code generation for the Sequence node in the client +// header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_SEQUENCE_ANY_OP_CS_H_) +#define _BE_VISITOR_SEQUENCE_ANY_OP_CS_H_ + +class be_visitor_sequence_any_op_cs : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_sequence_any_op_cs + // + // = DESCRIPTION + // This is a concrete visitor for sequence that generates the Any operator + // implementations + // + +public: + be_visitor_sequence_any_op_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_sequence_any_op_cs (void); + // destructor + + virtual int visit_sequence (be_sequence *node); + // visit sequence +}; + +#endif /* _BE_VISITOR_SEQUENCE_ANY_OP_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_sequence/buffer_type.h b/TAO/TAO_IDL/be_include/be_visitor_sequence/buffer_type.h new file mode 100644 index 00000000000..449e5efd482 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_sequence/buffer_type.h @@ -0,0 +1,63 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// buffer_type.h +// +// = DESCRIPTION +// Concrete visitor for the Sequence class +// This one provides code generation for the buffer type of the Sequence +// node. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_SEQUENCE_BUFFER_TYPE_H_) +#define _BE_VISITOR_SEQUENCE_BUFFER_TYPE_H_ + +class be_visitor_sequence_buffer_type : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_sequence_buffer_type + // + // = DESCRIPTION + // This is a concrete visitor to generate the buffer type + // for a TAO_*_Sequence instantiation. + // +public: + be_visitor_sequence_buffer_type (be_visitor_context *ctx); + // Constructor + + ~be_visitor_sequence_buffer_type (void); + // destructor + + // = Visitor methods. + virtual int visit_predefined_type (be_predefined_type *node); + virtual int visit_interface (be_interface *node); + virtual int visit_interface_fwd (be_interface_fwd *node); + virtual int visit_structure (be_structure *node); + virtual int visit_enum (be_enum *node); + virtual int visit_exception (be_exception *node); + virtual int visit_union (be_union *node); + virtual int visit_array (be_array *node); + virtual int visit_string (be_string *node); + virtual int visit_sequence (be_sequence *node); + virtual int visit_typedef (be_typedef *node); + +protected: + int visit_node (be_type *); + // helper that does the common job + +}; + +#endif /* _BE_VISITOR_SEQUENCE_BUFFER_TYPE_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_sequence/elemtype.h b/TAO/TAO_IDL/be_include/be_visitor_sequence/elemtype.h new file mode 100644 index 00000000000..88212e3ac0e --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_sequence/elemtype.h @@ -0,0 +1,66 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// elemtype.h +// +// = DESCRIPTION +// Concrete visitor for the Sequence class +// This one provides code generation for the element type returned by the [] +// operators for the Sequence node. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_SEQUENCE_ELEMTYPE_H_) +#define _BE_VISITOR_SEQUENCE_ELEMTYPE_H_ + +class be_visitor_sequence_elemtype : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_sequence_elemtype + // + // = DESCRIPTION + // This is a concrete visitor to generate the return type for the + // [] operators + // + // = NOTES + // This class may eventually go away when the _var and _out classes are + // generated using templates +public: + be_visitor_sequence_elemtype (be_visitor_context *ctx); + // Constructor + + ~be_visitor_sequence_elemtype (void); + // destructor + + // = Visitors + virtual int visit_predefined_type (be_predefined_type *node); + virtual int visit_interface (be_interface *node); + virtual int visit_interface_fwd (be_interface_fwd *node); + virtual int visit_structure (be_structure *node); + virtual int visit_enum (be_enum *node); + virtual int visit_exception (be_exception *node); + virtual int visit_union (be_union *node); + virtual int visit_array (be_array *node); + virtual int visit_sequence (be_sequence *node); + virtual int visit_typedef (be_typedef *node); + virtual int visit_string (be_string *node); + +protected: + int visit_node (be_type *); + // helper that does the common job + +}; + +#endif /* _BE_VISITOR_SEQUENCE_ELEMTYPE_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_sequence/sequence_base.h b/TAO/TAO_IDL/be_include/be_visitor_sequence/sequence_base.h new file mode 100644 index 00000000000..71673e2c230 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_sequence/sequence_base.h @@ -0,0 +1,69 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// sequence_base.h +// +// = DESCRIPTION +// Concrete visitor for the Sequence class +// This one provides code generation for the base typ of the Sequence node. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_SEQUENCE_SEQUENCE_BASE_H_) +#define _BE_VISITOR_SEQUENCE_SEQUENCE_BASE_H_ + +class be_visitor_sequence_base : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_sequence_base + // + // = DESCRIPTION + // This is a concrete visitor to generate the template parameters + // for a TAO_*_Sequence instantiation. + // + // = BUGS + // The class name is misleading, eventually this class could be + // used to generate code in other files, not only the client + // header. + // The visitor factory should provide a factory method that builds + // this class on the fly. + // +public: + be_visitor_sequence_base (be_visitor_context *ctx); + // Constructor + + ~be_visitor_sequence_base (void); + // destructor + + // = Visitor methods. + virtual int visit_predefined_type (be_predefined_type *node); + virtual int visit_interface (be_interface *node); + virtual int visit_interface_fwd (be_interface_fwd *node); + virtual int visit_structure (be_structure *node); + virtual int visit_enum (be_enum *node); + virtual int visit_exception (be_exception *node); + virtual int visit_union (be_union *node); + virtual int visit_array (be_array *node); + virtual int visit_string (be_string *node); + virtual int visit_sequence (be_sequence *node); + virtual int visit_typedef (be_typedef *node); + +protected: + int visit_node (be_type *); + // helper that does the common job + +}; + +#endif /* _BE_VISITOR_SEQUENCE_SEQUENCE_BASE_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_sequence/sequence_ch.h b/TAO/TAO_IDL/be_include/be_visitor_sequence/sequence_ch.h new file mode 100644 index 00000000000..8e7a3fd3e24 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_sequence/sequence_ch.h @@ -0,0 +1,57 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// sequence_ch.h +// +// = DESCRIPTION +// Concrete visitor for the Sequence class +// This one provides code generation for the Sequence node in the client +// header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_SEQUENCE_SEQUENCE_CH_H_) +#define _BE_VISITOR_SEQUENCE_SEQUENCE_CH_H_ + +class be_visitor_sequence_ch : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_sequence_ch + // + // = DESCRIPTION + // This is a concrete visitor to generate the client header for + // sequences + // +public: + be_visitor_sequence_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_sequence_ch (void); + // destructor + + virtual int visit_sequence (be_sequence *node); + // visit sequence node + + virtual int gen_base_sequence_class (be_sequence *node); + // generate the base sequence class + + virtual int gen_var_defn (be_sequence *node); + // generate the var defn + + virtual int gen_out_defn (be_sequence *node); + // generate the out defn +}; + +#endif /* _BE_VISITOR_SEQUENCE_SEQUENCE_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_sequence/sequence_ci.h b/TAO/TAO_IDL/be_include/be_visitor_sequence/sequence_ci.h new file mode 100644 index 00000000000..fbe8890c7c8 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_sequence/sequence_ci.h @@ -0,0 +1,55 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// sequence_ci.h +// +// = DESCRIPTION +// Concrete visitor for the Sequence class +// This one provides code generation for the Sequence node in the client +// inline. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_SEQUENCE_SEQUENCE_CI_H_) +#define _BE_VISITOR_SEQUENCE_SEQUENCE_CI_H_ + +class be_visitor_sequence_ci : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_sequence_ci + // + // = DESCRIPTION + // This is a concrete visitor to generate the client inline for + // sequences. The only purpose is to generate the implementation for the + // _var and _out classes + // +public: + be_visitor_sequence_ci (be_visitor_context *ctx); + // constructor + + ~be_visitor_sequence_ci (void); + // destructor + + virtual int visit_sequence (be_sequence *node); + // visit sequence node + + virtual int gen_var_impl (be_sequence *node); + // generate the var impl + + virtual int gen_out_impl (be_sequence *node); + // generate the out impl +}; + +#endif /* _BE_VISITOR_SEQUENCE_SEQUENCE_CI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_sequence/sequence_cs.h b/TAO/TAO_IDL/be_include/be_visitor_sequence/sequence_cs.h new file mode 100644 index 00000000000..f60808eda4d --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_sequence/sequence_cs.h @@ -0,0 +1,52 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// sequence_cs.h +// +// = DESCRIPTION +// Concrete visitor for the Sequence class +// This one provides code generation for the Sequence node in the client +// stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_SEQUENCE_SEQUENCE_CS_H_) +#define _BE_VISITOR_SEQUENCE_SEQUENCE_CS_H_ + +class be_visitor_sequence_cs : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_sequence_cs + // + // = DESCRIPTION + // This is a concrete visitor to generate the client stubs for + // sequences + // +public: + be_visitor_sequence_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_sequence_cs (void); + // destructor + + virtual int visit_sequence (be_sequence *node); + // visit sequence node + + virtual int gen_base_sequence_class (be_sequence *node); + // generate the base sequence class + +}; + +#endif /* _BE_VISITOR_SEQUENCE_SEQUENCE_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_structure.h b/TAO/TAO_IDL/be_include/be_visitor_structure.h index 63484a80692..3dafbd10eb8 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_structure.h +++ b/TAO/TAO_IDL/be_include/be_visitor_structure.h @@ -25,147 +25,13 @@ #include "be_visitor.h" #include "be_visitor_scope.h" -class be_visitor_structure : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_structure - // - // = DESCRIPTION - // This is the base visitor for structure - // - // -public: - be_visitor_structure (be_visitor_context *ctx); - // constructureor - - ~be_visitor_structure (void); - // destructureor - - virtual int visit_structure (be_structure *node); - // visit structure. We provide code for this method in the derived class - - // =visit operations on syntactically valid elements in our scope - - virtual int visit_field (be_field *node); - // visit field -}; - -class be_visitor_structure_ch : public be_visitor_structure -{ - // - // = TITLE - // be_visitor_structure_ch - // - // = DESCRIPTION - // This is a concrete visitor to generate the client header for structure - // - // -public: - be_visitor_structure_ch (be_visitor_context *ctx); - // constructureor - - ~be_visitor_structure_ch (void); - // destructureor - - virtual int visit_structure (be_structure *node); - // visit structure. We provide code for this method in the derived class - -}; - -class be_visitor_structure_ci : public be_visitor_structure -{ - // - // = TITLE - // be_visitor_structure_ci - // - // = DESCRIPTION - // This is a concrete visitor to generate the client inline for structure - // - // -public: - be_visitor_structure_ci (be_visitor_context *ctx); - // constructureor - - ~be_visitor_structure_ci (void); - // destructureor - - virtual int visit_structure (be_structure *node); - // visit structure. We provide code for this method in the derived class - -}; - -class be_visitor_structure_cs : public be_visitor_structure -{ - // - // = TITLE - // be_visitor_structure_cs - // - // = DESCRIPTION - // This is a concrete visitor to generate the client stubs for structure - // - // -public: - be_visitor_structure_cs (be_visitor_context *ctx); - // constructureor - - ~be_visitor_structure_cs (void); - // destructureor - - virtual int visit_structure (be_structure *node); - // visit structure. We provide code for this method in the derived class - -}; - -class be_visitor_structure_any_op_ch : public be_visitor_structure -{ - // - // = TITLE - // be_visitor_structure_any_op_ch - // - // = DESCRIPTION - // This is a concrete visitor for structure that generates the Any operator - // declarations - // - -public: - be_visitor_structure_any_op_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_structure_any_op_ch (void); - // destructor - - virtual int visit_structure (be_structure *node); - // visit structure - - virtual int visit_field (be_field *node); - // visit field -}; - -class be_visitor_structure_any_op_cs : public be_visitor_structure -{ - // - // = TITLE - // be_visitor_structure_any_op_cs - // - // = DESCRIPTION - // This is a concrete visitor for structure that generates the Any operator - // implementations - // - -public: - be_visitor_structure_any_op_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_structure_any_op_cs (void); - // destructor - - virtual int visit_structure (be_structure *node); - // visit structure - - virtual int visit_field (be_field *node); - // visit field -}; - +// generic visitor +#include "be_visitor_structure/structure.h" +// concrete visitors +#include "be_visitor_structure/structure_ch.h" +#include "be_visitor_structure/structure_ci.h" +#include "be_visitor_structure/structure_cs.h" +#include "be_visitor_structure/any_op_ch.h" +#include "be_visitor_structure/any_op_cs.h" #endif // TAO_BE_VISITOR_STRUCTURE_H diff --git a/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_ch.h new file mode 100644 index 00000000000..1bd7384f191 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_ch.h @@ -0,0 +1,52 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_ch.h +// +// = DESCRIPTION +// Concrete visitor for the Structure class +// This one provides code generation for the Any operators for the structure +// in the client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_STRUCTURE_ANY_OP_CH_H_) +#define _BE_VISITOR_STRUCTURE_ANY_OP_CH_H_ + +class be_visitor_structure_any_op_ch : public be_visitor_structure +{ + // + // = TITLE + // be_visitor_structure_any_op_ch + // + // = DESCRIPTION + // This is a concrete visitor for structure that generates the Any operator + // declarations + // + +public: + be_visitor_structure_any_op_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_structure_any_op_ch (void); + // destructor + + virtual int visit_structure (be_structure *node); + // visit structure + + virtual int visit_field (be_field *node); + // visit field +}; + +#endif /* _BE_VISITOR_STRUCTURE_ANY_OP_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_cs.h new file mode 100644 index 00000000000..1ee098a905a --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_structure/any_op_cs.h @@ -0,0 +1,52 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_ch.h +// +// = DESCRIPTION +// Concrete visitor for the Structure class +// This one provides code generation for the Any operators for the structure +// in the client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_STRUCTURE_ANY_OP_CS_H_) +#define _BE_VISITOR_STRUCTURE_ANY_OP_CS_H_ + +class be_visitor_structure_any_op_cs : public be_visitor_structure +{ + // + // = TITLE + // be_visitor_structure_any_op_cs + // + // = DESCRIPTION + // This is a concrete visitor for structure that generates the Any operator + // implementations + // + +public: + be_visitor_structure_any_op_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_structure_any_op_cs (void); + // destructor + + virtual int visit_structure (be_structure *node); + // visit structure + + virtual int visit_field (be_field *node); + // visit field +}; + +#endif /* _BE_VISITOR_STRUCTURE_ANY_OP_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_structure/structure.h b/TAO/TAO_IDL/be_include/be_visitor_structure/structure.h new file mode 100644 index 00000000000..a10531ccf9c --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_structure/structure.h @@ -0,0 +1,52 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// structure.h +// +// = DESCRIPTION +// Concrete visitor for the STRUCTURE class +// This one provides the generic visitor for the Structure node. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_STRUCTURE_STRUCTURE_H_) +#define _BE_VISITOR_STRUCTURE_STRUCTURE_H_ + +class be_visitor_structure : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_structure + // + // = DESCRIPTION + // This is the base visitor for structure + // + // +public: + be_visitor_structure (be_visitor_context *ctx); + // constructureor + + ~be_visitor_structure (void); + // destructureor + + virtual int visit_structure (be_structure *node); + // visit structure. We provide code for this method in the derived class + + // =visit operations on syntactically valid elements in our scope + + virtual int visit_field (be_field *node); + // visit field +}; + +#endif /* _BE_VISITOR_STRUCTURE_STRUCTURE_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_structure/structure_ch.h b/TAO/TAO_IDL/be_include/be_visitor_structure/structure_ch.h new file mode 100644 index 00000000000..f946d033288 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_structure/structure_ch.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// structure_ch.h +// +// = DESCRIPTION +// Concrete visitor for the Structure class +// This one provides code generation for the structure in the client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_STRUCTURE_STRUCTURE_CH_H_) +#define _BE_VISITOR_STRUCTURE_STRUCTURE_CH_H_ + +class be_visitor_structure_ch : public be_visitor_structure +{ + // + // = TITLE + // be_visitor_structure_ch + // + // = DESCRIPTION + // This is a concrete visitor to generate the client header for structure + // + // +public: + be_visitor_structure_ch (be_visitor_context *ctx); + // constructureor + + ~be_visitor_structure_ch (void); + // destructureor + + virtual int visit_structure (be_structure *node); + // visit structure. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_STRUCTURE_STRUCTURE_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_structure/structure_ci.h b/TAO/TAO_IDL/be_include/be_visitor_structure/structure_ci.h new file mode 100644 index 00000000000..ac47118f00d --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_structure/structure_ci.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// structure_ci.h +// +// = DESCRIPTION +// Concrete visitor for the Structure class +// This one provides code generation for the structure in the client inline. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_STRUCTURE_STRUCTURE_CI_H_) +#define _BE_VISITOR_STRUCTURE_STRUCTURE_CI_H_ + +class be_visitor_structure_ci : public be_visitor_structure +{ + // + // = TITLE + // be_visitor_structure_ci + // + // = DESCRIPTION + // This is a concrete visitor to generate the client inline for structure + // + // +public: + be_visitor_structure_ci (be_visitor_context *ctx); + // constructureor + + ~be_visitor_structure_ci (void); + // destructureor + + virtual int visit_structure (be_structure *node); + // visit structure. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_STRUCTURE_STRUCTURE_CI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_structure/structure_cs.h b/TAO/TAO_IDL/be_include/be_visitor_structure/structure_cs.h new file mode 100644 index 00000000000..06c4c0c51d0 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_structure/structure_cs.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// structure_cs.h +// +// = DESCRIPTION +// Concrete visitor for the Structure class +// This one provides code generation for the structure in the client stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_STRUCTURE_STRUCTURE_CS_H_) +#define _BE_VISITOR_STRUCTURE_STRUCTURE_CS_H_ + +class be_visitor_structure_cs : public be_visitor_structure +{ + // + // = TITLE + // be_visitor_structure_cs + // + // = DESCRIPTION + // This is a concrete visitor to generate the client stubs for structure + // + // +public: + be_visitor_structure_cs (be_visitor_context *ctx); + // constructureor + + ~be_visitor_structure_cs (void); + // destructureor + + virtual int visit_structure (be_structure *node); + // visit structure. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_STRUCTURE_STRUCTURE_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_typecode.h b/TAO/TAO_IDL/be_include/be_visitor_typecode.h index 23bb9f5f3ea..cbd083c4fb7 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_typecode.h +++ b/TAO/TAO_IDL/be_include/be_visitor_typecode.h @@ -24,109 +24,8 @@ #include "be_visitor_decl.h" -class be_visitor_typecode_decl : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_typecode_decl - // - // = DESCRIPTION - // This is a concrete visitor for generating TypeCode declarations - // +#include "be_visitor_typecode/typecode_decl.h" +#include "be_visitor_typecode/typecode_defn.h" -public: - be_visitor_typecode_decl (be_visitor_context *ctx); - // constructor - - ~be_visitor_typecode_decl (void); - // destructor - - virtual int visit_type (be_type *node); - // visit a generic be_type node - - // =visit methods on all types. They call the generic visit_type - - virtual int visit_array (be_array *node); - // visit a array - - virtual int visit_enum (be_enum *node); - // visit an enum - - virtual int visit_exception (be_exception *node); - // visit an enum - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_sequence (be_sequence *node); - // visit a sequence - - virtual int visit_structure (be_structure *node); - // visit a structure - - virtual int visit_typedef (be_typedef *node); - // visit a typedef - - virtual int visit_union (be_union *node); - // visit a union - -}; - - -class be_visitor_typecode_defn : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_typecode_defn - // - // = DESCRIPTION - // This is a concrete visitor for generating TypeCode definitions - // - -public: - be_visitor_typecode_defn (be_visitor_context *ctx); - // constructor - - ~be_visitor_typecode_defn (void); - // destructor - - virtual int visit_type (be_type *node); - // visit a generic be_type node - - // =visit methods on all types. They call the generic visit_type - - virtual int visit_array (be_array *node); - // visit a array - - virtual int visit_enum (be_enum *node); - // visit an enum - - virtual int visit_exception (be_exception *node); - // visit an enum - - virtual int visit_interface (be_interface *node); - // visit interface - - virtual int visit_sequence (be_sequence *node); - // visit a sequence - - virtual int visit_structure (be_structure *node); - // visit a structure - - virtual int visit_typedef (be_typedef *node); - // visit a typedef - - virtual int visit_union (be_union *node); - // visit a union - - - // = special methods - - virtual int gen_nested_namespace_begin (be_module *node); - // generate the nested namespace begins - - virtual int gen_nested_namespace_end (be_module *node); - // generate the nested namespace ends -}; #endif /* TAO_BE_VISITOR_TYPECODE_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_typecode/typecode_decl.h b/TAO/TAO_IDL/be_include/be_visitor_typecode/typecode_decl.h new file mode 100644 index 00000000000..c6f67b4fc4a --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_typecode/typecode_decl.h @@ -0,0 +1,74 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// typecode_decl.h +// +// = DESCRIPTION +// Concrete visitor for the generation of TypeCodes. +// This one generates the declaration. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_TYPECODE_TYPECODE_DECL_H_) +#define _BE_VISITOR_TYPECODE_TYPECODE_DECL_H_ + +class be_visitor_typecode_decl : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_typecode_decl + // + // = DESCRIPTION + // This is a concrete visitor for generating TypeCode declarations + // + +public: + be_visitor_typecode_decl (be_visitor_context *ctx); + // constructor + + ~be_visitor_typecode_decl (void); + // destructor + + virtual int visit_type (be_type *node); + // visit a generic be_type node + + // =visit methods on all types. They call the generic visit_type + + virtual int visit_array (be_array *node); + // visit a array + + virtual int visit_enum (be_enum *node); + // visit an enum + + virtual int visit_exception (be_exception *node); + // visit an enum + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_sequence (be_sequence *node); + // visit a sequence + + virtual int visit_structure (be_structure *node); + // visit a structure + + virtual int visit_typedef (be_typedef *node); + // visit a typedef + + virtual int visit_union (be_union *node); + // visit a union + +}; + +#endif /* _BE_VISITOR_TYPECODE_TYPECODE_DECL_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_typecode/typecode_defn.h b/TAO/TAO_IDL/be_include/be_visitor_typecode/typecode_defn.h new file mode 100644 index 00000000000..b87b57dfa05 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_typecode/typecode_defn.h @@ -0,0 +1,82 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// typecode_defn.h +// +// = DESCRIPTION +// Concrete visitor for the generation of TypeCodes. +// This one generates the definitions. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_TYPECODE_TYPECODE_DEFN_H_) +#define _BE_VISITOR_TYPECODE_TYPECODE_DEFN_H_ + +class be_visitor_typecode_defn : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_typecode_defn + // + // = DESCRIPTION + // This is a concrete visitor for generating TypeCode definitions + // + +public: + be_visitor_typecode_defn (be_visitor_context *ctx); + // constructor + + ~be_visitor_typecode_defn (void); + // destructor + + virtual int visit_type (be_type *node); + // visit a generic be_type node + + // =visit methods on all types. They call the generic visit_type + + virtual int visit_array (be_array *node); + // visit a array + + virtual int visit_enum (be_enum *node); + // visit an enum + + virtual int visit_exception (be_exception *node); + // visit an enum + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_sequence (be_sequence *node); + // visit a sequence + + virtual int visit_structure (be_structure *node); + // visit a structure + + virtual int visit_typedef (be_typedef *node); + // visit a typedef + + virtual int visit_union (be_union *node); + // visit a union + + + // = special methods + + virtual int gen_nested_namespace_begin (be_module *node); + // generate the nested namespace begins + + virtual int gen_nested_namespace_end (be_module *node); + // generate the nested namespace ends +}; + +#endif /* _BE_VISITOR_TYPECODE_TYPECODE_DEFN_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_typedef.h b/TAO/TAO_IDL/be_include/be_visitor_typedef.h index 7e5370057db..206410cb13f 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_typedef.h +++ b/TAO/TAO_IDL/be_include/be_visitor_typedef.h @@ -25,243 +25,13 @@ #include "be_visitor.h" #include "be_visitor_scope.h" -class be_visitor_typedef : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_typedef - // - // = DESCRIPTION - // This is a concrete visitor for typedef that abstracts all common tasks - // - -public: - be_visitor_typedef (be_visitor_context *ctx); - // constructor - - ~be_visitor_typedef (void); - // destructor - - virtual int visit_typedef (be_typedef *node); - // must be overridden - - // =visit methods on all elements syntactically valid as types that can be - // typedefed. - - virtual int visit_array (be_array *node); - // visit a array - - virtual int visit_enum (be_enum *node); - // visit an enum - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type node - - virtual int visit_string (be_string *node); - // visit a typedef - - virtual int visit_sequence (be_sequence *node); - // visit a sequence - - virtual int visit_structure (be_structure *node); - // visit a structure - - virtual int visit_union (be_union *node); - // visit a union - -}; - -// we need derived typedef visitors for the client files. - -class be_visitor_typedef_ch : public be_visitor_typedef -{ - // - // = TITLE - // be_visitor_typedef_ch - // - // = DESCRIPTION - // This is a concrete visitor to generate the client header for typedef - // - // -public: - be_visitor_typedef_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_typedef_ch (void); - // destructor - - virtual int visit_typedef (be_typedef *node); - // visit typedef. We provide code for this method in the derived class - - // =visit methods on all elements syntactically valid as types that can be - // typedefed. - - virtual int visit_array (be_array *node); - // visit a array - - virtual int visit_enum (be_enum *node); - // visit an enum - - virtual int visit_interface (be_interface *node); - // visit an interface; - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type node - - virtual int visit_string (be_string *node); - // visit a typedef - - virtual int visit_sequence (be_sequence *node); - // visit a sequence - - virtual int visit_structure (be_structure *node); - // visit a structure - - virtual int visit_union (be_union *node); - // visit a union - -}; - -class be_visitor_typedef_ci : public be_visitor_typedef -{ - // - // = TITLE - // be_visitor_typedef_sh - // - // = DESCRIPTION - // This is a concrete visitor to generate the server header for typedef - // - // -public: - be_visitor_typedef_ci (be_visitor_context *ctx); - // constructor - - ~be_visitor_typedef_ci (void); - // destructor - - virtual int visit_typedef (be_typedef *node); - // visit typedef. We provide code for this method in the derived class - - // =visit methods on all elements syntactically valid as types that can be - // typedefed. - - virtual int visit_array (be_array *node); - // visit a array - - virtual int visit_sequence (be_sequence *node); - // visit a sequence - - virtual int visit_structure (be_structure *node); - // visit a structure - - virtual int visit_union (be_union *node); - // visit a union - -}; - -class be_visitor_typedef_cs : public be_visitor_typedef -{ - // - // = TITLE - // be_visitor_typedef_cs - // - // = DESCRIPTION - // This is a concrete visitor to generate the server header for typedef - // - // -public: - be_visitor_typedef_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_typedef_cs (void); - // destructor - - virtual int visit_typedef (be_typedef *node); - // visit typedef. We provide code for this method in the derived class - -}; - -class be_visitor_typedef_any_op_ch : public be_visitor_typedef -{ - // - // = TITLE - // be_visitor_typedef_any_op_ch - // - // = DESCRIPTION - // This is a concrete visitor for typedef that generates the Any operator - // declarations and implementations - // - -public: - be_visitor_typedef_any_op_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_typedef_any_op_ch (void); - // destructor - - virtual int visit_typedef (be_typedef *node); - // visit typedef - - // =visit methods on all elements syntactically valid as types that can be - // typedefed. - - virtual int visit_array (be_array *node); - // visit a array - - virtual int visit_enum (be_enum *node); - // visit an enum - - virtual int visit_sequence (be_sequence *node); - // visit a sequence - - virtual int visit_structure (be_structure *node); - // visit a structure - - virtual int visit_union (be_union *node); - // visit a union - -}; - -class be_visitor_typedef_any_op_cs : public be_visitor_typedef -{ - // - // = TITLE - // be_visitor_typedef_any_op_cs - // - // = DESCRIPTION - // This is a concrete visitor for typedef that generates the Any operator - // declarations and implementations - // - -public: - be_visitor_typedef_any_op_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_typedef_any_op_cs (void); - // destructor - - virtual int visit_typedef (be_typedef *node); - // visit typedef - - // =visit methods on all elements syntactically valid as types that can be - // typedefed. - - virtual int visit_array (be_array *node); - // visit a array - - virtual int visit_enum (be_enum *node); - // visit an enum - - virtual int visit_sequence (be_sequence *node); - // visit a sequence - - virtual int visit_structure (be_structure *node); - // visit a structure - - virtual int visit_union (be_union *node); - // visit a union - -}; - +// generic visitor +#include "be_visitor_typedef/typedef.h" +// concrete visitors +#include "be_visitor_typedef/typedef_ch.h" +#include "be_visitor_typedef/typedef_ci.h" +#include "be_visitor_typedef/typedef_cs.h" +#include "be_visitor_typedef/any_op_ch.h" +#include "be_visitor_typedef/any_op_cs.h" #endif // TAO_BE_VISITOR_TYPEDEF_H diff --git a/TAO/TAO_IDL/be_include/be_visitor_typedef/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_typedef/any_op_ch.h new file mode 100644 index 00000000000..915465ed1fb --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_typedef/any_op_ch.h @@ -0,0 +1,69 @@ + +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_ch.h +// +// = DESCRIPTION +// Concrete visitor for the Typedef class +// This provides the code generation for the Any operators of the Typedef +// class in the client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_TYPEDEF_ANY_OP_CH_H_) +#define _BE_VISITOR_TYPEDEF_ANY_OP_CH_H_ + +class be_visitor_typedef_any_op_ch : public be_visitor_typedef +{ + // + // = TITLE + // be_visitor_typedef_any_op_ch + // + // = DESCRIPTION + // This is a concrete visitor for typedef that generates the Any operator + // declarations and implementations + // + +public: + be_visitor_typedef_any_op_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_typedef_any_op_ch (void); + // destructor + + virtual int visit_typedef (be_typedef *node); + // visit typedef + + // =visit methods on all elements syntactically valid as types that can be + // typedefed. + + virtual int visit_array (be_array *node); + // visit a array + + virtual int visit_enum (be_enum *node); + // visit an enum + + virtual int visit_sequence (be_sequence *node); + // visit a sequence + + virtual int visit_structure (be_structure *node); + // visit a structure + + virtual int visit_union (be_union *node); + // visit a union + +}; + +#endif /* _BE_VISITOR_TYPEDEF_ANY_OP_CH_H_*/ diff --git a/TAO/TAO_IDL/be_include/be_visitor_typedef/any_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_typedef/any_op_cs.h new file mode 100644 index 00000000000..9014b277d1d --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_typedef/any_op_cs.h @@ -0,0 +1,69 @@ + +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_cs.h +// +// = DESCRIPTION +// Concrete visitor for the Typedef class +// This provides the code generation for the Any operators of the Typedef +// class in the client stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_TYPEDEF_ANY_OP_CS_H_) +#define _BE_VISITOR_TYPEDEF_ANY_OP_CS_H_ + +class be_visitor_typedef_any_op_cs : public be_visitor_typedef +{ + // + // = TITLE + // be_visitor_typedef_any_op_cs + // + // = DESCRIPTION + // This is a concrete visitor for typedef that generates the Any operator + // declarations and implementations + // + +public: + be_visitor_typedef_any_op_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_typedef_any_op_cs (void); + // destructor + + virtual int visit_typedef (be_typedef *node); + // visit typedef + + // =visit methods on all elements syntactically valid as types that can be + // typedefed. + + virtual int visit_array (be_array *node); + // visit a array + + virtual int visit_enum (be_enum *node); + // visit an enum + + virtual int visit_sequence (be_sequence *node); + // visit a sequence + + virtual int visit_structure (be_structure *node); + // visit a structure + + virtual int visit_union (be_union *node); + // visit a union + +}; + +#endif /* _BE_VISITOR_TYPEDEF_ANY_OP_CS_H_*/ diff --git a/TAO/TAO_IDL/be_include/be_visitor_typedef/typedef.h b/TAO/TAO_IDL/be_include/be_visitor_typedef/typedef.h new file mode 100644 index 00000000000..4b9f9f48507 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_typedef/typedef.h @@ -0,0 +1,72 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// typedef.h +// +// = DESCRIPTION +// Concrete visitor for the Typedef class +// This provides the generic visitors for the Typedef class. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_TYPEDEF_TYPEDEF_H_) +#define _BE_VISITOR_TYPEDEF_TYPEDEF_H_ + +class be_visitor_typedef : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_typedef + // + // = DESCRIPTION + // This is a concrete visitor for typedef that abstracts all common tasks + // + +public: + be_visitor_typedef (be_visitor_context *ctx); + // constructor + + ~be_visitor_typedef (void); + // destructor + + virtual int visit_typedef (be_typedef *node); + // must be overridden + + // =visit methods on all elements syntactically valid as types that can be + // typedefed. + + virtual int visit_array (be_array *node); + // visit a array + + virtual int visit_enum (be_enum *node); + // visit an enum + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type node + + virtual int visit_string (be_string *node); + // visit a typedef + + virtual int visit_sequence (be_sequence *node); + // visit a sequence + + virtual int visit_structure (be_structure *node); + // visit a structure + + virtual int visit_union (be_union *node); + // visit a union + +}; + +#endif /* _BE_VISITOR_TYPEDEF_TYPEDEF_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_typedef/typedef_ch.h b/TAO/TAO_IDL/be_include/be_visitor_typedef/typedef_ch.h new file mode 100644 index 00000000000..a18b580d489 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_typedef/typedef_ch.h @@ -0,0 +1,76 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// typedef_ch.h +// +// = DESCRIPTION +// Concrete visitor for the Typedef class +// This provides the code generation for the Typedef class in the client +// header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_TYPEDEF_TYPEDEF_CH_H_) +#define _BE_VISITOR_TYPEDEF_TYPEDEF_CH_H_ + +class be_visitor_typedef_ch : public be_visitor_typedef +{ + // + // = TITLE + // be_visitor_typedef_ch + // + // = DESCRIPTION + // This is a concrete visitor to generate the client header for typedef + // + // +public: + be_visitor_typedef_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_typedef_ch (void); + // destructor + + virtual int visit_typedef (be_typedef *node); + // visit typedef. We provide code for this method in the derived class + + // =visit methods on all elements syntactically valid as types that can be + // typedefed. + + virtual int visit_array (be_array *node); + // visit a array + + virtual int visit_enum (be_enum *node); + // visit an enum + + virtual int visit_interface (be_interface *node); + // visit an interface; + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type node + + virtual int visit_string (be_string *node); + // visit a typedef + + virtual int visit_sequence (be_sequence *node); + // visit a sequence + + virtual int visit_structure (be_structure *node); + // visit a structure + + virtual int visit_union (be_union *node); + // visit a union + +}; + +#endif /* _BE_VISITOR_TYPEDEF_TYPEDEF_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_typedef/typedef_ci.h b/TAO/TAO_IDL/be_include/be_visitor_typedef/typedef_ci.h new file mode 100644 index 00000000000..38c0276c33a --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_typedef/typedef_ci.h @@ -0,0 +1,65 @@ + +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// typedef_ci.h +// +// = DESCRIPTION +// Concrete visitor for the Typedef class +// This provides the code generation for the Typedef class in the client +// inline. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_TYPEDEF_TYPEDEF_CI_H_) +#define _BE_VISITOR_TYPEDEF_TYPEDEF_CI_H_ + +class be_visitor_typedef_ci : public be_visitor_typedef +{ + // + // = TITLE + // be_visitor_typedef_sh + // + // = DESCRIPTION + // This is a concrete visitor to generate the server header for typedef + // + // +public: + be_visitor_typedef_ci (be_visitor_context *ctx); + // constructor + + ~be_visitor_typedef_ci (void); + // destructor + + virtual int visit_typedef (be_typedef *node); + // visit typedef. We provide code for this method in the derived class + + // =visit methods on all elements syntactically valid as types that can be + // typedefed. + + virtual int visit_array (be_array *node); + // visit a array + + virtual int visit_sequence (be_sequence *node); + // visit a sequence + + virtual int visit_structure (be_structure *node); + // visit a structure + + virtual int visit_union (be_union *node); + // visit a union + +}; + +#endif /* _BE_VISITOR_TYPEDEF_TYPEDEF_CI_H_*/ diff --git a/TAO/TAO_IDL/be_include/be_visitor_typedef/typedef_cs.h b/TAO/TAO_IDL/be_include/be_visitor_typedef/typedef_cs.h new file mode 100644 index 00000000000..091ac01e22c --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_typedef/typedef_cs.h @@ -0,0 +1,50 @@ + +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// typedef_cs.h +// +// = DESCRIPTION +// Concrete visitor for the Typedef class +// This provides the code generation for the Typedef class in the client +// stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_TYPEDEF_TYPEDEF_CS_H_) +#define _BE_VISITOR_TYPEDEF_TYPEDEF_CS_H_ + +class be_visitor_typedef_cs : public be_visitor_typedef +{ + // + // = TITLE + // be_visitor_typedef_cs + // + // = DESCRIPTION + // This is a concrete visitor to generate the server header for typedef + // + // +public: + be_visitor_typedef_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_typedef_cs (void); + // destructor + + virtual int visit_typedef (be_typedef *node); + // visit typedef. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_TYPEDEF_TYPEDEF_CS_H_*/ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union.h b/TAO/TAO_IDL/be_include/be_visitor_union.h index c812317d841..1111d4bd198 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_union.h +++ b/TAO/TAO_IDL/be_include/be_visitor_union.h @@ -25,226 +25,16 @@ #include "be_visitor.h" #include "be_visitor_scope.h" -class be_visitor_union : public be_visitor_scope -{ - // - // = TITLE - // be_visitor_union - // - // = DESCRIPTION - // This is the base visitor for union - // - // -public: - be_visitor_union (be_visitor_context *ctx); - // constructor - - ~be_visitor_union (void); - // destructor - - virtual int visit_union (be_union *node); - // visit union. We provide code for this method in the derived class - - // =visit operations on syntactically valid elements in our scope - - virtual int visit_union_branch (be_union_branch *node); - // visit union_branch -}; - -class be_visitor_union_ch : public be_visitor_union -{ - // - // = TITLE - // be_visitor_union_ch - // - // = DESCRIPTION - // This is a concrete visitor to generate the client header for union - // - // -public: - be_visitor_union_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_union_ch (void); - // destructor - - virtual int visit_union (be_union *node); - // visit union. We provide code for this method in the derived class - -}; - -class be_visitor_union_ci : public be_visitor_union -{ - // - // = TITLE - // be_visitor_union_ci - // - // = DESCRIPTION - // This is a concrete visitor to generate the client inline for union - // - // -public: - be_visitor_union_ci (be_visitor_context *ctx); - // constructor - - ~be_visitor_union_ci (void); - // destructor - - virtual int visit_union (be_union *node); - // visit union. We provide code for this method in the derived class - -}; - -class be_visitor_union_cs : public be_visitor_union -{ - // - // = TITLE - // be_visitor_union_cs - // - // = DESCRIPTION - // This is a concrete visitor to generate the client stubs for union - // - // -public: - be_visitor_union_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_union_cs (void); - // destructor - - virtual int visit_union (be_union *node); - // visit union. We provide code for this method in the derived class - -}; - -class be_visitor_union_discriminant_ch : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_union_discriminant_ch - // - // = DESCRIPTION - // This is a concrete visitor to generate the client header for union - // discriminant - // - // -public: - be_visitor_union_discriminant_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_union_discriminant_ch (void); - // destructor - - virtual int visit_enum (be_enum *node); - // visit an enum - - virtual int visit_predefined_type (be_predefined_type *node); - // visit a predefined type - - virtual int visit_typedef (be_typedef *node); - // visit a typedef node -}; - -class be_visitor_union_discriminant_ci : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_union_discriminant_ci - // - // = DESCRIPTION - // This is a concrete visitor to generate the client inline for union - // discriminant - // - // -public: - be_visitor_union_discriminant_ci (be_visitor_context *ctx); - // constructor - - ~be_visitor_union_discriminant_ci (void); - // destructor - - virtual int visit_enum (be_enum *node); - // visit an enum - - virtual int visit_predefined_type (be_predefined_type *node); - // visit a predefined type - - virtual int visit_typedef (be_typedef *node); - // visit a typedef node -}; - -class be_visitor_union_discriminant_cs : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_union_discriminant_cs - // - // = DESCRIPTION - // This is a concrete visitor to generate the client stubs for union - // discriminant - // - // -public: - be_visitor_union_discriminant_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_union_discriminant_cs (void); - // destructor - - virtual int visit_enum (be_enum *node); - // visit an enum. Required to generate the typecode for an enum definition - // appearing side the union - -}; - -class be_visitor_union_any_op_ch : public be_visitor_union -{ - // - // = TITLE - // be_visitor_union_any_op_ch - // - // = DESCRIPTION - // This is a concrete visitor for union that generates the Any operator - // declarations - // - -public: - be_visitor_union_any_op_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_union_any_op_ch (void); - // destructor - - virtual int visit_union (be_union *node); - // visit union - - virtual int visit_union_branch (be_union_branch *node); - // visit union_branch -}; - -class be_visitor_union_any_op_cs : public be_visitor_union -{ - // - // = TITLE - // be_visitor_union_any_op_cs - // - // = DESCRIPTION - // This is a concrete visitor for union that generates the Any operator - // implementations - // - -public: - be_visitor_union_any_op_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_union_any_op_cs (void); - // destructor - - virtual int visit_union (be_union *node); - // visit union - - virtual int visit_union_branch (be_union_branch *node); - // visit union_branch -}; +// generic visitor +#include "be_visitor_union/union.h" +// concrete visitors +#include "be_visitor_union/union_ch.h" +#include "be_visitor_union/union_ci.h" +#include "be_visitor_union/union_cs.h" +#include "be_visitor_union/discriminant_ch.h" +#include "be_visitor_union/discriminant_ci.h" +#include "be_visitor_union/discriminant_cs.h" +#include "be_visitor_union/any_op_ch.h" +#include "be_visitor_union/any_op_cs.h" #endif // TAO_BE_VISITOR_UNION_H diff --git a/TAO/TAO_IDL/be_include/be_visitor_union/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_union/any_op_ch.h new file mode 100644 index 00000000000..2f045164396 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union/any_op_ch.h @@ -0,0 +1,52 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_ch.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one generates code for the Any operators for the Union in the client +// header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_ANY_OP_CH_H_) +#define _BE_VISITOR_UNION_ANY_OP_CH_H_ + +class be_visitor_union_any_op_ch : public be_visitor_union +{ + // + // = TITLE + // be_visitor_union_any_op_ch + // + // = DESCRIPTION + // This is a concrete visitor for union that generates the Any operator + // declarations + // + +public: + be_visitor_union_any_op_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_union_any_op_ch (void); + // destructor + + virtual int visit_union (be_union *node); + // visit union + + virtual int visit_union_branch (be_union_branch *node); + // visit union_branch +}; + +#endif /* _BE_VISITOR_UNION_ANY_OP_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union/any_op_cs.h b/TAO/TAO_IDL/be_include/be_visitor_union/any_op_cs.h new file mode 100644 index 00000000000..95bf8baaa82 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union/any_op_cs.h @@ -0,0 +1,52 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// any_op_cs.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one generates code for the Any operators for the Union in the client +// header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_ANY_OP_CS_H_) +#define _BE_VISITOR_UNION_ANY_OP_CS_H_ + +class be_visitor_union_any_op_cs : public be_visitor_union +{ + // + // = TITLE + // be_visitor_union_any_op_cs + // + // = DESCRIPTION + // This is a concrete visitor for union that generates the Any operator + // implementations + // + +public: + be_visitor_union_any_op_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_union_any_op_cs (void); + // destructor + + virtual int visit_union (be_union *node); + // visit union + + virtual int visit_union_branch (be_union_branch *node); + // visit union_branch +}; + +#endif /* _BE_VISITOR_UNION_ANY_OP_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union/discriminant_ch.h b/TAO/TAO_IDL/be_include/be_visitor_union/discriminant_ch.h new file mode 100644 index 00000000000..5c46ba2cd58 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union/discriminant_ch.h @@ -0,0 +1,55 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// discriminant_ch.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one generates code for the discriminant of the Union in the client +// header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_DISCRIMINANT_CH_H_) +#define _BE_VISITOR_UNION_DISCRIMINANT_CH_H_ + +class be_visitor_union_discriminant_ch : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_union_discriminant_ch + // + // = DESCRIPTION + // This is a concrete visitor to generate the client header for union + // discriminant + // + // +public: + be_visitor_union_discriminant_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_union_discriminant_ch (void); + // destructor + + virtual int visit_enum (be_enum *node); + // visit an enum + + virtual int visit_predefined_type (be_predefined_type *node); + // visit a predefined type + + virtual int visit_typedef (be_typedef *node); + // visit a typedef node +}; + +#endif /* _BE_VISITOR_UNION_DISCRIMINANT_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union/discriminant_ci.h b/TAO/TAO_IDL/be_include/be_visitor_union/discriminant_ci.h new file mode 100644 index 00000000000..bb44c2f12ee --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union/discriminant_ci.h @@ -0,0 +1,55 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// discriminant_ci.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one generates code for the discriminant of the Union in the client +// inline file. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_DISCRIMINANT_CI_H_) +#define _BE_VISITOR_UNION_DISCRIMINANT_CI_H_ + +class be_visitor_union_discriminant_ci : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_union_discriminant_ci + // + // = DESCRIPTION + // This is a concrete visitor to generate the client inline for union + // discriminant + // + // +public: + be_visitor_union_discriminant_ci (be_visitor_context *ctx); + // constructor + + ~be_visitor_union_discriminant_ci (void); + // destructor + + virtual int visit_enum (be_enum *node); + // visit an enum + + virtual int visit_predefined_type (be_predefined_type *node); + // visit a predefined type + + virtual int visit_typedef (be_typedef *node); + // visit a typedef node +}; + +#endif /* _BE_VISITOR_UNION_DISCRIMINANT_CI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union/discriminant_cs.h b/TAO/TAO_IDL/be_include/be_visitor_union/discriminant_cs.h new file mode 100644 index 00000000000..23cbe129a22 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union/discriminant_cs.h @@ -0,0 +1,51 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// discriminant_cs.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one generates code for the discriminant of the Union in the client +// stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_DISCRIMINANT_CS_H_) +#define _BE_VISITOR_UNION_DISCRIMINANT_CS_H_ + +class be_visitor_union_discriminant_cs : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_union_discriminant_cs + // + // = DESCRIPTION + // This is a concrete visitor to generate the client stubs for union + // discriminant + // + // +public: + be_visitor_union_discriminant_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_union_discriminant_cs (void); + // destructor + + virtual int visit_enum (be_enum *node); + // visit an enum. Required to generate the typecode for an enum definition + // appearing side the union + +}; + +#endif /* _BE_VISITOR_UNION_DISCRIMINANT_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union/union.h b/TAO/TAO_IDL/be_include/be_visitor_union/union.h new file mode 100644 index 00000000000..568f32b6d8b --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union/union.h @@ -0,0 +1,52 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// union.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one is a generic visitor. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_UNION_H_) +#define _BE_VISITOR_UNION_UNION_H_ + +class be_visitor_union : public be_visitor_scope +{ + // + // = TITLE + // be_visitor_union + // + // = DESCRIPTION + // This is the base visitor for union + // + // +public: + be_visitor_union (be_visitor_context *ctx); + // constructor + + ~be_visitor_union (void); + // destructor + + virtual int visit_union (be_union *node); + // visit union. We provide code for this method in the derived class + + // =visit operations on syntactically valid elements in our scope + + virtual int visit_union_branch (be_union_branch *node); + // visit union_branch +}; + +#endif /* _BE_VISITOR_UNION_UNION_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union/union_ch.h b/TAO/TAO_IDL/be_include/be_visitor_union/union_ch.h new file mode 100644 index 00000000000..5d2f389fb5e --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union/union_ch.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// union_ch.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one generates code in the client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_UNION_CH_H_) +#define _BE_VISITOR_UNION_UNION_CH_H_ + +class be_visitor_union_ch : public be_visitor_union +{ + // + // = TITLE + // be_visitor_union_ch + // + // = DESCRIPTION + // This is a concrete visitor to generate the client header for union + // + // +public: + be_visitor_union_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_union_ch (void); + // destructor + + virtual int visit_union (be_union *node); + // visit union. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_UNION_UNION_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union/union_ci.h b/TAO/TAO_IDL/be_include/be_visitor_union/union_ci.h new file mode 100644 index 00000000000..b0a2c52afe5 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union/union_ci.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// union_ci.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one generates code in the client inline file. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_UNION_CI_H_) +#define _BE_VISITOR_UNION_UNION_CI_H_ + +class be_visitor_union_ci : public be_visitor_union +{ + // + // = TITLE + // be_visitor_union_ci + // + // = DESCRIPTION + // This is a concrete visitor to generate the client inline for union + // + // +public: + be_visitor_union_ci (be_visitor_context *ctx); + // constructor + + ~be_visitor_union_ci (void); + // destructor + + virtual int visit_union (be_union *node); + // visit union. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_UNION_UNION_CI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union/union_cs.h b/TAO/TAO_IDL/be_include/be_visitor_union/union_cs.h new file mode 100644 index 00000000000..3a6ef0322aa --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union/union_cs.h @@ -0,0 +1,48 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// union_cs.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one generates code in the client stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_UNION_CS_H_) +#define _BE_VISITOR_UNION_UNION_CS_H_ + +class be_visitor_union_cs : public be_visitor_union +{ + // + // = TITLE + // be_visitor_union_cs + // + // = DESCRIPTION + // This is a concrete visitor to generate the client stubs for union + // + // +public: + be_visitor_union_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_union_cs (void); + // destructor + + virtual int visit_union (be_union *node); + // visit union. We provide code for this method in the derived class + +}; + +#endif /* _BE_VISITOR_UNION_UNION_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union_branch.h b/TAO/TAO_IDL/be_include/be_visitor_union_branch.h index 780099165eb..7607d2a7f81 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_union_branch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_union_branch.h @@ -23,232 +23,10 @@ #include "be_visitor_decl.h" -class be_visitor_union_branch_public_ch : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_union_branch_public_ch - // - // = DESCRIPTION - // This is a concrete visitor for the be_union_branch node for the client - // header. This generates the code for the public section of the "union" - // class - // -public: - be_visitor_union_branch_public_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_union_branch_public_ch (void); - // destructor - - virtual int visit_union_branch (be_union_branch *node); - // visit the union_branch node - - // =visit operations on all possible data types that a union_branch can be - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit enum type - - virtual int visit_interface (be_interface *node); - // visit interface type - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward type - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_typedef (be_typedef *node); - // visit typedefed type - - virtual int visit_union (be_union *node); - // visit union type - -}; - -class be_visitor_union_branch_private_ch : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_union_branch_private_ch - // - // = DESCRIPTION - // This is a concrete visitor for the be_union_branch node for the client - // header. This generates the code for the private section of the "union" - // class - // -public: - be_visitor_union_branch_private_ch (be_visitor_context *ctx); - // constructor - - ~be_visitor_union_branch_private_ch (void); - // destructor - - virtual int visit_union_branch (be_union_branch *node); - // visit the union_branch node - - // =visit operations on all possible data types that a union_branch can be - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit enum type - - virtual int visit_interface (be_interface *node); - // visit interface type - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward type - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_typedef (be_typedef *node); - // visit typedefed type - - virtual int visit_union (be_union *node); - // visit union type - -}; - -class be_visitor_union_branch_public_ci : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_union_branch_public_ci - // - // = DESCRIPTION - // This visitor is used to generate the accessors for the members of the - // union - // -public: - be_visitor_union_branch_public_ci (be_visitor_context *ctx); - // constructor - - ~be_visitor_union_branch_public_ci (void); - // destructor - - virtual int visit_union_branch (be_union_branch *node); - // visit the union_branch node - - // =visit operations on all possible data types that a union_branch can be - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit enum type - - virtual int visit_interface (be_interface *node); - // visit interface type - - virtual int visit_interface_fwd (be_interface_fwd *node); - // visit interface forward type - - virtual int visit_predefined_type (be_predefined_type *node); - // visit predefined type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_typedef (be_typedef *node); - // visit typedefed type - - virtual int visit_union (be_union *node); - // visit union type - -}; - -class be_visitor_union_branch_public_cs : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_union_branch_public_cs - // - // = DESCRIPTION - // This visitor is used to generate implementation such as typecodes for - // constructed types - // -public: - be_visitor_union_branch_public_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_union_branch_public_cs (void); - // destructor - - virtual int visit_union_branch (be_union_branch *node); - // visit the union_branch node - - // =visit operations on all possible data types that a union_branch can be - - virtual int visit_array (be_array *node); - // visit array type - - virtual int visit_enum (be_enum *node); - // visit enum type - - virtual int visit_sequence (be_sequence *node); - // visit sequence type - - virtual int visit_string (be_string *node); - // visit string type - - virtual int visit_structure (be_structure *node); - // visit structure type - - virtual int visit_union (be_union *node); - // visit union type - -}; - -class be_visitor_union_branch_public_assign_cs : public be_visitor_decl -{ - // - // = TITLE - // be_visitor_union_branch_public_assign_cs - // - // = DESCRIPTION - // This is used to generate the body of the assignment operator and the - // copy constructor of the union class - // -public: - be_visitor_union_branch_public_assign_cs (be_visitor_context *ctx); - // constructor - - ~be_visitor_union_branch_public_assign_cs (void); - // destructor - - virtual int visit_union_branch (be_union_branch *node); - // visit the union_branch node - -}; +#include "be_visitor_union_branch/public_ch.h" +#include "be_visitor_union_branch/public_ci.h" +#include "be_visitor_union_branch/public_cs.h" +#include "be_visitor_union_branch/public_assign_cs.h" +#include "be_visitor_union_branch/private_ch.h" #endif // TAO_BE_VISITOR_UNION_BRANCH_H diff --git a/TAO/TAO_IDL/be_include/be_visitor_union_branch/private_ch.h b/TAO/TAO_IDL/be_include/be_visitor_union_branch/private_ch.h new file mode 100644 index 00000000000..5037fb586ea --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union_branch/private_ch.h @@ -0,0 +1,82 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// private_ch.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one generates code for private part of the union class for the union +// members in the client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_BRANCH_PRIVATE_CH_H_) +#define _BE_VISITOR_UNION_BRANCH_PRIVATE_CH_H_ + +class be_visitor_union_branch_private_ch : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_union_branch_private_ch + // + // = DESCRIPTION + // This is a concrete visitor for the be_union_branch node for the client + // header. This generates the code for the private section of the "union" + // class + // +public: + be_visitor_union_branch_private_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_union_branch_private_ch (void); + // destructor + + virtual int visit_union_branch (be_union_branch *node); + // visit the union_branch node + + // =visit operations on all possible data types that a union_branch can be + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit enum type + + virtual int visit_interface (be_interface *node); + // visit interface type + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward type + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_typedef (be_typedef *node); + // visit typedefed type + + virtual int visit_union (be_union *node); + // visit union type + +}; + +#endif /* _BE_VISITOR_UNION_BRANCH_PRIVATE_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union_branch/public_assign_cs.h b/TAO/TAO_IDL/be_include/be_visitor_union_branch/public_assign_cs.h new file mode 100644 index 00000000000..71d2dd7cc3b --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union_branch/public_assign_cs.h @@ -0,0 +1,49 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// public_assign_cs.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one generates code for the assignment operator of the union class +// for the union members in the client stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_BRANCH_PUBLIC_ASSIGN_CS_H_) +#define _BE_VISITOR_UNION_BRANCH_PUBLIC_ASSIGN_CS_H_ + +class be_visitor_union_branch_public_assign_cs : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_union_branch_public_assign_cs + // + // = DESCRIPTION + // This is used to generate the body of the assignment operator and the + // copy constructor of the union class + // +public: + be_visitor_union_branch_public_assign_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_union_branch_public_assign_cs (void); + // destructor + + virtual int visit_union_branch (be_union_branch *node); + // visit the union_branch node + +}; + +#endif /* _BE_VISITOR_UNION_BRANCH_PUBLIC_ASSIGN_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union_branch/public_ch.h b/TAO/TAO_IDL/be_include/be_visitor_union_branch/public_ch.h new file mode 100644 index 00000000000..43387f44cfa --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union_branch/public_ch.h @@ -0,0 +1,82 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// public_ch.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one generates code for public part of the union class for the union +// members in the client header. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_BRANCH_PUBLIC_CH_H_) +#define _BE_VISITOR_UNION_BRANCH_PUBLIC_CH_H_ + +class be_visitor_union_branch_public_ch : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_union_branch_public_ch + // + // = DESCRIPTION + // This is a concrete visitor for the be_union_branch node for the client + // header. This generates the code for the public section of the "union" + // class + // +public: + be_visitor_union_branch_public_ch (be_visitor_context *ctx); + // constructor + + ~be_visitor_union_branch_public_ch (void); + // destructor + + virtual int visit_union_branch (be_union_branch *node); + // visit the union_branch node + + // =visit operations on all possible data types that a union_branch can be + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit enum type + + virtual int visit_interface (be_interface *node); + // visit interface type + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward type + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_typedef (be_typedef *node); + // visit typedefed type + + virtual int visit_union (be_union *node); + // visit union type + +}; + +#endif /* _BE_VISITOR_UNION_BRANCH_PUBLIC_CH_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union_branch/public_ci.h b/TAO/TAO_IDL/be_include/be_visitor_union_branch/public_ci.h new file mode 100644 index 00000000000..7462bdfe3de --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union_branch/public_ci.h @@ -0,0 +1,81 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// public_ci.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one generates code for public part of the union class for the union +// members in the client inline. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_BRANCI_PUBLIC_CI_H_) +#define _BE_VISITOR_UNION_BRANCI_PUBLIC_CI_H_ + +class be_visitor_union_branch_public_ci : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_union_branch_public_ci + // + // = DESCRIPTION + // This visitor is used to generate the accessors for the members of the + // union + // +public: + be_visitor_union_branch_public_ci (be_visitor_context *ctx); + // constructor + + ~be_visitor_union_branch_public_ci (void); + // destructor + + virtual int visit_union_branch (be_union_branch *node); + // visit the union_branch node + + // =visit operations on all possible data types that a union_branch can be + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit enum type + + virtual int visit_interface (be_interface *node); + // visit interface type + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward type + + virtual int visit_predefined_type (be_predefined_type *node); + // visit predefined type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_typedef (be_typedef *node); + // visit typedefed type + + virtual int visit_union (be_union *node); + // visit union type + +}; + +#endif /* _BE_VISITOR_UNION_BRANCI_PUBLIC_CI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_union_branch/public_cs.h b/TAO/TAO_IDL/be_include/be_visitor_union_branch/public_cs.h new file mode 100644 index 00000000000..f727b019644 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_union_branch/public_cs.h @@ -0,0 +1,69 @@ +/* -*- c++ -*- */ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// public_cs.h +// +// = DESCRIPTION +// Visitor for the Union class. +// This one generates code for public part of the union class for the union +// members in the client stubs. +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#if !defined (_BE_VISITOR_UNION_BRANCS_PUBLIC_CS_H_) +#define _BE_VISITOR_UNION_BRANCS_PUBLIC_CS_H_ + +class be_visitor_union_branch_public_cs : public be_visitor_decl +{ + // + // = TITLE + // be_visitor_union_branch_public_cs + // + // = DESCRIPTION + // This visitor is used to generate implementation such as typecodes for + // constructed types + // +public: + be_visitor_union_branch_public_cs (be_visitor_context *ctx); + // constructor + + ~be_visitor_union_branch_public_cs (void); + // destructor + + virtual int visit_union_branch (be_union_branch *node); + // visit the union_branch node + + // =visit operations on all possible data types that a union_branch can be + + virtual int visit_array (be_array *node); + // visit array type + + virtual int visit_enum (be_enum *node); + // visit enum type + + virtual int visit_sequence (be_sequence *node); + // visit sequence type + + virtual int visit_string (be_string *node); + // visit string type + + virtual int visit_structure (be_structure *node); + // visit structure type + + virtual int visit_union (be_union *node); + // visit union type + +}; + +#endif /* _BE_VISITOR_UNION_BRANCS_PUBLIC_CS_H_ */ |