Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Attributes | Friends | List of all members
utility::keys::UserKey< O, S, C > Class Template Referenceabstract

User-created hidden index key abstract base class. More...

#include <UserKey.hh>

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

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 UserKeyclone () const =0
 Clone this. More...
 
virtual ~UserKey ()
 Destructor. More...
 
UserKeyoperator= (UserKey const &key)
 Copy assignment. More...
 
UserKeyoperator= (Key const &key)
 Key assignment. More...
 
std::string const & id () const
 ID. More...
 
std::string & id ()
 ID. More...
 
UserKeyid (std::string const &id_a)
 ID assignment. More...
 
std::string const & identifier () const
 Identifier. More...
 
std::string & identifier ()
 Identifier. More...
 
UserKeyidentifier (std::string const &identifier_a)
 Identifier assignment. More...
 
std::string const & code () const
 Code. More...
 
std::string & code ()
 Code. More...
 
UserKeycode (std::string const &code_a)
 Code assignment. More...
 
Index private_index () const
 Index. More...
 

Protected Member Functions

 UserKey (std::string const &id_a=std::string(), std::string const &identifier_a=std::string(), std::string const &code_a=std::string())
 Default constructor. More...
 
 UserKey (UserKey const &key)
 Copy constructor. More...
 
 UserKey (UserKey const &key, std::string const &id_a, std::string const &identifier_a=std::string(), std::string const &code_a=std::string())
 Copy + identifier constructor. More...
 
 UserKey (Key const &key)
 Key constructor. More...
 
 UserKey (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. More...
 
 UserKey (Index const index_a, std::string const &id_a=std::string(), std::string const &identifier_a=std::string(), std::string const &code_a=std::string())
 Index constructor. More...
 
void assign_Key (Key const &key)
 Key assignment. More...
 
 operator Index () const
 Index value conversion. More...
 
Index index () const
 Index. More...
 
Indexindex ()
 Index. More...
 
UserKeyindex (Index const index_a)
 Index assignment. More...
 
bool equals (Key const &key) const
 Equal to a Key? More...
 
bool less_than (Key const &key) const
 Less than a Key? More...
 
bool comparable (Key const &key) const
 Comparable to a Key? More...
 

Private Types

typedef S Super
 

Private Attributes

Index index_
 Index. More...
 
std::string id_
 ID: Short identifier. More...
 
std::string identifier_
 Identifier: Long identifier. More...
 
std::string code_
 Code: Coded identifier. More...
 

Friends

bool operator== (UserKey const &a, UserKey const &b)
 UserKey == UserKey. More...
 
bool operator!= (UserKey const &a, UserKey const &b)
 UserKey != UserKey. More...
 
bool operator< (UserKey const &a, UserKey const &b)
 UserKey < UserKey. More...
 
bool operator<= (UserKey const &a, UserKey const &b)
 UserKey <= UserKey. More...
 
bool operator>= (UserKey const &a, UserKey const &b)
 UserKey >= UserKey. More...
 
bool operator> (UserKey const &a, UserKey const &b)
 UserKey > UserKey. More...
 
template<typename UO , typename US , typename UC >
bool sequential (UserKey< UO, US, UC > const &a, UserKey< UO, US, UC > const &b)
 UserKeys are sequential? More...
 

Detailed Description

template<typename O, typename S = Key, typename C = NoClient>
class utility::keys::UserKey< O, S, C >

User-created hidden index key abstract base class.

Member Typedef Documentation

template<typename O , typename S = Key, typename C = NoClient>
typedef std::size_t utility::keys::UserKey< O, S, C >::Index
template<typename O , typename S = Key, typename C = NoClient>
typedef std::size_t utility::keys::UserKey< O, S, C >::index_type
template<typename O , typename S = Key, typename C = NoClient>
typedef utility::keys::Key utility::keys::UserKey< O, S, C >::Key
template<typename O , typename S = Key, typename C = NoClient>
typedef O utility::keys::UserKey< O, S, C >::Object
template<typename O , typename S = Key, typename C = NoClient>
typedef O utility::keys::UserKey< O, S, C >::object_type
template<typename O , typename S = Key, typename C = NoClient>
typedef std::size_t utility::keys::UserKey< O, S, C >::Size
template<typename O , typename S = Key, typename C = NoClient>
typedef std::size_t utility::keys::UserKey< O, S, C >::size_type
template<typename O , typename S = Key, typename C = NoClient>
typedef S utility::keys::UserKey< O, S, C >::Super
private

Constructor & Destructor Documentation

template<typename O , typename S = Key, typename C = NoClient>
utility::keys::UserKey< O, S, C >::UserKey ( std::string const &  id_a = std::string(),
std::string const &  identifier_a = std::string(),
std::string const &  code_a = std::string() 
)
inlineexplicitprotected

Default constructor.

template<typename O , typename S = Key, typename C = NoClient>
utility::keys::UserKey< O, S, C >::UserKey ( UserKey< O, S, C > const &  key)
inlineprotected

Copy constructor.

template<typename O , typename S = Key, typename C = NoClient>
utility::keys::UserKey< O, S, C >::UserKey ( UserKey< O, S, C > const &  key,
std::string const &  id_a,
std::string const &  identifier_a = std::string(),
std::string const &  code_a = std::string() 
)
inlineprotected

Copy + identifier constructor.

template<typename O , typename S = Key, typename C = NoClient>
utility::keys::UserKey< O, S, C >::UserKey ( Key const &  key)
inlineexplicitprotected

Key constructor.

References debug_assert.

template<typename O , typename S = Key, typename C = NoClient>
utility::keys::UserKey< O, S, C >::UserKey ( Key const &  key,
std::string const &  id_a,
std::string const &  identifier_a = std::string(),
std::string const &  code_a = std::string() 
)
inlineprotected

Key + identifier constructor.

References debug_assert.

template<typename O , typename S = Key, typename C = NoClient>
utility::keys::UserKey< O, S, C >::UserKey ( Index const  index_a,
std::string const &  id_a = std::string(),
std::string const &  identifier_a = std::string(),
std::string const &  code_a = std::string() 
)
inlineexplicitprotected

Index constructor.

template<typename O , typename S = Key, typename C = NoClient>
virtual utility::keys::UserKey< O, S, C >::~UserKey ( )
inlinevirtual

Destructor.

Member Function Documentation

template<typename O , typename S = Key, typename C = NoClient>
void utility::keys::UserKey< O, S, C >::assign_Key ( Key const &  key)
inlineprotected
template<typename O , typename S = Key, typename C = NoClient>
virtual UserKey* utility::keys::UserKey< O, S, C >::clone ( ) const
pure virtual

Clone this.

template<typename O , typename S = Key, typename C = NoClient>
std::string const& utility::keys::UserKey< O, S, C >::code ( ) const
inline
template<typename O , typename S = Key, typename C = NoClient>
std::string& utility::keys::UserKey< O, S, C >::code ( )
inline
template<typename O , typename S = Key, typename C = NoClient>
UserKey& utility::keys::UserKey< O, S, C >::code ( std::string const &  code_a)
inline

Code assignment.

References utility::keys::UserKey< O, S, C >::code_.

template<typename O , typename S = Key, typename C = NoClient>
bool utility::keys::UserKey< O, S, C >::comparable ( Key const &  key) const
inlineprotected
template<typename O , typename S = Key, typename C = NoClient>
bool utility::keys::UserKey< O, S, C >::equals ( Key const &  key) const
inlineprotected
template<typename O , typename S = Key, typename C = NoClient>
std::string const& utility::keys::UserKey< O, S, C >::id ( ) const
inline
template<typename O , typename S = Key, typename C = NoClient>
std::string& utility::keys::UserKey< O, S, C >::id ( )
inline
template<typename O , typename S = Key, typename C = NoClient>
UserKey& utility::keys::UserKey< O, S, C >::id ( std::string const &  id_a)
inline

ID assignment.

References utility::keys::UserKey< O, S, C >::id_.

template<typename O , typename S = Key, typename C = NoClient>
std::string const& utility::keys::UserKey< O, S, C >::identifier ( ) const
inline
template<typename O , typename S = Key, typename C = NoClient>
std::string& utility::keys::UserKey< O, S, C >::identifier ( )
inline
template<typename O , typename S = Key, typename C = NoClient>
UserKey& utility::keys::UserKey< O, S, C >::identifier ( std::string const &  identifier_a)
inline

Identifier assignment.

References utility::keys::UserKey< O, S, C >::identifier_.

template<typename O , typename S = Key, typename C = NoClient>
Index utility::keys::UserKey< O, S, C >::index ( ) const
inlineprotected
template<typename O , typename S = Key, typename C = NoClient>
Index& utility::keys::UserKey< O, S, C >::index ( )
inlineprotected
template<typename O , typename S = Key, typename C = NoClient>
UserKey& utility::keys::UserKey< O, S, C >::index ( Index const  index_a)
inlineprotected

Index assignment.

References utility::keys::UserKey< O, S, C >::index_.

template<typename O , typename S = Key, typename C = NoClient>
bool utility::keys::UserKey< O, S, C >::less_than ( Key const &  key) const
inlineprotected
template<typename O , typename S = Key, typename C = NoClient>
utility::keys::UserKey< O, S, C >::operator Index ( ) const
inlineprotected

Index value conversion.

References utility::keys::UserKey< O, S, C >::index_.

template<typename O , typename S = Key, typename C = NoClient>
UserKey& utility::keys::UserKey< O, S, C >::operator= ( UserKey< O, S, C > const &  key)
inline
template<typename O , typename S = Key, typename C = NoClient>
UserKey& utility::keys::UserKey< O, S, C >::operator= ( Key const &  key)
inline
template<typename O , typename S = Key, typename C = NoClient>
Index utility::keys::UserKey< 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!

References utility::keys::UserKey< O, S, C >::index_.

Friends And Related Function Documentation

template<typename O , typename S = Key, typename C = NoClient>
bool operator!= ( UserKey< O, S, C > const &  a,
UserKey< O, S, C > const &  b 
)
friend

UserKey != UserKey.

Note
Index-based equality
template<typename O , typename S = Key, typename C = NoClient>
bool operator< ( UserKey< O, S, C > const &  a,
UserKey< O, S, C > const &  b 
)
friend

UserKey < UserKey.

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

UserKey <= UserKey.

Note
Index-based ordering
template<typename O , typename S = Key, typename C = NoClient>
bool operator== ( UserKey< O, S, C > const &  a,
UserKey< O, S, C > const &  b 
)
friend

UserKey == UserKey.

Note
Index-based equality
template<typename O , typename S = Key, typename C = NoClient>
bool operator> ( UserKey< O, S, C > const &  a,
UserKey< O, S, C > const &  b 
)
friend

UserKey > UserKey.

Note
Index-based ordering
template<typename O , typename S = Key, typename C = NoClient>
bool operator>= ( UserKey< O, S, C > const &  a,
UserKey< O, S, C > const &  b 
)
friend

UserKey >= UserKey.

Note
Index-based ordering
template<typename O , typename S = Key, typename C = NoClient>
template<typename UO , typename US , typename UC >
bool sequential ( UserKey< UO, US, UC > const &  a,
UserKey< UO, US, UC > const &  b 
)
friend

UserKeys are sequential?

Note
Index-based ordering

Member Data Documentation

template<typename O , typename S = Key, typename C = NoClient>
std::string utility::keys::UserKey< O, S, C >::code_
private
template<typename O , typename S = Key, typename C = NoClient>
std::string utility::keys::UserKey< O, S, C >::id_
private
template<typename O , typename S = Key, typename C = NoClient>
std::string utility::keys::UserKey< O, S, C >::identifier_
private
template<typename O , typename S = Key, typename C = NoClient>
Index utility::keys::UserKey< O, S, C >::index_
private

The documentation for this class was generated from the following files: