activemq::util::Properties Class Reference

#include <Properties.h>

Inheritance diagram for activemq::util::Properties:

activemq::util::SimpleProperties List of all members.

Public Member Functions

virtual ~Properties ()
virtual bool isEmpty () const =0
virtual const char * getProperty (const std::string &name) const =0
virtual std::string getProperty (const std::string &name, const std::string &defaultValue) const =0
virtual void setProperty (const std::string &name, const std::string &value)=0
virtual bool hasProperty (const std::string &name) const =0
virtual std::vector< std::pair<
std::string, std::string > > 
toArray () const =0
virtual void copy (const Properties *source)=0
virtual Propertiesclone () const =0
virtual void clear ()=0

Detailed Description

Interface for a Java-like properties object. This is essentially a map of key-value string pairs.


Constructor & Destructor Documentation

virtual activemq::util::Properties::~Properties  )  [inline, virtual]
 


Member Function Documentation

virtual void activemq::util::Properties::clear  )  [pure virtual]
 

Clears all properties from the map.

Implemented in activemq::util::SimpleProperties.

virtual Properties* activemq::util::Properties::clone  )  const [pure virtual]
 

Clones this object.

Returns:
a replica of this object.

Implemented in activemq::util::SimpleProperties.

virtual void activemq::util::Properties::copy const Properties source  )  [pure virtual]
 

Copies the contents of the given properties object to this one.

Parameters:
source The source properties object.

Implemented in activemq::util::SimpleProperties.

virtual std::string activemq::util::Properties::getProperty const std::string &  name,
const std::string &  defaultValue
const [pure virtual]
 

Looks up the value for the given property.

Parameters:
name the name of the property to be looked up.
defaultValue The value to be returned if the given property does not exist.
Returns:
The value of the property specified by name, if it exists, otherwise the defaultValue.

Implemented in activemq::util::SimpleProperties.

virtual const char* activemq::util::Properties::getProperty const std::string &  name  )  const [pure virtual]
 

Looks up the value for the given property.

Parameters:
name The name of the property to be looked up.
Returns:
the value of the property with the given name, if it exists. If it does not exist, returns NULL.

Implemented in activemq::util::SimpleProperties.

virtual bool activemq::util::Properties::hasProperty const std::string &  name  )  const [pure virtual]
 

Check to see if the Property exists in the set

Parameters:
name the name of the property to check
Returns:
true if property exists, false otherwise.

Implemented in activemq::util::SimpleProperties.

virtual bool activemq::util::Properties::isEmpty  )  const [pure virtual]
 

Returns true if the properties object is empty

Returns:
true if empty

Implemented in activemq::util::SimpleProperties.

virtual void activemq::util::Properties::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.

Parameters:
name The name of the value to be written.
value The value to be written.

Implemented in activemq::util::SimpleProperties.

virtual std::vector< std::pair< std::string, std::string > > activemq::util::Properties::toArray  )  const [pure virtual]
 

Method that serializes the contents of the property map to an arryay.

Returns:
list of pairs where the first is the name and the second is the value.

Implemented in activemq::util::SimpleProperties.


The documentation for this class was generated from the following file:
Generated on Thu Aug 3 18:03:33 2006 for activemq-cpp by  doxygen 1.4.5