summaryrefslogtreecommitdiff
path: root/TAO/tao/Sequence_T.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Sequence_T.h')
-rw-r--r--TAO/tao/Sequence_T.h392
1 files changed, 229 insertions, 163 deletions
diff --git a/TAO/tao/Sequence_T.h b/TAO/tao/Sequence_T.h
index 8999044018c..a5f420fcf4a 100644
--- a/TAO/tao/Sequence_T.h
+++ b/TAO/tao/Sequence_T.h
@@ -30,7 +30,7 @@
* This class completes the implementation for TAO_Base_Sequence
* for the unbounded case.
*/
-template <class T>
+template <typename T>
class TAO_Unbounded_Sequence : public TAO_Unbounded_Base_Sequence
{
public:
@@ -49,14 +49,14 @@ public:
*/
TAO_Unbounded_Sequence (CORBA::ULong max,
CORBA::ULong length,
- T *data,
+ T * data,
CORBA::Boolean release = 0);
/// Copy constructor.
TAO_Unbounded_Sequence (const TAO_Unbounded_Sequence<T> &);
/// Assignment operator.
- TAO_Unbounded_Sequence<T> &operator= (const TAO_Unbounded_Sequence<T> &);
+ TAO_Unbounded_Sequence<T> & operator= (const TAO_Unbounded_Sequence<T> &);
/// Dtor.
~TAO_Unbounded_Sequence (void);
@@ -64,19 +64,21 @@ public:
// = Accessors.
/// operator []
- T &operator[] (CORBA::ULong);
+ T & operator[] (CORBA::ULong);
/// operator []
- const T &operator[] (CORBA::ULong) const;
+ const T & operator[] (CORBA::ULong) const;
// = Static operations.
/// Allocate storage for the sequence.
- static T *allocbuf (CORBA::ULong);
+ static T * allocbuf (CORBA::ULong);
/// Free the sequence.
static void freebuf (T *);
+ static void _tao_any_destructor (void *);
+
/// Implement the TAO_Base_Sequence methods (see Sequence.h)
virtual void _allocate_buffer (CORBA::ULong length);
virtual void _deallocate_buffer (void);
@@ -110,7 +112,7 @@ public:
* references), and then freeing the returned buffer itself using
* <freebuf>.
*/
- T *get_buffer (CORBA::Boolean orphan = 0);
+ T * get_buffer (CORBA::Boolean orphan = 0);
/**
* This function allows read-only access to the sequence buffer.
@@ -118,7 +120,7 @@ public:
* yet been allocated. No direct modification of the returned
* buffer by the caller is permitted.
*/
- const T *get_buffer (void) const;
+ const T * get_buffer (void) const;
/**
* Allows the buffer underlying a sequence to be replaced. The
@@ -127,7 +129,7 @@ public:
*/
void replace (CORBA::ULong max,
CORBA::ULong length,
- T *data,
+ T * data,
CORBA::Boolean release = 0);
};
@@ -141,7 +143,7 @@ public:
* This class completes the implementation for TAO_Base_Sequence
* for the bounded case.
*/
-template <class T, size_t MAX>
+template <typename T, size_t MAX>
class TAO_Bounded_Sequence : public TAO_Bounded_Base_Sequence
{
public:
@@ -158,7 +160,7 @@ public:
TAO_Bounded_Sequence (const TAO_Bounded_Sequence<T,MAX> &);
/// Assignment operator.
- TAO_Bounded_Sequence<T,MAX> &operator= (
+ TAO_Bounded_Sequence<T,MAX> & operator= (
const TAO_Bounded_Sequence<T,MAX> &
);
@@ -167,19 +169,21 @@ public:
// = Accessors.
/// operator []
- T &operator[] (CORBA::ULong);
+ T & operator[] (CORBA::ULong);
/// operator []
- const T &operator[] (CORBA::ULong) const;
+ const T & operator[] (CORBA::ULong) const;
// = Static operations.
/// Allocate storage for the sequence.
- static T *allocbuf (CORBA::ULong);
+ static T * allocbuf (CORBA::ULong);
/// Free the sequence.
static void freebuf (T *);
+ static void _tao_any_destructor (void *);
+
/// allocate a buffer of the requested length. The buffer is allocated for
/// the right type
virtual void _allocate_buffer (CORBA::ULong length);
@@ -218,7 +222,7 @@ public:
* references), and then freeing the returned buffer itself using
* <freebuf>.
*/
- T *get_buffer (CORBA::Boolean orphan = 0);
+ T * get_buffer (CORBA::Boolean orphan = 0);
/**
* This function allows read-only access to the sequence buffer.
@@ -226,7 +230,7 @@ public:
* yet been allocated. No direct modification of the returned
* buffer by the caller is permitted.
*/
- const T *get_buffer (void) const;
+ const T * get_buffer (void) const;
/**
* Allows the buffer underlying a sequence to be replaced. The
@@ -235,17 +239,33 @@ public:
*/
void replace (CORBA::ULong max,
CORBA::ULong length,
- T *data,
+ T * data,
CORBA::Boolean release = 0);
};
// *************************************************************
-template<class T,class T_var> class TAO_Unbounded_Object_Sequence;
+template<typename T,
+ typename T_var,
+ typename T_life,
+ typename T_cast>
+ class TAO_Unbounded_Object_Sequence;
template<class T,class T_var> class TAO_Unbounded_Pseudo_Sequence;
-template<class T,class T_var> class TAO_Unbounded_Valuetype_Sequence;
-template<class T, class T_var, size_t MAX> class TAO_Bounded_Object_Sequence;
-template<class T, class T_var, size_t MAX> class TAO_Bounded_Valuetype_Sequence;
+template<typename T,
+ typename T_var,
+ typename T_life>
+ class TAO_Unbounded_Valuetype_Sequence;
+template<typename T,
+ typename T_var,
+ typename T_life,
+ typename T_cast,
+ size_t MAX>
+ class TAO_Bounded_Object_Sequence;
+template<typename T,
+ typename T_var,
+ typename T_life,
+ size_t MAX>
+ class TAO_Bounded_Valuetype_Sequence;
template<size_t MAX> class TAO_Bounded_String_Sequence;
// *************************************************************
@@ -274,10 +294,9 @@ template<size_t MAX> class TAO_Bounded_String_Sequence;
* says that T_ptr *could* map to a type different to T* in the
* particular case of TAO it does map to <T*>.
*/
-template<class T, class T_var>
+template<typename T, typename T_var, typename T_life>
class TAO_Object_Manager
{
- friend class TAO_Unbounded_Object_Sequence<T,T_var>;
public:
// @@ Use partial template specialization here to give access only
// to the right kind of sequence.
@@ -291,7 +310,7 @@ public:
* release value on the <rhs>.
* + In any case a new reference to the same object is created.
*/
- TAO_Object_Manager (const TAO_Object_Manager<T,T_var> &rhs);
+ TAO_Object_Manager (const TAO_Object_Manager<T,T_var,T_life> & rhs);
/**
* Constructor from address of an element, it should be private and
@@ -309,43 +328,45 @@ public:
* @@ TODO what happens if rhs.release_ is true an this->relase_ is
* false?
*/
- TAO_Object_Manager<T,T_var> &operator= (const TAO_Object_Manager<T,T_var> &rhs);
+ TAO_Object_Manager<T,T_var,T_life> & operator= (
+ const TAO_Object_Manager<T,T_var,T_life> & rhs
+ );
/// Assignment from T *.
- TAO_Object_Manager<T,T_var> &operator= (T *);
+ TAO_Object_Manager<T,T_var,T_life> & operator= (T *);
- /// Assignment from T_var.
- TAO_Object_Manager<T,T_var> &operator= (const T_var &);
+ /// Assignment from T_life.
+ TAO_Object_Manager<T,T_var,T_life> & operator= (const T_var &);
/// Return pointer.
T * operator-> (void) const;
/// Cast (read-only).
- operator const T *() const;
+ operator const T * () const;
/// Cast.
- operator T *&();
+ operator T *& ();
/// Cast (read-only) so that assignment from a structured
/// type to a T_var will make a copy.
- operator const T_var() const;
+ operator const T_var () const;
/// for in parameter.
- T *in (void) const;
+ T * in (void) const;
/// for inout parameter.
- T *&inout (void);
+ T *& inout (void);
/// for out parameter.
- T *&out (void);
+ T *& out (void);
/// for return type
- T *_retn (void);
+ T * _retn (void);
private:
/// data member, notice that it is a pointer, to implement the
/// reference behavior for assignment.
- T **ptr_;
+ T ** ptr_;
/// release flag based on parent's flag
CORBA::Boolean release_;
@@ -359,7 +380,7 @@ private:
* @brief Manager for Pseudo Objects.
*
*/
-template<class T, class T_var>
+template<typename T, typename T_var>
class TAO_Pseudo_Object_Manager
{
friend class TAO_Unbounded_Pseudo_Sequence<T,T_var>;
@@ -376,7 +397,7 @@ public:
* release value on the <rhs>.
* + In any case a new reference to the same object is created.
*/
- TAO_Pseudo_Object_Manager (const TAO_Pseudo_Object_Manager<T,T_var> &rhs);
+ TAO_Pseudo_Object_Manager (const TAO_Pseudo_Object_Manager<T,T_var> & rhs);
/**
* Constructor from address of an element, it should be private and
@@ -394,39 +415,41 @@ public:
* @@ TODO what happens if rhs.release_ is true an this->relase_ is
* false?
*/
- TAO_Pseudo_Object_Manager<T,T_var> &operator= (const TAO_Pseudo_Object_Manager<T,T_var> &rhs);
+ TAO_Pseudo_Object_Manager<T,T_var> & operator= (
+ const TAO_Pseudo_Object_Manager<T,T_var> & rhs
+ );
/// Assignment from T *.
- TAO_Pseudo_Object_Manager<T,T_var> &operator= (T *);
+ TAO_Pseudo_Object_Manager<T,T_var> & operator= (T *);
/// Assignment from T_var.
- TAO_Pseudo_Object_Manager<T,T_var> &operator= (const T_var &);
+ TAO_Pseudo_Object_Manager<T,T_var> & operator= (const T_var &);
/// Return pointer.
T * operator-> (void) const;
/// Cast (read-only).
- operator const T *() const;
+ operator const T * () const;
/// Cast.
- operator T *&();
+ operator T *& ();
/// for in parameter.
- T *in (void) const;
+ T * in (void) const;
/// for inout parameter.
- T *&inout (void);
+ T *& inout (void);
/// for out parameter.
- T *&out (void);
+ T *& out (void);
/// for return type
- T *_retn (void);
+ T * _retn (void);
private:
/// data member, notice that it is a pointer, to implement the
/// reference behavior for assignment.
- T **ptr_;
+ T ** ptr_;
/// release flag based on parent's flag
CORBA::Boolean release_;
@@ -444,10 +467,10 @@ private:
*
* @see TAO_Object_Manager
*/
-template<class T, class T_var>
+template<typename T, typename T_var, typename T_life>
class TAO_Valuetype_Manager
{
- friend class TAO_Unbounded_Valuetype_Sequence<T,T_var>;
+ friend class TAO_Unbounded_Valuetype_Sequence<T,T_var,T_life>;
public:
// @@ Use partial template specialization here to give access only
// to the right kind of sequence.
@@ -461,7 +484,7 @@ public:
* release value on the <rhs>.
* + In any case a new reference to the same object is created.
*/
- TAO_Valuetype_Manager (const TAO_Valuetype_Manager<T,T_var> &rhs);
+ TAO_Valuetype_Manager (const TAO_Valuetype_Manager<T,T_var,T_life> & rhs);
/**
* Constructor from address of an element, it should be private and
@@ -480,43 +503,45 @@ public:
* @@ TODO what happens if rhs.release_ is true an this->relase_ is
* false?
*/
- TAO_Valuetype_Manager<T,T_var> &operator= (const TAO_Valuetype_Manager<T,T_var> &rhs);
+ TAO_Valuetype_Manager<T,T_var,T_life> &operator= (
+ const TAO_Valuetype_Manager<T,T_var,T_life> & rhs
+ );
/// Assignment from T *.
- TAO_Valuetype_Manager<T,T_var> &operator= (T *);
+ TAO_Valuetype_Manager<T,T_var,T_life> &operator= (T *);
/// Assignment from T_var.
- TAO_Valuetype_Manager<T,T_var> &operator= (const T_var &);
+ TAO_Valuetype_Manager<T,T_var,T_life> &operator= (const T_var &);
/// Return pointer.
T * operator-> (void) const;
/// Cast (read-only).
- operator const T *() const;
+ operator const T * () const;
/// Cast.
- operator T *&();
+ operator T *& ();
/// Cast (read-only) so that assignment from a structured
/// type to a T_var will make a copy.
operator const T_var() const;
/// for in parameter.
- T *in (void) const;
+ T * in (void) const;
/// for inout parameter.
- T *&inout (void);
+ T *& inout (void);
/// for out parameter.
- T *&out (void);
+ T * &out (void);
/// for return type
- T *_retn (void);
+ T * _retn (void);
private:
/// data member, notice that it is a pointer, to implement the
/// reference behavior for assignment.
- T **ptr_;
+ T ** ptr_;
/// release flag based on parent's flag
CORBA::Boolean release_;
@@ -534,7 +559,7 @@ private:
*
* @see TAO_Object_Manager
*/
-template<class T, class T_var>
+template<typename T, typename T_var, typename T_life>
class TAO_Abstract_Manager
{
// friend class TAO_Unbounded_Abstract_Sequence<T,T_var>;
@@ -546,7 +571,7 @@ public:
* release value on the <rhs>.
* + In any case a new reference to the same object is created.
*/
- TAO_Abstract_Manager (const TAO_Abstract_Manager<T,T_var> &rhs);
+ TAO_Abstract_Manager (const TAO_Abstract_Manager<T,T_var,T_life> & rhs);
/**
* Constructor from address of an element, it should be private and
@@ -565,29 +590,31 @@ public:
* @@ TODO what happens if rhs.release_ is true an this->relase_ is
* false?
*/
- TAO_Abstract_Manager<T,T_var> &operator= (const TAO_Abstract_Manager<T,T_var> &rhs);
+ TAO_Abstract_Manager<T,T_var,T_life> & operator= (
+ const TAO_Abstract_Manager<T,T_var,T_life> & rhs
+ );
/// Assignment from T *.
- TAO_Abstract_Manager<T,T_var> &operator= (T *);
+ TAO_Abstract_Manager<T,T_var,T_life> & operator= (T *);
/// Assignment from T_var.
- TAO_Abstract_Manager<T,T_var> &operator= (const T_var &);
+ TAO_Abstract_Manager<T,T_var,T_life> & operator= (const T_var &);
/// Return pointer.
- T *operator-> (void) const;
+ T * operator-> (void) const;
/// Cast (read-only).
- operator const T *() const;
+ operator const T * () const;
/// Cast.
- operator T *&();
+ operator T *& ();
/// Cast (read-only) so that assignment from a structured
/// type to a T_var will make a copy.
operator const T_var () const;
/// for in parameter.
- T *in (void) const;
+ T * in (void) const;
/// for inout parameter.
T *& inout (void);
@@ -596,12 +623,12 @@ public:
T *& out (void);
/// for return type
- T *_retn (void);
+ T * _retn (void);
private:
/// data member, notice that it is a pointer, to implement the
/// reference behavior for assignment.
- T **ptr_;
+ T ** ptr_;
/// release flag based on parent's flag
CORBA::Boolean release_;
@@ -618,7 +645,10 @@ private:
* class, in charge of handling the object lifetime, examples are
* pseudo objects, object references, valuetypes, and strings.
*/
-template<class T,class T_var>
+template<typename T,
+ typename T_var,
+ typename T_life,
+ typename T_cast>
class TAO_Unbounded_Object_Sequence : public TAO_Unbounded_Base_Sequence
{
@@ -669,8 +699,8 @@ public:
*/
TAO_Unbounded_Object_Sequence (CORBA::ULong maximum,
CORBA::ULong length,
- T* *data,
- CORBA::Boolean release=0);
+ T ** data,
+ CORBA::Boolean release = 0);
/**
* The copy constructor performs a deep copy from the existing
@@ -683,7 +713,9 @@ public:
* elements (items zero through length-1), and sets the release
* flag to TRUE.
*/
- TAO_Unbounded_Object_Sequence(const TAO_Unbounded_Object_Sequence<T,T_var> &);
+ TAO_Unbounded_Object_Sequence (
+ const TAO_Unbounded_Object_Sequence<T,T_var,T_life,T_cast> &
+ );
/// The destructor releases all object reference memebrs and frees
/// all string members.
@@ -707,10 +739,14 @@ public:
* the reallocation is performed. After reallocation, the release
* flag is always set to TRUE.
*/
- TAO_Unbounded_Object_Sequence<T,T_var> &operator= (const TAO_Unbounded_Object_Sequence <T,T_var> &);
+ TAO_Unbounded_Object_Sequence<T,T_var,T_life,T_cast> &operator= (
+ const TAO_Unbounded_Object_Sequence <T,T_var,T_life,T_cast> &
+ );
/// read-write accessor
- TAO_Object_Manager<T,T_var> operator[] (CORBA::ULong slot) const;
+ TAO_Object_Manager<T,T_var,T_life> operator[] (
+ CORBA::ULong slot
+ ) const;
/**
* The allocbuf function allocates a vector of T elements that can
@@ -723,7 +759,7 @@ public:
* reason cannot allocate the requested vector. Vectors allocated by
* allocbuf should be freed using the freebuf function.
*/
- static T **allocbuf (CORBA::ULong);
+ static T ** allocbuf (CORBA::ULong);
/**
* The freebuf function ensures that the destructor for each element
@@ -741,10 +777,10 @@ public:
virtual void _deallocate_buffer (void);
virtual void _shrink_buffer (CORBA::ULong new_length,
CORBA::ULong old_length);
- virtual void _downcast (void* target,
- CORBA::Object* src
+ virtual void _downcast (void * target,
+ CORBA::Object_ptr src
ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- virtual CORBA::Object* _upcast (void* src) const;
+ virtual CORBA::Object_ptr _upcast (void * src) const;
};
// *************************************************************
@@ -756,7 +792,11 @@ public:
*
* Please see the documentation for the unbounded case.
*/
-template<class T, class T_var, size_t MAX>
+template<typename T,
+ typename T_var,
+ typename T_life,
+ typename T_cast,
+ size_t MAX>
class TAO_Bounded_Object_Sequence : public TAO_Bounded_Base_Sequence
{
public:
@@ -773,27 +813,33 @@ public:
/// Constructor from data.
TAO_Bounded_Object_Sequence (CORBA::ULong length,
- T* *value,
- CORBA::Boolean release=0);
+ T ** value,
+ CORBA::Boolean release = 0);
/// Copy constructor.
- TAO_Bounded_Object_Sequence (const TAO_Bounded_Object_Sequence<T,T_var,MAX> &);
+ TAO_Bounded_Object_Sequence (
+ const TAO_Bounded_Object_Sequence<T,T_var,T_life,T_cast,MAX> &
+ );
/// destructor
~TAO_Bounded_Object_Sequence (void);
/// Assignment from another Bounded sequence.
- TAO_Bounded_Object_Sequence &operator= (const TAO_Bounded_Object_Sequence<T,T_var,MAX> &);
+ TAO_Bounded_Object_Sequence &operator= (
+ const TAO_Bounded_Object_Sequence<T,T_var,T_life,T_cast,MAX> &
+ );
/// Read-write accessor.
- TAO_Object_Manager<T,T_var> operator[] (CORBA::ULong slot) const;
+ TAO_Object_Manager<T,T_var,T_life> operator[] (
+ CORBA::ULong slot
+ ) const;
/// Allocate storage for a sequence..
- static T **allocbuf (CORBA::ULong length);
+ static T ** allocbuf (CORBA::ULong length);
/// Free a buffer allocated by allocbuf() and release each element on
/// it.
- static void freebuf (T **buffer);
+ static void freebuf (T ** buffer);
// The Base_Sequence functions, please see "tao/sequence.h"
/// No default to workaround egcs problem with templates and
@@ -802,10 +848,10 @@ public:
virtual void _deallocate_buffer (void);
virtual void _shrink_buffer (CORBA::ULong new_length,
CORBA::ULong old_length);
- virtual void _downcast (void* target,
- CORBA::Object* src
+ virtual void _downcast (void * target,
+ CORBA::Object_ptr src
ACE_ENV_ARG_DECL_WITH_DEFAULTS);
- virtual CORBA::Object* _upcast (void* src) const;
+ virtual CORBA::Object_ptr _upcast (void * src) const;
};
// *************************************************************
@@ -823,7 +869,7 @@ public:
* TAO internal details. The complete documentation of each method
* is provided in TAO_Unbounded_Object_Sequece
*/
-template<class T,class T_var>
+template<typename T, typename T_var>
class TAO_Unbounded_Pseudo_Sequence : public TAO_Unbounded_Base_Sequence
{
public:
@@ -838,11 +884,13 @@ public:
/// Constructor with a given buffer.
TAO_Unbounded_Pseudo_Sequence (CORBA::ULong maximum,
CORBA::ULong length,
- T* *data,
- CORBA::Boolean release=0);
+ T ** data,
+ CORBA::Boolean release = 0);
/// Copy ctor, deep copies.
- TAO_Unbounded_Pseudo_Sequence(const TAO_Unbounded_Pseudo_Sequence<T,T_var> &);
+ TAO_Unbounded_Pseudo_Sequence (
+ const TAO_Unbounded_Pseudo_Sequence<T,T_var> &
+ );
/// dtor releases all the contained elements.
~TAO_Unbounded_Pseudo_Sequence (void);
@@ -852,14 +900,16 @@ public:
* members and frees all string members, and then performs a
* deepcopy to create a new structure.
*/
- TAO_Unbounded_Pseudo_Sequence<T,T_var> &operator= (const TAO_Unbounded_Pseudo_Sequence <T,T_var> &);
+ TAO_Unbounded_Pseudo_Sequence<T,T_var> & operator= (
+ const TAO_Unbounded_Pseudo_Sequence <T,T_var> &
+ );
/// read-write accessor
TAO_Pseudo_Object_Manager<T,T_var> operator[] (CORBA::ULong slot) const;
/// The allocbuf function allocates a vector of T elements that can
/// be passed to the T *data constructor.
- static T **allocbuf (CORBA::ULong);
+ static T ** allocbuf (CORBA::ULong);
/// Release all the elements.
static void freebuf (T **);
@@ -880,7 +930,7 @@ public:
*
* Please see the documentation for the unbounded case.
*/
-template<class T, class T_var, size_t MAX>
+template<typename T, typename T_var, size_t MAX>
class TAO_Bounded_Pseudo_Sequence : public TAO_Bounded_Base_Sequence
{
public:
@@ -891,27 +941,31 @@ public:
/// Constructor from data.
TAO_Bounded_Pseudo_Sequence (CORBA::ULong length,
- T* *value,
- CORBA::Boolean release=0);
+ T ** value,
+ CORBA::Boolean release = 0);
/// Copy constructor.
- TAO_Bounded_Pseudo_Sequence (const TAO_Bounded_Pseudo_Sequence<T,T_var,MAX> &);
+ TAO_Bounded_Pseudo_Sequence (
+ const TAO_Bounded_Pseudo_Sequence<T,T_var,MAX> &
+ );
/// destructor
~TAO_Bounded_Pseudo_Sequence (void);
/// Assignment from another Bounded sequence.
- TAO_Bounded_Pseudo_Sequence &operator= (const TAO_Bounded_Pseudo_Sequence<T,T_var,MAX> &);
+ TAO_Bounded_Pseudo_Sequence & operator= (
+ const TAO_Bounded_Pseudo_Sequence<T,T_var,MAX> &
+ );
/// Read-write accessor.
TAO_Pseudo_Object_Manager<T,T_var> operator[] (CORBA::ULong slot) const;
/// Allocate storage for a sequence..
- static T **allocbuf (CORBA::ULong length);
+ static T ** allocbuf (CORBA::ULong length);
/// Free a buffer allocated by allocbuf() and release each element on
/// it.
- static void freebuf (T **buffer);
+ static void freebuf (T ** buffer);
// The Base_Sequence functions, please see "tao/sequence.h"
virtual void _allocate_buffer (CORBA::ULong length);
@@ -929,7 +983,7 @@ public:
*
* @see TAO_Unbounded_Object_Sequence
*/
-template<class T,class T_var>
+template<typename T, typename T_var, typename T_life>
class TAO_Unbounded_Valuetype_Sequence : public TAO_Unbounded_Base_Sequence
{
public:
@@ -944,12 +998,12 @@ public:
/// Constructor with a given buffer.
TAO_Unbounded_Valuetype_Sequence (CORBA::ULong maximum,
CORBA::ULong length,
- T* *data,
- CORBA::Boolean release=0);
+ T ** data,
+ CORBA::Boolean release = 0);
/// Copy ctor, deep copies.
TAO_Unbounded_Valuetype_Sequence (
- const TAO_Unbounded_Valuetype_Sequence<T,T_var> &
+ const TAO_Unbounded_Valuetype_Sequence<T,T_var,T_life> &
);
/// The destructor releases all object reference memebrs and frees
@@ -961,16 +1015,16 @@ public:
* members and frees all string members, and then performs a
* deepcopy to create a new structure.
*/
- TAO_Unbounded_Valuetype_Sequence<T,T_var> &operator= (
- const TAO_Unbounded_Valuetype_Sequence <T,T_var> &
+ TAO_Unbounded_Valuetype_Sequence<T,T_var,T_life> & operator= (
+ const TAO_Unbounded_Valuetype_Sequence <T,T_var,T_life> &
);
/// read-write accessor
- TAO_Valuetype_Manager<T,T_var> operator[] (CORBA::ULong slot) const;
+ TAO_Valuetype_Manager<T,T_var,T_life> operator[] (CORBA::ULong slot) const;
/// The allocbuf function allocates a vector of T elements that can
/// be passed to the T *data constructor.
- static T **allocbuf (CORBA::ULong);
+ static T ** allocbuf (CORBA::ULong);
/// Release all the elements.
static void freebuf (T **);
@@ -993,7 +1047,7 @@ public:
*
* Please see the documentation for the unbounded case.
*/
-template<class T, class T_var, size_t MAX>
+template<typename T, typename T_var, typename T_life, size_t MAX>
class TAO_Bounded_Valuetype_Sequence : public TAO_Bounded_Base_Sequence
{
public:
@@ -1004,12 +1058,12 @@ public:
/// Constructor from data.
TAO_Bounded_Valuetype_Sequence (CORBA::ULong length,
- T* *value,
- CORBA::Boolean release=0);
+ T ** value,
+ CORBA::Boolean release = 0);
/// Copy constructor.
TAO_Bounded_Valuetype_Sequence (
- const TAO_Bounded_Valuetype_Sequence<T,T_var,MAX> &
+ const TAO_Bounded_Valuetype_Sequence<T,T_var,T_life,MAX> &
);
/// destructor
@@ -1017,18 +1071,18 @@ public:
/// Assignment from another Bounded sequence.
TAO_Bounded_Valuetype_Sequence &operator= (
- const TAO_Bounded_Valuetype_Sequence<T,T_var,MAX> &
+ const TAO_Bounded_Valuetype_Sequence<T,T_var,T_life,MAX> &
);
/// Read-write accessor.
- TAO_Valuetype_Manager<T,T_var> operator[] (CORBA::ULong slot) const;
+ TAO_Valuetype_Manager<T,T_var,T_life> operator[] (CORBA::ULong slot) const;
/// Allocate storage for a sequence..
- static T **allocbuf (CORBA::ULong length);
+ static T ** allocbuf (CORBA::ULong length);
/// Free a buffer allocated by allocbuf() and release each element on
/// it.
- static void freebuf (T **buffer);
+ static void freebuf (T ** buffer);
// The Base_Sequence functions, please see "tao/sequence.h"
/// No default to workaround egcs problem with templates and
@@ -1048,7 +1102,7 @@ public:
*
* @see TAO_Unbounded_Object_Sequence
*/
-template<class T,class T_var>
+template<typename T, typename T_var, typename T_life>
class TAO_Unbounded_Abstract_Sequence : public TAO_Unbounded_Base_Sequence
{
public:
@@ -1063,12 +1117,12 @@ public:
/// Constructor with a given buffer.
TAO_Unbounded_Abstract_Sequence (CORBA::ULong maximum,
CORBA::ULong length,
- T* *data,
- CORBA::Boolean release=0);
+ T ** data,
+ CORBA::Boolean release = 0);
/// Copy ctor, deep copies.
TAO_Unbounded_Abstract_Sequence (
- const TAO_Unbounded_Abstract_Sequence<T,T_var> &
+ const TAO_Unbounded_Abstract_Sequence<T,T_var,T_life> &
);
/// The destructor releases all object reference memebrs and frees
@@ -1080,16 +1134,16 @@ public:
* members and frees all string members, and then performs a
* deepcopy to create a new structure.
*/
- TAO_Unbounded_Abstract_Sequence<T,T_var> &operator= (
- const TAO_Unbounded_Abstract_Sequence <T,T_var> &
+ TAO_Unbounded_Abstract_Sequence<T,T_var,T_life> &operator= (
+ const TAO_Unbounded_Abstract_Sequence <T,T_var,T_life> &
);
/// read-write accessor
- TAO_Abstract_Manager<T,T_var> operator[] (CORBA::ULong slot) const;
+ TAO_Abstract_Manager<T,T_var,T_life> operator[] (CORBA::ULong slot) const;
/// The allocbuf function allocates a vector of T elements that can
/// be passed to the T *data constructor.
- static T **allocbuf (CORBA::ULong);
+ static T ** allocbuf (CORBA::ULong);
/// Release all the elements.
static void freebuf (T **);
@@ -1112,7 +1166,7 @@ public:
*
* Please see the documentation for the unbounded case.
*/
-template<class T, class T_var, size_t MAX>
+template<typename T, typename T_var, typename T_life, size_t MAX>
class TAO_Bounded_Abstract_Sequence : public TAO_Bounded_Base_Sequence
{
public:
@@ -1123,12 +1177,12 @@ public:
/// Constructor from data.
TAO_Bounded_Abstract_Sequence (CORBA::ULong length,
- T* *value,
- CORBA::Boolean release=0);
+ T ** value,
+ CORBA::Boolean release = 0);
/// Copy constructor.
TAO_Bounded_Abstract_Sequence (
- const TAO_Bounded_Abstract_Sequence<T,T_var,MAX> &
+ const TAO_Bounded_Abstract_Sequence<T,T_var,T_life,MAX> &
);
/// destructor
@@ -1136,18 +1190,18 @@ public:
/// Assignment from another Bounded sequence.
TAO_Bounded_Abstract_Sequence &operator= (
- const TAO_Bounded_Abstract_Sequence<T,T_var,MAX> &
+ const TAO_Bounded_Abstract_Sequence<T,T_var,T_life,MAX> &
);
/// Read-write accessor.
- TAO_Abstract_Manager<T,T_var> operator[] (CORBA::ULong slot) const;
+ TAO_Abstract_Manager<T,T_var,T_life> operator[] (CORBA::ULong slot) const;
/// Allocate storage for a sequence..
- static T **allocbuf (CORBA::ULong length);
+ static T ** allocbuf (CORBA::ULong length);
/// Free a buffer allocated by allocbuf() and release each element on
/// it.
- static void freebuf (T **buffer);
+ static void freebuf (T ** buffer);
// The Base_Sequence functions, please see "tao/sequence.h"
/// No default to workaround egcs problem with templates and
@@ -1187,11 +1241,11 @@ public:
/// Constructor with a given buffer.
TAO_Unbounded_Array_Sequence (CORBA::ULong maximum,
CORBA::ULong length,
- T *data,
- CORBA::Boolean release=0);
+ T * data,
+ CORBA::Boolean release = 0);
/// Copy ctor, deep copies.
- TAO_Unbounded_Array_Sequence(const TAO_Unbounded_Array_Sequence<T, T_var> &);
+ TAO_Unbounded_Array_Sequence(const TAO_Unbounded_Array_Sequence<T,T_var> &);
/// dtor releases all the contained elements.
~TAO_Unbounded_Array_Sequence (void);
@@ -1201,24 +1255,26 @@ public:
* members and frees all string members, and then performs a
* deepcopy to create a new structure.
*/
- TAO_Unbounded_Array_Sequence<T, T_var> &operator= (
- const TAO_Unbounded_Array_Sequence <T, T_var> &
+ TAO_Unbounded_Array_Sequence<T,T_var> & operator= (
+ const TAO_Unbounded_Array_Sequence <T,T_var> &
);
// = Accessors.
/// operator []
- T &operator[] (CORBA::ULong);
+ T & operator[] (CORBA::ULong);
/// operator []
- const T &operator[] (CORBA::ULong) const;
+ const T & operator[] (CORBA::ULong) const;
/// The allocbuf function allocates a vector of T elements that can
/// be passed to the T *data constructor.
- static T *allocbuf (CORBA::ULong);
+ static T * allocbuf (CORBA::ULong);
/// Release all the elements.
static void freebuf (T *);
+ static void _tao_any_destructor (void *);
+
/// allocate a buffer of the requested length. The buffer is allocated for the
/// right type
virtual void _allocate_buffer (CORBA::ULong length);
@@ -1249,7 +1305,7 @@ public:
* references), and then freeing the returned buffer itself using
* <freebuf>.
*/
- T *get_buffer (CORBA::Boolean orphan = 0);
+ T * get_buffer (CORBA::Boolean orphan = 0);
/**
* This function allows read-only access to the sequence buffer.
@@ -1257,7 +1313,7 @@ public:
* yet been allocated. No direct modification of the returned
* buffer by the caller is permitted.
*/
- const T *get_buffer (void) const;
+ const T * get_buffer (void) const;
/**
* Allows the buffer underlying a sequence to be replaced. The
@@ -1266,7 +1322,7 @@ public:
*/
void replace (CORBA::ULong max,
CORBA::ULong length,
- T *data,
+ T * data,
CORBA::Boolean release = 0);
};
@@ -1310,11 +1366,13 @@ public:
const T &operator[] (CORBA::ULong) const;
/// Allocate storage for a sequence..
- static T *allocbuf (CORBA::ULong length);
+ static T * allocbuf (CORBA::ULong length);
/// Free a buffer allocated by allocbuf() and release each element on
/// it.
- static void freebuf (T *buffer);
+ static void freebuf (T * buffer);
+
+ static void _tao_any_destructor (void *);
/// allocate a buffer of the requested length. The buffer is allocated for the
/// right type
@@ -1346,7 +1404,7 @@ public:
* references), and then freeing the returned buffer itself using
* <freebuf>.
*/
- T *get_buffer (CORBA::Boolean orphan = 0);
+ T * get_buffer (CORBA::Boolean orphan = 0);
/**
* This function allows read-only access to the sequence buffer.
@@ -1354,7 +1412,7 @@ public:
* yet been allocated. No direct modification of the returned
* buffer by the caller is permitted.
*/
- const T *get_buffer (void) const;
+ const T * get_buffer (void) const;
/**
* Allows the buffer underlying a sequence to be replaced. The
@@ -1408,7 +1466,7 @@ public:
* it to freebuf when finished with it.
*/
TAO_Bounded_String_Sequence (CORBA::ULong length,
- char* *value,
+ char ** value,
CORBA::Boolean release = 0);
/**
@@ -1427,7 +1485,9 @@ public:
* is destroyed via its destructor and then the source sequence
* copied using the copy constructor.
*/
- TAO_Bounded_String_Sequence &operator= (const TAO_Bounded_String_Sequence<MAX> &);
+ TAO_Bounded_String_Sequence & operator= (
+ const TAO_Bounded_String_Sequence<MAX> &
+ );
/**
* {SPEC}
@@ -1451,7 +1511,7 @@ public:
* reason cannot allocate the requested vector. Vectors allocated by
* allocbuf should be freed using the freebuf function.
*/
- static char **allocbuf (CORBA::ULong length);
+ static char ** allocbuf (CORBA::ULong length);
/**
* {SPEC}
@@ -1461,7 +1521,9 @@ public:
* reference elements, which are freed using release(). The freebuf
* function will ignore null pointers passed to it.
*/
- static void freebuf (char **buffer);
+ static void freebuf (char ** buffer);
+
+ static void _tao_any_destructor (void *);
// Functions to create, destroy, and adjust the underlying buffer.
virtual void _allocate_buffer (CORBA::ULong length);
@@ -1471,7 +1533,7 @@ public:
// Parameters work the same as in constructor of the same signature.
void replace (CORBA::ULong length,
- char* *value,
+ char ** value,
CORBA::Boolean release = 0);
};
@@ -1516,7 +1578,7 @@ public:
* it to freebuf when finished with it.
*/
TAO_Bounded_WString_Sequence (CORBA::ULong length,
- CORBA::WChar* *value,
+ CORBA::WChar ** value,
CORBA::Boolean release = 0);
/**
@@ -1535,7 +1597,9 @@ public:
* is destroyed via its destructor and then the source sequence
* copied using the copy constructor.
*/
- TAO_Bounded_WString_Sequence &operator= (const TAO_Bounded_WString_Sequence<MAX> &);
+ TAO_Bounded_WString_Sequence &operator= (
+ const TAO_Bounded_WString_Sequence<MAX> &
+ );
/**
* {SPEC}
@@ -1559,7 +1623,7 @@ public:
* reason cannot allocate the requested vector. Vectors allocated by
* allocbuf should be freed using the freebuf function.
*/
- static CORBA::WChar **allocbuf (CORBA::ULong length);
+ static CORBA::WChar ** allocbuf (CORBA::ULong length);
/**
* {SPEC}
@@ -1569,7 +1633,9 @@ public:
* reference elements, which are freed using release(). The freebuf
* function will ignore null pointers passed to it.
*/
- static void freebuf (CORBA::WChar **buffer);
+ static void freebuf (CORBA::WChar ** buffer);
+
+ static void _tao_any_destructor (void *);
// Functions to create, destroy, and adjust the underlying buffer.
virtual void _allocate_buffer (CORBA::ULong length);
@@ -1579,7 +1645,7 @@ public:
// Parameters work the same as in constructor of the same signature.
void replace (CORBA::ULong length,
- CORBA::WChar* *value,
+ CORBA::WChar ** value,
CORBA::Boolean release = 0);
};