rwsf::Configrwsf::HandleBase
#include rwsf/core/Config.h
rwsf::Config is the base class for classes that encapsulate information from a deployment descriptor. Configuration information consists of a context object and a set of name/value pairs. The service implementation creates an instance of this class for each service instance. This class implements the handle/body idiom in which rwsf::ConfigImp is the body.
An instance of rwsf::Config contains the configuration information for each object created by the HydraSCA Agent. When the HydraSCA Agent starts up, it reads the objects.xml configuration file supplied for each service. This configuration file defines each object required by a service along with its initialization parameters. The HydraSCA Agent places these parameters into an rwsf::Config object which then gets passed to the init() method for the named object.
Config();
Default constructor. Creates an empty config object.
Config(const Config & config);
Attaches to and increments the reference count on config's body.
virtual ~Config();
Detaches from the current body (if any), decrements the reference count of the body, and deletes the body if there are no other references.
bool containsParameter(const std::string & name) const;
Returns true if the rwsf::Config instance contains an initialization parameter whose key matches name; otherwise, false. Parameter name comparisons are case-sensitive.
bool getBoolInitParameter(const std::string & key, bool def = false) const;
Returns the value associated with the initialization parameter key, where the value may be either true or false. If the key is not found, returns def.
std::string getInitParameter(const std::string & name) const;
Returns the value of the initialization parameter name. Initialization parameters are configured in the rwsf::Config instance. If the name is not found, returns the empty string. Parameter name comparisons are case-sensitive.
rwsf::Enumeration< std::string > getInitParameterNames() const;
Returns an enumeration of all the parameter names defined for this object in the rwsf::Config instance. When the instance defines no initialization parameters, the enumeration will be empty.
long getLongInitParameter(const std::string & key, long def = 0) const;
Returns the value of the initialization parameter key. If the key is not found, returns def.
void setBoolInitParameter(const std::string & key, bool value);
Sets the value of the initialization parameter key to value.
void setInitParameter(const std::string & key, const std::string & value);
Sets the value of the initialization parameter key to value.
void setLongInitParameter(const std::string & key, long value);
Sets the value of the initialization parameter key to value.
rwsf::ConfigImp & body() const;
Reimplements method in rwsf::HandleBase
Base class documentation:
Gets a reference for the body instance, if any; otherwise, throws an rwsf::Exception exception.
Config & operator=(const Config & rhs);
Assignment operator.
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.