describes a pair mapping key => data for a specified key type More...

#include <MapPair.hpp>

Collaboration diagram for FSTR::MapPair< KeyType, ContentType >:

Public Types

typedef void(MapPair::* IfHelperType) () const
 

Public Member Functions

void IfHelper () const
 
 operator IfHelperType () const
 Provides bool() operator to determine if Pair is valid. More...
 
template<typename T = KeyType>
std::enable_if<!std::is_class< T >::value, KeyType >::type key () const
 Get the key (non-class key types) More...
 
template<typename T = KeyType>
std::enable_if< std::is_same< T, String >::value, const KeyType & >::type key () const
 Get the key (String key type) More...
 
const ContentType & content () const
 Accessor to get a reference to the content. More...
 
 operator const ContentType & () const
 
 operator WString () const
 
size_t printTo (Print &p) const
 

Static Public Member Functions

static const MapPair empty ()
 Get an empty Pair object, identifies as invalid when lookup fails. More...
 

Public Attributes

KeyStoreType key_
 
const ContentType * content_
 

Detailed Description

template<typename KeyType, class ContentType>
class FSTR::MapPair< KeyType, ContentType >

describes a pair mapping key => data for a specified key type

Template Parameters
KeyTypeIntegral, floating point, enum or String
ContentTypeObject type to use for content

Member Typedef Documentation

◆ IfHelperType

template<typename KeyType , class ContentType >
typedef void(MapPair::* FSTR::MapPair< KeyType, ContentType >::IfHelperType) () const

Member Function Documentation

◆ content()

template<typename KeyType , class ContentType >
const ContentType& FSTR::MapPair< KeyType, ContentType >::content ( ) const
inline

Accessor to get a reference to the content.

◆ empty()

template<typename KeyType , class ContentType >
static const MapPair FSTR::MapPair< KeyType, ContentType >::empty ( )
inlinestatic

Get an empty Pair object, identifies as invalid when lookup fails.

◆ IfHelper()

template<typename KeyType , class ContentType >
void FSTR::MapPair< KeyType, ContentType >::IfHelper ( ) const
inline

◆ key() [1/2]

template<typename KeyType , class ContentType >
template<typename T = KeyType>
std::enable_if<!std::is_class<T>::value, KeyType>::type FSTR::MapPair< KeyType, ContentType >::key ( ) const
inline

Get the key (non-class key types)

◆ key() [2/2]

template<typename KeyType , class ContentType >
template<typename T = KeyType>
std::enable_if<std::is_same<T, String>::value, const KeyType&>::type FSTR::MapPair< KeyType, ContentType >::key ( ) const
inline

Get the key (String key type)

◆ operator const ContentType &()

template<typename KeyType , class ContentType >
FSTR::MapPair< KeyType, ContentType >::operator const ContentType & ( ) const
inline

◆ operator IfHelperType()

template<typename KeyType , class ContentType >
FSTR::MapPair< KeyType, ContentType >::operator IfHelperType ( ) const
inline

Provides bool() operator to determine if Pair is valid.

◆ operator WString()

template<typename KeyType , class ContentType >
FSTR::MapPair< KeyType, ContentType >::operator WString ( ) const
inlineexplicit

◆ printTo()

template<typename KeyType , class ContentType >
size_t FSTR::MapPair< KeyType, ContentType >::printTo ( Print p) const
inline

Member Data Documentation

◆ content_

template<typename KeyType , class ContentType >
const ContentType* FSTR::MapPair< KeyType, ContentType >::content_

◆ key_

template<typename KeyType , class ContentType >
KeyStoreType FSTR::MapPair< KeyType, ContentType >::key_

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