libetonyek::IWORKPropertyMap Class Reference

Represents a (hierarchical) property map. More...

#include <IWORKPropertyMap.h>

List of all members.

Classes

class  NotFoundException

Public Member Functions

 IWORKPropertyMap ()
 Construct an empty map.
 IWORKPropertyMap (const IWORKPropertyMap *parent)
 Construct an empty map with parent parent.
 IWORKPropertyMap (const IWORKPropertyMap &other)
 Construct a map as a copy of existing one.
IWORKPropertyMapoperator= (const IWORKPropertyMap &other)
 Assign the content from another map.
void swap (IWORKPropertyMap &other)
 Swap the content with another map.
void setParent (const IWORKPropertyMap *parent)
 Set a new parent for this map.
template<class Property >
bool has (bool lookInParent=false) const
 Check for the presence of a property.
template<class Property >
bool clears (bool lookInParent=false) const
template<class Property >
const IWORKPropertyInfo
< Property >::ValueType & 
get (bool lookInParent=false) const
 Retrieve the value of a property.
template<class Property >
void put (const typename IWORKPropertyInfo< Property >::ValueType &value)
 Insert a new value for key key.
template<class Property >
void clear ()
 Clear property.

Private Types

typedef boost::unordered_map
< IWORKPropertyID_t,
boost::any > 
Map_t

Private Attributes

Map_t m_map
const IWORKPropertyMapm_parent

Detailed Description

Represents a (hierarchical) property map.


Member Typedef Documentation

typedef boost::unordered_map<IWORKPropertyID_t, boost::any> libetonyek::IWORKPropertyMap::Map_t [private]

Constructor & Destructor Documentation

Construct an empty map with parent parent.

  • [in] parent the parent of this map

Construct a map as a copy of existing one.

  • [in] other the original

Member Function Documentation

template<class Property >
bool libetonyek::IWORKPropertyMap::clears ( bool  lookInParent = false) const [inline]

Referenced by clears().

template<class Property >
const IWORKPropertyInfo<Property>::ValueType& libetonyek::IWORKPropertyMap::get ( bool  lookInParent = false) const [inline]

Retrieve the value of a property.

If the property is not found in this map and lookInParent is true, the parent map is searched (transitively).

  • [in] lookInParent should the parent map be searched if the property is not found in this map?
    Returns:
    the found value

Referenced by libetonyek::IWORKStyle::get(), and get().

template<class Property >
bool libetonyek::IWORKPropertyMap::has ( bool  lookInParent = false) const [inline]

Check for the presence of a property.

If the property is not found in this map and lookInParent is true, the parent map is searched (transitively).

  • [in] lookInParent should the parent map be searched if the property is not found in this map?
    Returns:
    true if the property is present

Referenced by libetonyek::IWORKStyle::has(), and has().

IWORKPropertyMap & libetonyek::IWORKPropertyMap::operator= ( const IWORKPropertyMap other)

Assign the content from another map.

  • [in] other the source map
    Returns:
    this map

Set a new parent for this map.

  • [in] parent the new parent

Referenced by libetonyek::IWORKStyle::IWORKStyle(), and libetonyek::IWORKStyle::link().

Swap the content with another map.

  • [inout] the other map

Referenced by operator=().


Member Data Documentation


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