activemq-cpp-3.3.0
|
Interface for a Java-like properties object. More...
#include <src/main/cms/CMSProperties.h>
Public Member Functions | |
virtual | ~CMSProperties () throw () |
virtual int | size () const =0 |
Returns the current count of all the Properties that are currently stored in the Properties object. | |
virtual bool | isEmpty () const =0 |
Returns true if the properties object is empty. | |
virtual const char * | getProperty (const std::string &name) const =0 |
Looks up the value for the given property. | |
virtual std::string | getProperty (const std::string &name, const std::string &defaultValue) const =0 |
Looks up the value for the given property. | |
virtual void | setProperty (const std::string &name, const std::string &value)=0 |
Sets the value for a given property. | |
virtual bool | hasProperty (const std::string &name) const =0 |
Check to see if the Property exists in the set. | |
virtual std::string | remove (const std::string &name)=0 |
Removes the property with the given name. | |
virtual std::vector< std::string > | propertyNames () const =0 |
Returns a vector containing all the names of the properties currently stored in the Properties object. | |
virtual std::vector< std::pair < std::string, std::string > > | toArray () const =0 |
Method that serializes the contents of the property map to an array. | |
virtual void | copy (const CMSProperties *source)=0 |
Copies the contents of the given properties object to this one. | |
virtual CMSProperties * | clone () const =0 |
Clones this object. | |
virtual void | clear ()=0 |
Clears all properties from the map. | |
virtual std::string | toString () const =0 |
Formats the contents of the Properties Object into a string that can be logged, etc. |
Interface for a Java-like properties object.
This is essentially a map of key-value string pairs.
virtual cms::CMSProperties::~CMSProperties | ( | ) | throw () [virtual] |
virtual void cms::CMSProperties::clear | ( | ) | [pure virtual] |
Clears all properties from the map.
Implemented in activemq::util::ActiveMQProperties.
virtual CMSProperties* cms::CMSProperties::clone | ( | ) | const [pure virtual] |
Clones this object.
Implemented in activemq::util::ActiveMQProperties.
virtual void cms::CMSProperties::copy | ( | const CMSProperties * | source | ) | [pure virtual] |
Copies the contents of the given properties object to this one.
source | The source properties object. |
virtual const char* cms::CMSProperties::getProperty | ( | const std::string & | name | ) | const [pure virtual] |
Looks up the value for the given property.
name | The name of the property to be looked up. |
Implemented in activemq::util::ActiveMQProperties.
virtual std::string cms::CMSProperties::getProperty | ( | const std::string & | name, |
const std::string & | defaultValue | ||
) | const [pure virtual] |
Looks up the value for the given property.
name | the name of the property to be looked up. |
defaultValue | The value to be returned if the given property does not exist. |
name
, if it exists, otherwise the defaultValue
. Implemented in activemq::util::ActiveMQProperties.
virtual bool cms::CMSProperties::hasProperty | ( | const std::string & | name | ) | const [pure virtual] |
Check to see if the Property exists in the set.
name | the name of the property to check |
Implemented in activemq::util::ActiveMQProperties.
virtual bool cms::CMSProperties::isEmpty | ( | ) | const [pure virtual] |
Returns true if the properties object is empty.
Implemented in activemq::util::ActiveMQProperties.
virtual std::vector<std::string> cms::CMSProperties::propertyNames | ( | ) | const [pure virtual] |
Returns a vector containing all the names of the properties currently stored in the Properties object.
Implemented in activemq::util::ActiveMQProperties.
virtual std::string cms::CMSProperties::remove | ( | const std::string & | name | ) | [pure virtual] |
Removes the property with the given name.
If the property existed in the collection then it is removed and returned, otherwise an empty string is returned.
name | the name of the property to be removed. |
Implemented in activemq::util::ActiveMQProperties.
virtual void cms::CMSProperties::setProperty | ( | const std::string & | name, |
const std::string & | value | ||
) | [pure virtual] |
Sets the value for a given property.
If the property already exists, overwrites the value.
name | The name of the value to be written. |
value | The value to be written. |
Implemented in activemq::util::ActiveMQProperties.
virtual int cms::CMSProperties::size | ( | ) | const [pure virtual] |
Returns the current count of all the Properties that are currently stored in the Properties object.
Implemented in activemq::util::ActiveMQProperties.
virtual std::vector< std::pair< std::string, std::string > > cms::CMSProperties::toArray | ( | ) | const [pure virtual] |
Method that serializes the contents of the property map to an array.
Implemented in activemq::util::ActiveMQProperties.
virtual std::string cms::CMSProperties::toString | ( | ) | const [pure virtual] |
Formats the contents of the Properties Object into a string that can be logged, etc.
Implemented in activemq::util::ActiveMQProperties.