nidas
v1.2-1520
|
#include <ProjectConfigs.h>
Public Member Functions | |
ProjectConfig () | |
const std::string & | getName () const |
void | setName (const std::string &val) |
const std::string & | getXMLName () const |
void | setXMLName (const std::string &val) |
const nidas::util::UTime & | getBeginTime () const |
void | setBeginTime (const nidas::util::UTime &val) |
const nidas::util::UTime & | getEndTime () const |
void | setEndTime (const nidas::util::UTime &val) |
void | addEnvironmentVariable (const std::string &name, const std::string &value) |
Add an environment variable to this ProjectConfig. 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 ProjectConfig. More... | |
void | initProject (Project &project) const throw (nidas::core::XMLException, nidas::util::InvalidParameterException) |
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 | _xmlName |
nidas::util::UTime | _beginTime |
nidas::util::UTime | _endTime |
std::map< std::string, std::string > | _envVars |
ProjectConfig::ProjectConfig | ( | ) |
References getBeginTime(), setEndTime(), and USECS_PER_DAY.
void ProjectConfig::addEnvironmentVariable | ( | const std::string & | name, |
const std::string & | value | ||
) |
Add an environment variable to this ProjectConfig.
The actual process environment is not effected. After doing addEnvironmentVariable() one or more times, use ProjectConfig::putenv() to update the actual process environment. Set value to an empty string to remove a variable from the environment.
References _envVars.
void ProjectConfig::fromDOMElement | ( | const xercesc::DOMElement * | node | ) | |
throw | ( | nidas::util::InvalidParameterException | |||
) |
|
inline |
References _beginTime.
Referenced by nidas::core::ProjectConfigs::addConfigByTime(), ProjConfigIO::getConfig(), nidas::core::ProjectConfigs::getConfig(), ProjConfigIO::getConfigForTime(), ProjConfigIO::listConfigs(), nidas::core::ProjectConfigTimeComparator::operator()(), ProjectConfig(), StatsProcess::run(), and DataPrep::run().
|
inline |
References _endTime.
Referenced by nidas::core::ProjectConfigs::addConfigByTime(), ProjConfigIO::getConfig(), nidas::core::ProjectConfigs::getConfig(), ProjConfigIO::getConfigForTime(), ProjConfigIO::listConfigs(), nidas::core::ProjectConfigTimeComparator::operator()(), StatsProcess::run(), and DataPrep::run().
|
inline |
References _envVars.
|
inline |
|
inline |
References _xmlName.
Referenced by ProjConfigIO::getConfig(), ProjConfigIO::getConfigForTime(), ProjConfigIO::listConfigs(), nidas::core::DSMServerApp::run(), StatsProcess::run(), and DataPrep::run().
void ProjectConfig::initProject | ( | Project & | project | ) | const |
throw | ( | nidas::core::XMLException, | |||
nidas::util::InvalidParameterException | |||||
) |
project,: | the project, by reference. |
References nidas::util::Process::expandEnvVars(), and nidas::core::parseXMLConfigFile().
Referenced by StatsProcess::listOutputSamples(), nidas::core::DSMServerApp::run(), StatsProcess::run(), and DataPrep::run().
void ProjectConfig::putenv | ( | ) | const |
Update the process environment with the current list of environment variables in the ProjectConfig.
References _envVars, nidas::util::Process::getEnvVar(), getName(), and nidas::util::Process::setEnvVar().
|
inline |
References _beginTime.
Referenced by ProjConfigIO::addConfigByTime().
|
inline |
References _endTime.
Referenced by ProjConfigIO::addConfigByTime(), ProjectConfig(), and ProjConfigIO::termConfig().
|
inline |
References _name.
Referenced by ProjConfigIO::addConfigByTime().
|
inline |
References _xmlName.
Referenced by ProjConfigIO::addConfigByTime().
xercesc::DOMElement * ProjectConfig::toDOMElement | ( | xercesc::DOMElement * | node | ) | const |
throw | ( | xercesc::DOMException | |||
) |
xercesc::DOMElement * ProjectConfig::toDOMParent | ( | xercesc::DOMElement * | parent | ) | const |
throw | ( | xercesc::DOMException | |||
) |
References nidas::core::DOMable::getNamespaceURI().
Referenced by nidas::core::ProjectConfigs::toDOMElement().
|
private |
Referenced by getBeginTime(), and setBeginTime().
|
private |
Referenced by getEndTime(), and setEndTime().
|
private |
Referenced by addEnvironmentVariable(), getEnvironmentVariables(), and putenv().
|
private |
Referenced by getXMLName(), and setXMLName().