#include <vtkAbstractArray.h>
Inheritance diagram for vtkAbstractArray:
vtkAbstractArray is an abstract superclass for data array objects. This class defines an API that all subclasses must support. The data type must be assignable and copy-constructible, but no other assumptions about its type are made. Most of the subclasses of this array deal with numeric data either as scalars or tuples of scalars. A program can use the IsNumeric() method to check whether an instance of vtkAbstractArray contains numbers. It is also possible to test for this by attempting to SafeDownCast an array to an instance of vtkDataArray, although this assumes that all numeric arrays will always be descended from vtkDataArray.
Every array has a character-string name. The naming of the array occurs automatically when it is instantiated, but you are free to change this name using the SetName() method. (The array name is used for data manipulation.)
Definition at line 54 of file vtkAbstractArray.h.
virtual int | GetDataType ()=0 |
virtual int | GetDataTypeSize ()=0 |
static unsigned long | GetDataTypeSize (int type) |
Public Types | |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual int | Allocate (vtkIdType sz, vtkIdType ext=1000)=0 |
virtual void | Initialize ()=0 |
virtual void | GetValues (vtkIdList *indices, vtkAbstractArray *output)=0 |
virtual void | GetValues (vtkIdType p1, vtkIdType p2, vtkAbstractArray *output)=0 |
virtual int | GetNumberOfElementComponents ()=0 |
virtual int | GetElementComponentSize ()=0 |
virtual void * | GetVoidPointer (vtkIdType id)=0 |
virtual void | Squeeze ()=0 |
virtual bool | IsNumeric ()=0 |
virtual void | ConvertToContiguous (vtkDataArray **Data, vtkIdTypeArray **Offsets)=0 |
virtual void | ConvertFromContiguous (vtkDataArray *Data, vtkIdTypeArray *Offsets)=0 |
virtual void | DeepCopy (vtkAbstractArray *da)=0 |
virtual void | CopyValue (int toIndex, int fromIndex, vtkAbstractArray *sourceArray)=0 |
virtual int | Resize (vtkIdType numTuples)=0 |
void | Reset () |
vtkIdType | GetSize () |
vtkIdType | GetMaxId () |
virtual void | SetVoidArray (void *vtkNotUsed(array), vtkIdType vtkNotUsed(size), int vtkNotUsed(save)) |
virtual unsigned long | GetActualMemorySize ()=0 |
void | SetName (const char *name) |
const char * | GetName () |
virtual const char * | GetDataTypeAsString (void) |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkAbstractArray * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkAbstractArray (vtkIdType numComp=1) | |
~vtkAbstractArray () | |
Protected Attributes | |
vtkIdType | Size |
vtkIdType | MaxId |
char * | Name |
int | DataType |
|
Reimplemented from vtkObject. Reimplemented in vtkStringArray. Definition at line 57 of file vtkAbstractArray.h. |
|
|
|
|
|
Reimplemented from vtkObject. Reimplemented in vtkStringArray. |
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkStringArray. |
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject. Reimplemented in vtkStringArray. |
|
Reimplemented from vtkObject. Reimplemented in vtkStringArray. |
|
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkObject. Reimplemented in vtkStringArray. |
|
Allocate memory for this array. Delete old storage only if necessary. Note that ext is no longer used. Implemented in vtkStringArray. |
|
Release storage and reset array to initial state. Implemented in vtkStringArray. |
|
Return the underlying data type. An integer indicating data type is returned as specified in vtkSetGet.h. Implemented in vtkStringArray. |
|
Return the size of the underlying data type. For a bit, 0 is returned. XXX FIXME How will this method behave for variably-sized objects? Implemented in vtkStringArray. |
|
Return the underlying data type. An integer indicating data type is returned as specified in vtkSetGet.h. |
|
Given a list of indices, return an array of values. The caller must ensure that enough room has been allocated within the output array to hold the data and that the data types match well enough to allow any necessary conversions. Implemented in vtkStringArray. |
|
Get the values for the range of indices specified (i.e., p1->p2 inclusive). You must insure that the output array has been previously allocated with enough space to hold the data and that the type of the output array is compatible with the type of this array. Implemented in vtkStringArray. |
|
Return the number of components in a single element of the array. For vtkDataArray and its subclasses, this is the number of components in a tuple. Arrays with variable-length elements (such as vtkStringArray and vtkCellArray) should return 0. Implemented in vtkStringArray. |
|
Return the size, in bytes, of the lowest-level element of an array. For vtkDataArray and subclasses this is the size of the data type. For vtkStringArray, this is sizeof(vtkStdString::value_type), which winds up being sizeof(char). Implemented in vtkStringArray. |
|
Return a void pointer. For image pipeline interface and other special pointer manipulation. Implemented in vtkStringArray. |
|
Deep copy of data. Implementation left to subclasses, which should support as many type conversions as possible given the data type. Implemented in vtkStringArray. |
|
Copy an element from one array into an element on this array. Implemented in vtkStringArray. |
|
Free any unnecessary memory. Description: Resize object to just fit data requirement. Reclaims extra memory. Implemented in vtkStringArray. |
|
Resize the array while conserving the data. Implemented in vtkStringArray. |
|
Reset to an empty state, without freeing any memory. Definition at line 126 of file vtkAbstractArray.h. |
|
Return the size of the data. Definition at line 132 of file vtkAbstractArray.h. |
|
What is the maximum id currently in the array. Definition at line 138 of file vtkAbstractArray.h. |
|
This method lets the user specify data to be held by the array. The array argument is a pointer to the data. size is the size of the array supplied by the user. Set save to 1 to keep the class from deleting the array when it cleans up or reallocates memory. The class uses the actual array provided; it does not copy the data from the supplied array. Definition at line 149 of file vtkAbstractArray.h. |
|
Return the memory in kilobytes consumed by this data array. Used to support streaming and reading/writing data. The value returned is guaranteed to be greater than or equal to the memory required to actually represent the data represented by this object. The information returned is valid only after the pipeline has been updated. Implemented in vtkStringArray. |
|
Set/get array's name |
|
Return the memory in kilobytes consumed by this data array. Used to support streaming and reading/writing data. The value returned is guaranteed to be greater than or equal to the memory required to actually represent the data represented by this object. The information returned is valid only after the pipeline has been updated. |
|
Get the name of a data type as a string. XXX FIXME Find this macro and move it into vtkTypeNames.h or something. Definition at line 171 of file vtkAbstractArray.h. |
|
This method is here to make backward compatibility easier. It must return true if and only if an array contains numeric data. Implemented in vtkStringArray. |
|
Flatten an arbitrary array into two separate numeric arrays. The first contains all the data in the source array; the second, the index of the end of each element. This function is meant to assist reading and writing arrays with variable-length elements such as vtkStringArray and vtkCellArray. The arrays will be created within the method body: the caller is responsible for deleting them when no longer needed. For example, a string array with the elements "This" "Is" "A" "Test" would be converted into the following two arrays: Data: (unsigned char array) ThisIsATest Offsets: 3 5 6 10 vtkDataArray also implements this method, although in practice you shouldn't need it. It ignores the offsets array and takes its tuple-size information from the data array. Implemented in vtkStringArray. |
|
This is the inverse of ConvertToContiguous(), above. Implemented in vtkStringArray. |
|
Definition at line 214 of file vtkAbstractArray.h. |
|
Definition at line 215 of file vtkAbstractArray.h. |
|
Definition at line 217 of file vtkAbstractArray.h. |
|
Definition at line 219 of file vtkAbstractArray.h. |