asset::EntryID< TY > Struct Template Reference

#include <entry-id.hpp>

Inheritance diagram for asset::EntryID< TY >:

Inheritance graph
[legend]
Collaboration diagram for asset::EntryID< TY >:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<class TY>
struct asset::EntryID< TY >

typed symbolic and hash ID for asset-like position accounting.

Allows for creating an entry with symbolic id and distinct type, combined with an derived hash value, without the overhead in storage and instance management imposed by using a full-fledged Asset.

Similar to an Asset, an identification tuple is available (generated on the fly), as is an unique LUID and total ordering. The type information is attached as template parameter, but included into the hash calculation. All instantiations of the EntryID template share a common baseclass, usable for type erased common registration.

See also:
mobject::session::Track

Definition at line 178 of file entry-id.hpp.


Public Member Functions

 EntryID (string const &symbolID)
 case-2: explicitly specify a symbolic ID to use.
 EntryID ()
 case-1: auto generated symbolic ID
Asset::Ident getIdent () const
 generate an Asset identification tuple based on this EntryID's symbolic ID and type information.
 operator string () const

Static Public Member Functions

static bool canRecast (BareEntryID const &bID)
static idi::HashVal getTypeHash ()
static EntryID recast (BareEntryID const &bID)

Friends

bool operator< (EntryID const &i1, EntryID const &i2)
ostream & operator<< (ostream &os, EntryID const &id)

Constructor & Destructor Documentation

template<class TY>
asset::EntryID< TY >::EntryID (  )  [inline]

case-1: auto generated symbolic ID

Definition at line 184 of file entry-id.hpp.

template<class TY>
asset::EntryID< TY >::EntryID ( string const &  symbolID  )  [inline, explicit]

case-2: explicitly specify a symbolic ID to use.

The type information TY will be included automatically into the generated hash-ID. This hash is reproducible.

Definition at line 193 of file entry-id.hpp.


Member Function Documentation

template<class TY>
static bool asset::EntryID< TY >::canRecast ( BareEntryID< TY > const &  bID  )  [inline, static]

Returns:
true if the upcast would yield exactly the same tuple (symbol,type) as was used on original definition of an ID, based on the given BareEntryID. Implemented by re-calculating the hash.

Definition at line 222 of file entry-id.hpp.

References asset::BareEntryID::getHash(), and asset::BareEntryID::getSym().

Here is the call graph for this function:

template<class TY>
Asset::Ident asset::EntryID< TY >::getIdent (  )  const [inline]

generate an Asset identification tuple based on this EntryID's symbolic ID and type information.

The remaining fields are filled in with hardwired defaults.

Definition at line 203 of file entry-id.hpp.


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

Generated on Sun Aug 1 21:32:08 2010 for Lumiera by  doxygen 1.5.6