stlab.adobe.com Adobe Systems Incorporated

static_table_traits< KeyType, ValueType > Class Template Reference
[Other containers: circular_queue, table_index, static_table, etc.]

A traits class for use with adobe::static_table. More...

#include <static_table.hpp>

List of all members.

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:
xThe first key
yThe second key
Returns:
true if x == 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:
xThe table entry
yAn arbitrary key
Returns:
true if x'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:
xThe first entry
yThe second entry
Returns:
true if x's key < y's key; false otherwise.

Definition at line 195 of file static_table.hpp.

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google