VTK  9.3.20240329
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkInformationKey Class Referenceabstract

Superclass for vtkInformation keys. More...

#include <vtkInformationKey.h>

Inheritance diagram for vtkInformationKey:
[legend]
Collaboration diagram for vtkInformationKey:
[legend]

Public Member Functions

 vtkBaseTypeMacro (vtkInformationKey, vtkObjectBase)
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
const char * GetName ()
 Get the name of the key. More...
 
const char * GetLocation ()
 Get the location of the key. More...
 
virtual void ShallowCopy (vtkInformation *from, vtkInformation *to)=0
 Copy the entry associated with this key from one information object to another. More...
 
virtual void DeepCopy (vtkInformation *from, vtkInformation *to)
 Duplicate (new instance created) the entry associated with this key from one information object to another (new instances of any contained vtkInformation and vtkInformationVector objects are created). More...
 
virtual int Has (vtkInformation *info)
 Check whether this key appears in the given information object. More...
 
virtual void Remove (vtkInformation *info)
 Remove this key from the given information object. More...
 
virtual void Report (vtkInformation *info, vtkGarbageCollector *collector)
 Report a reference this key has in the given information object. More...
 
virtual bool NeedToExecute (vtkInformation *vtkNotUsed(pipelineInfo), vtkInformation *vtkNotUsed(dobjInfo))
 This function is only relevant when the pertaining key is used in a VTK pipeline. More...
 
virtual void StoreMetaData (vtkInformation *vtkNotUsed(request), vtkInformation *vtkNotUsed(pipelineInfo), vtkInformation *vtkNotUsed(dobjInfo))
 This function is only relevant when the pertaining key is used in a VTK pipeline. More...
 
virtual void CopyDefaultInformation (vtkInformation *vtkNotUsed(request), vtkInformation *vtkNotUsed(fromInfo), vtkInformation *vtkNotUsed(toInfo))
 This function is only relevant when the pertaining key is used in a VTK pipeline. More...
 
 vtkInformationKey (const char *name, const char *location)
 Key instances are static data that need to be created and destroyed. More...
 
 ~vtkInformationKey () override
 Key instances are static data that need to be created and destroyed. More...
 
void Print (vtkInformation *info)
 Print the key's value in an information object to a stream. More...
 
virtual void Print (ostream &os, vtkInformation *info)
 Print the key's value in an information object to a stream. More...
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual std::string GetObjectDescription () const
 The object description printed in messages and PrintSelf output. More...
 
virtual vtkTypeBool IsA (const char *name)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
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). More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
bool GetIsInMemkind () const
 A local state flag that remembers whether this object lives in the normal or extended memory space. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual bool UsesGarbageCollector () const
 Indicate whether the class uses vtkGarbageCollector or not. More...
 

Protected Member Functions

 vtkInformationKeySetStringMacro (Name)
 
 vtkInformationKeySetStringMacro (Location)
 
void SetAsObjectBase (vtkInformation *info, vtkObjectBase *value)
 
const vtkObjectBaseGetAsObjectBase (vtkInformation *info) const
 
vtkObjectBaseGetAsObjectBase (vtkInformation *info)
 
void ReportAsObjectBase (vtkInformation *info, vtkGarbageCollector *collector)
 
void ConstructClass (const char *)
 
- 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

char * Name
 
char * Location
 
- Protected Attributes inherited from vtkObjectBase
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Additional Inherited Members

- 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. More...
 
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). More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. More...
 
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. More...
 
- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 

Detailed Description

Superclass for vtkInformation keys.

vtkInformationKey is the superclass for all keys used to access the map represented by vtkInformation. The vtkInformation::Set and vtkInformation::Get methods of vtkInformation are accessed by information keys. A key is a pointer to an instance of a subclass of vtkInformationKey. The type of the subclass determines the overload of Set/Get that is selected. This ensures that the type of value stored in a vtkInformation instance corresponding to a given key matches the type expected for that key.

Tests:
vtkInformationKey (Tests)

Definition at line 30 of file vtkInformationKey.h.

Constructor & Destructor Documentation

◆ vtkInformationKey()

vtkInformationKey::vtkInformationKey ( const char *  name,
const char *  location 
)

Key instances are static data that need to be created and destroyed.

The constructor and destructor must be public. The name of the static instance and the class in which it is defined should be passed to the constructor. They must be string literals because the strings are not copied.

◆ ~vtkInformationKey()

vtkInformationKey::~vtkInformationKey ( )
override

Key instances are static data that need to be created and destroyed.

The constructor and destructor must be public. The name of the static instance and the class in which it is defined should be passed to the constructor. They must be string literals because the strings are not copied.

Member Function Documentation

◆ vtkBaseTypeMacro()

vtkInformationKey::vtkBaseTypeMacro ( vtkInformationKey  ,
vtkObjectBase   
)

◆ PrintSelf()

void vtkInformationKey::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

◆ GetName()

const char* vtkInformationKey::GetName ( )

Get the name of the key.

This is not the type of the key, but the name of the key instance.

◆ GetLocation()

const char* vtkInformationKey::GetLocation ( )

Get the location of the key.

This is the name of the class in which the key is defined.

◆ ShallowCopy()

virtual void vtkInformationKey::ShallowCopy ( vtkInformation from,
vtkInformation to 
)
pure virtual

◆ DeepCopy()

virtual void vtkInformationKey::DeepCopy ( vtkInformation from,
vtkInformation to 
)
inlinevirtual

Duplicate (new instance created) the entry associated with this key from one information object to another (new instances of any contained vtkInformation and vtkInformationVector objects are created).

Default implementation simply calls ShallowCopy().

Reimplemented in vtkInformationQuadratureSchemeDefinitionVectorKey, vtkInformationInformationVectorKey, and vtkInformationInformationKey.

Definition at line 73 of file vtkInformationKey.h.

◆ Has()

virtual int vtkInformationKey::Has ( vtkInformation info)
virtual

Check whether this key appears in the given information object.

Reimplemented in vtkInformationRequestKey.

◆ Remove()

virtual void vtkInformationKey::Remove ( vtkInformation info)
virtual

Remove this key from the given information object.

Reimplemented in vtkInformationExecutivePortVectorKey, and vtkInformationRequestKey.

◆ Report()

virtual void vtkInformationKey::Report ( vtkInformation info,
vtkGarbageCollector collector 
)
virtual

◆ Print() [1/2]

void vtkInformationKey::Print ( vtkInformation info)

Print the key's value in an information object to a stream.

◆ Print() [2/2]

virtual void vtkInformationKey::Print ( ostream &  os,
vtkInformation info 
)
virtual

◆ NeedToExecute()

virtual bool vtkInformationKey::NeedToExecute ( vtkInformation vtkNotUsedpipelineInfo,
vtkInformation vtkNotUseddobjInfo 
)
inlinevirtual

This function is only relevant when the pertaining key is used in a VTK pipeline.

Specific keys that handle pipeline data requests (for example, UPDATE_PIECE_NUMBER) can overwrite this method to notify the pipeline that a a filter should be (re-)executed because what is in the current output is different that what is being requested by the key. For example, DATA_PIECE_NUMBER != UPDATE_PIECE_NUMBER.

Definition at line 107 of file vtkInformationKey.h.

◆ StoreMetaData()

virtual void vtkInformationKey::StoreMetaData ( vtkInformation vtkNotUsedrequest,
vtkInformation vtkNotUsedpipelineInfo,
vtkInformation vtkNotUseddobjInfo 
)
inlinevirtual

This function is only relevant when the pertaining key is used in a VTK pipeline.

Specific keys that handle pipeline data requests (for example, UPDATE_PIECE_NUMBER) can overwrite this method to store in the data information meta-data about the request that led to the current filter execution. This meta-data can later be used to compare what is being requested to decide whether the filter needs to re-execute. For example, a filter may store the current UPDATE_PIECE_NUMBER in the data object's information as the DATA_PIECE_NUMBER. DATA_PIECE_NUMBER can later be compared to a new UPDATA_PIECE_NUMBER to decide whether a filter should re-execute.

Definition at line 127 of file vtkInformationKey.h.

◆ CopyDefaultInformation()

virtual void vtkInformationKey::CopyDefaultInformation ( vtkInformation vtkNotUsedrequest,
vtkInformation vtkNotUsedfromInfo,
vtkInformation vtkNotUsedtoInfo 
)
inlinevirtual

This function is only relevant when the pertaining key is used in a VTK pipeline.

By overwriting this method, a key can decide if/how to copy itself downstream or upstream during a particular pipeline pass. For example, meta-data keys can copy themselves during REQUEST_INFORMATION whereas request keys can copy themselves during REQUEST_UPDATE_EXTENT.

Definition at line 140 of file vtkInformationKey.h.

◆ vtkInformationKeySetStringMacro() [1/2]

vtkInformationKey::vtkInformationKeySetStringMacro ( Name  )
protected

◆ vtkInformationKeySetStringMacro() [2/2]

vtkInformationKey::vtkInformationKeySetStringMacro ( Location  )
protected

◆ SetAsObjectBase()

void vtkInformationKey::SetAsObjectBase ( vtkInformation info,
vtkObjectBase value 
)
protected

◆ GetAsObjectBase() [1/2]

const vtkObjectBase* vtkInformationKey::GetAsObjectBase ( vtkInformation info) const
protected

◆ GetAsObjectBase() [2/2]

vtkObjectBase* vtkInformationKey::GetAsObjectBase ( vtkInformation info)
protected

◆ ReportAsObjectBase()

void vtkInformationKey::ReportAsObjectBase ( vtkInformation info,
vtkGarbageCollector collector 
)
protected

◆ ConstructClass()

void vtkInformationKey::ConstructClass ( const char *  )
protected

Member Data Documentation

◆ Name

char* vtkInformationKey::Name
protected

Definition at line 146 of file vtkInformationKey.h.

◆ Location

char* vtkInformationKey::Location
protected

Definition at line 147 of file vtkInformationKey.h.


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