diff options
5 files changed, 378 insertions, 2 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index c37f70b4b85..388716ed28f 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -11,15 +11,19 @@ Tue Jul 6 22:10:00 1999 Michael Kircher <mk1@cs.wustl.edu> * TAO_IDL/be/be_visitor_argument/compiled_marshal_cs.cpp * TAO_IDL/be/be_visitor_argument/upcall_ss.cpp * TAO_IDL/be/be_visitor_argument/vardecl_ss.cpp - * TAO_IDL/be/be_visitor_argument/ami_handler_result_arg.cpp - * TAO_IDL/be/be_visitor_argument/ami_handler_vardecl_cs.cpp: + * TAO_IDL/be/be_visitor_argument/ami_handler_result_arg.cpp: Added code to generate ami_handler_ names. The generated names are held in the corresponding classes, which is then also responsible for deleting it. * TAO_IDL/be/be_visitor_operation/ami_handler_argument_marshal.cpp + * TAO_IDL/be_include/be_visitor_operation/ami_handler_argument_marshal.h * TAO_IDL/be/be_visitor_argument/ami_handler_upcall_cs.cpp + * TAO_IDL/be_include/be_visitor_argument/ami_handler_upcall_cs.h + * TAO_IDL/be/be_visitor_argument/ami_handler_vardecl_cs.cpp + * TAO_IDL/be_include/be_visitor_argument/ami_handler_vardecl_cs.h * TAO_IDL/be/be_visitor_argument/ami_handler_compiled_marshal_cs.cpp + * TAO_IDL/be_include/be_visitor_argument/ami_handler_compiled_marshal_cs.h: Added these files for code generation of the AMI Handler skeleton. diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/ami_handler_compiled_marshal_cs.h b/TAO/TAO_IDL/be_include/be_visitor_argument/ami_handler_compiled_marshal_cs.h new file mode 100644 index 00000000000..11d8bef925f --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/ami_handler_compiled_marshal_cs.h @@ -0,0 +1,89 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// ami_handler_compiled_marshal_cs.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments for passing the arguments +// to the CDR << and >> operators +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#ifndef _BE_VISITOR_ARGUMENT_ami_handler_compiled_marshal_cs_H_ +#define _BE_VISITOR_ARGUMENT_ami_handler_compiled_marshal_cs_H_ + +// ************************************************************ +// class be_visitor_args_ami_handler_compiled_marshal_cs +// ************************************************************ +class be_visitor_args_ami_handler_compiled_marshal_cs : public be_visitor_args +{ + // + // = TITLE + // be_visitor_args_ami_handler_compiled_marshal_cs + // + // = DESCRIPTION + // Code to be generated when making the do_static_call + // +public: + be_visitor_args_ami_handler_compiled_marshal_cs (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args_ami_handler_compiled_marshal_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 + +#ifdef IDL_HAS_VALUETYPE + virtual int visit_valuetype (be_valuetype *node); + // visit valuetype + + virtual int visit_valuetype_fwd (be_valuetype_fwd *node); + // visit valuetype forward +#endif /* IDL_HAS_VALUETYPE */ + + 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_ami_handler_compiled_marshal_cs_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/ami_handler_upcall_cs.h b/TAO/TAO_IDL/be_include/be_visitor_argument/ami_handler_upcall_cs.h new file mode 100644 index 00000000000..a1da8fe0ed2 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/ami_handler_upcall_cs.h @@ -0,0 +1,90 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// ami_handler_upcall_cs.h +// +// = DESCRIPTION +// Visitors for generation of code for Arguments. This generates the +// passing of arguments to the upcall. +// +// = AUTHOR +// Aniruddha Gokhale +// Michael Kircher +// +// ============================================================================ + +#ifndef _BE_VISITOR_ARGUMENT_upcall_cs_H_ +#define _BE_VISITOR_ARGUMENT_upcall_cs_H_ + +// ************************************************************ +// class be_visitor_args_ami_handler_upcall_cs +// ************************************************************ +class be_visitor_args_ami_handler_upcall_cs : public be_visitor_args +{ + // + // = TITLE + // be_visitor_args_ami_handler_upcall_cs + // + // = DESCRIPTION + // Visitor for passing argument to the upcall + // +public: + be_visitor_args_ami_handler_upcall_cs (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args_ami_handler_upcall_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 + +#ifdef IDL_HAS_VALUETYPE + virtual int visit_valuetype (be_valuetype *node); + // visit valuetype + + virtual int visit_valuetype_fwd (be_valuetype_fwd *node); + // visit valuetype forward +#endif /* IDL_HAS_VALUETYPE */ + + 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_cs_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_argument/ami_handler_vardecl_cs.h b/TAO/TAO_IDL/be_include/be_visitor_argument/ami_handler_vardecl_cs.h new file mode 100644 index 00000000000..fd2d80db63f --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_argument/ami_handler_vardecl_cs.h @@ -0,0 +1,126 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// ami_handler_vardecl_cs.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 +// Michael Kircher +// +// ============================================================================ + +#ifndef _BE_VISITOR_ARGUMENT_ami_handler_vardecl_cs_H_ +#define _BE_VISITOR_ARGUMENT_ami_handler_vardecl_cs_H_ + +// ************************************************************ +// class be_visitor_args_ami_handler_vardecl_cs +// ************************************************************ +class be_visitor_args_ami_handler_vardecl_cs : public be_visitor_args +{ + // + // = TITLE + // be_visitor_args_ami_handler_vardecl_cs + // + // = DESCRIPTION + // Visitor for variable declaration for argument + // +public: + be_visitor_args_ami_handler_vardecl_cs (be_visitor_context *ctx); + // constructor + + virtual ~be_visitor_args_ami_handler_vardecl_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 + +#ifdef IDL_HAS_VALUETYPE + virtual int visit_valuetype (be_valuetype *node); + // visit valuetype + + virtual int visit_valuetype_fwd (be_valuetype_fwd *node); + // visit valuetype forward +#endif /* IDL_HAS_VALUETYPE */ + + 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_compiled_visitor_args_ami_handler_vardecl_cs +// ************************************************************ +class be_compiled_visitor_args_ami_handler_vardecl_cs : public be_visitor_args_ami_handler_vardecl_cs +{ + // + // = TITLE + // be_compiled_visitor_args_ami_handler_vardecl_cs + // + // = DESCRIPTION + // Visitor for variable declaration for argument for compiled marshaling + // skeletons + // +public: + be_compiled_visitor_args_ami_handler_vardecl_cs (be_visitor_context *ctx); + // constructor + + virtual ~be_compiled_visitor_args_ami_handler_vardecl_cs (void); + // destructor + + virtual int visit_interface (be_interface *node); + // visit interface + + virtual int visit_interface_fwd (be_interface_fwd *node); + // visit interface forward + +#ifdef IDL_HAS_VALUETYPE + virtual int visit_valuetype (be_valuetype *node); + // visit valuetype + + virtual int visit_valuetype_fwd (be_valuetype_fwd *node); + // visit valuetype forward +#endif /* IDL_HAS_VALUETYPE */ + +}; + +#endif /* _BE_VISITOR_ARGUMENT_ami_handler_vardecl_cs_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_argument_marshal.h b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_argument_marshal.h new file mode 100644 index 00000000000..1697ff6cdd0 --- /dev/null +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_argument_marshal.h @@ -0,0 +1,67 @@ +// +// $Id$ +// + +// ============================================================================ +// +// = LIBRARY +// TAO IDL +// +// = FILENAME +// ami_handler_argument_marshal.h +// +// = DESCRIPTION +// Visitor for generating code for IDL operations. This is a visitor for +// passing arguments to the CDR operators in a compiled marshaling +// stub/skeleton +// +// = AUTHOR +// Aniruddha Gokhale +// +// ============================================================================ + +#ifndef _BE_VISITOR_OPERATION_ami_handler_argument_marshal_H_ +#define _BE_VISITOR_OPERATION_ami_handler_argument_marshal_H_ + +// ************************************************************ +// generic operation visitor for docall, upcall, pre/post +// ************************************************************ + +class be_compiled_visitor_operation_ami_handler_argument_marshal + : public be_visitor_operation_argument +{ + // + // = TITLE + // be_compiled_visitor_operation_ami_handler_argument_marshal + // + // = DESCRIPTION + // This is a visitor to generate a variable declaration of an operation + // return type + // +public: + be_compiled_visitor_operation_ami_handler_argument_marshal (be_visitor_context *ctx); + // constructor + + ~be_compiled_visitor_operation_ami_handler_argument_marshal (void); + // destructor + + virtual int pre_process (be_decl *bd); + // stuff to o/p before each element of the scope is handled + + virtual int post_process (be_decl *bd); + // stuff to o/p after each element of the scope is handled + + enum LAST_ARG_PRINTED + { + TAO_ARG_NONE, + TAO_ARG_IN, + TAO_ARG_INOUT, + TAO_ARG_OUT + }; + +private: + LAST_ARG_PRINTED last_arg_printed_; +}; + + +#endif /* _BE_VISITOR_OPERATION_ami_handler_argument_marshal_H_ */ |