InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
KeyValuePair< _T1, _T2 > Struct Template Reference

#include <KeyValuePair.h>

Public Types

typedef object_type data_type
 
typedef _T1 key_type
 
typedef _T2 value_type
 

Public Member Functions

 KeyValuePair (adobe::move_from< KeyValuePair > other)
 
 KeyValuePair (_T1 __a, _T2 __b)
 
 KeyValuePair (const KeyValuePair &other)=default
 
 KeyValuePair (KeyValuePair &&other)=default
 
KeyValuePairoperator= (const KeyValuePair &other)=default
 
KeyValuePairoperator= (KeyValuePair &&other)=default
 
_T1 & Key ()
 
_T2 & Value ()
 
const _T1 & Key () const
 
const _T2 & Value () const
 
void SetValue (const _T2 &val)
 

Public Attributes

_T1 fKey
 
_T2 fValue
 

Friends

void swap (KeyValuePair< _T1, _T2 > &a, KeyValuePair< _T1, _T2 > &b)
 

Detailed Description

template<class _T1, class _T2>
struct KeyValuePair< _T1, _T2 >

KeyValuePair is similar in concept to std::pair. It is a bridge class between the old InDesign collection classes, and the newer stl-like collection classes. It enables some of the old syntax that was used for BTLookup-based classes, which are now obsolete.

Constructor & Destructor Documentation

template<class _T1, class _T2>
KeyValuePair< _T1, _T2 >::KeyValuePair(adobe::move_from< KeyValuePair< _T1, _T2 > > other)
inline

Move constructor - moves the content of other into this object, leaving 'other' in destructible state

Member Function Documentation

template<class _T1, class _T2>
_T1& KeyValuePair< _T1, _T2 >::Key ()
inline

Return the "left", or key of the pair.

Returns
_T1& the key of the pair.
template<class _T1, class _T2>
const _T1& KeyValuePair< _T1, _T2 >::Key () const
inline

Return the "left", or key of the pair.

Returns
_T1& the key of the pair.
template<class _T1, class _T2>
void KeyValuePair< _T1, _T2 >::SetValue (const _T2 & val)
inline

Reset the value of the pair.

Parameters
valthe new value
template<class _T1, class _T2>
_T2& KeyValuePair< _T1, _T2 >::Value ()
inline

Return the "right" or value of the pair.

Returns
_T2& the value of the pair.
template<class _T1, class _T2>
const _T2& KeyValuePair< _T1, _T2 >::Value () const
inline

Return the "right" or value of the pair.

Returns
_T2& the value of the pair.