#include <Array.h>
Inheritance diagram for OSCAR::Array< Type >:

Public Methods | |
| Array (unsigned int sz, const Type *array=0) | |
| Array (const Array< Type > &rhs) | |
| virtual | ~Array (void) |
| Array< Type > & | operator= (const Array< Type > &rhs) |
| bool | Copy (const Array< Type > &arrayToCopy) |
| unsigned int | GetSize () const |
| bool | Grow (unsigned int growth) |
| bool | Output (std::ostream &out) const |
| bool | Input (std::istream &in) |
| Type & | at (unsigned int index) |
| const Type & | at (unsigned int index) const |
| Type & | operator[] (unsigned int index) |
| const Type & | operator[] (unsigned int index) const |
| const Type * | GetArray () const |
| Type * | GetArray () |
Protected Methods | |
| void | init (unsigned int size, const Type *array=0) |
| Array () | |
Protected Attributes | |
| unsigned int | size |
| Type * | element |
|
||||||||||||||||
|
Constructor. Constructs an Array of size sz and to initialize all its elements by values in array Explicit keyword prevents implicit conversion from a scalar to an Array object |
|
||||||||||
|
Copy Constructor. This is the Copy constructor for an object of type Array. Use this to construct an Array object from an existing Array object.
|
|
||||||||||
|
Virtual Destructor for Array. This is the Destructor for an Array object. |
|
|||||||||
|
Constructor. Default Constructor. This does nothing. Its only used for stack allocation in derived classes. Sets internal memory pointer to 0. This prevents the destructor from deallocating |
|
||||||||||
|
Get an individual element in an Array object. This method is used read an individual element in a const RRAarray object. No range checking is performed in this method. Ths method can be used on both sides of the = operator
|
|
||||||||||
|
Get an individual element in an Array object. This method is used to read/write individual element in a non-const RRAarray object. No range checking is performed in this method. Ths method can be used on both sides of the = operator
|
|
||||||||||
|
Copy an Array. This method is used to copy an Array. It will return false if the arrays are of different sizes or if an error is thrown while copying the individual elements. It will not resize like the operator equals.
|
|
|||||||||
|
Get a pointer to the Array of elements. Returns a pointer to the first element in the array elements.
|
|
|||||||||
|
Get a pointer to the Array of const elements. This constant function is used to get a pointer to the Array of elements.
|
|
|||||||||
|
Get the size. This method is used to get the size(number of elements) in an Array object.
|
|
||||||||||
|
Allocate more space. This method is used to increase the size(number of elements) in an Array object.
|
|
||||||||||||||||
|
Allocate memory and initialize the Array object. This method is used to allocate memory for an Array object and initialize it with an existing Array. This method is called by the constructors. |
|
||||||||||
|
Input the Array object from an input stream. This method is used to input an Array object from an input stream.
|
|
||||||||||
|
Assignment operator. This is the Assignment operator for an object of type Array. This operator will resize the calling object if the array being copied is not of the same size.
|
|
||||||||||
|
Overloaded operator[]. This overloaded operator[] is used to read individual elements in const Array objects. Range checking is performed in this method and it will abort if index is out of range. Ths method can be used on both sides of the = operator. This method will abort if index is out of range.
|
|
||||||||||
|
Overloaded operator[]. This overloaded operator[] is used to read/write individual elements in non-const Array objects. Range checking is performed in this method and it will abort if index is out of range. Ths method can be used on both sides of the = operator. This method will abort if index is out of range.
|
|
||||||||||
|
Output the Array object to an output stream. This method is used to output an Array object to an output stream.
|
|
|||||
|
|
|
|||||
|
|
| RRG Homepage | OSCAR Overview | OSCAR Tutorials | Simulations |