VMime
propertySet::property Class Reference

#include <propertySet.hpp>

Inheritance diagram for propertySet::property:
Collaboration diagram for propertySet::property:

Public Member Functions

 property (const string &name, const string &value)
 property (const string &name)
 property (const property &prop)
const stringgetName () const
const stringgetValue () const
void setValue (const string &value)
template<class TYPE>
void setValue (const TYPE &value)
template<class TYPE>
TYPE getValue () const
template<>
void setValue (const string &value)
template<>
void setValue (const bool &value)
template<>
string getValue () const

Additional Inherited Members

Protected Member Functions inherited from object
 object ()
 object (const object &)
objectoperator= (const object &)
virtual ~object ()

Detailed Description

A property holds a (name,value) pair.

Constructor & Destructor Documentation

◆ property() [1/3]

property ( const string & name,
const string & value )

Referenced by property().

◆ property() [2/3]

property ( const string & name)

◆ property() [3/3]

property ( const property & prop)

References object::object(), and property().

Member Function Documentation

◆ getName()

const string & getName ( ) const

Return the name of the property.

Returns
property name

◆ getValue() [1/3]

VMIME_EXPORT bool getValue ( ) const

◆ getValue() [2/3]

template<class TYPE>
TYPE getValue ( ) const

Get the value of the property as a generic type.

Exceptions
exceptions::invalid_property_typeif the specified type is incompatible with the string value (cannot be converted using std::istringstream)
Returns
current value of the property

◆ getValue() [3/3]

const string & getValue ( ) const

Return the value of the property as a string.

Returns
current value of the property

◆ setValue() [1/4]

VMIME_EXPORT void setValue ( const bool & value)

◆ setValue() [2/4]

VMIME_EXPORT void setValue< string > ( const string & value)

◆ setValue() [3/4]

void setValue ( const string & value)

Set the value of the property as a string.

Parameters
valuenew value for property

◆ setValue() [4/4]

template<class TYPE>
void setValue ( const TYPE & value)

Set the value of the property as a generic type.

Parameters
valuenew value for property

The documentation for this class was generated from the following files: