VAPoR  3.0.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
VAPoR::Params Class Referenceabstract

A pure virtual class for managing parameters used in visualization. More...

#include <params.h>

Inheritance diagram for VAPoR::Params:
VetsUtil::MyBase VAPoR::ParamsBase VAPoR::AnimationParams VAPoR::BasicParams VAPoR::RegionParams VAPoR::RenderParams VAPoR::ViewpointParams VAPoR::InstanceParams VAPoR::MouseModeParams VAPoR::VizWinParams VAPoR::ArrowParams VAPoR::HelloParams VAPoR::IsolineParams

Public Member Functions

 Params (const Params &p)
 Default copy constructor. More...
 
virtual ~Params ()
 
virtual const std::string getShortName ()=0
 
virtual void Validate (int type)=0
 
bool isRenderParams () const
 
bool isBasicParams () const
 
virtual void restart ()=0
 
virtual int GetVizNum ()
 
virtual int SetLocal (bool lg)
 
virtual bool IsLocal ()
 
virtual BoxGetBox ()
 
- Public Member Functions inherited from VetsUtil::MyBase
 MyBase ()
 
const string & getClassName () const
 
- Public Member Functions inherited from VAPoR::ParamsBase
 ParamsBase (XmlNode *parent, const string &name)
 
 ParamsBase (const string &name)
 Default constructor. More...
 
 ParamsBase (const ParamsBase &pbase)
 Copy constructor. More...
 
virtual ~ParamsBase ()
 destructor..destroys the xml tree based at the root node. More...
 
ParamNodeGetRootNode () const
 
const string GetName () const
 
virtual long GetValueLong (const string &tag, const vector< long > &defaultVal=_emptyLongVec)
 
virtual double GetValueDouble (const string &tag, const vector< double > &defaultVal=_emptyDoubleVec)
 
virtual const string GetValueString (const string &tag, const string &defaultVal=_emptyString)
 
virtual const vector< long > GetValueLongVec (const string &tag, const vector< long > &defaultVal=_emptyLongVec)
 
virtual const vector< double > GetValueDoubleVec (const string &tag, const vector< double > &defaultVal=_emptyDoubleVec)
 
virtual void GetValueStringVec (const string &tag, vector< string > &vec, const vector< string > &defaultVal=_emptyStringVec)
 
virtual int SetValueLong (string tag, const char *description, long value, Params *p)
 
virtual int SetValueLong (string tag, const char *description, const vector< long > &value, Params *p)
 
virtual int SetValueDouble (string tag, const char *description, double value, Params *p)
 
virtual int SetValueDouble (string tag, const char *description, const vector< double > &value, Params *p)
 
virtual int SetValueString (string tag, const char *description, const string &value, Params *p)
 
virtual int SetValueStringVec (string tag, const char *description, const vector< string > &value, Params *p)
 
ParamsBaseType GetParamsBaseTypeId ()
 
virtual void SetRootParamNode (ParamNode *pn)
 
ParamsBaseGetParamsBase (const vector< string > &path) const
 
int SetParamsBase (const vector< string > &path, ParamsBase *pbase)
 
int RemoveParamsBase (const vector< string > &path, ParamsBase *pbase)
 
void SetParent (XmlNode *parent)
 
virtual bool elementStartHandler (ExpatParseMgr *pm, int depth, string &tag, const char **attribs)
 
virtual bool elementEndHandler (ExpatParseMgr *pm, int depth, string &tag)
 
virtual ParamNodebuildNode ()
 
ParamNodeGetCurrentNode ()
 
ParamNodePush (string &tag, ParamsBase *pBase=0)
 
ParamNodePop ()
 
void Remove (const string &name)
 
const map< string, string > & GetAttributes ()
 
void Clear ()
 

Static Public Member Functions

static bool IsRenderingEnabled (int winnum)
 
- Static Public Member Functions inherited from VetsUtil::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message. More...
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code. More...
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code. More...
 
static int GetErrCode ()
 Retrieve the current error code. More...
 
static void SetErrMsgCB (ErrMsgCB_T cb)
 
static ErrMsgCB_T GetErrMsgCB ()
 
static void SetErrMsgFilePtr (FILE *fp)
 
static const FILE * SetErrMsgFilePtr ()
 
static void SetDiagMsg (const char *format,...)
 Record a formatted diagnostic message. More...
 
static const char * GetDiagMsg ()
 
static void SetDiagMsgCB (DiagMsgCB_T cb)
 
static DiagMsgCB_T GetDiagMsgCB ()
 
static void SetDiagMsgFilePtr (FILE *fp)
 
static bool EnableErrMsg (bool enable)
 
- Static Public Member Functions inherited from VAPoR::ParamsBase
static ParamsBaseType GetTypeFromTag (const string &tag)
 
static const string GetTagFromType (ParamsBaseType t)
 
static ParamsBaseCreateDefaultParamsBase (int pType)
 
static ParamsBaseCreateDefaultParamsBase (const string &tag)
 
static int RegisterParamsBaseClass (const string &tag, BaseCreateFcn fcn, bool isParams)
 
static int ReregisterParamsBaseClass (const string &tag, const string &newtag, bool isParams)
 
static int GetNumParamsClasses ()
 
static int GetNumBasicParamsClasses ()
 
static bool IsParamsTag (const string &tag)
 

Protected Member Functions

virtual int SetValueLong (string tag, const char *description, long value)
 
virtual int SetValueLong (string tag, const char *description, const vector< long > &value)
 
virtual int SetValueDouble (string tag, const char *description, double value)
 
virtual int SetValueDouble (string tag, const char *description, const vector< double > &value)
 
virtual int SetValueString (string tag, const char *description, const string &value)
 
virtual int SetValueStringVec (string tag, const char *description, const vector< string > &value)
 
- Protected Member Functions inherited from VetsUtil::MyBase
void SetClassName (const string &name)
 

Internal

Internal methods not intended for general use

 Params (XmlNode *parent, const string &name, int winNum)
 
 Params (int winNum, const string &name)
 Deprecated constructor, needed for built-in classes that do not have associated XML node: More...
 
virtual int GetInstanceIndex ()
 
virtual void SetVizNum (int vnum)
 
static int GetCurrentParamsInstanceIndex (int pType, int winnum)
 
static int GetCurrentParamsInstanceIndex (const std::string tag, int winnum)
 
static void SetCurrentParamsInstanceIndex (int pType, int winnum, int instance)
 
static ParamsGetParamsInstance (int pType, int winnum=-1, int instance=-1)
 
static ParamsGetParamsInstance (const std::string tag, int winnum=-1, int instance=-1)
 
static ParamsGetCurrentParamsInstance (int pType, int winnum)
 
static ParamsGetDefaultParams (ParamsBase::ParamsBaseType pType)
 
static ParamsGetDefaultParams (const string &tag)
 
static void SetDefaultParams (int pType, Params *p)
 
static void SetDefaultParams (const string &tag, Params *p)
 
static ParamsCreateDefaultParams (int pType)
 
static int GetNumParamsInstances (int pType, int winnum)
 
static int GetNumParamsInstances (const std::string tag, int winnum)
 
static void AppendParamsInstance (int pType, int winnum, Params *p)
 
static void AppendParamsInstance (const std::string tag, int winnum, Params *p)
 
static void RemoveParamsInstance (int pType, int winnum, int instance)
 
static vector< Params * > & GetAllParamsInstances (int pType, int winnum)
 
static int GetAllParamsInstances (string tag, vector< Params * > &)
 
static int DeleteVisualizer (int viznum)
 
static vector< Params * > & GetAllParamsInstances (const std::string tag, int winnum)
 
static map< int, vector< Params * > > * cloneAllParamsInstances (int winnum)
 
static vector< Params * > * cloneAllDefaultParams ()
 

Additional Inherited Members

- Public Types inherited from VetsUtil::MyBase
typedef void(* ErrMsgCB_T) (const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T) (const char *msg)
 
- Public Types inherited from VAPoR::ParamsBase
typedef int ParamsBaseType
 
- Static Public Attributes inherited from VetsUtil::MyBase
static char * ErrMsg
 
static int ErrCode
 
static int ErrMsgSize
 
static FILE * ErrMsgFilePtr
 
static ErrMsgCB_T ErrMsgCB
 
static char * DiagMsg
 
static int DiagMsgSize
 
static FILE * DiagMsgFilePtr
 
static DiagMsgCB_T DiagMsgCB
 
static bool Enabled
 

Detailed Description

A pure virtual class for managing parameters used in visualization.

Author
Alan Norton
Version
3.0
Date
March, 2014

Params classes provide containers for parameters used by the various renderers in VAPOR The parameters all all represented as an XML tree. Each Params instance has a ParamNode root and the ParamNode class provides methods for setting and getting the values from the XML representation. The Params class is also the basic entity that is used in Undo/Redo by the Command class, so that all changes in state occurring during the VAPOR application can be represented as a change in the state of a Params instance. The state of each Params instance is automatically saved and restored with the VAPOR Session file, using the XML representation.

The Params class is derived from ParamsBase, which provides the association between a Params class and its representation as a set of (key,value) pairs. All the parameters in a ParamsBase instance are stored in an XML tree, and can be retrieved based on the value of the associated tag (key). Params instances have additional capabilities (not found in ParamsBase instances), including the Undo/Redo support and the ability to be associated with a tab in the gui. When it is desired to contain a class within a Params class (such as a Transfer Function within a RenderParams) then the embedded class should be derived from ParamsBase, so that its state will be represented in the state of the containing Params instance.
In the VAPOR GUI, each tab corresponds to a Params subclass, and the renderer tabs correspond to subclasses of RenderParams, a subclass of Params. Several Params classes (BasicParams) have a unique instance and are not associated with tabs in the GUI. The BasicParams classes are used for Undo/Redo and for saving/restoring session state. At run time there is a collection of Params instances that describe the full state of the application. These Params instances can be retrieved using GetParamsInstance() and GetDefaultParams(). There is one default instance of each Params class. This instance is initially in the default state after data is loaded, but can be modified later. There is in addition one instance of Region, Animation, and Viewpoint params for each Visualizer, that represents the state of the local params for that visualizer. There are in addition one or more instances of each RenderParams Class for each visualizer, depending on how many instances have been created.
See also
Command, ParamsBase, ParamNode, RenderParams

Instructions for VAPOR Params implementers:

Implementers of VAPOR Params classes should implement a Params class with all of the state described by its ParamNode root.

If the Params class corresponds to a renderer, the Params class should be derived from RenderParams.
The implementer should also provide Get and Set methods for all of the parameters in the new Params class.
The Get methods can directly access the corresponding ParamNode methods that retrieve data from the XML tree.
The Set methods should invoke the methods Params::SetValueLong(), Params::SetValueDouble(), Params::SetValueString(), and Params::SetValueStringVec(), so that changes in the Params state will automatically be captured in the Undo/Redo queue, and so that values that are set are confirmed to be valid based on the current DataMgr.
Params implementers must also implement the various pure virtual methods described below.

Instructions for VAPOR application implementers:

Application code (such as scripting and GUI applications) must be aware of the various Params instances that are in use. Methods for accessing these instances are provided as static methods on Params described below. These methods allow retrieval of Params instances based on the type of Params, the visualizer that it is associated with, and the instance index of RenderParams.

Terminology:

Type: Each Params subclass has a unique string type, that also serves as the XML tag associated with the Params
Instance index: Each RenderParams has an instance index, allowing control of multiple RenderParams instances in the same rendering.
Visualizer: A visualizer is an OpenGL rendering window. These are numbered by positive integers. Each RenderParams instance is associated with a particular visualizer. Params instances that are not RenderParams can apply in one or more visualizer.
Current Instance: When there are multiple instances of a RenderParams, one of them is the "Current Instance". The current instance determines the values that are displayed in the GUI, and is also used as the default instance when referenced by another Params instance.

Definition at line 129 of file params.h.

Constructor & Destructor Documentation

VAPoR::Params::Params ( XmlNode *  parent,
const string &  name,
int  winNum 
)

Standard Params constructor

Parameters
[in]parentXmlNode corresponding to this Params class instance
[in]namestd::string name, can be the tag
[in]winNuminteger visualizer num, -1 for global or default params
VAPoR::Params::Params ( int  winNum,
const string &  name 
)
inline

Deprecated constructor, needed for built-in classes that do not have associated XML node:

Definition at line 144 of file params.h.

VAPoR::Params::Params ( const Params p)

Default copy constructor.

virtual VAPoR::Params::~Params ( )
virtual

Destroy object

Note
This destructor does not delete child XmlNodes created as children of the parent constructor parameter.

Member Function Documentation

static void VAPoR::Params::AppendParamsInstance ( int  pType,
int  winnum,
Params p 
)
inlinestatic

Static method that appends a new instance to the list of existing Params instances for a particular visualizer. Useful for application developers.

Parameters
[in]pTypeParamsBase TypeId of the params class
[in]winnumindex of specified visualizer window
[in]ppointer to Params instance being appended

Definition at line 288 of file params.h.

static void VAPoR::Params::AppendParamsInstance ( const std::string  tag,
int  winnum,
Params p 
)
inlinestatic

Static method that appends a new instance to the list of existing Params instances for a particular visualizer. Based on the XML tag of the Params class. Useful for application developers.

Parameters
[in]tagXML tag associated with Params class
[in]winnumindex of specified visualizer window
[in]ppointer to Params instance being appended

Definition at line 300 of file params.h.

static vector<Params*>* VAPoR::Params::cloneAllDefaultParams ( )
static

Static method that produces clones of all the default Params instances for a particular visualizer. Useful for application developers.

Parameters
[in]winnumindex of specified visualizer window
Return values
std::vectorof default Params pointers associated with the window, indexed by ParamsBase TypeIDs
static map<int, vector<Params*> >* VAPoR::Params::cloneAllParamsInstances ( int  winnum)
static

Static method that produces clones of all the Params instances for a particular visualizer. Useful for application developers.

Parameters
[in]winnumindex of specified visualizer window.
Return values
std::mapmapping from Params typeIDs to std::vectors of Params pointers associated with the window
static Params* VAPoR::Params::CreateDefaultParams ( int  pType)
static

Static method that constructs a default Params instance. Useful for application developers.

Parameters
[in]pTypeParamsBase TypeId of the params class
Return values
Pointerto new default Params instance
static int VAPoR::Params::DeleteVisualizer ( int  viznum)
static

Static method that deletes all the Params instances for a particular visualizer of any type.

Parameters
[in]viznumwindow number associated with the visualizer
Return values
numberof Params instances that were deleted.
static vector<Params*>& VAPoR::Params::GetAllParamsInstances ( int  pType,
int  winnum 
)
inlinestatic

Static method that produces a list of all the Params instances of a type for a particular visualizer. Useful for application developers.

Parameters
[in]pTypeParamsBase TypeId of the params class.
[in]winnumindex of specified visualizer window.
Return values
vectorof the Params pointers associated with the window .

Definition at line 318 of file params.h.

static int VAPoR::Params::GetAllParamsInstances ( string  tag,
vector< Params * > &   
)
static

Static method that produces a list of all the Params instances of a type for any visualizer (but not the default params) Useful for application developers.

Parameters
[in]pTypeParamsBase TypeId of the params class.
[out]vector<Params*>vector of all params of the specified type
Return values
intindicates size of result vector.
static vector<Params*>& VAPoR::Params::GetAllParamsInstances ( const std::string  tag,
int  winnum 
)
inlinestatic

Static method that produces a list of all the Params instances for a particular visualizer, based on the XML Tag of the Params class. Useful for application developers.

Parameters
[in]tagXML tag associated with Params class
[in]winnumindex of specified visualizer window
Return values
vectorof the Params pointers associated with the window

Definition at line 344 of file params.h.

virtual Box* VAPoR::Params::GetBox ( )
inlinevirtual

Virtual method to return the Box associated with a Params class. By default returns NULL. All params classes that use a box to define data extents should reimplement this method. Needed to support manipulators.

Return values
Box*returns pointer to the Box associated with this Params.

Reimplemented in VAPoR::RegionParams, VAPoR::IsolineParams, and VAPoR::ArrowParams.

Definition at line 464 of file params.h.

static Params* VAPoR::Params::GetCurrentParamsInstance ( int  pType,
int  winnum 
)
inlinestatic

Static method that returns the instance that is current in the identified window. Useful for application developers.

Parameters
[in]pTypeParamsBase TypeId of the params class
[in]winnumindex of identified window
Return values
Pointerto specified Params instance

Definition at line 212 of file params.h.

References IsLocal().

static int VAPoR::Params::GetCurrentParamsInstanceIndex ( int  pType,
int  winnum 
)
inlinestatic

Static method that identifies the instance that is current in the identified window. Useful for application developers.

Parameters
[in]pTypeParamsBase is the typeID of the params class
[in]winnumindex of identified window
Return values
instanceindex that is current

Definition at line 165 of file params.h.

static int VAPoR::Params::GetCurrentParamsInstanceIndex ( const std::string  tag,
int  winnum 
)
inlinestatic

Static method that identifies the instance that is current in the identified window. Useful for application developers. Uses tag to identify the Params class.

Parameters
[in]tagTag (name) of the params class
[in]winnumindex of identified window
Return values
instanceindex that is current

Definition at line 174 of file params.h.

static Params* VAPoR::Params::GetDefaultParams ( ParamsBase::ParamsBaseType  pType)
inlinestatic

Static method that returns the default Params instance. Useful for application developers. With non-render params this is the global Params instance.

Parameters
[in]pTypeParamsBase TypeId of the params class
Return values
Pointerto specified Params instance

Definition at line 224 of file params.h.

Referenced by VAPoR::DataStatus::getStretchFactors().

static Params* VAPoR::Params::GetDefaultParams ( const string &  tag)
inlinestatic

Static method that returns the default Params instance. Useful for application developers. Based on XML tag (name) of Params class. With non-render params this is the global Params instance.

Parameters
[in]tagXML tag of the Params class
Return values
Pointerto specified Params instance

Definition at line 234 of file params.h.

virtual int VAPoR::Params::GetInstanceIndex ( )
virtual

virtual method indicates instance index, only used with RenderParams Implementers need not implement this method. Should only be used if the Params instance has been installed by AppendParamsInstance() or InsertParamsInstance() Returns -1 if the Params instance is not installed.

Return values
integerinstance index

Referenced by VAPoR::Command::CaptureEnd().

static int VAPoR::Params::GetNumParamsInstances ( int  pType,
int  winnum 
)
static

Static method that tells how many instances of a Params class exist for a particular visualizer. Useful for application developers.

Parameters
[in]pTypeParamsBase TypeId of the params class
[in]winnumindex of specified visualizer window
Return values
numberof instances that exist
static int VAPoR::Params::GetNumParamsInstances ( const std::string  tag,
int  winnum 
)
inlinestatic

Static method that tells how many instances of a Params class exist for a particular visualizer. Based on the XML tag of the Params class. Useful for application developers.

Parameters
[in]tagXML tag associated with Params class
[in]winnumindex of specified visualizer window
Return values
numberof instances that exist

Definition at line 278 of file params.h.

static Params* VAPoR::Params::GetParamsInstance ( int  pType,
int  winnum = -1,
int  instance = -1 
)
static

Static method that finds the Params instance. Useful for application developers. if instance is -1, and winnum is >=0 the current instance in the specified window is found. if winnum is -1, the default instance is found.

Parameters
[in]pTypeParamsBase TypeId of the params class
[in]winnumindex of window
[in]instanceindex
static Params* VAPoR::Params::GetParamsInstance ( const std::string  tag,
int  winnum = -1,
int  instance = -1 
)
inlinestatic

Static method that finds the Params instance based on tag. Useful for application developers. if instance is -1, the current instance is found. if winnum is -1, the default instance is found.

Parameters
[in]tagXML Tag (name) of the params class
[in]winnumindex of window
[in]instanceindex

Definition at line 203 of file params.h.

virtual const std::string VAPoR::Params::getShortName ( )
pure virtual

Pure virtual method specifying short name e.g. to display on the associated tab. This is not the tag!

Return values
stringname to identify associated tab
See also
GetName

Implemented in VAPoR::InstanceParams, VAPoR::VizWinParams, VAPoR::MouseModeParams, VAPoR::RegionParams, VAPoR::ViewpointParams, VAPoR::ArrowParams, VAPoR::IsolineParams, and VAPoR::HelloParams.

virtual int VAPoR::Params::GetVizNum ( )
inlinevirtual

Identify the visualizer associated with this instance. With global or default or Basic Params this is -1

Definition at line 433 of file params.h.

Referenced by VAPoR::Command::CaptureEnd().

bool VAPoR::Params::isBasicParams ( ) const

Virtual method indicating whether a Params is "Basic", i.e. a Params class that has only one instance, used only for Undo/redo and sessions. Basic params are not associated with Tabs in the GUI. Default returns false. Useful for application developers.

Return values
returnstrue if it is UndoRedo
virtual bool VAPoR::Params::IsLocal ( )
inlinevirtual

Indicate whether a Params is local or not. Only used by non-render params

Return values
istrue if local

Definition at line 455 of file params.h.

Referenced by GetCurrentParamsInstance().

static bool VAPoR::Params::IsRenderingEnabled ( int  winnum)
static

Static method that tells whether or not any renderer is enabled in a visualizer. Useful for application developers.

Parameters
[in]winnumindex of specified visualizer window
Return values
Trueif any renderer is enabled
bool VAPoR::Params::isRenderParams ( ) const

method indicating whether a Params is a RenderParams instance. Default returns false. Useful for application developers.

Return values
returnstrue if it is a RenderParams
static void VAPoR::Params::RemoveParamsInstance ( int  pType,
int  winnum,
int  instance 
)
static

Static method that removes an instance from the list of existing Params instances for a particular visualizer. Useful for application developers.

Parameters
[in]pTypeParamsBase TypeId of the params class
[in]winnumindex of specified visualizer window
[in]instanceindex of instance to remove
virtual void VAPoR::Params::restart ( )
pure virtual

Pure virtual method, sets a Params instance to its default state, without any data present. Params implementers should assign valid values to all elements in the Params class in this method.

Implemented in VAPoR::VizWinParams, VAPoR::InstanceParams, VAPoR::ViewpointParams, VAPoR::RegionParams, VAPoR::MouseModeParams, VAPoR::IsolineParams, VAPoR::ArrowParams, and VAPoR::HelloParams.

static void VAPoR::Params::SetCurrentParamsInstanceIndex ( int  pType,
int  winnum,
int  instance 
)
inlinestatic

Static method that specifies the instance that is current in the identified window. For non-Render Params, the current instance should always be 0;

Parameters
[in]pTypeParamsBase TypeId of the params class
[in]winnumindex of identified window
[in]instanceindex of instance to be made current

Definition at line 183 of file params.h.

static void VAPoR::Params::SetDefaultParams ( int  pType,
Params p 
)
inlinestatic

Static method that sets the default Params instance. Useful for application developers. With non-render params this is the global Params instance.

Parameters
[in]pTypeParamsBase TypeId of the params class
[in]pPointer to default Params instance

Definition at line 243 of file params.h.

static void VAPoR::Params::SetDefaultParams ( const string &  tag,
Params p 
)
inlinestatic

Static method that specifies the default Params instance Based on Xml Tag of Params class. With non-render params this is the global Params instance. Useful for application developers.

Parameters
[in]tagXML Tag of the params class
[in]pPointer to default Params instance

Definition at line 253 of file params.h.

virtual int VAPoR::Params::SetLocal ( bool  lg)
inlinevirtual

Specify whether a [non-render]params is local or global. The local/global setting provides a means of controlling the sharing or non-sharing of parameters between different visualizers. A params instance is local if it applies only to in a single visualizer. Global params instances are applied in all other (non-local) visualizers. For example if there are three visualizers, Visualizer 0, 1, and 2, and suppose that the ViewpointParams associated with Visualizer 0 is Local, while the ViewpointParams associated with Visualizers 1 and 2 are both Global. In that case the viewpoint settings for Visualizer 0 can differ from the settings in Visualizer 1 and 2. However Visualizer 1 and 2 will share the same (global) viewpoint.

Parameters
[in]lgboolean is true if is local

Definition at line 449 of file params.h.

virtual int VAPoR::Params::SetValueDouble ( string  tag,
const char *  description,
double  value 
)
inlineprotectedvirtual

Method for setting a single double value associated with a tag. This will capture the state of the Params before the value is set, then set the value(s), then Validate(), and finally capture the state of the Params after the Validate() Returns 0 if successful, -1 if the value cannot be set

See also
Validate(), ParamsBase::GetValueDouble()
Parameters
[in]stringtag
[in]char*description
[in]doublevalue
Return values
intzero if successful

Definition at line 534 of file params.h.

virtual int VAPoR::Params::SetValueDouble ( string  tag,
const char *  description,
const vector< double > &  value 
)
inlineprotectedvirtual

Method for setting double values associated with a tag. This will capture the state of the Params before the values are set, then set the value(s), then Validate(), and finally capture the state of the Params after the Validate(). Returns 0 if successful, -1 if the value cannot be set

See also
Validate(), ParamsBase::GetValueDoubleVec()
Parameters
[in]stringtag
[in]char*description
[in]vector<double>value
Return values
intzero if successful

Definition at line 547 of file params.h.

virtual int VAPoR::Params::SetValueLong ( string  tag,
const char *  description,
long  value 
)
inlineprotectedvirtual

Method for setting a single long value associated with a tag. This will capture the state of the Params before the value is set, then set the value(s), then Validate(), and finally capture the state of the Params after the Validate()

See also
Validate(), ParamsBase::GetValueLong() Returns 0 if successful, -1 if the value cannot be set
Parameters
[in]stringtag
[in]longvalue
[in]char*description
Return values
intzero if successful

Definition at line 508 of file params.h.

virtual int VAPoR::Params::SetValueLong ( string  tag,
const char *  description,
const vector< long > &  value 
)
inlineprotectedvirtual

Method for setting long values associated with a tag. This will capture the state of the Params before the value is set, then set the value(s), then Validate(), and finally capture the state of the Params after the Validate() Returns 0 if successful, -1 if the value cannot be set

See also
Validate(), ParamsBase::GetValueLongVec()
Parameters
[in]stringtag
[in]char*description
[in]vector<long>value
Return values
intzero if successful

Definition at line 521 of file params.h.

virtual int VAPoR::Params::SetValueString ( string  tag,
const char *  description,
const string &  value 
)
inlineprotectedvirtual

Method for setting a single string value associated with a tag. This will capture the state of the Params before the value is set, then set the value, then Validate(), and finally capture the state of the Params after the Validate() Returns 0 if successful, -1 if the value cannot be set

See also
Validate(), ParamsBase::GetValueString()
Parameters
[in]stringtag
[in]char*description
[in]stringvalue
Return values
intzero if successful

Definition at line 561 of file params.h.

virtual int VAPoR::Params::SetValueStringVec ( string  tag,
const char *  description,
const vector< string > &  value 
)
inlineprotectedvirtual

Method for setting string values associated with a tag. This will capture the state of the Params before the values are set, then set the value(s), then Validate(), and finally capture the state of the Params after the Validate() returns 0 if successful, -1 if the value cannot be set.

Note
strings in string vectors must be non-blank, non-empty, and must not have embedded blank characters.
See also
Validate(), ParamsBase::GetValueStringVec()
Parameters
[in]stringtag
[in]char*description
[in]vector<string>value
Return values
intzero if successful

Definition at line 575 of file params.h.

virtual void VAPoR::Params::SetVizNum ( int  vnum)
inlinevirtual

Specify the visualizer index of a Params instance. Not covered by undo/redo; not a user-level setting

Parameters
[in]vnumis the integer visualizer number

Definition at line 366 of file params.h.

virtual void VAPoR::Params::Validate ( int  type)
pure virtual

Pure virtual method for validation of all settings It is required that implementers of Params classes write this method so that it checks the values of all parameters in the Params instance, ensuring that they are consistent with the current DataMgr When the type argument is 0, this method sets all parameters to their default values associated with the current Data Manager. When the type argument is 1, the method changes only those parameters that are inconsistent with the current Data Manager, setting them to values that are consistent. When the type argument is 2 the method can assume that the DataMgr has not changed so the values that change with DataMgr (such as the variable names) do not need to be checked.

The Validate(2) method is invoked after a SetValue is issued, so that the state of the Params object should be valid even after erroneous values have been set.
Parameters
[in]inttype
See also
DataMgr

Implemented in VAPoR::VizWinParams, VAPoR::InstanceParams, VAPoR::ViewpointParams, VAPoR::RegionParams, VAPoR::MouseModeParams, VAPoR::IsolineParams, VAPoR::ArrowParams, and VAPoR::HelloParams.


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