Rosetta 3.3
Classes | Namespaces | Functions
src/utility/keys/Key.hh File Reference

Hidden index key interface class. More...

#include <utility/keys/Key.fwd.hh>
#include <utility/keys/AutoKey.fwd.hh>
#include <utility/keys/UserKey.fwd.hh>
#include <utility/keys/KeyLess.fwd.hh>
#include <cstddef>
#include <string>


class  utility::keys::Key
 Hidden index key interface class. More...


namespace  utility

unresizable vector whose size is known at compile time, which may be allocated on the stack, and which indexes from 1.

namespace  utility::keys

Keys and key-accessed containers for fast, safe object lookup.


bool utility::keys::operator== (Key const &a, Key const &b)
 Key == Key.
bool utility::keys::operator!= (Key const &a, Key const &b)
 Key != Key.
bool utility::keys::operator< (Key const &a, Key const &b)
 Key < Key.
bool utility::keys::operator<= (Key const &a, Key const &b)
 Key <= Key.
bool utility::keys::operator>= (Key const &a, Key const &b)
 Key >= Key.
bool utility::keys::operator> (Key const &a, Key const &b)
 Key > Key.
bool utility::keys::comparable (Key const &a, Key const &b)
 Are Keys of Comparable Types?

Detailed Description

Hidden index key interface class.

Stuart G. Mentzer (
  • Interface provides common base class for covariant return in hierarchies
  • Derived classes specify the friend class(es) that can access the index
  • Index can be ignored if not used as key/index into a container
  • Can safely derive from concrete Key types as long as fields aren't added
  • Can derive privately from an Key to share the index set of another Key type without allowing convertibility (for type safety)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines