VTK
9.4.20241220
|
a vtkAbstractArray subclass for strings More...
#include <vtkStringArray.h>
Public Types | |
enum | DeleteMethod { VTK_DATA_ARRAY_FREE = vtkAbstractArray::VTK_DATA_ARRAY_FREE , VTK_DATA_ARRAY_DELETE = vtkAbstractArray::VTK_DATA_ARRAY_DELETE , VTK_DATA_ARRAY_ALIGNED_FREE = vtkAbstractArray::VTK_DATA_ARRAY_ALIGNED_FREE , VTK_DATA_ARRAY_USER_DEFINED = vtkAbstractArray::VTK_DATA_ARRAY_USER_DEFINED } |
typedef vtkAbstractArray | Superclass |
Public Types inherited from vtkAbstractArray | |
enum | DeleteMethod { VTK_DATA_ARRAY_FREE , VTK_DATA_ARRAY_DELETE , VTK_DATA_ARRAY_ALIGNED_FREE , VTK_DATA_ARRAY_USER_DEFINED } |
enum | { MAX_DISCRETE_VALUES = 32 } |
enum | { AbstractArray = 0 , DataArray , AoSDataArrayTemplate , SoADataArrayTemplate , TypedDataArray , MappedDataArray , ScaleSoADataArrayTemplate , ImplicitArray , DataArrayTemplate = AoSDataArrayTemplate } |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual vtkTypeBool | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
vtkStringArray * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
int | GetDataType () const override |
Get the data type. | |
int | IsNumeric () const override |
This method is here to make backward compatibility easier. | |
void | Initialize () override |
Release storage and reset array to initial state. | |
int | GetDataTypeSize () const override |
Return the size of the data type. | |
void | Squeeze () override |
Free any unnecessary memory. | |
vtkTypeBool | Resize (vtkIdType numTuples) override |
Resize the array while conserving the data. | |
void | SetTuple (vtkIdType i, vtkIdType j, vtkAbstractArray *source) override |
Set the tuple at the ith location using the jth tuple in the source array. | |
void | InsertTuple (vtkIdType i, vtkIdType j, vtkAbstractArray *source) override |
Insert the jth tuple in the source array, at ith location in this array. | |
void | InsertTuples (vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source) override |
Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in this array. | |
void | InsertTuplesStartingAt (vtkIdType dstStart, vtkIdList *srcIds, vtkAbstractArray *source) override |
Copy the tuples indexed in srcIds from the source array to the tuple locations starting at index dstStart. | |
void | InsertTuples (vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source) override |
Copy n consecutive tuples starting at srcStart from the source array to this array, starting at the dstStart location. | |
vtkIdType | InsertNextTuple (vtkIdType j, vtkAbstractArray *source) override |
Insert the jth tuple in the source array, at the end in this array. | |
void | InterpolateTuple (vtkIdType i, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights) override |
Set the ith tuple in this array as the interpolated tuple value, given the ptIndices in the source array and associated interpolation weights. | |
void | InterpolateTuple (vtkIdType i, vtkIdType id1, vtkAbstractArray *source1, vtkIdType id2, vtkAbstractArray *source2, double t) override |
Insert the ith tuple in this array as interpolated from the two values, p1 and p2, and an interpolation factor, t. | |
void | GetTuples (vtkIdList *ptIds, vtkAbstractArray *output) override |
Given a list of indices, return an array of values. | |
void | GetTuples (vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) override |
Get the values for the range of indices specified (i.e., p1->p2 inclusive). | |
vtkTypeBool | Allocate (vtkIdType sz, vtkIdType ext=1000) override |
Allocate memory for this array. | |
const vtkStdString & | GetValue (vtkIdType id) const |
Read-access of string at a particular index. | |
vtkStdString & | GetValue (vtkIdType id) |
Get the string at a particular index. | |
void | SetValue (vtkIdType id, vtkStdString value) |
Set the data at a particular index. | |
void | SetValue (vtkIdType id, const char *value) |
void | SetNumberOfTuples (vtkIdType number) override |
Set the number of tuples (a component group) in the array. | |
vtkIdType | GetNumberOfValues () const |
Return the number of values in the array. | |
int | GetNumberOfElementComponents () |
int | GetElementComponentSize () const override |
Return the size, in bytes, of the lowest-level element of an array. | |
void | InsertValue (vtkIdType id, vtkStdString f) |
Insert data at a specified position in the array. | |
void | InsertValue (vtkIdType id, const char *val) |
void | SetVariantValue (vtkIdType idx, vtkVariant value) override |
Set a value in the array form a variant. | |
void | InsertVariantValue (vtkIdType idx, vtkVariant value) override |
Safely set a value in the array form a variant. | |
vtkIdType | InsertNextValue (vtkStdString f) |
Insert data at the end of the array. | |
vtkIdType | InsertNextValue (const char *f) |
vtkStdString * | WritePointer (vtkIdType id, vtkIdType number) |
Get the address of a particular data index. | |
vtkStdString * | GetPointer (vtkIdType id) |
Get the address of a particular data index. | |
void * | GetVoidPointer (vtkIdType id) override |
Return a void pointer. | |
void | DeepCopy (vtkAbstractArray *aa) override |
Deep copy of another string array. | |
void | SetArray (vtkStdString *array, vtkIdType size, int save, int deleteMethod=VTK_DATA_ARRAY_DELETE) |
This method lets the user specify data to be held by the array. | |
void | SetVoidArray (void *array, vtkIdType size, int save) override |
void | SetVoidArray (void *array, vtkIdType size, int save, int deleteMethod) override |
void | SetArrayFreeFunction (void(*callback)(void *)) override |
This method allows the user to specify a custom free function to be called when the array is deallocated. | |
unsigned long | GetActualMemorySize () const override |
Return the memory in kibibytes (1024 bytes) consumed by this data array. | |
vtkArrayIterator * | NewIterator () override |
Returns a vtkArrayIteratorTemplate<vtkStdString>. | |
vtkIdType | GetDataSize () const override |
Returns the size of the data in DataTypeSize units. | |
vtkIdType | LookupValue (const vtkStdString &value) |
void | LookupValue (const vtkStdString &value, vtkIdList *ids) |
vtkIdType | LookupValue (const char *value) |
void | LookupValue (const char *value, vtkIdList *ids) |
void | DataChanged () override |
Tell the array explicitly that the data has changed. | |
virtual void | DataElementChanged (vtkIdType id) |
Tell the array explicitly that a single data element has changed. | |
void | ClearLookup () override |
Delete the associated fast lookup data structure on this array, if it exists. | |
vtkIdType | LookupValue (vtkVariant value) override |
Return the indices where a specific value appears. | |
void | LookupValue (vtkVariant value, vtkIdList *ids) override |
Return the indices where a specific value appears. | |
Public Member Functions inherited from vtkAbstractArray | |
virtual vtkTypeBool | IsA (const char *type) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
vtkAbstractArray * | NewInstance () const |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
void | PrintValues (ostream &os) |
nlohmann::json | SerializeValues () |
virtual vtkTypeBool | Allocate (vtkIdType numValues, vtkIdType ext=1000)=0 |
Allocate memory for this array. | |
virtual void | Initialize ()=0 |
Release storage and reset array to initial state. | |
virtual int | GetDataType () const =0 |
Return the underlying data type. | |
virtual int | GetElementComponentSize () const =0 |
Return the size, in bytes, of the lowest-level element of an array. | |
void | SetComponentName (vtkIdType component, const char *name) |
Set the name for a component. | |
const char * | GetComponentName (vtkIdType component) const |
Get the component name for a given component. | |
bool | HasAComponentName () const |
Returns if any component has had a name assigned. | |
int | CopyComponentNames (vtkAbstractArray *da) |
Copies the component names from the inputted array to the current array make sure that the current array has the same number of components as the input array. | |
virtual void | SetNumberOfTuples (vtkIdType numTuples)=0 |
Set the number of tuples (a component group) in the array. | |
virtual bool | SetNumberOfValues (vtkIdType numValues) |
Specify the number of values (tuples * components) for this object to hold. | |
vtkIdType | GetNumberOfTuples () const |
Get the number of complete tuples (a component group) in the array. | |
vtkIdType | GetNumberOfValues () const |
Get the total number of values in the array. | |
virtual void | SetTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source)=0 |
Set the tuple at dstTupleIdx in this array to the tuple at srcTupleIdx in the source array. | |
virtual void | InsertTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx, vtkAbstractArray *source)=0 |
Insert the tuple at srcTupleIdx in the source array into this array at dstTupleIdx. | |
virtual void | InsertTuples (vtkIdList *dstIds, vtkIdList *srcIds, vtkAbstractArray *source)=0 |
Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in this array. | |
virtual void | InsertTuplesStartingAt (vtkIdType dstStart, vtkIdList *srcIds, vtkAbstractArray *source)=0 |
Copy the tuples indexed in srcIds from the source array to the tuple locations starting at index dstStart. | |
virtual void | InsertTuples (vtkIdType dstStart, vtkIdType n, vtkIdType srcStart, vtkAbstractArray *source)=0 |
Copy n consecutive tuples starting at srcStart from the source array to this array, starting at the dstStart location. | |
virtual vtkIdType | InsertNextTuple (vtkIdType srcTupleIdx, vtkAbstractArray *source)=0 |
Insert the tuple from srcTupleIdx in the source array at the end of this array. | |
virtual void | GetTuples (vtkIdList *tupleIds, vtkAbstractArray *output) |
Given a list of tuple ids, return an array of tuples. | |
virtual void | GetTuples (vtkIdType p1, vtkIdType p2, vtkAbstractArray *output) |
Get the tuples for the range of tuple ids specified (i.e., p1->p2 inclusive). | |
virtual bool | HasStandardMemoryLayout () const |
Returns true if this array uses the standard memory layout defined in the VTK user guide, e.g. | |
virtual void * | GetVoidPointer (vtkIdType valueIdx)=0 |
Return a void pointer. | |
virtual void | DeepCopy (vtkAbstractArray *da) |
Deep copy of data. | |
virtual void | InterpolateTuple (vtkIdType dstTupleIdx, vtkIdList *ptIndices, vtkAbstractArray *source, double *weights)=0 |
Set the tuple at dstTupleIdx in this array to the interpolated tuple value, given the ptIndices in the source array and associated interpolation weights. | |
virtual void | InterpolateTuple (vtkIdType dstTupleIdx, vtkIdType srcTupleIdx1, vtkAbstractArray *source1, vtkIdType srcTupleIdx2, vtkAbstractArray *source2, double t)=0 |
Insert the tuple at dstTupleIdx in this array to the tuple interpolated from the two tuple indices, srcTupleIdx1 and srcTupleIdx2, and an interpolation factor, t. | |
virtual void | Squeeze ()=0 |
Free any unnecessary memory. | |
virtual vtkTypeBool | Resize (vtkIdType numTuples)=0 |
Resize the array to the requested number of tuples and preserve data. | |
vtkIdType | GetSize () const |
Return the size of the data. | |
vtkIdType | GetMaxId () const |
What is the maximum id currently in the array. | |
virtual void | SetArrayFreeFunction (void(*callback)(void *))=0 |
This method allows the user to specify a custom free function to be called when the array is deallocated. | |
virtual void | ExportToVoidPointer (void *out_ptr) |
This method copies the array data to the void pointer specified by the user. | |
virtual unsigned long | GetActualMemorySize () const =0 |
Return the memory in kibibytes (1024 bytes) consumed by this data array. | |
virtual const char * | GetDataTypeAsString () const |
Get the name of a data type as a string. | |
virtual int | IsNumeric () const =0 |
This method is here to make backward compatibility easier. | |
virtual bool | IsIntegral () const |
This method will return true if and only if an array contains integer-valued data. | |
virtual vtkArrayIterator * | NewIterator ()=0 |
Subclasses must override this method and provide the right kind of templated vtkArrayIteratorTemplate. | |
virtual vtkIdType | GetDataSize () const |
Returns the size of the data in DataTypeSize units. | |
virtual vtkVariant | GetVariantValue (vtkIdType valueIdx) |
Retrieve value from the array as a variant. | |
virtual void | InsertVariantValue (vtkIdType valueIdx, vtkVariant value)=0 |
Insert a value into the array from a variant. | |
virtual void | SetVariantValue (vtkIdType valueIdx, vtkVariant value)=0 |
Set a value in the array from a variant. | |
virtual void | DataChanged ()=0 |
Tell the array explicitly that the data has changed. | |
virtual void | ClearLookup ()=0 |
Delete the associated fast lookup data structure on this array, if it exists. | |
virtual void | GetProminentComponentValues (int comp, vtkVariantArray *values, double uncertainty=1.e-6, double minimumProminence=1.e-3) |
Populate the given vtkVariantArray with a set of distinct values taken on by the requested component (or, when passed -1, by the tuples as a whole). | |
vtkInformation * | GetInformation () |
Get an information object that can be used to annotate the array. | |
bool | HasInformation () const |
Inquire if this array has an instance of vtkInformation already associated with it. | |
virtual int | CopyInformation (vtkInformation *infoFrom, vtkTypeBool deep=1) |
Copy information instance. | |
void | Modified () override |
Removes out-of-date PER_COMPONENT() and PER_FINITE_COMPONENT() values. | |
virtual int | GetArrayType () const |
Method for type-checking in FastDownCast implementations. | |
const char * | GetArrayTypeAsString () const |
Get the name for the array type as string. | |
virtual void | SetNumberOfComponents (int) |
Set/Get the dimension (n) of the components. | |
int | GetNumberOfComponents () const |
Set/Get the dimension (n) of the components. | |
void | Reset () |
Reset to an empty state, without freeing any memory. | |
virtual void | SetVoidArray (void *vtkNotUsed(array), vtkIdType vtkNotUsed(size), int vtkNotUsed(save))=0 |
This method lets the user specify data to be held by the array. | |
virtual void | SetVoidArray (void *array, vtkIdType size, int save, int vtkNotUsed(deleteMethod)) |
This method lets the user specify data to be held by the array. | |
virtual void | SetName (const char *) |
Set/get array's name. | |
virtual char * | GetName () |
Set/get array's name. | |
virtual unsigned int | GetMaxDiscreteValues () |
Get/Set the maximum number of prominent values this array may contain before it is considered continuous. | |
virtual void | SetMaxDiscreteValues (unsigned int) |
Get/Set the maximum number of prominent values this array may contain before it is considered continuous. | |
Public Member Functions inherited from vtkObject | |
vtkBaseTypeMacro (vtkObject, vtkObjectBase) | |
virtual void | DebugOn () |
Turn debugging output on. | |
virtual void | DebugOff () |
Turn debugging output off. | |
bool | GetDebug () |
Get the value of the debug flag. | |
void | SetDebug (bool debugFlag) |
Set the value of the debug flag. | |
virtual void | Modified () |
Update the modification time for this object. | |
virtual vtkMTimeType | GetMTime () |
Return this object's modified time. | |
void | PrintSelf (ostream &os, vtkIndent indent) override |
Methods invoked by print to print information about the object including superclasses. | |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
vtkTypeBool | HasObserver (unsigned long event) |
vtkTypeBool | HasObserver (const char *event) |
vtkTypeBool | InvokeEvent (unsigned long event) |
vtkTypeBool | InvokeEvent (const char *event) |
std::string | GetObjectDescription () const override |
The object description printed in messages and PrintSelf output. | |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkCommand * | GetCommand (unsigned long tag) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObserver (vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
void | RemoveObservers (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
vtkTypeBool | HasObserver (const char *event, vtkCommand *) |
Allow people to add/remove/invoke observers (callbacks) to any VTK object. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Overloads to AddObserver that allow developers to add class member functions as callbacks for events. | |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
Allow user to set the AbortFlagOn() with the return value of the callback method. | |
vtkTypeBool | InvokeEvent (unsigned long event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
vtkTypeBool | InvokeEvent (const char *event, void *callData) |
This method invokes an event and return whether the event was aborted or not. | |
virtual void | SetObjectName (const std::string &objectName) |
Set/get the name of this object for reporting purposes. | |
virtual std::string | GetObjectName () const |
Set/get the name of this object for reporting purposes. | |
Public Member Functions inherited from vtkObjectBase | |
const char * | GetClassName () const |
Return the class name as a string. | |
virtual std::string | GetObjectDescription () const |
The object description printed in messages and PrintSelf output. | |
virtual vtkTypeBool | IsA (const char *name) |
Return 1 if this class is the same type of (or a subclass of) the named class. | |
virtual vtkIdType | GetNumberOfGenerationsFromBase (const char *name) |
Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
virtual void | Delete () |
Delete a VTK object. | |
virtual void | FastDelete () |
Delete a reference to this object. | |
void | InitializeObjectBase () |
void | Print (ostream &os) |
Print an object to an ostream. | |
void | Register (vtkObjectBase *o) |
Increase the reference count (mark as used by another object). | |
virtual void | UnRegister (vtkObjectBase *o) |
Decrease the reference count (release by another object). | |
int | GetReferenceCount () |
Return the current reference count of this object. | |
void | SetReferenceCount (int) |
Sets the reference count. | |
bool | GetIsInMemkind () const |
A local state flag that remembers whether this object lives in the normal or extended memory space. | |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
Methods invoked by print to print information about the object including superclasses. | |
virtual bool | UsesGarbageCollector () const |
Indicate whether the class uses vtkGarbageCollector or not. | |
Static Public Member Functions | |
static vtkStringArray * | New () |
static vtkStringArray * | ExtendedNew () |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkStringArray * | SafeDownCast (vtkObjectBase *o) |
Static Public Member Functions inherited from vtkAbstractArray | |
static vtkTypeBool | IsTypeOf (const char *type) |
static vtkAbstractArray * | SafeDownCast (vtkObjectBase *o) |
static vtkAbstractArray * | CreateArray (int dataType) |
Creates an array for dataType where dataType is one of VTK_BIT, VTK_CHAR, VTK_UNSIGNED_CHAR, VTK_SHORT, VTK_UNSIGNED_SHORT, VTK_INT, VTK_UNSIGNED_INT, VTK_LONG, VTK_UNSIGNED_LONG, VTK_FLOAT, VTK_DOUBLE, VTK_ID_TYPE, VTK_STRING. | |
static vtkInformationIntegerKey * | GUI_HIDE () |
This key is a hint to end user interface that this array is internal and should not be shown to the end user. | |
static vtkInformationInformationVectorKey * | PER_COMPONENT () |
This key is used to hold a vector of COMPONENT_VALUES (and, for vtkDataArray subclasses, COMPONENT_RANGE) keys – one for each component of the array. | |
static vtkInformationInformationVectorKey * | PER_FINITE_COMPONENT () |
This key is used to hold a vector of COMPONENT_VALUES (and, for vtkDataArray subclasses, COMPONENT_RANGE) keys – one for each component of the array. | |
static vtkInformationVariantVectorKey * | DISCRETE_VALUES () |
A key used to hold discrete values taken on either by the tuples of the array (when present in this->GetInformation()) or individual components (when present in one entry of the PER_COMPONENT() information vector). | |
static vtkInformationDoubleVectorKey * | DISCRETE_VALUE_SAMPLE_PARAMETERS () |
A key used to hold conditions under which cached discrete values were generated; the value is a 2-vector of doubles. | |
static int | GetDataTypeSize (int type) |
Return the size of the underlying data type. | |
Static Public Member Functions inherited from vtkObject | |
static vtkObject * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | BreakOnError () |
This method is called when vtkErrorMacro executes. | |
static void | SetGlobalWarningDisplay (vtkTypeBool val) |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOn () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static void | GlobalWarningDisplayOff () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
static vtkTypeBool | GetGlobalWarningDisplay () |
This is a global flag that controls whether any debug, warning or error messages are displayed. | |
Static Public Member Functions inherited from vtkObjectBase | |
static vtkTypeBool | IsTypeOf (const char *name) |
Return 1 if this class type is the same type of (or a subclass of) the named class. | |
static vtkIdType | GetNumberOfGenerationsFromBaseType (const char *name) |
Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). | |
static vtkObjectBase * | New () |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. | |
static void | SetMemkindDirectory (const char *directoryname) |
The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. | |
static bool | GetUsingMemkind () |
A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. | |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkStringArray () | |
~vtkStringArray () override | |
vtkStdString * | ResizeAndExtend (vtkIdType sz) |
Protected Member Functions inherited from vtkAbstractArray | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkAbstractArray () | |
~vtkAbstractArray () override | |
virtual void | SetInformation (vtkInformation *) |
Set an information object that can be used to annotate the array. | |
virtual void | UpdateDiscreteValueSet (double uncertainty, double minProminence) |
Obtain the set of unique values taken on by each component of the array, as well as by the tuples of the array. | |
Protected Member Functions inherited from vtkObject | |
vtkObject () | |
~vtkObject () override | |
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr) |
These methods allow a command to exclusively grab all events. | |
void | InternalReleaseFocus () |
These methods allow a command to exclusively grab all events. | |
Protected Member Functions inherited from vtkObjectBase | |
vtkObjectBase () | |
virtual | ~vtkObjectBase () |
virtual void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) |
virtual void | ReportReferences (vtkGarbageCollector *) |
virtual void | ObjectFinalize () |
vtkObjectBase (const vtkObjectBase &) | |
void | operator= (const vtkObjectBase &) |
Protected Attributes | |
vtkStdString * | Array |
void(* | DeleteFunction )(void *) |
Protected Attributes inherited from vtkAbstractArray | |
vtkIdType | Size |
vtkIdType | MaxId |
int | NumberOfComponents |
unsigned int | MaxDiscreteValues |
char * | Name |
bool | RebuildArray |
vtkInformation * | Information |
vtkInternalComponentNames * | ComponentNames |
Protected Attributes inherited from vtkObject | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
std::string | ObjectName |
Protected Attributes inherited from vtkObjectBase | |
std::atomic< int32_t > | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Additional Inherited Members | |
Static Protected Member Functions inherited from vtkObjectBase | |
static vtkMallocingFunction | GetCurrentMallocFunction () |
static vtkReallocingFunction | GetCurrentReallocFunction () |
static vtkFreeingFunction | GetCurrentFreeFunction () |
static vtkFreeingFunction | GetAlternateFreeFunction () |
a vtkAbstractArray subclass for strings
Points and cells may sometimes have associated data that are stored as strings, e.g. labels for information visualization projects. This class provides a clean way to store and access those strings.
Definition at line 141 of file vtkStringArray.h.
Definition at line 154 of file vtkStringArray.h.
Enumerator | |
---|---|
VTK_DATA_ARRAY_FREE | |
VTK_DATA_ARRAY_DELETE | |
VTK_DATA_ARRAY_ALIGNED_FREE | |
VTK_DATA_ARRAY_USER_DEFINED |
Definition at line 144 of file vtkStringArray.h.
|
protected |
|
overrideprotected |
|
static |
|
static |
|
static |
|
virtual |
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 vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkAbstractArray.
|
static |
|
protectedvirtual |
Reimplemented from vtkAbstractArray.
vtkStringArray * vtkStringArray::NewInstance | ( | ) | const |
|
overridevirtual |
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.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
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 168 of file vtkStringArray.h.
|
overridevirtual |
Release storage and reset array to initial state.
Implements vtkAbstractArray.
|
overridevirtual |
Return the size of the data type.
WARNING: This may not mean what you expect with strings. It will return sizeof(std::string) and not take into account the data included in any particular string.
Implements vtkAbstractArray.
|
inlineoverridevirtual |
Free any unnecessary memory.
Resize object to just fit data requirement. Reclaims extra memory.
Implements vtkAbstractArray.
Definition at line 187 of file vtkStringArray.h.
|
overridevirtual |
Resize the array while conserving the data.
Implements vtkAbstractArray.
|
overridevirtual |
Set the tuple at the ith location using the jth tuple in the source array.
This method assumes that the two arrays have the same type and structure. Note that range checking and memory allocation is not performed; use in conjunction with SetNumberOfTuples() to allocate space.
Implements vtkAbstractArray.
|
overridevirtual |
Insert the jth tuple in the source array, at ith location in this array.
Note that memory allocation is performed as necessary to hold the data.
Implements vtkAbstractArray.
|
overridevirtual |
Copy the tuples indexed in srcIds from the source array to the tuple locations indexed by dstIds in this array.
Note that memory allocation is performed as necessary to hold the data.
Implements vtkAbstractArray.
|
overridevirtual |
Copy the tuples indexed in srcIds from the source array to the tuple locations starting at index dstStart.
Note that memory allocation is performed as necessary to hold the data.
Implements vtkAbstractArray.
|
overridevirtual |
Copy n consecutive tuples starting at srcStart from the source array to this array, starting at the dstStart location.
Note that memory allocation is performed as necessary to hold the data.
Implements vtkAbstractArray.
|
overridevirtual |
Insert the jth tuple in the source array, at the end in this array.
Note that memory allocation is performed as necessary to hold the data. Returns the location at which the data was inserted.
Implements vtkAbstractArray.
|
overridevirtual |
Set the ith tuple in this array as the interpolated tuple value, given the ptIndices in the source array and associated interpolation weights.
This method assumes that the two arrays are of the same type and structure.
Implements vtkAbstractArray.
|
overridevirtual |
Insert the ith tuple in this array as interpolated from the two values, p1 and p2, and an interpolation factor, t.
The interpolation factor ranges from (0,1), with t=0 located at p1. This method assumes that the three arrays are of the same type. p1 is value at index id1 in source1, while, p2 is value at index id2 in source2.
Implements vtkAbstractArray.
|
overridevirtual |
Given a list of indices, return an array of values.
You must ensure 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).
Reimplemented from vtkAbstractArray.
|
overridevirtual |
Get the values for the range of indices specified (i.e., p1->p2 inclusive).
You must ensure 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.
Reimplemented from vtkAbstractArray.
|
overridevirtual |
Allocate memory for this array.
Delete old storage only if necessary. Note that ext is no longer used.
Implements vtkAbstractArray.
const vtkStdString & vtkStringArray::GetValue | ( | vtkIdType | id | ) | const |
Read-access of string at a particular index.
vtkStdString & vtkStringArray::GetValue | ( | vtkIdType | id | ) |
Get the string at a particular index.
|
inline |
Set the data at a particular index.
Does not do range checking. Make sure you use the method SetNumberOfValues() before inserting data.
Definition at line 292 of file vtkStringArray.h.
void vtkStringArray::SetValue | ( | vtkIdType | id, |
const char * | value | ||
) |
|
inlineoverridevirtual |
Set the number of tuples (a component group) in the array.
Note that this may allocate space depending on the number of components.
Implements vtkAbstractArray.
Definition at line 306 of file vtkStringArray.h.
|
inline |
Return the number of values in the array.
Definition at line 314 of file vtkStringArray.h.
|
inline |
Definition at line 316 of file vtkStringArray.h.
|
inlineoverridevirtual |
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 317 of file vtkStringArray.h.
void vtkStringArray::InsertValue | ( | vtkIdType | id, |
vtkStdString | f | ||
) |
Insert data at a specified position in the array.
void vtkStringArray::InsertValue | ( | vtkIdType | id, |
const char * | val | ||
) |
|
overridevirtual |
Set a value in the array form a variant.
Insert a value into the array from a variant.
Implements vtkAbstractArray.
|
overridevirtual |
Safely set a value in the array form a variant.
Safely insert a value into the array from a variant.
Implements vtkAbstractArray.
vtkIdType vtkStringArray::InsertNextValue | ( | vtkStdString | f | ) |
Insert data at the end of the array.
Return its location in the array.
vtkIdType vtkStringArray::InsertNextValue | ( | const char * | f | ) |
vtkStdString * vtkStringArray::WritePointer | ( | vtkIdType | id, |
vtkIdType | number | ||
) |
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.
|
inline |
Get the address of a particular data index.
Performs no checks to verify that the memory has been allocated etc.
Definition at line 357 of file vtkStringArray.h.
|
inlineoverridevirtual |
Return a void pointer.
For image pipeline interface and other special pointer manipulation. Use of this method is discouraged, as newer arrays require a deep-copy of the array data in order to return a suitable pointer. See vtkArrayDispatch for a safer alternative for fast data access.
Implements vtkAbstractArray.
Definition at line 358 of file vtkStringArray.h.
|
overridevirtual |
Deep copy of another string array.
Will complain and change nothing if the array passed in is not a vtkStringArray.
Reimplemented from vtkAbstractArray.
void vtkStringArray::SetArray | ( | vtkStdString * | array, |
vtkIdType | size, | ||
int | save, | ||
int | deleteMethod = VTK_DATA_ARRAY_DELETE |
||
) |
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. If save is 0, then this class is free to delete the array when it cleans up or reallocates using the provided free function If the delete method is VTK_DATA_ARRAY_USER_DEFINED a custom free function can be assigned to be called using SetArrayFreeFunction, if no custom function is assigned we will default to delete[].
|
inlineoverride |
Definition at line 380 of file vtkStringArray.h.
|
inlineoverride |
Definition at line 384 of file vtkStringArray.h.
|
overridevirtual |
This method allows the user to specify a custom free function to be called when the array is deallocated.
Calling this method will implicitly mean that the given free function will be called when the class cleans up or reallocates memory.
Implements vtkAbstractArray.
|
overridevirtual |
Return the memory in kibibytes (1024 bytes) 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.
|
overridevirtual |
Returns a vtkArrayIteratorTemplate<vtkStdString>.
Implements vtkAbstractArray.
|
overridevirtual |
Returns the size of the data in DataTypeSize units.
Thus, the number of bytes for the data can be computed by GetDataSize() * GetDataTypeSize(). The size computation includes the string termination character for each string.
Reimplemented from vtkAbstractArray.
|
overridevirtual |
Return the indices where a specific value appears.
Implements vtkAbstractArray.
|
overridevirtual |
Return the indices where a specific value appears.
Implements vtkAbstractArray.
vtkIdType vtkStringArray::LookupValue | ( | const vtkStdString & | value | ) |
void vtkStringArray::LookupValue | ( | const vtkStdString & | value, |
vtkIdList * | ids | ||
) |
vtkIdType vtkStringArray::LookupValue | ( | const char * | value | ) |
void vtkStringArray::LookupValue | ( | const char * | value, |
vtkIdList * | ids | ||
) |
|
overridevirtual |
Tell the array explicitly that the data has changed.
This is only necessary to call when you modify the array contents without using the array's API (i.e. you retrieve a pointer to the data and modify the array contents). You need to call this so that the fast lookup will know to rebuild itself. Otherwise, the lookup functions will give incorrect results.
Implements vtkAbstractArray.
|
virtual |
Tell the array explicitly that a single data element has changed.
Like DataChanged(), then is only necessary when you modify the array contents without using the array's API.
|
overridevirtual |
Delete the associated fast lookup data structure on this array, if it exists.
The lookup will be rebuilt on the next call to a lookup function.
Implements vtkAbstractArray.
|
protected |
|
protected |
Definition at line 464 of file vtkStringArray.h.
|
protected |
Definition at line 467 of file vtkStringArray.h.