Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

d_Collection< T > Class Template Reference

#include <d_Collection.h>

Inheritance diagram for d_Collection< T >:

d_Object d_List< T > d_Set< T > d_Varray< T > List of all members.

Public Methods

 d_Collection (oUInt2 iBlockSize=dBlockSize)
virtual ~d_Collection ()
virtual void d_deactivate ()
void insert_element (const T &iElem)
d_Iterator< T > create_iterator () const
d_Iterator< T > begin () const
d_Iterator< T > end () const
void remove_all ()
d_ULong cardinality () const
virtual d_Boolean allows_duplicates () const=0
virtual d_Boolean is_ordered () const=0
d_Boolean is_empty () const

Public Attributes

oUInt2 blockSize
d_Ref< oCollBlock< T > > head
d_Ref< oCollBlock< T > > tail

Protected Attributes

oUInt2 blocks
oUInt4 total
oDynaObject * dynaObject

Detailed Description

template<class T>
class d_Collection< T >

This is the base-abstract class for all collection classes.

Thus you can't use this class directly, but use real container classes.

SEE ALSO: d_Bag, d_Dictionary, d_Iterator, d_List, d_Set, d_Varray

ODMG: Compliant


Constructor & Destructor Documentation

template<class T>
d_Collection< T >::d_Collection oUInt2    iBlockSize = dBlockSize
 

Default constructor.

is the optional preallocated size (default is 64 elements).

ODMG : Compliant

template<class T>
virtual d_Collection< T >::~d_Collection   [virtual]
 

Destructor.

ODMG : Compliant


Member Function Documentation

template<class T>
virtual d_Boolean d_Collection< T >::allows_duplicates   const [pure virtual]
 

Implemented in d_Dictionary< K, V >, d_List< T >, d_Set< T >, d_Varray< T >, and d_Dictionary< d_String, d_String >.

template<class T>
d_Iterator<T> d_Collection< T >::begin   const
 

Returns an iterator that points to the first element.

Permits to handle the container by STL classes.

SEE ALSO: create_iterator() ODMG : Compliant

template<class T>
d_ULong d_Collection< T >::cardinality   const [inline]
 

Returns the number of elements in the collection.

ODMG : Compliant

template<class T>
d_Iterator<T> d_Collection< T >::create_iterator   const
 

Returns an iterator that points to the first element.

SEE ALSO: begin() ODMG : Compliant

template<class T>
virtual void d_Collection< T >::d_deactivate   [virtual]
 

Object deactivation trigger.

It's the trigger called asynchronously by Orient ODBMS when the object is freed in memory. It can be defined as a special "cache destructor".

It's useful when an object had to free some memory (transient members) before to die.

If the user class, inherited by d_Object, doesn't define a own d_deactivate virtual method, by default is called the d_Object::d_deactivate() that doesn't execute any operation.

SEE ALSO: d_activate() ODMG : Compliant

Reimplemented from d_Object.

template<class T>
d_Iterator<T> d_Collection< T >::end   const
 

Returns an iterator that points to the last element.

Permits to handle the container by STL classes.

SEE ALSO: begin() ODMG : Compliant

template<class T>
void d_Collection< T >::insert_element const T &    iElem
 

Insert an element.

ODMG : Compliant

template<class T>
d_Boolean d_Collection< T >::is_empty   const
 

Returns true if the collection doesn't contain elements, otherwise true.

ODMG : Compliant

template<class T>
virtual d_Boolean d_Collection< T >::is_ordered   const [pure virtual]
 

Implemented in d_Dictionary< K, V >, d_List< T >, d_Set< T >, d_Varray< T >, and d_Dictionary< d_String, d_String >.

template<class T>
void d_Collection< T >::remove_all  
 

Remove all the elements in the collection.

ODMG : Compliant


Member Data Documentation

template<class T>
oUInt2 d_Collection< T >::blocks [protected]
 

template<class T>
oUInt2 d_Collection< T >::blockSize
 

template<class T>
oDynaObject* d_Collection< T >::dynaObject [protected]
 

template<class T>
d_Ref<oCollBlock<T> > d_Collection< T >::head
 

template<class T>
d_Ref<oCollBlock<T> > d_Collection< T >::tail
 

template<class T>
oUInt4 d_Collection< T >::total [protected]
 


The documentation for this class was generated from the following file:
Generated on Fri Nov 29 17:12:14 2002 for Orient ODBMS Just Edition v. 2.0e by doxygen1.3-rc1