ParaView
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkSMEnumerationDomain Class Reference

list of integers with associated strings More...

#include <vtkSMEnumerationDomain.h>

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

List of all members.

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual int IsInDomain (vtkSMProperty *property)
int IsInDomain (int val, unsigned int &idx)
unsigned int GetNumberOfEntries ()
int GetEntryValue (unsigned int idx)
const char * GetEntryText (unsigned int idx)
const char * GetEntryTextForValue (int value)
int HasEntryText (const char *text)
void AddEntry (const char *text, int value)
void RemoveAllEntries ()
virtual void Update (vtkSMProperty *property)
int GetEntryValueForText (const char *text)
int GetEntryValue (const char *text, int &valid)

Static Public Member Functions

static vtkSMEnumerationDomainNew ()
static int IsTypeOf (const char *type)
static vtkSMEnumerationDomainSafeDownCast (vtkObject *o)

Protected Member Functions

virtual int ReadXMLAttributes (vtkSMProperty *prop, vtkPVXMLElement *element)
virtual void ChildSaveState (vtkPVXMLElement *domainElement)

Protected Attributes

vtkSMEnumerationDomainInternals * EInternals
virtual int SetDefaultValues (vtkSMProperty *)
 vtkSMEnumerationDomain ()
 ~vtkSMEnumerationDomain ()

Detailed Description

list of integers with associated strings

vtkSMEnumerationDomain represents an enumeration of integer values with associated descriptive strings. Valid XML elements are:

 * <Entry text="" value=""/> where text is the descriptive
 string and value is the integer value.
 
See also:
vtkSMDomain

Definition at line 38 of file vtkSMEnumerationDomain.h.


Constructor & Destructor Documentation

vtkSMEnumerationDomain::vtkSMEnumerationDomain ( ) [protected]

Overridden to ensure that the property's default value is valid for the enumeration, if not it will be set to the first enumeration value.

vtkSMEnumerationDomain::~vtkSMEnumerationDomain ( ) [protected]

Overridden to ensure that the property's default value is valid for the enumeration, if not it will be set to the first enumeration value.


Member Function Documentation

static vtkSMEnumerationDomain* vtkSMEnumerationDomain::New ( ) [static]

Reimplemented from vtkSMSessionObject.

Reimplemented in vtkSMFieldDataDomain.

virtual const char* vtkSMEnumerationDomain::GetClassName ( ) [virtual]

Reimplemented from vtkSMDomain.

Reimplemented in vtkSMFieldDataDomain.

static int vtkSMEnumerationDomain::IsTypeOf ( const char *  type) [static]

Reimplemented from vtkSMDomain.

Reimplemented in vtkSMFieldDataDomain.

virtual int vtkSMEnumerationDomain::IsA ( const char *  type) [virtual]

Reimplemented from vtkSMDomain.

Reimplemented in vtkSMFieldDataDomain.

static vtkSMEnumerationDomain* vtkSMEnumerationDomain::SafeDownCast ( vtkObject o) [static]

Reimplemented from vtkSMDomain.

Reimplemented in vtkSMFieldDataDomain.

void vtkSMEnumerationDomain::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkSMDomain.

Reimplemented in vtkSMFieldDataDomain.

virtual int vtkSMEnumerationDomain::IsInDomain ( vtkSMProperty property) [virtual]

Returns true if the value of the propery is in the domain. The propery has to be a vtkSMIntVectorProperty. If all vector values are in the domain, it returns 1. It returns 0 otherwise.

Implements vtkSMDomain.

int vtkSMEnumerationDomain::IsInDomain ( int  val,
unsigned int idx 
)

Returns true if the int is in the domain. If value is in domain, it's index is return in idx.

unsigned int vtkSMEnumerationDomain::GetNumberOfEntries ( )

Returns the number of entries in the enumeration.

int vtkSMEnumerationDomain::GetEntryValue ( unsigned int  idx)

Returns the integer value of an enumeration entry.

const char* vtkSMEnumerationDomain::GetEntryText ( unsigned int  idx)

Returns the descriptive string of an enumeration entry.

const char* vtkSMEnumerationDomain::GetEntryTextForValue ( int  value)

Returns the text for an enumeration value.

int vtkSMEnumerationDomain::HasEntryText ( const char *  text)

Return 1 is the text is present in the enumeration, otherwise 0.

int vtkSMEnumerationDomain::GetEntryValueForText ( const char *  text)

Get the value for an enumeration text. The return value is valid only is HasEntryText() returns 1.

int vtkSMEnumerationDomain::GetEntryValue ( const char *  text,
int valid 
)

Given an entry text, return the integer value. Valid is set to 1 if text is defined, otherwise 0. If valid=0, return value is undefined.

void vtkSMEnumerationDomain::AddEntry ( const char *  text,
int  value 
)

Add a new enumeration entry. text cannot be null.

void vtkSMEnumerationDomain::RemoveAllEntries ( )

Clear all entries.

virtual void vtkSMEnumerationDomain::Update ( vtkSMProperty property) [virtual]

Update self based on the "unchecked" values of all required properties. Overwritten by sub-classes.

Reimplemented from vtkSMDomain.

Reimplemented in vtkSMFieldDataDomain.

virtual int vtkSMEnumerationDomain::SetDefaultValues ( vtkSMProperty ) [virtual]

Overridden to ensure that the property's default value is valid for the enumeration, if not it will be set to the first enumeration value.

Reimplemented from vtkSMDomain.

Reimplemented in vtkSMFieldDataDomain.

virtual int vtkSMEnumerationDomain::ReadXMLAttributes ( vtkSMProperty prop,
vtkPVXMLElement element 
) [protected, virtual]

Set the appropriate ivars from the xml element. Should be overwritten by subclass if adding ivars.

Reimplemented from vtkSMDomain.

Reimplemented in vtkSMFieldDataDomain.

virtual void vtkSMEnumerationDomain::ChildSaveState ( vtkPVXMLElement domainElement) [protected, virtual]

Reimplemented from vtkSMDomain.


Member Data Documentation

vtkSMEnumerationDomainInternals* vtkSMEnumerationDomain::EInternals [protected]

Definition at line 108 of file vtkSMEnumerationDomain.h.


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