ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkSMCompositeTreeDomain Class Reference

domain used to restrict an vtkSMIntVectorProperty values to valid flat-index for a vtkCompositeDataSet. More...

#include <vtkSMCompositeTreeDomain.h>

Inheritance diagram for vtkSMCompositeTreeDomain:
Inheritance graph
[legend]
Collaboration diagram for vtkSMCompositeTreeDomain:
Collaboration graph
[legend]

Public Types

enum  { ALL = 0, LEAVES = 1, NON_LEAVES = 2, NONE = 3 }
 
enum  DefaultModes { DEFAULT = 0, NONEMPTY_LEAF = 1 }
 
typedef vtkSMDomain Superclass
 
- Public Types inherited from vtkSMDomain
typedef vtkSMSessionObject Superclass
 
- Public Types inherited from vtkSMSessionObject
typedef vtkSMObject Superclass
 
- Public Types inherited from vtkSMObject
typedef vtkObject Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void Update (vtkSMProperty *input)
 Called when the 'required-property' is modified. More...
 
vtkSMSourceProxyGetSource ()
 Returns the source proxy whose data information is returned by GetInformation(). More...
 
virtual int IsInDomain (vtkSMProperty *vtkNotUsed(property))
 Is the (unchecked) value of the property in the domain? Overwritten by sub-classes. More...
 
virtual int SetDefaultValues (vtkSMProperty *, bool use_unchecked_values)
 A vtkSMProperty is often defined with a default value in the XML itself. More...
 
virtual vtkPVDataInformationGetInformation ()
 Get the vtkPVDataInformation which provides the tree structure for the composite dataset. More...
 
virtual int GetSourcePort ()
 Returns the port for the source proxy from which the data information is obtained by GetInformation(). More...
 
virtual int GetMode ()
 Mode indicates if the property is interested in all nodes, leaves only or non-leaves only. More...
 
virtual void SetMode (int)
 Mode indicates if the property is interested in all nodes, leaves only or non-leaves only. More...
 
virtual int GetDefaultMode ()
 DefaultMode controls how the default value for the property is set by SetDefaultValues(). More...
 
virtual void SetDefaultMode (int)
 DefaultMode controls how the default value for the property is set by SetDefaultValues(). More...
 
- Public Member Functions inherited from vtkSMDomain
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual int IsInDomain (vtkSMProperty *property)=0
 Is the (unchecked) value of the property in the domain? Overwritten by sub-classes. More...
 
virtual void SetAnimationValue (vtkSMProperty *, int vtkNotUsed(index), double vtkNotUsed(value))
 Set the value of an element of a property from the animation editor. More...
 
virtual int SetDefaultValues (vtkSMProperty *, bool vtkNotUsed(use_unchecked_values))
 A vtkSMProperty is often defined with a default value in the XML itself. More...
 
vtkSMPropertyGetProperty ()
 Provides access to the vtkSMProperty on which this domain is hooked up. More...
 
virtual char * GetXMLName ()
 Assigned by the XML parser. More...
 
virtual bool GetIsOptional ()
 When the IsOptional flag is set, IsInDomain() always returns true. More...
 
- Public Member Functions inherited from vtkSMSessionObject
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual vtkSMSessionProxyManagerGetSessionProxyManager ()
 Return the corresponding ProxyManager if any. More...
 
virtual void SetSession (vtkSMSession *)
 Get/Set the session on wihch this object exists. More...
 
virtual vtkSMSessionGetSession ()
 Get/Set the session on wihch this object exists. More...
 
- Public Member Functions inherited from vtkSMObject
void PrintSelf (ostream &os, vtkIndent indent)
 

Static Public Member Functions

static vtkSMCompositeTreeDomainNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMCompositeTreeDomainSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSMDomain
static int IsTypeOf (const char *type)
 
static vtkSMDomainSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSMSessionObject
static vtkSMSessionObjectNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMSessionObjectSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSMObject
static vtkSMObjectNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMObjectSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkSMCompositeTreeDomain ()
 
 ~vtkSMCompositeTreeDomain ()
 
virtual int ReadXMLAttributes (vtkSMProperty *prop, vtkPVXMLElement *element)
 Set the appropriate ivars from the xml element. More...
 
void Update (vtkSMInputProperty *iproperty)
 Internal implementation called by Update(vtkSMProperty*);. More...
 
void InvokeModifiedIfChanged ()
 
void SetInformation (vtkPVDataInformation *)
 
- Protected Member Functions inherited from vtkSMDomain
 vtkSMDomain ()
 
 ~vtkSMDomain ()
 
virtual int LoadState (vtkPVXMLElement *vtkNotUsed(domainElement), vtkSMProxyLocator *vtkNotUsed(loader))
 Load the state of the domain from the XML. More...
 
vtkSMPropertyGetRequiredProperty (const char *function)
 Returns a given required property of the given function. More...
 
void RemoveRequiredProperty (vtkSMProperty *prop)
 Remove the given property from the required properties list. More...
 
void AddRequiredProperty (vtkSMProperty *prop, const char *function)
 Add a new required property to this domain. More...
 
virtual vtkPVDataInformationGetInputDataInformation (const char *function, int index=0)
 Helper method to get vtkPVDataInformation from input proxy connected to the required property with the given function. More...
 
void DomainModified ()
 Invokes DomainModifiedEvent. More...
 
void InvokeModified ()
 
unsigned int GetNumberOfRequiredProperties ()
 Gets the number of required properties added. More...
 
void SetProperty (vtkSMProperty *)
 Set the domain's property. More...
 
void SaveState (vtkPVXMLElement *parent, const char *uid)
 Add the header and creates a new vtkPVXMLElement for the domain, fills it up with the common attributes. More...
 
virtual void ChildSaveState (vtkPVXMLElement *domainElement)
 Add the header and creates a new vtkPVXMLElement for the domain, fills it up with the common attributes. More...
 
virtual void SetIsOptional (bool)
 When the IsOptional flag is set, IsInDomain() always returns true. More...
 
virtual void SetXMLName (const char *)
 Assigned by the XML parser. More...
 
- Protected Member Functions inherited from vtkSMSessionObject
 vtkSMSessionObject ()
 
 ~vtkSMSessionObject ()
 
- Protected Member Functions inherited from vtkSMObject
 vtkSMObject ()
 
 ~vtkSMObject ()
 

Protected Attributes

vtkPVDataInformationInformation
 
vtkTimeStamp UpdateTime
 
vtkPVDataInformationLastInformation
 
vtkWeakPointer< vtkSMSourceProxySource
 
int Mode
 
int DefaultMode
 
int SourcePort
 
- Protected Attributes inherited from vtkSMDomain
char * XMLName
 
bool IsOptional
 
vtkSMDomainInternals * Internals
 
- Protected Attributes inherited from vtkSMSessionObject
vtkWeakPointer< vtkSMSessionSession
 

Detailed Description

domain used to restrict an vtkSMIntVectorProperty values to valid flat-index for a vtkCompositeDataSet.

vtkSMCompositeTreeDomain can be added to a vtkSMIntVectorProperty. This domain requires a vtkSMInputProperty which is used to provide the input to the filter. This domain obtains data information from the input selected on the required input property and then decides the range for the flat-index. A flat index for a tree is obtained by performing a pre-order traversal of the tree eg. A ( B ( D, E), C (F, G)) becomes: [A,B,D,E,C,F,G], so flat-index of A is 0, while flat-index of C is 4.

vtkSMCompositeTreeDomain can be used in multiple modes.

vtkSMCompositeTreeDomain also provides ability to set default value on the property. If mode is LEAVES, then the default value selected is the first non-null leaf node. If mode is ALL, the same behaviour for default value is possible by using default_mode="nonempty-leaf" in XML. e.g.

<CompositeTreeDomain name="tree" mode="all" default_mode="nonempty-leaf">
<RequiredProperties>
<Property function="Input" name="Input" />
</RequiredProperties>
</CompositeTreeDomain>

Definition at line 65 of file vtkSMCompositeTreeDomain.h.

Member Typedef Documentation

§ Superclass

Definition at line 69 of file vtkSMCompositeTreeDomain.h.

Member Enumeration Documentation

§ anonymous enum

anonymous enum
Enumerator
ALL 
LEAVES 
NON_LEAVES 
NONE 

Definition at line 117 of file vtkSMCompositeTreeDomain.h.

§ DefaultModes

Enumerator
DEFAULT 
NONEMPTY_LEAF 

Definition at line 125 of file vtkSMCompositeTreeDomain.h.

Constructor & Destructor Documentation

§ vtkSMCompositeTreeDomain()

vtkSMCompositeTreeDomain::vtkSMCompositeTreeDomain ( )
protected

§ ~vtkSMCompositeTreeDomain()

vtkSMCompositeTreeDomain::~vtkSMCompositeTreeDomain ( )
protected

Member Function Documentation

§ New()

static vtkSMCompositeTreeDomain* vtkSMCompositeTreeDomain::New ( )
static

§ GetClassName()

virtual const char* vtkSMCompositeTreeDomain::GetClassName ( )
virtual

Reimplemented from vtkSMDomain.

§ IsTypeOf()

static int vtkSMCompositeTreeDomain::IsTypeOf ( const char *  type)
static

§ IsA()

virtual int vtkSMCompositeTreeDomain::IsA ( const char *  type)
virtual

Reimplemented from vtkSMDomain.

§ SafeDownCast()

static vtkSMCompositeTreeDomain* vtkSMCompositeTreeDomain::SafeDownCast ( vtkObject *  o)
static

§ PrintSelf()

void vtkSMCompositeTreeDomain::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

§ Update() [1/2]

virtual void vtkSMCompositeTreeDomain::Update ( vtkSMProperty input)
virtual

Called when the 'required-property' is modified.

The property must be a vtkSMInputProperty. This will obtain the composite data information for the input source and then determine the valid range for the flat-index.

Reimplemented from vtkSMDomain.

§ GetInformation()

virtual vtkPVDataInformation* vtkSMCompositeTreeDomain::GetInformation ( )
virtual

Get the vtkPVDataInformation which provides the tree structure for the composite dataset.

§ GetSource()

vtkSMSourceProxy* vtkSMCompositeTreeDomain::GetSource ( )

Returns the source proxy whose data information is returned by GetInformation().

§ GetSourcePort()

virtual int vtkSMCompositeTreeDomain::GetSourcePort ( )
virtual

Returns the port for the source proxy from which the data information is obtained by GetInformation().

§ IsInDomain()

virtual int vtkSMCompositeTreeDomain::IsInDomain ( vtkSMProperty vtkNotUsedproperty)
inlinevirtual

Is the (unchecked) value of the property in the domain? Overwritten by sub-classes.

Definition at line 105 of file vtkSMCompositeTreeDomain.h.

§ GetMode()

virtual int vtkSMCompositeTreeDomain::GetMode ( )
virtual

Mode indicates if the property is interested in all nodes, leaves only or non-leaves only.

Can be configured in XML using the "mode" attribute. Values can be "all", "leaves", "non-leaves". Default is all nodes.

§ SetMode()

virtual void vtkSMCompositeTreeDomain::SetMode ( int  )
virtual

Mode indicates if the property is interested in all nodes, leaves only or non-leaves only.

Can be configured in XML using the "mode" attribute. Values can be "all", "leaves", "non-leaves". Default is all nodes.

§ GetDefaultMode()

virtual int vtkSMCompositeTreeDomain::GetDefaultMode ( )
virtual

DefaultMode controls how the default value for the property is set by SetDefaultValues().

DEFAULT implies the default value is picked based on the default strategy for the selected Mode. NONEMPTY_LEAF indicates that the first non-empty leaf node is set as the default value, if possible.

§ SetDefaultMode()

virtual void vtkSMCompositeTreeDomain::SetDefaultMode ( int  )
virtual

DefaultMode controls how the default value for the property is set by SetDefaultValues().

DEFAULT implies the default value is picked based on the default strategy for the selected Mode. NONEMPTY_LEAF indicates that the first non-empty leaf node is set as the default value, if possible.

§ SetDefaultValues()

virtual int vtkSMCompositeTreeDomain::SetDefaultValues ( vtkSMProperty ,
bool  use_unchecked_values 
)
virtual

A vtkSMProperty is often defined with a default value in the XML itself.

However, many times, the default value must be determined at run time. To facilitate this, domains can override this method to compute and set the default value for the property. Note that unlike the compile-time default values, the application must explicitly call this method to initialize the property. Returns 1 if the domain updated the property.

§ ReadXMLAttributes()

virtual int vtkSMCompositeTreeDomain::ReadXMLAttributes ( vtkSMProperty prop,
vtkPVXMLElement elem 
)
protectedvirtual

Set the appropriate ivars from the xml element.

Should be overwritten by subclass if adding ivars.

Reimplemented from vtkSMDomain.

§ Update() [2/2]

void vtkSMCompositeTreeDomain::Update ( vtkSMInputProperty iproperty)
protected

Internal implementation called by Update(vtkSMProperty*);.

§ InvokeModifiedIfChanged()

void vtkSMCompositeTreeDomain::InvokeModifiedIfChanged ( )
protected

§ SetInformation()

void vtkSMCompositeTreeDomain::SetInformation ( vtkPVDataInformation )
protected

Member Data Documentation

§ Information

vtkPVDataInformation* vtkSMCompositeTreeDomain::Information
protected

Definition at line 168 of file vtkSMCompositeTreeDomain.h.

§ UpdateTime

vtkTimeStamp vtkSMCompositeTreeDomain::UpdateTime
protected

Definition at line 170 of file vtkSMCompositeTreeDomain.h.

§ LastInformation

vtkPVDataInformation* vtkSMCompositeTreeDomain::LastInformation
protected

Definition at line 171 of file vtkSMCompositeTreeDomain.h.

§ Source

vtkWeakPointer<vtkSMSourceProxy> vtkSMCompositeTreeDomain::Source
protected

Definition at line 173 of file vtkSMCompositeTreeDomain.h.

§ Mode

int vtkSMCompositeTreeDomain::Mode
protected

Definition at line 174 of file vtkSMCompositeTreeDomain.h.

§ DefaultMode

int vtkSMCompositeTreeDomain::DefaultMode
protected

Definition at line 175 of file vtkSMCompositeTreeDomain.h.

§ SourcePort

int vtkSMCompositeTreeDomain::SourcePort
protected

Definition at line 176 of file vtkSMCompositeTreeDomain.h.


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