votca 2024.2-dev
Loading...
Searching...
No Matches
votca::tools::Identity< T > Class Template Reference

Information about Identity. More...

#include <identity.h>

Collaboration diagram for votca::tools::Identity< T >:

Public Member Functions

 Identity ()
 Constructor.
 
 Identity (const T &id)
 Constructor that takes initial id.
 
const T & getId () const
 Gets the id returns error of the id has not been set.
 
void setId (const T &id)
 Set the id.
 

Private Attributes

id_
 
bool id_set_
 

Detailed Description

template<typename T>
class votca::tools::Identity< T >

Information about Identity.

The identity object is meant to provide functionality for storing the id of an object it primariy meant to be used in child classes and provides a more safety than other implementations.

Definition at line 36 of file identity.h.

Constructor & Destructor Documentation

◆ Identity() [1/2]

template<typename T >
votca::tools::Identity< T >::Identity ( )
inline

Constructor.

Definition at line 43 of file identity.h.

◆ Identity() [2/2]

template<typename T >
votca::tools::Identity< T >::Identity ( const T & id)
inline

Constructor that takes initial id.

Definition at line 45 of file identity.h.

Member Function Documentation

◆ getId()

template<typename T >
const T & votca::tools::Identity< T >::getId ( ) const
inline

Gets the id returns error of the id has not been set.

Definition at line 47 of file identity.h.

◆ setId()

template<typename T >
void votca::tools::Identity< T >::setId ( const T & id)
inline

Set the id.

Definition at line 52 of file identity.h.

Member Data Documentation

◆ id_

template<typename T >
T votca::tools::Identity< T >::id_
private

Definition at line 38 of file identity.h.

◆ id_set_

template<typename T >
bool votca::tools::Identity< T >::id_set_
private

Definition at line 39 of file identity.h.


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