Rosetta 3.3
Public Types | Public Member Functions | Protected Member Functions | Friends
utility::keys::Key Class Reference

Hidden index key interface class. More...

#include <Key.hh>

List of all members.

Public Types

typedef std::size_t index_type
typedef std::size_t size_type
typedef std::size_t Index
typedef std::size_t Size

Public Member Functions

virtual Keyclone () const =0
 Clone this.
virtual ~Key ()
 Destructor.
Keyoperator= (Key const &key)
 Copy assignment.
virtual std::string const & id () const =0
 ID.
virtual std::string & id ()=0
 ID.
virtual Keyid (std::string const &id_a)=0
 ID assignment.
virtual std::string const & identifier () const =0
 Identifier.
virtual std::string & identifier ()=0
 Identifier.
virtual Keyidentifier (std::string const &identifier_a)=0
 Identifier assignment.
virtual std::string const & code () const =0
 Code.
virtual std::string & code ()=0
 Code.
virtual Keycode (std::string const &code_a)=0
 Code assignment.
virtual Index private_index () const =0
 Index.

Protected Member Functions

 Key ()
 Default constructor.
 Key (Key const &)
 Copy constructor.
virtual void assign_Key (Key const &key)=0
 Key assignment.
 operator Index () const
 Index value conversion.
virtual Index index () const =0
 Index.
virtual Indexindex ()=0
 Index.
virtual Keyindex (Index const index_a)=0
 Index assignment.
virtual bool equals (Key const &key) const =0
 Equal to a Key?
virtual bool less_than (Key const &key) const =0
 Less than a Key?
virtual bool comparable (Key const &key) const =0
 Comparable to a Key?

Friends

class AutoKey
class UserKey
class KeyLess
class PointerKeyLess
bool operator== (Key const &a, Key const &b)
 Key == Key.
bool operator!= (Key const &a, Key const &b)
 Key != Key.
bool operator< (Key const &a, Key const &b)
 Key < Key.
bool operator<= (Key const &a, Key const &b)
 Key <= Key.
bool operator>= (Key const &a, Key const &b)
 Key >= Key.
bool operator> (Key const &a, Key const &b)
 Key > Key.
bool comparable (Key const &a, Key const &b)
 Are Keys of Comparable Types?

Detailed Description

Hidden index key interface class.


Member Typedef Documentation


Constructor & Destructor Documentation

utility::keys::Key::Key ( ) [inline, protected]

Default constructor.

utility::keys::Key::Key ( Key const &  ) [inline, protected]

Copy constructor.

virtual utility::keys::Key::~Key ( ) [inline, virtual]

Destructor.


Member Function Documentation

virtual void utility::keys::Key::assign_Key ( Key const &  key) [protected, pure virtual]

Key assignment.

Referenced by operator=().

virtual Key* utility::keys::Key::clone ( ) const [pure virtual]

Clone this.

virtual std::string const& utility::keys::Key::code ( ) const [pure virtual]
virtual std::string& utility::keys::Key::code ( ) [pure virtual]

Code.

virtual Key& utility::keys::Key::code ( std::string const &  code_a) [pure virtual]

Code assignment.

virtual bool utility::keys::Key::comparable ( Key const &  key) const [protected, pure virtual]

Comparable to a Key?

virtual bool utility::keys::Key::equals ( Key const &  key) const [protected, pure virtual]
virtual std::string const& utility::keys::Key::id ( ) const [pure virtual]
virtual std::string& utility::keys::Key::id ( ) [pure virtual]

ID.

virtual Key& utility::keys::Key::id ( std::string const &  id_a) [pure virtual]

ID assignment.

virtual std::string& utility::keys::Key::identifier ( ) [pure virtual]

Identifier.

virtual Key& utility::keys::Key::identifier ( std::string const &  identifier_a) [pure virtual]

Identifier assignment.

virtual std::string const& utility::keys::Key::identifier ( ) const [pure virtual]
virtual Index& utility::keys::Key::index ( ) [protected, pure virtual]

Index.

virtual Index utility::keys::Key::index ( ) const [protected, pure virtual]
virtual Key& utility::keys::Key::index ( Index const  index_a) [protected, pure virtual]

Index assignment.

virtual bool utility::keys::Key::less_than ( Key const &  key) const [protected, pure virtual]
utility::keys::Key::operator Index ( ) const [inline, protected]

Index value conversion.

Note:
A pure virtual version of this slows down key lookup operations because it prevents inlining for derived key types

References index().

Key& utility::keys::Key::operator= ( Key const &  key) [inline]

Copy assignment.

References assign_Key().

virtual Index utility::keys::Key::private_index ( ) const [pure virtual]

Index.

Note:
Only for use as an optimization: DO NOT WRITE CODE DEPENDING ON THE SPECIFIC INDEX VALUE!

Friends And Related Function Documentation

friend class AutoKey [friend]
bool comparable ( Key const &  a,
Key const &  b 
) [friend]

Are Keys of Comparable Types?

Referenced by utility::keys::comparable().

friend class KeyLess [friend]
bool operator!= ( Key const &  a,
Key const &  b 
) [friend]

Key != Key.

Note:
TYpe and index-based polymorphic equality
bool operator< ( Key const &  a,
Key const &  b 
) [friend]

Key < Key.

Note:
Index-based ordering
Needed for use as key in associative containers
bool operator<= ( Key const &  a,
Key const &  b 
) [friend]

Key <= Key.

Note:
Index-based ordering
Needed for use as key in associative containers
bool operator== ( Key const &  a,
Key const &  b 
) [friend]

Key == Key.

Note:
TYpe and index-based polymorphic equality
bool operator> ( Key const &  a,
Key const &  b 
) [friend]

Key > Key.

Note:
Index-based ordering
Needed for use as key in associative containers
bool operator>= ( Key const &  a,
Key const &  b 
) [friend]

Key >= Key.

Note:
Index-based ordering
Needed for use as key in associative containers
friend class PointerKeyLess [friend]
friend class UserKey [friend]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines