template<class TYPE> class DPArray: public DArray<GPBase>

Dynamic array for GPBased classes.

Inheritance:


Inherited from DArray:


Inherited from ArrayBaseT:

Public Methods

oTYPE& operator[](int n)
oconst TYPE& operator[](int n) const
o operator TYPE* ()
o operator const TYPE* () const
ovoid ins(int n, const TYPE &val, unsigned int howmany=1)
ovoid sort()
ovoid sort(int lo, int hi)


Inherited from ArrayBase:

Public Methods

oint size() const
oint lbound() const
oint hbound() const
ovoid empty()
ovoid touch(int n)
ovoid resize(int hibound)
ovoid resize(int lobound, int hibound)
ovoid shift(int disp)
ovoid del(int n, unsigned int howmany=1)


Documentation

Dynamic array for GPBased classes.

There are many situations when it's necessary to create arrays of GP pointers. For example, DArray<GP<Dialog> > or DArray<GP<Button> >. This would result in compilation of two instances of DArray because from the viewpoint of the compiler there are two different classes used as array elements: GP<Dialog> and GP<Button>. In reality though, all GP pointers have absolutely the same binary structure because they are derived from GPBase class and do not add any variables or virtual functions. That's why it's possible to instantiate DArray only once for GPBase elements and then just cast types.

To implement this idea we have created this DPArray<TYPE> class, which can be used instead of DArray<GP<TYPE> >. It behaves absolutely the same way as DArray but has one big advantage: overhead of using DPArray with one more type is negligible.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java


DjVu is a trademark of LizardTech, Inc.
All other products mentioned are registered trademarks or trademarks of their respective companies.