nidas  v1.2-1520
Public Member Functions | Private Attributes | List of all members
nidas::core::Dataset Class Reference

A Dataset is a named collection of parameters, that are used in data processing. More...

#include <Datasets.h>

Public Member Functions

 Dataset ()
 
const std::string & getName () const
 
void setName (const std::string &val)
 
const std::string & getDescription () const
 
void setDescription (const std::string &val)
 
float getResolutionSecs () const
 
void setResolutionSecs (float val)
 
void addEnvironmentVariable (const std::string &name, const std::string &value)
 Add an environment variable to this Dataset. More...
 
std::map< std::string,
std::string > 
getEnvironmentVariables () const
 
void putenv () const
 Update the process environment with the current list of environment variables in the Dataset. More...
 
void fromDOMElement (const xercesc::DOMElement *) throw (nidas::util::InvalidParameterException)
 
xercesc::DOMElement * toDOMParent (xercesc::DOMElement *parent) const throw (xercesc::DOMException)
 
xercesc::DOMElement * toDOMElement (xercesc::DOMElement *node) const throw (xercesc::DOMException)
 

Private Attributes

std::string _name
 
std::string _desc
 
float _resSecs
 
std::map< std::string,
std::string > 
_envVars
 

Detailed Description

A Dataset is a named collection of parameters, that are used in data processing.

In addition to a name, a long-winded description, a resolution in seconds, there are one or more name=value string parameters which are typically set in a Unix process environment.

Constructor & Destructor Documentation

Dataset::Dataset ( )

Member Function Documentation

void Dataset::addEnvironmentVariable ( const std::string &  name,
const std::string &  value 
)

Add an environment variable to this Dataset.

The actual process environment is not effected. After doing addEnvironmentVariable() one or more times, use Dataset::putenv() to update the actual process environment. Set value to an empty string to remove a variable from the environment.

References _envVars.

void Dataset::fromDOMElement ( const xercesc::DOMElement *  node)
throw (nidas::util::InvalidParameterException
)
const std::string& nidas::core::Dataset::getDescription ( ) const
inline

References _desc.

std::map<std::string,std::string> nidas::core::Dataset::getEnvironmentVariables ( ) const
inline

References _envVars.

Referenced by DatasetsApp::showEnv().

const std::string& nidas::core::Dataset::getName ( ) const
inline
float nidas::core::Dataset::getResolutionSecs ( ) const
inline

References _resSecs.

Referenced by StatsProcess::getDataset().

void Dataset::putenv ( ) const

Update the process environment with the current list of environment variables in the Dataset.

References _envVars, getName(), and nidas::util::Process::setEnvVar().

Referenced by StatsProcess::getDataset(), and nidas::core::NidasApp::throw().

void nidas::core::Dataset::setDescription ( const std::string &  val)
inline

References _desc.

void nidas::core::Dataset::setName ( const std::string &  val)
inline

References _name.

void nidas::core::Dataset::setResolutionSecs ( float  val)
inline

References _resSecs.

xercesc::DOMElement * Dataset::toDOMElement ( xercesc::DOMElement *  node) const
throw (xercesc::DOMException
)
xercesc::DOMElement * Dataset::toDOMParent ( xercesc::DOMElement *  parent) const
throw (xercesc::DOMException
)

Member Data Documentation

std::string nidas::core::Dataset::_desc
private

Referenced by getDescription(), and setDescription().

std::map<std::string,std::string> nidas::core::Dataset::_envVars
private
std::string nidas::core::Dataset::_name
private

Referenced by getName(), and setName().

float nidas::core::Dataset::_resSecs
private

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