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

d_Varray< T > Class Template Reference

#include <d_Varray.h>

Inheritance diagram for d_Varray< T >:

d_Collection< T > d_Object List of all members.

Public Methods

 d_Varray ()
operator[] (const oUInt4 iIndex)
virtual d_Boolean allows_duplicates () const
virtual d_Boolean is_ordered () const
d_Boolean find_element (const T &iValue, d_ULong &ioPosition)
retrieve_element_at (const d_ULong iIndex)
void remove_element_at (const d_ULong iPosition)
void replace_element_at (const T &iValue, const d_ULong iPosition)
 d_Varray (d_Object::DynaFactoryConstructor *iObj)

Detailed Description

template<class T>
class d_Varray< T >

It's a container class (see Containers), it's ordered by index and allows duplicates.

This class is like the vector of the C++ Library, but is persistent.

LOCATION: d_Varray.h

USAGE: d_Varray< <type-name> > <property-name>;

Where:

<type-name>: Type to contain. Can be a literal or a user type <PROPERTY-NAME>: NAME OF PROPERTY

EXAMPLES: class Invoice : public d_Object { * Relationship 1-n to product objects d_Varray< d_Ref<Product> > products; };

d_Ref<Invoice> myInvoice; * Ref to Invoice object

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

ODMG: Compliant


Constructor & Destructor Documentation

template<class T>
d_Varray< T >::d_Varray  
 

Default constructor.

ODMG : Compliant

template<class T>
d_Varray< T >::d_Varray d_Object::DynaFactoryConstructor   iObj [inline]
 


Member Function Documentation

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

Returns always true.

ODMG : Compliant

Implements d_Collection< T >.

template<class T>
d_Boolean d_Varray< T >::find_element const T &    iValue,
d_ULong &    ioPosition
 

Search the value in the container.

Search the value in the array. If the element is found its position is returned in and the method returns true; otherwise it returns false.

ODMG : Compliant

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

Returns always true.

ODMG : Compliant

Implements d_Collection< T >.

template<class T>
T d_Varray< T >::operator[] const oUInt4    iIndex
 

Returns the value at any position.

Returns the value at position . If is out of the range, an exception d_Error_PositionOutOfRange is raised.

This method permits to handle a d_Varray object as a common C++ array.

SEE ALSO: retrieve_element_at() ODMG : Compliant

template<class T>
void d_Varray< T >::remove_element_at const d_ULong    iPosition
 

Remove an element.

Remove the element at position . If is out of the range, an exception d_Error_PositionOutOfRange is raised.

SEE ALSO: remove_all(), d_Iterator::remove_element () ODMG : Compliant

template<class T>
void d_Varray< T >::replace_element_at const T &    iValue,
const d_ULong    iPosition
 

Replace an element.

Replace the element at position with . If is out of the range, an exception d_Error_PositionOutOfRange is raised.

SEE ALSO: d_Iterator::replace_element () ODMG : Compliant

template<class T>
T d_Varray< T >::retrieve_element_at const d_ULong    iIndex
 

Returns the value at any position.

Returns the value at position . If is out of the range, an exception d_Error_PositionOutOfRange is raised.

SEE ALSO: operator[]() ODMG : Compliant


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