summaryrefslogtreecommitdiff
path: root/TAO/tao/DynamicInterface
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2003-03-07 18:44:43 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2003-03-07 18:44:43 +0000
commit31818221b3e383a753bffb27c929f2523f86db0f (patch)
tree9b5329710c1a16c98946a647a8cfb4422f0f4b10 /TAO/tao/DynamicInterface
parent3191befef1fb38f424364a6e244c7e0f0f2b9924 (diff)
downloadATCD-31818221b3e383a753bffb27c929f2523f86db0f.tar.gz
ChangeLogTag:Fri Mar 7 10:43:57 2003 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO/tao/DynamicInterface')
-rw-r--r--TAO/tao/DynamicInterface/Request.cpp14
-rw-r--r--TAO/tao/DynamicInterface/Request.h360
2 files changed, 192 insertions, 182 deletions
diff --git a/TAO/tao/DynamicInterface/Request.cpp b/TAO/tao/DynamicInterface/Request.cpp
index 123925bdbc5..8d11e801c04 100644
--- a/TAO/tao/DynamicInterface/Request.cpp
+++ b/TAO/tao/DynamicInterface/Request.cpp
@@ -459,22 +459,22 @@ CORBA::Request::handle_response (TAO_InputCDR &incoming,
}
// Constructor.
-CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (CORBA::ULong max)
+CORBA::ORB_RequestSeq::ORB_RequestSeq (CORBA::ULong max)
: TAO_Unbounded_Pseudo_Sequence <CORBA::Request,CORBA::Request_var> (max)
{
// No-op.
}
-CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (const CORBA_ORB_RequestSeq &rhs)
+CORBA::ORB_RequestSeq::ORB_RequestSeq (const CORBA::ORB_RequestSeq &rhs)
: TAO_Unbounded_Pseudo_Sequence <CORBA::Request,CORBA::Request_var> (rhs)
{
// No-op.
}
-CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (CORBA::ULong max,
- CORBA::ULong length,
- CORBA::Request **data,
- CORBA::Boolean release)
+CORBA::ORB_RequestSeq::ORB_RequestSeq (CORBA::ULong max,
+ CORBA::ULong length,
+ CORBA::Request **data,
+ CORBA::Boolean release)
: TAO_Unbounded_Pseudo_Sequence <CORBA::Request,CORBA::Request_var> (max,
length,
data,
@@ -484,7 +484,7 @@ CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (CORBA::ULong max,
}
-CORBA_ORB_RequestSeq::CORBA_ORB_RequestSeq (void)
+CORBA::ORB_RequestSeq::ORB_RequestSeq (void)
{
// No-op.
}
diff --git a/TAO/tao/DynamicInterface/Request.h b/TAO/tao/DynamicInterface/Request.h
index 0093bc94e85..2c0ebc24d85 100644
--- a/TAO/tao/DynamicInterface/Request.h
+++ b/TAO/tao/DynamicInterface/Request.h
@@ -1,24 +1,18 @@
// -*- C++ -*-
-//
-// $Id$
-
-// ============================================================================
-//
-// = LIBRARY
-// TAO
-//
-// = FILENAME
-// Request.h
-//
-// = DESCRIPTION
-// Header file for CORBA's Dynamic Invocation Interface "Request"
-// type.
-//
-// = AUTHOR
-// Copyright 1994-1995 by Sun Microsystems, Inc.
-// Additions and RequestSeq by Jeff Parsons <parsons@cs.wustl.edu>
-//
-// ============================================================================
+
+//=============================================================================
+/**
+ * @file Request.h
+ *
+ * $Id$
+ *
+ * Header file for CORBA's Dynamic Invocation Interface "Request"
+ * type.
+ *
+ * @author Copyright 1994-1995 by Sun Microsystems, Inc.
+ * @author Additions and RequestSeq by Jeff Parsons <parsons@cs.wustl.edu>
+ */
+//=============================================================================
#ifndef TAO_REQUEST_H
#define TAO_REQUEST_H
@@ -45,88 +39,108 @@
namespace CORBA
{
+ /**
+ * @class Request
+ *
+ * @brief CORBA::Request
+ *
+ * Provides a way to create requests and populate it with parameters
+ * for use in the Dynamic Invocation Interface.
+ */
class TAO_DynamicInterface_Export Request
{
- // = TITLE
- // CORBA::Request
- //
- // = DESCRIPTION
- // Provides a way to create requests and populate it with parameters for
- // use in the Dynamic Invocation Interface.
- //
public:
+
+ /// Return the target of this request.
CORBA::Object_ptr target (void) const;
- // Return the target of this request.
+ /// Return the operation name for the request.
const CORBA::Char *operation (void) const;
- // Return the operation name for the request.
+ /// Return the arguments for the request.
CORBA::NVList_ptr arguments (void);
- // Return the arguments for the request.
+ /// Return the result for the request.
CORBA::NamedValue_ptr result (void);
- // Return the result for the request.
+ /// Return the exceptions resulting from this request.
CORBA::ExceptionList_ptr exceptions (void);
- // Return the exceptions resulting from this request.
+ /// Accessor for the Context member.
CORBA::Context_ptr ctx (void) const;
- // Accessor for the Context member.
+ /// Mutator for the Context member.
void ctx (CORBA::Context_ptr);
- // Mutator for the Context member.
+ /// Return a list of the request's result's contexts. Since TAO
+ /// does not implement Contexts, this will always be 0.
CORBA::ContextList_ptr contexts (void);
- // Return a list of the request's result's contexts. Since
- // TAO does not implement Contexts, this will always be 0.
+ // @deprecated Return the <Environment> for this request.
// CORBA::Environment_ptr env (void);
- // *** DEPRECATED *** Return the <Environment> for this request.
- // Argument manipulation helper functions.
- // Arg adders, one for each type of parameter,
- // with and without optional name. Returns
- // reference to Any for insertion using <<=.
+ /**
+ * @name Argument manipulation helper functions.
+ *
+ * Arg adders, one for each type of parameter, with and without
+ * optional name. Returns reference to Any for insertion using
+ * <<=.
+ */
+ //@{
CORBA::Any &add_in_arg (void);
CORBA::Any &add_in_arg (const char* name);
CORBA::Any &add_inout_arg (void);
CORBA::Any &add_inout_arg (const char* name);
CORBA::Any &add_out_arg (void);
CORBA::Any &add_out_arg (const char* name);
+ //@}
+ /// Initialize the return type.
void set_return_type (CORBA::TypeCode_ptr tc);
- // Initialize the return type.
+ /// Returns reference to Any for extraction using >>=.
CORBA::Any &return_value (void);
- // Returns reference to Any for extraction using >>=.
+ /// Perform method resolution and invoke an appropriate method.
+ /**
+ * If the method returns successfully, its result is placed in
+ * the result argument specified on @c create_request. The behavior
+ * is undefined if this @c Request has already been used with a
+ * previous call to @c invoke>, @c send>, or
+ * @send_multiple_requests.
+ *
+ * @note A default argument is set, but please note that this not
+ * recommended as the user may not be able to propagate the
+ * exceptions.
+ */
void invoke (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
- // Perform method resolution and invoke an appropriate method. If
- // the method returns successfully, its result is placed in the
- // result argument specified on <create_request>. The behavior is
- // undefined if this <Request> has already been used with a previous
- // call to <invoke>, <send>, or <send_multiple_requests>.
-
- // A default argument is set, but please note that this not recommended
- // as the user may not be able to propagate the exceptions
+ /// Send a oneway request.
+ /**
+ * @note A default argument is set, but please note that this not
+ * recommended as the user may not be able to propagate the
+ * exceptions.
+ */
void send_oneway (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
- // Send a oneway request.
- // A default argument is set, but please note that this not recommended
- // as the user may not be able to propagate the exceptions.
- // The 'deferred synchronous' methods.
+ /**
+ * @name The 'deferred synchronous' methods.
+ *
+ * The 'deferred synchronous' methods.
+ */
+ //@{
void send_deferred (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
void get_response (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
CORBA::Boolean poll_response (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS);
+ //@}
- // Callback method for deferred synchronous requests.
+ /// Callback method for deferred synchronous requests.
void handle_response (TAO_InputCDR &incoming,
CORBA::ULong reply_status
ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- // Pseudo object methods.
+ /// Pseudo object methods.
static CORBA::Request* _duplicate (CORBA::Request*);
static CORBA::Request* _nil (void);
@@ -134,21 +148,21 @@ namespace CORBA
CORBA::ULong _incr_refcnt (void);
CORBA::ULong _decr_refcnt (void);
+ /// Set the lazy evaluation flag.
void _tao_lazy_evaluation (int lazy_evaluation);
- // Set the lazy evaluation flag.
+ /// Get the byte order member.
int _tao_byte_order (void) const;
- // Get the byte order member.
+ /// Set the byte order member.
void _tao_byte_order (int byte_order);
- // Set the byte order member.
+ // Hold on to a user exception in case we are part of a TAO
+ // gateway.
void raw_user_exception (TAO_InputCDR &cdr);
- // Hold on to a user exception in case we are part of
- // a TAO gateway.
+ /// Accessor for the input stream containing the exception.
ACE_CString &raw_user_exception (void);
- // Accessor for the input stream containing the exception.
#if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8
// Useful for template programming.
@@ -157,7 +171,7 @@ namespace CORBA
#endif /* __GNUC__ */
private:
- friend class TAO_Dynamic_Adapter_Impl;
+ friend class ::TAO_Dynamic_Adapter_Impl;
// The following are not allowed except when called from the
// friend class.
@@ -178,71 +192,69 @@ namespace CORBA
~Request (void);
+ private:
+
+ /// Target object.
CORBA::Object_ptr target_;
- // Target object.
+ /// Pointer to our ORB.
CORBA::ORB_var orb_;
- // Pointer to our ORB.
- const CORBA::Char *opname_;
- // Operation name.
+ /// Operation name.
+ const char * opname_;
+ /// Parameter list.
CORBA::NVList_ptr args_;
- // Parameter list.
+ /// Result of the operation.
CORBA::NamedValue_ptr result_;
- // Result of the operation.
+ /// Invocation flags.
CORBA::Flags flags_;
- // Invocation flags.
+ /// @deprecated Holds exceptions.
// CORBA::Environment env_;
- // *** DEPRECATED *** Holds exceptions.
+ /// List of exceptions raised by the operation.
CORBA::ExceptionList_var exceptions_;
- // List of exceptions raised by the operation.
+ /// List of the request's result's contexts.
CORBA::ContextList_ptr contexts_;
- // List of the request's result's contexts.
+ /// Context associated with this request.
CORBA::Context_ptr ctx_;
- // Context associated with this request.
+ /// Reference counting.
CORBA::ULong refcount_;
- // Reference counting.
+ /// Protect the refcount_ and response_receieved_.
TAO_SYNCH_MUTEX lock_;
- // Protect the refcount_ and response_receieved_.
+ /// If not zero then the NVList is not evaluated by default.
int lazy_evaluation_;
- // If not zero then the NVList is not evaluated by default.
+ /// Set to TRUE upon completion of invoke() or handle_response().
CORBA::Boolean response_received_;
- // Set to TRUE upon completion of invoke() or
- // handle_response().
+ /// Can be reset by a gateway when passing along a request.
int byte_order_;
- // Can be reset by a gateway when passing along a request.
+ /// Stores user exception as a CDR stream when this request is
+ /// used in a TAO gateway.
ACE_CString raw_user_exception_;
- // Stores user exception as a CDR stream when this request is
- // used in a TAO gateway.
+
};
+ /**
+ * @class Request_var
+ *
+ * @brief The T_var class for Request.
+ *
+ * As any other pseudo object Request must have a T_var class, the
+ * interface an semantics are specified in the CORBA spec.
+ */
class TAO_DynamicInterface_Export Request_var
{
- // = TITLE
- // The T_var class for Request.
- //
- // = DESCRIPTION
- // As any other pseudo object Request must have a T_var class,
- // the interface an semantics are specified in the CORBA spec.
- //
- // = NOTE
- // We use CORBA::Request_ptr as the _ptr type instead of
- // CORBA::Request_ptr, this is an attempt to reduced the cyclic
- // dependencies in TAO.
- //
public:
Request_var (void);
Request_var (Request_ptr);
@@ -267,20 +279,16 @@ namespace CORBA
Request_ptr ptr_;
};
+ /**
+ * @class Request_out
+ *
+ * @brief The T_out class for Request
+ *
+ * As any other pseudo object Request must have a T_out class, the
+ * interface an semantics are specified in the CORBA spec.
+ */
class TAO_DynamicInterface_Export Request_out
{
- // = TITLE
- // The T_out class for Request
- //
- // = DESCRIPTION
- // As any other pseudo object Request must have a T_out class,
- // the interface an semantics are specified in the CORBA spec.
- //
- // = NOTE
- // We use Request_ptr as the _ptr type instead of
- // CORBA::Request_ptr, this is an attempt to reduced the cyclic
- // dependencies in TAO.
- //
public:
Request_out (Request_ptr &);
Request_out (Request_var &);
@@ -295,92 +303,94 @@ namespace CORBA
private:
Request_ptr &ptr_;
};
-} // End CORBA namespace.
// Make sure you instantiate this in Request.cpp
-class TAO_DynamicInterface_Export CORBA_ORB_RequestSeq
- : public TAO_Unbounded_Pseudo_Sequence<CORBA::Request, CORBA::Request_var>
-{
-public:
- // Helpful with template programming.
+ class TAO_DynamicInterface_Export ORB_RequestSeq
+ : public TAO_Unbounded_Pseudo_Sequence<CORBA::Request, CORBA::Request_var>
+ {
+ public:
+ // Helpful with template programming.
#if !defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ >= 8
- typedef CORBA_ORB_RequestSeq_var _var_type;
+ typedef ORB_RequestSeq_var _var_type;
#endif /* __GNUC__ */
- // Implement the same constructors provided by the template here,
- // check Sequence_T.h for ideas.
- // Simply delegate on the template for the implementation...
+ // Implement the same constructors provided by the template here,
+ // check Sequence_T.h for ideas.
+ // Simply delegate on the template for the implementation...
- CORBA_ORB_RequestSeq (void);
- // Default constructor.
+ /// Default constructor.
+ ORB_RequestSeq (void);
- CORBA_ORB_RequestSeq (CORBA::ULong max);
- // Constructor with a "hint" for the maximum capacity.
+ /// Constructor with a "hint" for the maximum capacity.
+ ORB_RequestSeq (CORBA::ULong max);
- CORBA_ORB_RequestSeq (CORBA::ULong maximum,
- CORBA::ULong length,
- CORBA::Request* * data,
- CORBA::Boolean release=0);
- // Constructor with a given buffer.
+ /// Constructor with a given buffer.
+ ORB_RequestSeq (CORBA::ULong maximum,
+ CORBA::ULong length,
+ CORBA::Request* * data,
+ CORBA::Boolean release=0);
- CORBA_ORB_RequestSeq (const CORBA_ORB_RequestSeq &);
- // Copy ctor, deep copies.
-};
+ /// Copy ctor, deep copies.
+ ORB_RequestSeq (const ORB_RequestSeq &);
-class TAO_DynamicInterface_Export CORBA_ORB_RequestSeq_var
-{
-public:
- CORBA_ORB_RequestSeq_var (void);
- // Default constructor.
+ };
- CORBA_ORB_RequestSeq_var (CORBA_ORB_RequestSeq *);
+ class TAO_DynamicInterface_Export ORB_RequestSeq_var
+ {
+ public:
+ /// Default constructor.
+ ORB_RequestSeq_var (void);
- CORBA_ORB_RequestSeq_var (const CORBA_ORB_RequestSeq_var &);
- // Copy constructor.
+ ORB_RequestSeq_var (ORB_RequestSeq *);
- ~CORBA_ORB_RequestSeq_var (void);
- // Destructor.
+ /// Copy constructor.
+ ORB_RequestSeq_var (const ORB_RequestSeq_var &);
- CORBA_ORB_RequestSeq_var &operator= (CORBA_ORB_RequestSeq *);
- CORBA_ORB_RequestSeq_var &operator= (const CORBA_ORB_RequestSeq_var &);
- CORBA_ORB_RequestSeq *operator-> (void);
- const CORBA_ORB_RequestSeq *operator-> (void) const;
+ /// Destructor.
+ ~ORB_RequestSeq_var (void);
- operator const CORBA_ORB_RequestSeq &() const;
- operator CORBA_ORB_RequestSeq &();
- operator CORBA_ORB_RequestSeq &() const;
- CORBA::Octet &operator[] (CORBA::ULong slot);
+ ORB_RequestSeq_var &operator= (ORB_RequestSeq *);
+ ORB_RequestSeq_var &operator= (const ORB_RequestSeq_var &);
+ ORB_RequestSeq *operator-> (void);
+ const ORB_RequestSeq *operator-> (void) const;
- // in, inout, out, _retn.
- const CORBA_ORB_RequestSeq &in (void) const;
- CORBA_ORB_RequestSeq &inout (void);
- CORBA_ORB_RequestSeq *&out (void);
- CORBA_ORB_RequestSeq *_retn (void);
- CORBA_ORB_RequestSeq *ptr (void) const;
+ operator const ORB_RequestSeq &() const;
+ operator ORB_RequestSeq &();
+ operator ORB_RequestSeq &() const;
+ CORBA::Octet &operator[] (CORBA::ULong slot);
-private:
- CORBA_ORB_RequestSeq *ptr_;
-};
+ // in, inout, out, _retn.
+ const ORB_RequestSeq &in (void) const;
+ ORB_RequestSeq &inout (void);
+ ORB_RequestSeq *&out (void);
+ ORB_RequestSeq *_retn (void);
+ ORB_RequestSeq *ptr (void) const;
-class TAO_DynamicInterface_Export CORBA_ORB_RequestSeq_out
-{
-public:
- CORBA_ORB_RequestSeq_out (CORBA_ORB_RequestSeq *&);
- CORBA_ORB_RequestSeq_out (CORBA_ORB_RequestSeq_var &);
- CORBA_ORB_RequestSeq_out (CORBA_ORB_RequestSeq_out &);
- CORBA_ORB_RequestSeq_out &operator= (CORBA_ORB_RequestSeq_out &);
- CORBA_ORB_RequestSeq_out &operator= (CORBA_ORB_RequestSeq *);
- operator CORBA_ORB_RequestSeq *&();
- CORBA_ORB_RequestSeq *&ptr (void);
- CORBA_ORB_RequestSeq *operator-> (void);
- CORBA::Octet &operator[] (CORBA::ULong slot);
-
-private:
- CORBA_ORB_RequestSeq *&ptr_;
-
- // Assignment from T_var not allowed.
- void operator= (const CORBA_ORB_RequestSeq_var &);
-};
+ private:
+ ORB_RequestSeq *ptr_;
+ };
+
+ class TAO_DynamicInterface_Export ORB_RequestSeq_out
+ {
+ public:
+ ORB_RequestSeq_out (ORB_RequestSeq *&);
+ ORB_RequestSeq_out (ORB_RequestSeq_var &);
+ ORB_RequestSeq_out (ORB_RequestSeq_out &);
+ ORB_RequestSeq_out &operator= (ORB_RequestSeq_out &);
+ ORB_RequestSeq_out &operator= (ORB_RequestSeq *);
+ operator ORB_RequestSeq *&();
+ ORB_RequestSeq *&ptr (void);
+ ORB_RequestSeq *operator-> (void);
+ CORBA::Octet &operator[] (CORBA::ULong slot);
+
+ private:
+ ORB_RequestSeq *&ptr_;
+
+ /// Assignment from T_var not allowed.
+ void operator= (const ORB_RequestSeq_var &);
+ };
+
+} // End CORBA namespace.
#if defined (__ACE_INLINE__)
# include "Request.inl"