3 //=============================================================================
8 * @author Carlos O'Ryan
10 //=============================================================================
12 #ifndef TAO_ARGUMENT_H
13 #define TAO_ARGUMENT_H
15 #include /**/ "ace/pre.h"
17 #include "tao/Basic_Types.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "tao/orbconf.h"
24 #include /**/ "tao/TAO_Export.h"
25 #include "tao/ParameterModeC.h"
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
42 * @brief Base class for argument class templates.
44 * @c Argument subclasses override the virtual methods
45 * appropriately. For example, a stub "IN" argument class
46 * template would override the @c marshal() method, but wouldn't
47 * need to override the @c demarshal() method.
49 class TAO_Export Argument
55 /// Marshal the argument into the given CDR output stream.
57 * @note The default implementation simply returns @c true.
59 virtual CORBA::Boolean
marshal (TAO_OutputCDR
&cdr
);
61 /// Demarshal the argument from the given CDR input stream.
63 * @note The default implementation simply returns @c true.
65 virtual CORBA::Boolean
demarshal (TAO_InputCDR
&);
67 /// Template method to clone a TAO Argument
68 virtual Argument
* clone ();
70 #if TAO_HAS_INTERCEPTORS == 1
73 * @name Portable Interceptor Related Methods
75 * These methods are only used when setting up
76 * @c PortableInterceptor::RequestInfo instances with the
77 * appropriate operation-specific parameter list and return
78 * value, if either or both exist.
81 /// Populate the given @a CORBA::Any result argument.
83 * @note The default implementation is a no-op.
85 virtual void interceptor_value (CORBA::Any
*) const;
87 /// Get the parameter mode of this argument
88 virtual CORBA::ParameterMode
mode () const = 0;
91 #endif /* TAO_HAS_INTERCEPTORS == 1 */
94 #if TAO_HAS_INTERCEPTORS == 1
95 class TAO_Export InArgument
: public Argument
98 virtual CORBA::ParameterMode
mode () const;
101 typedef Argument InArgument
;
104 #if TAO_HAS_INTERCEPTORS == 1
105 class TAO_Export InoutArgument
: public Argument
108 virtual CORBA::ParameterMode
mode () const;
111 typedef Argument InoutArgument
;
114 #if TAO_HAS_INTERCEPTORS == 1
115 class TAO_Export OutArgument
: public Argument
118 virtual CORBA::ParameterMode
mode () const;
121 typedef Argument OutArgument
;
124 #if TAO_HAS_INTERCEPTORS == 1
125 class TAO_Export RetArgument
: public Argument
128 virtual CORBA::ParameterMode
mode () const;
131 typedef Argument RetArgument
;
134 class TAO_Export Void_Return_Argument
: public RetArgument
137 virtual Argument
* clone ();
141 TAO_END_VERSIONED_NAMESPACE_DECL
143 #include /**/ "ace/post.h"
145 #endif /* TAO_ARGUMENT_H */