Honeycomb  0.1
Component-Model Framework
Public Member Functions | Protected Attributes | Friends | List of all members
honey::Id Class Reference

Holds a name string and its hashed value for fast comparison ops. See String Identifier. More...

#include <Id.h>

Inheritance diagram for honey::Id:
Inheritance graph
[legend]
Collaboration diagram for honey::Id:
Collaboration graph
[legend]

Public Member Functions

 Id ()
 
 Id (const String &name)
 
 Id (const String &name, szt hash)
 Construct with precalculated hash. More...
 
 Id (const IdLiteral &rhs)
 
 Id (const Id &rhs)
 
 Id (Id &&rhs)
 
Id & operator= (const Id &rhs)
 
Id & operator= (Id &&rhs)
 
Id & operator= (const IdLiteral &rhs)
 
bool operator== (const Id &rhs) const
 
bool operator!= (const Id &rhs) const
 
bool operator< (const Id &rhs) const
 
bool operator> (const Id &rhs) const
 
bool operator<= (const Id &rhs) const
 
bool operator>= (const Id &rhs) const
 
bool operator== (const IdLiteral &rhs) const
 
bool operator!= (const IdLiteral &rhs) const
 
bool operator< (const IdLiteral &rhs) const
 
bool operator> (const IdLiteral &rhs) const
 
bool operator<= (const IdLiteral &rhs) const
 
bool operator>= (const IdLiteral &rhs) const
 
const String & name () const
 Get name string that this id represents. More...
 
szt hash () const
 Get hashed integral value of name. More...
 
 operator szt () const
 Same as hash() More...
 

Protected Attributes

String _name
 
szt _hash
 

Friends

class IdLiteral
 
ostream & operator<< (ostream &os, const Id &val)
 
ByteStream & operator<< (ByteStream &os, const Id &val)
 Id to bytes. More...
 
ByteStream & operator>> (ByteStream &is, Id &val)
 Id from bytes. More...
 

Detailed Description

Holds a name string and its hashed value for fast comparison ops. See String Identifier.

Constructor & Destructor Documentation

honey::Id::Id ( )
inline
honey::Id::Id ( const String &  name)
inline
honey::Id::Id ( const String &  name,
szt  hash 
)
inline

Construct with precalculated hash.

honey::Id::Id ( const IdLiteral &  rhs)
honey::Id::Id ( const Id &  rhs)
inline
honey::Id::Id ( Id &&  rhs)
inline

Member Function Documentation

szt honey::Id::hash ( ) const
inline

Get hashed integral value of name.

const String& honey::Id::name ( ) const
inline

Get name string that this id represents.

honey::Id::operator szt ( ) const
inline

Same as hash()

bool honey::Id::operator!= ( const Id &  rhs) const
inline
bool honey::Id::operator!= ( const IdLiteral &  rhs) const
bool honey::Id::operator< ( const Id &  rhs) const
inline
bool honey::Id::operator< ( const IdLiteral &  rhs) const
bool honey::Id::operator<= ( const Id &  rhs) const
inline
bool honey::Id::operator<= ( const IdLiteral &  rhs) const
Id& honey::Id::operator= ( const Id &  rhs)
inline
Id& honey::Id::operator= ( Id &&  rhs)
inline
Id& honey::Id::operator= ( const IdLiteral &  rhs)
bool honey::Id::operator== ( const Id &  rhs) const
inline
bool honey::Id::operator== ( const IdLiteral &  rhs) const
bool honey::Id::operator> ( const Id &  rhs) const
inline
bool honey::Id::operator> ( const IdLiteral &  rhs) const
bool honey::Id::operator>= ( const Id &  rhs) const
inline
bool honey::Id::operator>= ( const IdLiteral &  rhs) const

Friends And Related Function Documentation

friend class IdLiteral
friend
ostream& operator<< ( ostream &  os,
const Id &  val 
)
friend
ByteStream& operator<< ( ByteStream &  os,
const Id &  val 
)
friend

Id to bytes.

ByteStream& operator>> ( ByteStream &  is,
Id &  val 
)
friend

Id from bytes.

Member Data Documentation

szt honey::Id::_hash
protected
String honey::Id::_name
protected

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