#include <vtkStringArray.h>
Inheritance diagram for vtkStringArray:
Points and cells may sometimes have associated data that are stored as strings, e.g. many information visualization projects. This class provides a reasonably clean way to store and access those.
If you'd like to look into modifying the wrappers to handle this properly, go right ahead...
Definition at line 54 of file vtkStringArray.h.
|
Reimplemented from vtkAbstractArray. Definition at line 58 of file vtkStringArray.h. |
|
|
|
|
|
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkObject. |
|
Reimplemented from vtkAbstractArray. |
|
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 vtkAbstractArray. |
|
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 vtkAbstractArray. |
|
Reimplemented from vtkAbstractArray. |
|
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 vtkAbstractArray. |
|
Get the data type. Implements vtkAbstractArray. Definition at line 69 of file vtkStringArray.h. References VTK_STRING. |
|
This method is here to make backward compatibility easier. It must return true if and only if an array contains numeric data. Implements vtkAbstractArray. Definition at line 73 of file vtkStringArray.h. |
|
Release storage and reset array to initial state. Implements vtkAbstractArray. |
|
Return the size of the data type. WARNING: This may not mean what you expect with strings. It will return sizeof(vtkstd::string) and not take into account the data included in any particular string. Implements vtkAbstractArray. |
|
Free any unnecessary memory. Resize object to just fit data requirement. Reclaims extra memory. Implements vtkAbstractArray. Definition at line 85 of file vtkStringArray.h. |
|
Resize the array while conserving the data. Implements vtkAbstractArray. |
|
Given a list of indices, return an array of values. You must insure that the output array has been previously allocated with enough space to hold the data and that the types match sufficiently to allow conversion (if necessary). Implements vtkAbstractArray. |
|
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. Implements vtkAbstractArray. |
|
Copy a value from a given source array into this array. Implements vtkAbstractArray. |
|
Allocate memory for this array. Delete old storage only if necessary. Note that ext is no longer used. Implements vtkAbstractArray. |
|
Get the data at a particular index. |
|
Set the data at a particular index. Does not do range checking. Make sure you use the method SetNumberOfValues() before inserting data. BTX Definition at line 116 of file vtkStringArray.h. |
|
|
|
Specify the number of values for this object to hold. Does an allocation as well as setting the MaxId ivar. Used in conjunction with SetValue() method for fast insertion. |
|
Definition at line 127 of file vtkStringArray.h. |
|
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. Implements vtkAbstractArray. Definition at line 129 of file vtkStringArray.h. |
|
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). Implements vtkAbstractArray. Definition at line 130 of file vtkStringArray.h. |
|
Insert data at a specified position in the array. BTX |
|
|
|
Insert data at the end of the array. Return its location in the array. BTX |
|
|
|
Get the address of a particular data index. Make sure data is allocated for the number of items requested. Set MaxId according to the number of data values requested. |
|
Get the address of a particular data index. Performs no checks to verify that the memory has been allocated etc. Definition at line 154 of file vtkStringArray.h. |
|
Get the address of a particular data index. Make sure data is allocated for the number of items requested. Set MaxId according to the number of data values requested. Implements vtkAbstractArray. Definition at line 155 of file vtkStringArray.h. |
|
Deep copy of another string array. Will complain and change nothing if the array passed in is not a vtkStringArray. Implements vtkAbstractArray. |
|
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 suppled array. |
|
Deep copy of another string array. Will complain and change nothing if the array passed in is not a vtkStringArray. Definition at line 173 of file vtkStringArray.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. This function takes into account the size of the contents of the strings as well as the string containers themselves. Implements vtkAbstractArray. |
|
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. Implements vtkAbstractArray. |
|
This is the inverse of ConvertToContiguous(), above. Implements vtkAbstractArray. |
|
|
|
Definition at line 194 of file vtkStringArray.h. |
|
Definition at line 197 of file vtkStringArray.h. |