CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <Named.hh>
Similar to 'Named', but includes an incrementing 'id' string
Public Types | |
typedef Named< _Base > | Base |
typedef Base::MostDerived | MostDerived |
Public Member Functions | |
Indexed () | |
std::string | id () const |
std::string | name () const |
std::string | alias () const |
Return "alias" if object stored in database and alias exists, return empty string otherwise. More... | |
Protected Member Functions | |
void | clear_name () const |
Unset "id" and "name", if object is modified. More... | |
void | set_id (Index _id) const |
Set id. More... | |
void | set_id (std::string _id) const |
Set id. More... | |
void | regenerate_name () const |
Regenerate "name". More... | |
void | set_name (std::string _name) const |
Set "name", explicity. More... | |
Private Attributes | |
friend | ValDatabase< MostDerived > |
std::string | m_id |
std::string | m_name |
typedef Named<_Base> CASM::DB::Indexed< _Base >::Base |
typedef Base::MostDerived CASM::DB::Indexed< _Base >::MostDerived |
CASM::DB::Indexed< _Base >::Indexed |
Definition at line 47 of file Named_impl.hh.
|
inherited |
Return "alias" if object stored in database and alias exists, return empty string otherwise.
Definition at line 34 of file Named_impl.hh.
|
protected |
Unset "id" and "name", if object is modified.
Definition at line 65 of file Named_impl.hh.
std::string CASM::DB::Indexed< _Base >::id |
Definition at line 50 of file Named_impl.hh.
std::string CASM::DB::Indexed< _Base >::name |
Definition at line 56 of file Named_impl.hh.
|
protectedinherited |
Regenerate "name".
Definition at line 41 of file Named_impl.hh.
|
protected |
Set id.
Setting id should be done through Database<Derived> implementations
Definition at line 76 of file Named_impl.hh.
|
protected |
Set id.
Setting id should be done through Database<Derived> implementations
Definition at line 86 of file Named_impl.hh.
|
protectedinherited |
|
mutableprivate |
|
mutableprivateinherited |
|
private |