Dillo v3.1.1-14-g8f67d6e0
Loading...
Searching...
No Matches
lout::container::typed::Vector< T > Class Template Reference

Typed version of container::untyped::Vector. More...

#include <container.hh>

Public Member Functions

 Vector (int initSize, bool ownerOfObjects)
 
void put (T *newElement, int newPos=-1)
 
void insert (T *newElement, int pos)
 
int insertSorted (T *newElement, object::Comparator *comparator=&object::standardComparator)
 
void remove (int pos)
 
T * get (int pos) const
 
void clear ()
 
void sort (object::Comparator *comparator=&object::standardComparator)
 
int bsearch (T *key, bool mustExist, int start, int end, object::Comparator *comparator=&object::standardComparator)
 
int bsearch (T *key, bool mustExist, object::Comparator *comparator=&object::standardComparator)
 
- Public Member Functions inherited from lout::container::typed::Collection< T >
 Collection ()
 
 ~Collection ()
 
bool equals (Object *other)
 Returns, whether two objects are equal.
 
int hashValue ()
 Return a hash value for the object.
 
void intoStringBuffer (misc::StringBuffer *sb)
 Store a textual representation of the object in a misc::StringBuffer.
 
Iterator< T > iterator ()
 
int size ()
 
- Public Member Functions inherited from lout::object::Object
virtual ~Object ()
 The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly.
 
virtual Objectclone ()
 Return an exact copy of the object.
 
const char * toString ()
 Use object::Object::intoStringBuffer to return a textual representation of the object.
 
virtual size_t sizeOf ()
 Return the number of bytes, this object totally uses.
 

Additional Inherited Members

- Protected Attributes inherited from lout::container::typed::Collection< T >
untyped::Collectionbase
 

Detailed Description

template<class T>
class lout::container::typed::Vector< T >

Typed version of container::untyped::Vector.

Definition at line 446 of file container.hh.

Constructor & Destructor Documentation

◆ Vector()

template<class T >
lout::container::typed::Vector< T >::Vector ( int  initSize,
bool  ownerOfObjects 
)
inline

Definition at line 449 of file container.hh.

References lout::container::typed::Collection< T >::base.

Member Function Documentation

◆ bsearch() [1/2]

template<class T >
int lout::container::typed::Vector< T >::bsearch ( T *  key,
bool  mustExist,
int  start,
int  end,
object::Comparator comparator = &object::standardComparator 
)
inline

Definition at line 468 of file container.hh.

References lout::container::typed::Collection< T >::base.

Referenced by testVector2(), and testVector3().

◆ bsearch() [2/2]

template<class T >
int lout::container::typed::Vector< T >::bsearch ( T *  key,
bool  mustExist,
object::Comparator comparator = &object::standardComparator 
)
inline

Definition at line 473 of file container.hh.

References lout::container::typed::Collection< T >::base.

◆ clear()

template<class T >
void lout::container::typed::Vector< T >::clear ( )
inline

◆ get()

◆ insert()

template<class T >
void lout::container::typed::Vector< T >::insert ( T *  newElement,
int  pos 
)
inline

Definition at line 454 of file container.hh.

References lout::container::typed::Collection< T >::base.

◆ insertSorted()

template<class T >
int lout::container::typed::Vector< T >::insertSorted ( T *  newElement,
object::Comparator comparator = &object::standardComparator 
)
inline

Definition at line 456 of file container.hh.

References lout::container::typed::Collection< T >::base.

Referenced by testVector2().

◆ put()

◆ remove()

template<class T >
void lout::container::typed::Vector< T >::remove ( int  pos)
inline

Definition at line 461 of file container.hh.

References lout::container::typed::Collection< T >::base.

◆ sort()

template<class T >
void lout::container::typed::Vector< T >::sort ( object::Comparator comparator = &object::standardComparator)
inline

Definition at line 465 of file container.hh.

References lout::container::typed::Collection< T >::base.

Referenced by testVector1().


The documentation for this class was generated from the following file: