VAPOR3 3.9.4
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
VAPoR::ParamsBase Class Reference

Nodes with state in Xml tree representation. More...

#include <ParamsBase.h>

Inheritance diagram for VAPoR::ParamsBase:
Wasp::MyBase AnimationParams AppSettingsParams BookmarkParams GUIStateParams MouseModeParams SettingsParams VAPoR::AnnotationParams VAPoR::AnnotationsParams VAPoR::AxisAnnotation VAPoR::Box VAPoR::ColorMap VAPoR::ColorbarPbase VAPoR::ContourParams::Contours VAPoR::DatasetParams VAPoR::DatasetParams::ScriptParams VAPoR::DatasetsParams VAPoR::MapperFunction VAPoR::OpacityMap VAPoR::ParamsSeparator VAPoR::PythonScript VAPoR::PythonVariablesParams VAPoR::RegionParams VAPoR::RenderParams VAPoR::Transform VAPoR::Viewpoint VAPoR::ViewpointParams

Classes

class  StateSave
 State capture class. More...
 

Public Member Functions

 ParamsBase (StateSave *ssave, const string &classname)
 
 ParamsBase (StateSave *ssave, XmlNode *node)
 
 ParamsBase (const ParamsBase &rhs)
 Copy constructor.
 
ParamsBaseoperator= (const ParamsBase &rhs)
 
 ParamsBase (ParamsBase &&)=delete
 
ParamsBaseoperator= (ParamsBase &)=delete
 
bool operator== (const ParamsBase &rhs) const
 Equivalence operator.
 
bool operator!= (const ParamsBase &rhs) const
 
virtual ~ParamsBase ()
 
void SetParent (ParamsBase *parent)
 
XmlNodeGetNode () const
 
void BeginGroup (const string &description)
 
void EndGroup ()
 
void IntermediateChange ()
 
virtual vector< long > GetValueLongVec (const string tag) const
 
virtual vector< long > GetValueLongVec (const string tag, const vector< long > &defaultVal) const
 
virtual long GetValueLong (const string tag, long defaultVal) const
 
virtual vector< double > GetValueDoubleVec (const string tag) const
 
virtual vector< double > GetValueDoubleVec (const string tag, const vector< double > &defaultVal) const
 
virtual double GetValueDouble (const string tag, double defaultVal) const
 
virtual vector< string > GetValueStringVec (const string tag) const
 
virtual vector< string > GetValueStringVec (const string tag, const vector< string > &defaultVal) const
 
virtual string GetValueString (const string tag, string defaultVal) const
 
virtual void SetValueLongVec (const string &tag, string description, const vector< long > &values)
 
virtual void SetValueLong (const string &tag, string description, long value)
 
virtual void SetValueDoubleVec (const string &tag, string description, const vector< double > &values)
 
virtual void SetValueDouble (const string &tag, string description, double value)
 
virtual void SetValueStringVec (const string &tag, string description, const vector< string > &values)
 
virtual void SetValueString (const string &tag, string description, const string &value)
 
string GetName () const
 
- Public Member Functions inherited from Wasp::MyBase
 MyBase ()
 
const string & getClassName () const
 

Protected Member Functions

 ParamsBase (StateSave *ssave)
 
void Remove (const string &name)
 
const map< string, string > & GetAttributes ()
 
void Clear ()
 
- Protected Member Functions inherited from Wasp::MyBase
void SetClassName (const string &name)
 

Protected Attributes

StateSave_ssave
 
XmlNode_node
 

Additional Inherited Members

- Public Types inherited from Wasp::MyBase
typedef void(* ErrMsgCB_T) (const char *msg, int err_code)
 
typedef void(* DiagMsgCB_T) (const char *msg)
 
- Static Public Member Functions inherited from Wasp::MyBase
static void SetErrMsg (const char *format,...)
 Record a formatted error message.
 
static void SetErrMsg (int errcode, const char *format,...)
 Record a formatted error message and an error code.
 
static const char * GetErrMsg ()
 
static void SetErrCode (int err_code)
 Record an error code.
 
static int GetErrCode ()
 Retrieve the current error code.
 
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.
 
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 bool GetEnableErrMsg ()
 
- Static Public Attributes inherited from Wasp::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

Nodes with state in Xml tree representation.

Author
John Clyne
Version
$Revision$
Date
$Date$

This is pure abstract base class that may be derived for to maintain parameter state information in a manner that supports session save/restore and undo/redo operations. All session state is maintained in an XML tree that may be written to a file and subsequently used to reinitialize ParamsBase class objects.

Definition at line 50 of file ParamsBase.h.

Constructor & Destructor Documentation

◆ ParamsBase() [1/5]

VAPoR::ParamsBase::ParamsBase ( StateSave ssave,
const string &  classname 
)

Create a ParamsBase object from scratch

Parameters
[in]ssaveStateSave class object that will be used to record state changes made to this class.
[in]classnameThe string identifier associated with a derived class that will be used to create new instances of that class via the ParamsFactory factory object.

◆ ParamsBase() [2/5]

VAPoR::ParamsBase::ParamsBase ( StateSave ssave,
XmlNode node 
)

Create a ParamsBase object from an existing XmlNode tree

This method will construct a ParamsBase object using an existing XML tree. Hence it should NOT do any initialization that changes parameter values.

◆ ParamsBase() [3/5]

VAPoR::ParamsBase::ParamsBase ( const ParamsBase rhs)

Copy constructor.

◆ ParamsBase() [4/5]

VAPoR::ParamsBase::ParamsBase ( ParamsBase &&  )
delete

Explicit delete the two flavors of move constructor, so they ain't called accidentally.

◆ ~ParamsBase()

virtual VAPoR::ParamsBase::~ParamsBase ( )
virtual

Destroy object

Destroys all resources except possibly the XmlNode and its children associated with this object. If this objects node is a root node (i.e. has no parent) the node is freed. Otherwise it is not.

◆ ParamsBase() [5/5]

VAPoR::ParamsBase::ParamsBase ( StateSave ssave)
protected

Member Function Documentation

◆ BeginGroup()

void VAPoR::ParamsBase::BeginGroup ( const string &  description)
inline

Definition at line 138 of file ParamsBase.h.

◆ Clear()

void VAPoR::ParamsBase::Clear ( )
protected

Remove (undefine) all parameters

This method deletes any and all paramters contained in the base class as well as deleting any tree branches.

◆ EndGroup()

void VAPoR::ParamsBase::EndGroup ( )
inline

Definition at line 139 of file ParamsBase.h.

◆ GetAttributes()

const map< string, string > & VAPoR::ParamsBase::GetAttributes ( )
protected

Return the attributes associated with the current branch

Return values
mapattribute mapping

◆ GetName()

string VAPoR::ParamsBase::GetName ( ) const
inline

Method for obtaining the name and/or tag associated with the instance

Definition at line 175 of file ParamsBase.h.

References VAssert.

◆ GetNode()

XmlNode * VAPoR::ParamsBase::GetNode ( ) const
inline

Definition at line 136 of file ParamsBase.h.

Referenced by VAPoR::ParamsContainer::SetParent().

◆ GetValueDouble()

virtual double VAPoR::ParamsBase::GetValueDouble ( const string  tag,
double  defaultVal 
) const
virtual

◆ GetValueDoubleVec() [1/2]

virtual vector< double > VAPoR::ParamsBase::GetValueDoubleVec ( const string  tag) const
virtual

◆ GetValueDoubleVec() [2/2]

virtual vector< double > VAPoR::ParamsBase::GetValueDoubleVec ( const string  tag,
const vector< double > &  defaultVal 
) const
virtual

◆ GetValueLong()

virtual long VAPoR::ParamsBase::GetValueLong ( const string  tag,
long  defaultVal 
) const
virtual

◆ GetValueLongVec() [1/2]

virtual vector< long > VAPoR::ParamsBase::GetValueLongVec ( const string  tag) const
virtual

◆ GetValueLongVec() [2/2]

virtual vector< long > VAPoR::ParamsBase::GetValueLongVec ( const string  tag,
const vector< long > &  defaultVal 
) const
virtual

◆ GetValueString()

virtual string VAPoR::ParamsBase::GetValueString ( const string  tag,
string  defaultVal 
) const
virtual

◆ GetValueStringVec() [1/2]

virtual vector< string > VAPoR::ParamsBase::GetValueStringVec ( const string  tag) const
virtual

◆ GetValueStringVec() [2/2]

virtual vector< string > VAPoR::ParamsBase::GetValueStringVec ( const string  tag,
const vector< string > &  defaultVal 
) const
virtual

◆ IntermediateChange()

void VAPoR::ParamsBase::IntermediateChange ( )
inline

Definition at line 140 of file ParamsBase.h.

◆ operator!=()

bool VAPoR::ParamsBase::operator!= ( const ParamsBase rhs) const
inline

Definition at line 115 of file ParamsBase.h.

◆ operator=() [1/2]

ParamsBase & VAPoR::ParamsBase::operator= ( const ParamsBase rhs)

◆ operator=() [2/2]

ParamsBase & VAPoR::ParamsBase::operator= ( ParamsBase )
delete

◆ operator==()

bool VAPoR::ParamsBase::operator== ( const ParamsBase rhs) const
inline

Equivalence operator.

Definition at line 113 of file ParamsBase.h.

References _node, and _ssave.

◆ Remove()

void VAPoR::ParamsBase::Remove ( const string &  name)
protected

Delete the named branch.

This method deletes the named child, and all decendents, of the current destroying it's contents in the process. The named node must be a child of the current node. If the named node does not exist the result is a no-op.

Parameters
[in]nameThe name of the branch

◆ SetParent()

void VAPoR::ParamsBase::SetParent ( ParamsBase parent)

Set parent

This method sets the parent of the ParamsBase class to parent, modifying both this class instance and the parent

Parameters
[in]parentA pointer to a parent ParamsBase class . If NULL the class will become parentless

◆ SetValueDouble()

virtual void VAPoR::ParamsBase::SetValueDouble ( const string &  tag,
string  description,
double  value 
)
virtual

◆ SetValueDoubleVec()

virtual void VAPoR::ParamsBase::SetValueDoubleVec ( const string &  tag,
string  description,
const vector< double > &  values 
)
virtual

◆ SetValueLong()

virtual void VAPoR::ParamsBase::SetValueLong ( const string &  tag,
string  description,
long  value 
)
virtual

◆ SetValueLongVec()

virtual void VAPoR::ParamsBase::SetValueLongVec ( const string &  tag,
string  description,
const vector< long > &  values 
)
virtual

◆ SetValueString()

virtual void VAPoR::ParamsBase::SetValueString ( const string &  tag,
string  description,
const string &  value 
)
virtual

◆ SetValueStringVec()

virtual void VAPoR::ParamsBase::SetValueStringVec ( const string &  tag,
string  description,
const vector< string > &  values 
)
virtual

Member Data Documentation

◆ _node

XmlNode* VAPoR::ParamsBase::_node
protected

Definition at line 210 of file ParamsBase.h.

Referenced by operator==().

◆ _ssave

StateSave* VAPoR::ParamsBase::_ssave
protected

Definition at line 209 of file ParamsBase.h.

Referenced by operator==().


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