Rosetta 3.3
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
utility::keys::AutoKey< O, S, C > Class Template Reference

Automatic hidden index key abstract base class. More...

#include <AutoKey.hh>

Inheritance diagram for utility::keys::AutoKey< O, S, C >:
Inheritance graph
[legend]
Collaboration diagram for utility::keys::AutoKey< O, S, C >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef utility::keys::Key Key
typedefobject_type
typedef std::size_t index_type
typedef std::size_t size_type
typedefObject
typedef std::size_t Index
typedef std::size_t Size

Public Member Functions

virtual AutoKeyclone () const =0
 Clone this.
virtual ~AutoKey ()
 Destructor.
AutoKeyoperator= (AutoKey const &key)
 Copy assignment.
AutoKeyoperator= (Key const &key)
 Key assignment.
std::string const & id () const
 ID.
std::string & id ()
 ID.
AutoKeyid (std::string const &id_a)
 ID assignment.
std::string const & identifier () const
 Identifier.
std::string & identifier ()
 Identifier.
AutoKeyidentifier (std::string const &identifier_a)
 Identifier assignment.
std::string const & code () const
 Code.
std::string & code ()
 Code.
AutoKeycode (std::string const &code_a)
 Code assignment.
Index private_index () const
 Index.

Static Public Member Functions

static Size n_key ()
 Number of keys with distinct indexes.

Protected Member Functions

 AutoKey ()
 Default constructor.
 AutoKey (AutoKey const &key)
 Copy constructor.
 AutoKey (AutoKey const &key, std::string const &id_a, std::string const &identifier_a=std::string(), std::string const &code_a=std::string())
 Copy + identifier constructor.
 AutoKey (Key const &key)
 Key constructor.
 AutoKey (Key const &key, std::string const &id_a, std::string const &identifier_a=std::string(), std::string const &code_a=std::string())
 Key + identifier constructor.
 AutoKey (std::string const &id_a, std::string const &identifier_a=std::string(), std::string const &code_a=std::string())
 Identifier constructor.
void assign_Key (Key const &key)
 Key assignment.
 operator Index () const
 Index value conversion.
Index index () const
 Index.
Indexindex ()
 Index.
AutoKeyindex (Index const index_a)
 Index assignment.
bool equals (Key const &key) const
 Equal to a Key?
bool less_than (Key const &key) const
 Less than a Key?
bool comparable (Key const &key) const
 Comparable to a Key?

Friends

bool operator== (AutoKey const &a, AutoKey const &b)
 AutoKey == AutoKey.
bool operator!= (AutoKey const &a, AutoKey const &b)
 AutoKey != AutoKey.
bool operator< (AutoKey const &a, AutoKey const &b)
 AutoKey < AutoKey.
bool operator<= (AutoKey const &a, AutoKey const &b)
 AutoKey <= AutoKey.
bool operator>= (AutoKey const &a, AutoKey const &b)
 AutoKey >= AutoKey.
bool operator> (AutoKey const &a, AutoKey const &b)
 AutoKey > AutoKey.
bool sequential (AutoKey const &a, AutoKey const &b)
 AutoKeys are sequential?

Detailed Description

template<typename O, typename S, typename C>
class utility::keys::AutoKey< O, S, C >

Automatic hidden index key abstract base class.


Member Typedef Documentation

template<typename O, typename S, typename C>
typedef std::size_t utility::keys::AutoKey< O, S, C >::Index
template<typename O, typename S, typename C>
typedef std::size_t utility::keys::AutoKey< O, S, C >::index_type
template<typename O, typename S, typename C>
typedef utility::keys::Key utility::keys::AutoKey< O, S, C >::Key

Reimplemented in utility::options::OptionKey.

template<typename O, typename S, typename C>
typedef O utility::keys::AutoKey< O, S, C >::Object
template<typename O, typename S, typename C>
typedef O utility::keys::AutoKey< O, S, C >::object_type
template<typename O, typename S, typename C>
typedef std::size_t utility::keys::AutoKey< O, S, C >::Size
template<typename O, typename S, typename C>
typedef std::size_t utility::keys::AutoKey< O, S, C >::size_type

Constructor & Destructor Documentation

template<typename O, typename S, typename C>
utility::keys::AutoKey< O, S, C >::AutoKey ( ) [inline, protected]

Default constructor.

template<typename O, typename S, typename C>
utility::keys::AutoKey< O, S, C >::AutoKey ( AutoKey< O, S, C > const &  key) [inline, protected]

Copy constructor.

template<typename O, typename S, typename C>
utility::keys::AutoKey< O, S, C >::AutoKey ( AutoKey< O, S, C > const &  key,
std::string const &  id_a,
std::string const &  identifier_a = std::string(),
std::string const &  code_a = std::string() 
) [inline, protected]

Copy + identifier constructor.

template<typename O, typename S, typename C>
utility::keys::AutoKey< O, S, C >::AutoKey ( Key const &  key) [inline, explicit, protected]

Key constructor.

template<typename O, typename S, typename C>
utility::keys::AutoKey< O, S, C >::AutoKey ( Key const &  key,
std::string const &  id_a,
std::string const &  identifier_a = std::string(),
std::string const &  code_a = std::string() 
) [inline, protected]

Key + identifier constructor.

template<typename O, typename S, typename C>
utility::keys::AutoKey< O, S, C >::AutoKey ( std::string const &  id_a,
std::string const &  identifier_a = std::string(),
std::string const &  code_a = std::string() 
) [inline, explicit, protected]

Identifier constructor.

template<typename O, typename S, typename C>
virtual utility::keys::AutoKey< O, S, C >::~AutoKey ( ) [inline, virtual]

Destructor.


Member Function Documentation

template<typename O, typename S, typename C>
void utility::keys::AutoKey< O, S, C >::assign_Key ( Key const &  key) [inline, protected]
template<typename O, typename S, typename C>
virtual AutoKey* utility::keys::AutoKey< O, S, C >::clone ( ) const [pure virtual]
template<typename O, typename S, typename C>
std::string const& utility::keys::AutoKey< O, S, C >::code ( ) const [inline]
template<typename O, typename S, typename C>
std::string& utility::keys::AutoKey< O, S, C >::code ( ) [inline]

Code.

template<typename O, typename S, typename C>
AutoKey& utility::keys::AutoKey< O, S, C >::code ( std::string const &  code_a) [inline]

Code assignment.

template<typename O, typename S, typename C>
bool utility::keys::AutoKey< O, S, C >::comparable ( Key const &  key) const [inline, protected]

Comparable to a Key?

Referenced by utility::keys::AutoKey< Option >::assign_Key().

template<typename O, typename S, typename C>
bool utility::keys::AutoKey< O, S, C >::equals ( Key const &  key) const [inline, protected]

Equal to a Key?

template<typename O, typename S, typename C>
std::string const& utility::keys::AutoKey< O, S, C >::id ( ) const [inline]
template<typename O, typename S, typename C>
std::string& utility::keys::AutoKey< O, S, C >::id ( ) [inline]

ID.

template<typename O, typename S, typename C>
AutoKey& utility::keys::AutoKey< O, S, C >::id ( std::string const &  id_a) [inline]

ID assignment.

template<typename O, typename S, typename C>
std::string const& utility::keys::AutoKey< O, S, C >::identifier ( ) const [inline]
template<typename O, typename S, typename C>
std::string& utility::keys::AutoKey< O, S, C >::identifier ( ) [inline]

Identifier.

template<typename O, typename S, typename C>
AutoKey& utility::keys::AutoKey< O, S, C >::identifier ( std::string const &  identifier_a) [inline]

Identifier assignment.

template<typename O, typename S, typename C>
Index utility::keys::AutoKey< O, S, C >::index ( ) const [inline, protected]

Index.

template<typename O, typename S, typename C>
Index& utility::keys::AutoKey< O, S, C >::index ( ) [inline, protected]

Index.

template<typename O, typename S, typename C>
AutoKey& utility::keys::AutoKey< O, S, C >::index ( Index const  index_a) [inline, protected]

Index assignment.

template<typename O, typename S, typename C>
bool utility::keys::AutoKey< O, S, C >::less_than ( Key const &  key) const [inline, protected]

Less than a Key?

template<typename O, typename S, typename C>
static Size utility::keys::AutoKey< O, S, C >::n_key ( ) [inline, static]

Number of keys with distinct indexes.

template<typename O, typename S, typename C>
utility::keys::AutoKey< O, S, C >::operator Index ( ) const [inline, protected]

Index value conversion.

template<typename O, typename S, typename C>
AutoKey& utility::keys::AutoKey< O, S, C >::operator= ( Key const &  key) [inline]
template<typename O, typename S, typename C>
AutoKey& utility::keys::AutoKey< O, S, C >::operator= ( AutoKey< O, S, C > const &  key) [inline]

Copy assignment.

template<typename O, typename S, typename C>
Index utility::keys::AutoKey< O, S, C >::private_index ( ) const [inline]

Index.

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

Friends And Related Function Documentation

template<typename O, typename S, typename C>
bool operator!= ( AutoKey< O, S, C > const &  a,
AutoKey< O, S, C > const &  b 
) [friend]

AutoKey != AutoKey.

Note:
Index-based equality
template<typename O, typename S, typename C>
bool operator< ( AutoKey< O, S, C > const &  a,
AutoKey< O, S, C > const &  b 
) [friend]

AutoKey < AutoKey.

Note:
Index-based ordering
Needed for use as key in associative containers
template<typename O, typename S, typename C>
bool operator<= ( AutoKey< O, S, C > const &  a,
AutoKey< O, S, C > const &  b 
) [friend]

AutoKey <= AutoKey.

Note:
Index-based ordering
template<typename O, typename S, typename C>
bool operator== ( AutoKey< O, S, C > const &  a,
AutoKey< O, S, C > const &  b 
) [friend]

AutoKey == AutoKey.

Note:
Index-based equality
template<typename O, typename S, typename C>
bool operator> ( AutoKey< O, S, C > const &  a,
AutoKey< O, S, C > const &  b 
) [friend]

AutoKey > AutoKey.

Note:
Index-based ordering
template<typename O, typename S, typename C>
bool operator>= ( AutoKey< O, S, C > const &  a,
AutoKey< O, S, C > const &  b 
) [friend]

AutoKey >= AutoKey.

Note:
Index-based ordering
template<typename O, typename S, typename C>
bool sequential ( AutoKey< O, S, C > const &  a,
AutoKey< O, S, C > const &  b 
) [friend]

AutoKeys are sequential?

Note:
Index-based ordering

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