Honeycomb  0.1
Component-Model Framework
Classes | Macros | Functions
String Identifier

Classes

class  honey::Id
 Holds a name string and its hashed value for fast comparison ops. See String Identifier. More...
 
class  honey::IdLiteral
 Id created from a string literal at compile-time. More...
 
class  honey::NameId
 Holds both a name string and its hashed value, and unlike Id the name is never compiled out. More...
 

Macros

#define idnull   IdLiteral()
 Null id. More...
 

Functions

constexpr IdLiteral honey::operator""_id (const char *str, szt len)
 Create an id from a string literal at compile-time. More...
 

Detailed Description

String ids provide a fast way to compare strings.
An Id is composed of a name string and its hashed integral value (using hash::fast()).
In final mode an Id only holds the hash, name() is not available.

See also
string literal operator _id to create ids at compile-time.

Macro Definition Documentation

#define idnull   IdLiteral()

Null id.

Function Documentation

constexpr IdLiteral honey::operator""_id ( const char *  str,
szt  len 
)

Create an id from a string literal at compile-time.

This operator can be used in a case expression of a switch block (ex. case "foo"_id: ).