| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DybArchiveList Class Reference

#include <DybArchiveList.h>

Inheritance diagram for DybArchiveList:

[legend]
Collaboration diagram for DybArchiveList:
[legend]
List of all members.

Public Types

typedef TemporalDataObject contained_type
typedef std::list< DataObject
* >::value_type 
value_type
typedef std::list< DataObject
* >::reference 
reference
typedef std::list< DataObject
* >::const_reference 
const_reference
typedef std::list< DataObject
* >::size_type 
size_type
typedef std::list< DataObject
* >::iterator 
iterator
typedef std::list< DataObject
* >::const_iterator 
const_iterator
typedef std::list< DataObject
* >::reverse_iterator 
reverse_iterator
typedef std::list< DataObject
* >::const_reverse_iterator 
const_reverse_iterator
typedef std::vector< TemporalDataObject
* >::pointer 
pointer
typedef std::vector< TemporalDataObject
* >::const_pointer 
const_pointer

Public Member Functions

 DybArchiveList ()
 Constructors.
 DybArchiveList (const DybArchiveList &value)
 Copy Constructor.
virtual ~DybArchiveList ()
 Destructor.
virtual const CLIDclID () const
 Retrieve pointer to class defininition structure.
DybArchiveList::iterator begin ()
 Return an iterator pointing to the beginning of the container.
DybArchiveList::const_iterator begin () const
 Return a const_iterator pointing to the beginning of the container.
DybArchiveList::iterator end ()
 Return an iterator pointing to the end of the container.
DybArchiveList::const_iterator end () const
 Return a const_iterator pointing to the end of the container.
DybArchiveList::reverse_iterator rbegin ()
 Return a reverse_iterator pointing to the beginning of the reversed container.
DybArchiveList::const_reverse_iterator rbegin () const
 Return a const_reverse_iterator pointing to the beginning of the reversed container.
DybArchiveList::reverse_iterator rend ()
 Return a reverse_iterator pointing to the end of the reversed container.
DybArchiveList::const_reverse_iterator rend () const
 Return a const_reverse_iterator pointing to the end of the reversed container.
DybArchiveList::size_type size () const
 Return the size of the container Size means the number of objects stored in the container, independently on the amount of information stored in each object.
virtual long numberOfObjects () const
 The same as size(), return number of objects in the container.
DybArchiveList::size_type max_size () const
 Return the largest possible size of the container.
bool empty () const
 Return true if the size of the container is 0.
DybArchiveList::reference front ()
 Return reference to the first element.
DybArchiveList::const_reference front () const
 Return const_reference to the first element.
DybArchiveList::reference back ()
 Return reference to the last element.
DybArchiveList::const_reference back () const
 Return const_reference to the last element.
void push_back (DybArchiveList::const_reference value)
 push_back = append = insert a new element at the end of the container
void push_front (DybArchiveList::const_reference value)
 push_back = insert a new element at the beginning of the container
void pop_back ()
 pop_back = remove the last element from the container The removed object will be deleted (see the method release)
DybArchiveList::iterator insert (DybArchiveList::iterator position, DybArchiveList::const_reference value)
 Insert "value" before "position".
DybArchiveList::iterator erase (DybArchiveList::iterator position)
 Erase the object at "position" from the container.
DybArchiveList::iterator erase (DybArchiveList::iterator first, DybArchiveList::iterator last)
 Erase the range [first, last) from the container.
void clear ()
 Clear the entire content of the container and delete all contained objects.
virtual long index (const DataObject *obj) const
 Return distance of a given object from the beginning of its container It correcponds to the "index" ( from 0 to size()-1 ) If "obj" not found, return -1.
virtual long index (const TemporalDataObject *obj) const
 Return distance of a given object from the beginning of its container It correcponds to the "index" ( from 0 to size()-1 ) If "obj" not found, return -1.
virtual DataObjectdataObject (long dist) const
 Return const pointer to an object of a given distance.
virtual TemporalDataObjecttemporalDataObject (long dist) const
 Return const pointer to an object of a given distance.
virtual std::ostream & fillStream (std::ostream &s) const
 Fill the output stream (ASCII).
void setRegistry (IRegistry *pRegistry)
IRegistryregistry () const
LinkManagerlinkMgr () const
unsigned char version () const
void setVersion (unsigned char vsn)
unsigned long refCount () const
virtual unsigned long addRef ()
virtual unsigned long release ()
const std::string & name () const
virtual StreamBufferserialize (StreamBuffer &s)
virtual StreamBufferserialize (StreamBuffer &s) const

Static Public Member Functions

static const CLIDclassID ()

Private Attributes

std::list< DataObject * > m_list
 The STL list.

Friends

friend std::ostream & operator<< (std::ostream &s, const DataObject &obj)

Detailed Description

Definition at line 18 of file DybArchiveList.h.


Member Typedef Documentation

typedef TemporalDataObject DybArchiveList::contained_type

Definition at line 21 of file DybArchiveList.h.

typedef std::list<DataObject*>::value_type DybArchiveList::value_type

Definition at line 22 of file DybArchiveList.h.

typedef std::list<DataObject*>::reference DybArchiveList::reference

Definition at line 24 of file DybArchiveList.h.

typedef std::list<DataObject*>::const_reference DybArchiveList::const_reference

Definition at line 25 of file DybArchiveList.h.

typedef std::list<DataObject*>::size_type DybArchiveList::size_type

Definition at line 27 of file DybArchiveList.h.

typedef std::list<DataObject*>::iterator DybArchiveList::iterator

Definition at line 29 of file DybArchiveList.h.

typedef std::list<DataObject*>::const_iterator DybArchiveList::const_iterator

Definition at line 30 of file DybArchiveList.h.

typedef std::list<DataObject*>::reverse_iterator DybArchiveList::reverse_iterator

Definition at line 32 of file DybArchiveList.h.

typedef std::list<DataObject*>::const_reverse_iterator DybArchiveList::const_reverse_iterator

Definition at line 33 of file DybArchiveList.h.

typedef std::vector<TemporalDataObject*>::pointer DybArchiveList::pointer

Definition at line 39 of file DybArchiveList.h.

typedef std::vector<TemporalDataObject*>::const_pointer DybArchiveList::const_pointer

Definition at line 40 of file DybArchiveList.h.


Constructor & Destructor Documentation

DybArchiveList::DybArchiveList (  ) 

Constructors.

Definition at line 9 of file DybArchiveList.cpp.

00010   : m_list(0) {
00011 }

DybArchiveList::DybArchiveList ( const DybArchiveList value  ) 

Copy Constructor.

Definition at line 14 of file DybArchiveList.cpp.

00015   : DataObject(*this),
00016     m_list(value.m_list) {
00017 }

DybArchiveList::~DybArchiveList (  )  [virtual]

Destructor.

Definition at line 20 of file DybArchiveList.cpp.

00020                                 {
00021   clear();
00022 }


Member Function Documentation

const CLID & DybArchiveList::clID (  )  const [virtual]

Retrieve pointer to class defininition structure.

Reimplemented from DataObject.

Definition at line 25 of file DybArchiveList.cpp.

00025                                        { 
00026   return DybArchiveList::classID(); 
00027 }

const CLID & DybArchiveList::classID (  )  [static]

Reimplemented from DataObject.

Definition at line 29 of file DybArchiveList.cpp.

00029                                     {
00030   // TODO - Fix this.
00031   static CLID clid = TemporalDataObject::classID() + CLID_ObjectList; 
00032   return clid;
00033 }

DybArchiveList::iterator DybArchiveList::begin (  ) 

Return an iterator pointing to the beginning of the container.

Definition at line 46 of file DybArchiveList.cpp.

00046                                               {
00047   return m_list.begin();    
00048 }

DybArchiveList::const_iterator DybArchiveList::begin (  )  const

Return a const_iterator pointing to the beginning of the container.

Definition at line 51 of file DybArchiveList.cpp.

00051                                                           {
00052   return m_list.begin();
00053 }

DybArchiveList::iterator DybArchiveList::end (  ) 

Return an iterator pointing to the end of the container.

Definition at line 56 of file DybArchiveList.cpp.

00056                                             {
00057   return m_list.end();
00058 }

DybArchiveList::const_iterator DybArchiveList::end (  )  const

Return a const_iterator pointing to the end of the container.

Definition at line 61 of file DybArchiveList.cpp.

00061                                                         {
00062   return m_list.end();
00063 }

DybArchiveList::reverse_iterator DybArchiveList::rbegin (  ) 

Return a reverse_iterator pointing to the beginning of the reversed container.

Definition at line 67 of file DybArchiveList.cpp.

00067                                                        {
00068   return m_list.rbegin();
00069 }

DybArchiveList::const_reverse_iterator DybArchiveList::rbegin (  )  const

Return a const_reverse_iterator pointing to the beginning of the reversed container.

Definition at line 72 of file DybArchiveList.cpp.

00072                                                                    {
00073   return m_list.rbegin();
00074 }

DybArchiveList::reverse_iterator DybArchiveList::rend (  ) 

Return a reverse_iterator pointing to the end of the reversed container.

Definition at line 77 of file DybArchiveList.cpp.

00077                                                      {
00078   return m_list.rend();
00079 }

DybArchiveList::const_reverse_iterator DybArchiveList::rend (  )  const

Return a const_reverse_iterator pointing to the end of the reversed container.

Definition at line 82 of file DybArchiveList.cpp.

00082                                                                  {
00083   return m_list.rend();
00084 }

DybArchiveList::size_type DybArchiveList::size (  )  const

Return the size of the container Size means the number of objects stored in the container, independently on the amount of information stored in each object.

Definition at line 89 of file DybArchiveList.cpp.

00089                                                     {
00090   return m_list.size();
00091 }

long DybArchiveList::numberOfObjects (  )  const [virtual]

The same as size(), return number of objects in the container.

Definition at line 94 of file DybArchiveList.cpp.

00094                                            {
00095   return m_list.size();
00096 }

DybArchiveList::size_type DybArchiveList::max_size (  )  const

Return the largest possible size of the container.

Definition at line 99 of file DybArchiveList.cpp.

00099                                                         {
00100   return m_list.max_size();
00101 }

bool DybArchiveList::empty (  )  const

Return true if the size of the container is 0.

Definition at line 104 of file DybArchiveList.cpp.

00104                                   {
00105   return m_list.empty();
00106 }

DybArchiveList::reference DybArchiveList::front (  ) 

Return reference to the first element.

Definition at line 109 of file DybArchiveList.cpp.

00109                                                {
00110   return m_list.front();
00111 }

DybArchiveList::const_reference DybArchiveList::front (  )  const

Return const_reference to the first element.

Definition at line 114 of file DybArchiveList.cpp.

00114                                                            {
00115   return m_list.front();
00116 }

DybArchiveList::reference DybArchiveList::back (  ) 

Return reference to the last element.

Definition at line 119 of file DybArchiveList.cpp.

00119                                               {
00120   return m_list.back();
00121 }

DybArchiveList::const_reference DybArchiveList::back (  )  const

Return const_reference to the last element.

Definition at line 124 of file DybArchiveList.cpp.

00124                                                           {
00125   return m_list.back();
00126 }

void DybArchiveList::push_back ( DybArchiveList::const_reference  value  ) 

push_back = append = insert a new element at the end of the container

Definition at line 129 of file DybArchiveList.cpp.

00129                                                                     {
00130   value->addRef();
00131   m_list.push_back(value);
00132 }

void DybArchiveList::push_front ( DybArchiveList::const_reference  value  ) 

push_back = insert a new element at the beginning of the container

Definition at line 135 of file DybArchiveList.cpp.

00135                                                                      {
00136   value->addRef();
00137   m_list.push_front(value);
00138 }

void DybArchiveList::pop_back (  ) 

pop_back = remove the last element from the container The removed object will be deleted (see the method release)

Definition at line 142 of file DybArchiveList.cpp.

00142                                {
00143   DybArchiveList::value_type position = m_list.back();
00144   position->release();
00145   m_list.pop_back();
00146 }

DybArchiveList::iterator DybArchiveList::insert ( DybArchiveList::iterator  position,
DybArchiveList::const_reference  value 
)

Insert "value" before "position".

Definition at line 149 of file DybArchiveList.cpp.

00150                                                                                        {
00151   value->addRef();
00152   DybArchiveList::iterator i = m_list.insert(position, value);
00153   return i;
00154 }

DybArchiveList::iterator DybArchiveList::erase ( DybArchiveList::iterator  position  ) 

Erase the object at "position" from the container.

The removed object will be deleted.

Definition at line 158 of file DybArchiveList.cpp.

00158                                                                               {
00159   (*position)->release();
00160   // Removing from the container itself
00161   return m_list.erase(position);
00162 }

DybArchiveList::iterator DybArchiveList::erase ( DybArchiveList::iterator  first,
DybArchiveList::iterator  last 
)

Erase the range [first, last) from the container.

The removed object will be deleted

Definition at line 166 of file DybArchiveList.cpp.

00167                                                                               {
00168   for( DybArchiveList::iterator iter = first; iter != last; iter++ )  {
00169     (*iter)->release();
00170   }
00171   // Removing from the container itself
00172   return m_list.erase(first, last);
00173 }

void DybArchiveList::clear (  ) 

Clear the entire content of the container and delete all contained objects.

Definition at line 176 of file DybArchiveList.cpp.

00176                               {
00177   erase(begin(), end());
00178 }

long DybArchiveList::index ( const DataObject obj  )  const [virtual]

Return distance of a given object from the beginning of its container It correcponds to the "index" ( from 0 to size()-1 ) If "obj" not found, return -1.

Definition at line 183 of file DybArchiveList.cpp.

00183                                                         {
00184   long i = 0;
00185   DybArchiveList::const_iterator   iter;
00186   for( iter = begin(); iter != end(); iter++ )  {
00187     if( obj == (*iter) ) {
00188       return i;
00189     }
00190     i++;
00191   }
00192   return -1;
00193 }

long DybArchiveList::index ( const TemporalDataObject obj  )  const [virtual]

Return distance of a given object from the beginning of its container It correcponds to the "index" ( from 0 to size()-1 ) If "obj" not found, return -1.

Definition at line 198 of file DybArchiveList.cpp.

00198                                                                 {
00199   long i = 0;
00200   DybArchiveList::const_iterator   iter;
00201   for( iter = begin(); iter != end(); iter++ )  {
00202     if( obj == dynamic_cast<TemporalDataObject*>(*iter) ) {
00203       return i;
00204     }
00205     i++;
00206   }
00207   return -1;
00208 }

DataObject * DybArchiveList::dataObject ( long  dist  )  const [virtual]

Return const pointer to an object of a given distance.

Definition at line 211 of file DybArchiveList.cpp.

00211                                                         {
00212   long i = 0;
00213   DybArchiveList::const_iterator   iter;
00214   for( iter = begin(); iter != end(); iter++ )  {
00215     if( dist == i ) {
00216       return *iter;
00217     }
00218     i++;
00219   }
00220   return 0;
00221 }

TemporalDataObject * DybArchiveList::temporalDataObject ( long  dist  )  const [virtual]

Return const pointer to an object of a given distance.

Definition at line 224 of file DybArchiveList.cpp.

00224                                                                         {
00225   long i = 0;
00226   DybArchiveList::const_iterator   iter;
00227   for( iter = begin(); iter != end(); iter++ )  {
00228     if( dist == i ) {
00229       return dynamic_cast<TemporalDataObject*>(*iter);
00230     }
00231     i++;
00232   }
00233   return 0;
00234 }

std::ostream & DybArchiveList::fillStream ( std::ostream &  s  )  const [virtual]

Fill the output stream (ASCII).

Reimplemented from DataObject.

Definition at line 237 of file DybArchiveList.cpp.

00237                                                             {
00238   s << "class DybArchiveList :    size = "
00239     << std::setw(12)
00240     << size() << "\n";
00241   // Output the base class
00242   //ObjectContainerBase::fillStream(s);
00243   if ( 0 != size() ) {
00244     s << "\nContents of the STL list :";
00245     long   count = 0;
00246     DybArchiveList::const_iterator iter;
00247     for( iter = m_list.begin(); iter != m_list.end(); iter++, count++ ) {
00248       s << "\nIndex "
00249         << std::setw(12)
00250         << count
00251         << " of object of type "<< **iter;
00252     }
00253   }
00254   return s;
00255 }


Member Data Documentation

std::list<DataObject*> DybArchiveList::m_list [private]

The STL list.

Definition at line 163 of file DybArchiveList.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:38:35 2011 for DataUtilities by doxygen 1.4.7