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

FX::FXArray< EType > Class Template Reference

Array of some generic type. More...

#include <FXArray.h>

Inheritance diagram for FX::FXArray< EType >:
FX::FXArrayBase

Public Member Functions

 FXArray ()
 Allocate initially empty array.
 
 FXArray (FXival n)
 Allocate array of n elements.
 
 FXArray (const FXArray< EType > &src)
 Allocate array copied from another.
 
 FXArray (const EType &src, FXival n)
 Allocate initialized with n copies of object.
 
 FXArray (const EType *src, FXival n)
 Allocate initialized with array of n objects.
 
FXival no () const
 Return number of items.
 
FXbool no (FXival n)
 Change number of elements in array to n.
 
FXArray< EType > & operator= (const FXArray< EType > &src)
 Assign from another array.
 
EType * data ()
 Return pointer to array.
 
const EType * data () const
 
EType & operator[] (FXival i)
 Index into array.
 
const EType & operator[] (FXival i) const
 
EType & at (FXival i)
 Index into array.
 
const EType & at (FXival i) const
 
EType & head ()
 First element in array.
 
const EType & head () const
 
EType & tail ()
 Last element in array.
 
const EType & tail () const
 
FXArray< EType > & adopt (FXArray< EType > &src)
 Adopt array from another one; the other array becomes empty.
 
FXbool assign (const EType &src)
 Assign object p to array.
 
FXbool assign (const EType &src, FXival n)
 Assign n copies of object to array.
 
FXbool assign (const EType *src, FXival n)
 Assign n objects to list.
 
FXbool assign (const FXArray< EType > &src)
 Assign n objects to list.
 
FXbool insert (FXival pos, const EType &src)
 Insert an object.
 
FXbool insert (FXival pos, const EType &src, FXival n)
 Insert n copies of object at specified position.
 
FXbool insert (FXival pos, const EType *src, FXival n)
 Insert n objects at specified position.
 
FXbool insert (FXival pos, const FXArray< EType > &src)
 Insert n objects at specified position.
 
FXbool prepend (const EType &src)
 Prepend object.
 
FXbool prepend (const EType &src, FXival n)
 Prepend n copies of object.
 
FXbool prepend (const EType *src, FXival n)
 Prepend n objects.
 
FXbool prepend (const FXArray< EType > &src)
 Prepend n objects.
 
FXbool append (const EType &src)
 Append object.
 
FXbool append (const EType &src, FXival n)
 Append n copies of object.
 
FXbool append (const EType *src, FXival n)
 Append n objects.
 
FXbool append (const FXArray< EType > &src)
 Append n objects.
 
FXbool replace (FXival pos, const EType &src)
 Replace an object by other object.
 
FXbool replace (FXival pos, FXival m, const EType &src, FXival n)
 Replace the m objects at pos with n copies of other object.
 
FXbool replace (FXival pos, FXival m, const EType *src, FXival n)
 Replace m objects at pos by n other objects.
 
FXbool replace (FXival pos, FXival m, const FXArray< EType > &src)
 Replace m objects at pos by other objects.
 
FXbool erase (FXival pos)
 Remove object at pos.
 
FXbool erase (FXival pos, FXival n)
 Remove n objects starting at pos.
 
FXbool push (const EType &src)
 Push object to end.
 
FXbool pop ()
 Pop object from end.
 
FXbool clear ()
 Remove all objects.
 
 ~FXArray ()
 Delete data.
 

Additional Inherited Members

- Protected Member Functions inherited from FX::FXArrayBase
FXbool resize (FXival num, FXival sz)
 
- Protected Attributes inherited from FX::FXArrayBase
FXptr ptr
 

Detailed Description

template<typename EType>
class FX::FXArray< EType >

Array of some generic type.


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

Copyright © 1997-2022 Jeroen van der Zijp