MFEM  v3.1
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
mfem::IdGenerator Class Reference

#include <hash.hpp>

Public Member Functions

 IdGenerator (int first_id=0)
 
 IdGenerator (const IdGenerator &other)
 
int Get ()
 Generate a unique ID. More...
 
void Reuse (int id)
 Return an ID previously generated by 'Get'. More...
 

Detailed Description

Helper class to generate unique IDs. When IDs are no longer needed, they can be returned to the class ('Reuse') and they will be returned next time 'Get' is called.

Definition at line 25 of file hash.hpp.

Constructor & Destructor Documentation

mfem::IdGenerator::IdGenerator ( int  first_id = 0)
inline

Definition at line 28 of file hash.hpp.

mfem::IdGenerator::IdGenerator ( const IdGenerator other)
inline

Definition at line 30 of file hash.hpp.

Member Function Documentation

int mfem::IdGenerator::Get ( )
inline

Generate a unique ID.

Definition at line 34 of file hash.hpp.

void mfem::IdGenerator::Reuse ( int  id)
inline

Return an ID previously generated by 'Get'.

Definition at line 46 of file hash.hpp.


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