|
CatapultServer
v0.5.0.1 (Elephant)
|
Index file containing a uint64_t value. More...
Public Member Functions | |
| IndexFile (const std::string &filename, LockMode lockMode=LockMode::File) | |
| Creates an index file with name filename and file locking specified by lockMode. More... | |
| bool | exists () const |
true if the index file exists. More... | |
| uint64_t | get () const |
| Gets the index value. More... | |
| void | set (uint64_t value) |
| Sets the index value to value. More... | |
| uint64_t | increment () |
| Increments the index value by one and returns the new value. More... | |
Private Member Functions | |
| RawFile | open (OpenMode mode) const |
Private Attributes | |
| std::string | m_filename |
| LockMode | m_lockMode |
Index file containing a uint64_t value.
|
explicit |
Creates an index file with name filename and file locking specified by lockMode.
| bool catapult::io::IndexFile::exists | ( | ) | const |
true if the index file exists.

| uint64_t catapult::io::IndexFile::get | ( | ) | const |
Gets the index value.


| uint64_t catapult::io::IndexFile::increment | ( | ) |
Increments the index value by one and returns the new value.



| void catapult::io::IndexFile::set | ( | uint64_t | value | ) |
Sets the index value to value.


|
private |
|
private |