VAPoR  0.1
Public Member Functions | Static Public 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::ParsedXml VAPoR::AnimationParams VAPoR::RegionParams VAPoR::RenderParams VAPoR::ViewpointParams

Public Member Functions

 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...
 
 Params (const Params &p)
 Default copy constructor. More...
 
virtual ~Params ()
 
virtual const std::string & getShortName ()=0
 
virtual bool isRenderParams ()
 
virtual ParamsdeepCopy (ParamNode *nd=0)
 
virtual void restart ()=0
 Pure virtual method, sets a Params instance to its default state. More...
 
virtual int getVizNum ()
 
virtual void setLocal (bool lg)
 
bool isLocal ()
 
virtual void setVizNum (int vnum)
 
virtual void SetVisualizerNum (int viznum)
 
virtual int GetVisualizerNum ()
 
virtual bool reinit (bool)
 
virtual BoxGetBox ()
 
virtual int getOrientation ()
 
virtual void calcContainingStretchedBoxExtentsInCube (float extents[6], bool rotated=false)
 
void calcRotatedStretchedBoxExtentsInCube (float extents[6])
 
virtual bool isDomainConstrained ()
 
- 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 ()
 
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)
 
ParamNodeGetRootNode ()
 
virtual ParamNodebuildNode ()
 
void SetFlagDirty (const string &flag)
 
const string & GetName ()
 
ParamsBaseType GetParamsBaseTypeId ()
 
virtual void SetRootParamNode (ParamNode *pn)
 
- Public Member Functions inherited from VAPoR::ParsedXml
virtual ~ParsedXml ()
 
virtual bool elementStartHandler (ExpatParseMgr *, int, std::string &, const char **)=0
 
virtual bool elementEndHandler (ExpatParseMgr *, int, std::string &)=0
 
virtual bool charHandler (ExpatParseMgr *, const XML_Char *, int)
 

Static Public Member Functions

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 void InsertParamsInstance (int pType, int winnum, int posn, Params *dp)
 
static vector< Params * > & GetAllParamsInstances (int pType, int winnum)
 
static vector< Params * > & GetAllParamsInstances (const std::string tag, int winnum)
 
static map< int, vector< Params * > > * cloneAllParamsInstances (int winnum)
 
static vector< Params * > * cloneAllDefaultParams ()
 
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 bool IsParamsTag (const string &tag)
 

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
 
- Public Attributes inherited from VAPoR::ParsedXml
ParsedXmlpreviousClass
 
- 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
 
- Protected Member Functions inherited from VetsUtil::MyBase
void SetClassName (const string &name)
 
- Protected Member Functions inherited from VAPoR::ParamsBase
virtual ParamNodegetCurrentParamNode ()
 
virtual void setCurrentParamNode (ParamNode *pn)
 
ParamNodeGetCurrentNode ()
 
ParamNodePush (string &tag, ParamsBase *pBase=0)
 
ParamNodePop ()
 
void Remove (const string &name)
 
const map< string, string > & GetAttributes ()
 
void Clear ()
 
- Protected Attributes inherited from VAPoR::ParamsBase
string _paramsBaseName
 
int _parseDepth
 
- Static Protected Attributes inherited from VAPoR::ParamsBase
static vector< ParamsBase * > dummyParamsBaseInstances
 
static const string _emptyString
 
static map< string, int > classIdFromTagMap
 
static map< int, string > tagFromClassIdMap
 
static map< int, BaseCreateFcn > createDefaultFcnMap
 
static int numParamsClasses
 
static int numEmbedClasses
 
- Static Protected Attributes inherited from VAPoR::ParsedXml
static const string _stringType
 
static const string _longType
 
static const string _doubleType
 
static const string _typeAttr
 

Detailed Description

A pure virtual class for managing parameters used in visualization.

Author
Alan Norton
Version
$Revision$
Date
$Date$

Definition at line 75 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 86 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.

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

Definition at line 229 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.

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

Definition at line 239 of file params.h.

virtual void VAPoR::Params::calcContainingStretchedBoxExtentsInCube ( float  extents[6],
bool  rotated = false 
)
inlinevirtual

Virtual method supports rotated boxes such as probe Specifies an axis-aligned box containing the rotated box. By default it just finds the box extents. Caller must supply extents array, which gets its values filled in.

Parameters
[out]float[6]Extents of rotated box

Definition at line 357 of file params.h.

void VAPoR::Params::calcRotatedStretchedBoxExtentsInCube ( float  extents[6])
static vector<Params*>* VAPoR::Params::cloneAllDefaultParams ( )
static

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

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.

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)
inlinestatic

Static method that constructs a default Params instance.

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

Definition at line 199 of file params.h.

virtual Params* VAPoR::Params::deepCopy ( ParamNode nd = 0)
virtual

Pure virtual method that clones a Params instance. Derived from ParamsBase. With Params instances, the argument is ignored.

Parameters
[in]ndParamNode* instance corresponding to the ParamsBase instance

Reimplemented from VAPoR::ParamsBase.

static vector<Params*>& VAPoR::Params::GetAllParamsInstances ( int  pType,
int  winnum 
)
inlinestatic

Static method that produces a list of all the Params instances for a particular visualizer.

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 266 of file params.h.

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.

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 276 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 so support manipulators.

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

Definition at line 344 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.

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

Definition at line 157 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.

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

Definition at line 115 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. 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 123 of file params.h.

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

Static method that returns the default Params instance. 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 167 of file params.h.

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

Static method that returns the default Params instance. 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 176 of file params.h.

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

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

Parameters
[in]pTypeParamsBase TypeId of the params class
[in]winnumindex of specified visualizer window
Return values
numberof instances that exist

Definition at line 210 of file params.h.

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.

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

Definition at line 220 of file params.h.

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

The orientation is used only with 2D Box Manipulators, and must be implemented for Params supporting such manipulators. Valid values are 0,1,2 for being orthog to X,Y,Z-axes. Default is -1 (invalid)

Return values
intorientation direction (0,1,2)

Definition at line 349 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. if instance is -1, the current instance 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

Referenced by VAPoR::VizWinMgr::getActiveParams().

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. 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 149 of file params.h.

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

Pure virtual method specifying name to display on the associated tab.

Return values
stringname to identify associated tab
virtual int VAPoR::Params::GetVisualizerNum ( )
virtual
virtual int VAPoR::Params::getVizNum ( )
inlinevirtual

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

Definition at line 312 of file params.h.

static void VAPoR::Params::InsertParamsInstance ( int  pType,
int  winnum,
int  posn,
Params dp 
)
inlinestatic

Static method that inserts a new instance into the list of existing Params instances for a particular visualizer.

Parameters
[in]pTypeParamsBase TypeId of the params class.
[in]winnumindex of specified visualizer window.
[in]posnindex where new instance will be inserted.
[in]dppointer to Params instance being appended.

Definition at line 256 of file params.h.

virtual bool VAPoR::Params::isDomainConstrained ( )
inlinevirtual

This virtual method specifies that the box associated with this Params is constrained to stay within data extents. Override this method to allow the manipulator to move the box outside of the data extents. Default returns true.

Return values
booltrue if box not allowed to go completely outside of data.

Definition at line 367 of file params.h.

bool VAPoR::Params::isLocal ( )
inline

Indicate whether a Params is local or not.

Return values
istrue if local

Definition at line 324 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.

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

Virtual method indicating whether a Params is a RenderParams instance. Default returns false.

Return values
returnstrue if it is a RenderParams

Definition at line 300 of file params.h.

virtual bool VAPoR::Params::reinit ( bool  )
inlinevirtual

Virtual method to set up the Params to deal with new metadata. When a new metadata is read, all params are notified. If the params have state that depends on the metadata (e.g. region size, variable, etc., they should implement reinit() to respond. Default does nothing.

Definition at line 338 of file params.h.

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.

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.

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.

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

Definition at line 131 of file params.h.

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

Static method that sets the default Params instance. 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 184 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.

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

Definition at line 193 of file params.h.

virtual void VAPoR::Params::setLocal ( bool  lg)
inlinevirtual

Specify whether a params is local or global.

Parameters
[in]lgboolean is true if is local

Definition at line 316 of file params.h.

virtual void VAPoR::Params::SetVisualizerNum ( int  viznum)
virtual
virtual void VAPoR::Params::setVizNum ( int  vnum)
inlinevirtual

Specify the visualizer index of a Params instance.

Parameters
[in]vnumis the integer visualizer number

Definition at line 328 of file params.h.


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