libetonyek::IWORKPropertyMap Class Reference

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

#include <IWORKPropertyMap.h>

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 std::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

◆ Map_t

std::unordered_map<IWORKPropertyID_t, boost::any> libetonyek::IWORKPropertyMap::Map_t
private

Constructor & Destructor Documentation

◆ IWORKPropertyMap() [1/3]

libetonyek::IWORKPropertyMap::IWORKPropertyMap ( )

Construct an empty map.

◆ IWORKPropertyMap() [2/3]

libetonyek::IWORKPropertyMap::IWORKPropertyMap ( const IWORKPropertyMap * parent)
explicit

Construct an empty map with parent parent.

  • [in] parent the parent of this map

◆ IWORKPropertyMap() [3/3]

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

Construct a map as a copy of existing one.

  • [in] other the original

Member Function Documentation

◆ clear()

◆ clears()

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

Referenced by clears().

◆ get()

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 get(), and libetonyek::IWORKStyle::get().

◆ has()

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::createListLevelStyles(), has(), and libetonyek::IWORKStyle::has().

◆ operator=()

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

Assign the content from another map.

  • [in] other the source map
    Returns
    this map

◆ put()

template<class Property >
void libetonyek::IWORKPropertyMap::put ( const typename IWORKPropertyInfo< Property >::ValueType & value)
inline

Insert a new value for key key.

  • [in] value the value to insert

Referenced by libetonyek::NUMCollector::collectStickyNote(), libetonyek::IWORKStyle::createListLevelStyles(), libetonyek::IWORKListLabelGeometriesProperty::endOfElement(), libetonyek::IWORKListLabelIndentsProperty::endOfElement(), libetonyek::IWORKListLabelTypesProperty::endOfElement(), libetonyek::IWORKListTextIndentsProperty::endOfElement(), libetonyek::IWORKPropertyContext< Property, Context, TokenId, TokenId2 >::endOfElement(), libetonyek::IWORKPtrPropertyContext< Property, Context, TokenId >::endOfElement(), libetonyek::KEY1StylesContext::endOfElement(), libetonyek::IWAText::parse(), libetonyek::IWAParser::parseArrowProperties(), libetonyek::IWAParser::parseAuthorInComment(), libetonyek::IWAParser::parseCellStyle(), libetonyek::IWAParser::parseCharacterProperties(), libetonyek::IWAParser::parseColumnsProperties(), libetonyek::IWAParser::parseDropCapStyle(), libetonyek::IWAParser::parseGraphicStyle(), libetonyek::IWAParser::parseListStyle(), libetonyek::IWAParser::parseMediaStyle(), libetonyek::IWAParser::parsePageMaster(), libetonyek::IWAParser::parseParagraphStyle(), libetonyek::KEY6Parser::parsePlaceholder(), libetonyek::KEY6Parser::parseSlideStyle(), libetonyek::IWAParser::parseTableGridLine(), libetonyek::IWAParser::parseTableStyle(), libetonyek::IWAParser::parseTabularModel(), libetonyek::IWAParser::parseTileDefinition(), libetonyek::KEY1DivStyle::readAttribute(), and libetonyek::KEY1SpanStyle::readAttribute().

◆ setParent()

void libetonyek::IWORKPropertyMap::setParent ( const IWORKPropertyMap * parent)

Set a new parent for this map.

  • [in] parent the new parent

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

◆ swap()

void libetonyek::IWORKPropertyMap::swap ( IWORKPropertyMap & other)

Swap the content with another map.

  • [inout] the other map

Referenced by operator=(), and swap().

Member Data Documentation

◆ m_map

Map_t libetonyek::IWORKPropertyMap::m_map
private

Referenced by clear(), clears(), get(), has(), put(), and swap().

◆ m_parent

const IWORKPropertyMap* libetonyek::IWORKPropertyMap::m_parent
private

Referenced by clears(), get(), has(), setParent(), and swap().


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

Generated for libetonyek by doxygen 1.12.0