static_table_traits< KeyType, ValueType > Class Template Reference |
Public Types | |
typedef std::pair< key_type, value_type > | entry_type |
typedef KeyType | key_type |
typedef bool | result_type |
typedef ValueType | value_type |
Public Member Functions | |
result_type | equal (const key_type &x, const key_type &y) const |
result_type | operator() (const key_type &x, const entry_type &y) const |
result_type | operator() (const entry_type &x, const key_type &y) const |
result_type | operator() (const entry_type &x, const entry_type &y) const |
Detailed Description
template<typename KeyType, typename ValueType>
class adobe::static_table_traits< KeyType, ValueType >
static_table_traits provides functionality lifted out of the static_table class so clients can add their own traits should their key types require custom comparison and equality functionality. An example key type that would require a customized static_table_traits class would be boost::reference_wrapper<const std::type_info>
, as the default-supplied functionality is not compatible.
Definition at line 188 of file static_table.hpp.
Member Typedef Documentation
A pair comprised of a key_type and a value_type.
Definition at line 193 of file static_table.hpp.
The type used for lookups in the table.
Definition at line 191 of file static_table.hpp.
The result type retured by operator() in this function object. Must always be bool
. Required by boost::bind.
Definition at line 190 of file static_table.hpp.
The resultant type from a table lookup.
Definition at line 192 of file static_table.hpp.
Member Function Documentation
adobe::static_table_traits::result_type equal | ( | const key_type & | x, |
const key_type & | y | ||
) | const |
- Parameters:
-
x The first key y The second key
- Returns:
true
ifx
==y
;false
otherwise.
Definition at line 212 of file static_table.hpp.
result_type operator() | ( | const key_type & | x, |
const entry_type & | y | ||
) | const |
Definition at line 202 of file static_table.hpp.
adobe::static_table_traits::result_type operator() | ( | const entry_type & | x, |
const key_type & | y | ||
) | const |
- Parameters:
-
x The table entry y An arbitrary key
- Returns:
true
ifx
's key <y
;false
otherwise.
Definition at line 207 of file static_table.hpp.
adobe::static_table_traits::result_type operator() | ( | const entry_type & | x, |
const entry_type & | y | ||
) | const |
- Parameters:
-
x The first entry y The second entry
- Returns:
true
ifx
's key <y
's key;false
otherwise.
Definition at line 195 of file static_table.hpp.