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

Holds both a name string and its hashed value, and unlike Id the name is never compiled out. More...

#include <Id.h>

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

Public Member Functions

 NameId ()=default
 
 NameId (const String &name)
 
 NameId (const char *name)
 
 NameId (const Id &id)
 Create with id, leaving name empty. More...
 
 NameId (const String &name, const Id &id)
 Create with name and precalculated id. More...
 
const Stringname () const
 
- Public Member Functions inherited from honey::Id
 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)
 
Idoperator= (const Id &rhs)
 
Idoperator= (Id &&rhs)
 
Idoperator= (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 Stringname () 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...
 

Friends

ostream & operator<< (ostream &os, const NameId &val)
 
ByteStreamoperator<< (ByteStream &os, const NameId &val)
 Named id to bytes. More...
 
ByteStreamoperator>> (ByteStream &is, NameId &val)
 Named id from bytes. More...
 

Additional Inherited Members

- Protected Attributes inherited from honey::Id
String _name
 
szt _hash
 

Detailed Description

Holds both a name string and its hashed value, and unlike Id the name is never compiled out.

Constructor & Destructor Documentation

honey::NameId::NameId ( )
default
honey::NameId::NameId ( const String name)
inline
honey::NameId::NameId ( const char *  name)
inline
honey::NameId::NameId ( const Id id)
inlineexplicit

Create with id, leaving name empty.

honey::NameId::NameId ( const String name,
const Id id 
)
inline

Create with name and precalculated id.

Member Function Documentation

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

Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const NameId val 
)
friend
ByteStream& operator<< ( ByteStream os,
const NameId val 
)
friend

Named id to bytes.

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

Named id from bytes.


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