activemq::util::SimpleProperties Class Reference

#include <SimpleProperties.h>

Inheritance diagram for activemq::util::SimpleProperties:

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

Public Member Functions

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

Private Attributes

std::map< std::string, std::string > properties

Detailed Description

Basic implementation of the Properties interface.


Constructor & Destructor Documentation

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


Member Function Documentation

virtual void activemq::util::SimpleProperties::clear  )  [inline, virtual]
 

Clears all properties from the map.

Implements activemq::util::Properties.

virtual Properties* activemq::util::SimpleProperties::clone  )  const [inline, virtual]
 

Clones this object.

Returns:
a replica of this object.

Implements activemq::util::Properties.

virtual void activemq::util::SimpleProperties::copy const Properties source  )  [inline, virtual]
 

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

Parameters:
source The source properties object.

Implements activemq::util::Properties.

virtual std::string activemq::util::SimpleProperties::getProperty const std::string &  name,
const std::string &  defaultValue
const [inline, 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.

Implements activemq::util::Properties.

virtual const char* activemq::util::SimpleProperties::getProperty const std::string &  name  )  const [inline, 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.

Implements activemq::util::Properties.

virtual bool activemq::util::SimpleProperties::hasProperty const std::string &  name  )  const [inline, virtual]
 

Check to see if the Property exists in the set

Parameters:
name - property name to check for in this properties set.
Returns:
true if property exists, false otherwise.

Implements activemq::util::Properties.

virtual bool activemq::util::SimpleProperties::isEmpty  )  const [inline, virtual]
 

Returns true if the properties object is empty

Returns:
true if empty

Implements activemq::util::Properties.

virtual void activemq::util::SimpleProperties::setProperty const std::string &  name,
const std::string &  value
[inline, 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.

Implements activemq::util::Properties.

virtual std::vector< std::pair< std::string, std::string > > activemq::util::SimpleProperties::toArray  )  const [inline, 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.

Implements activemq::util::Properties.


Member Data Documentation

std::map< std::string, std::string > activemq::util::SimpleProperties::properties [private]
 


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