Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
fileSystem.h
Go to the documentation of this file.
1
5#ifndef FILESYSTEM_H
6#define FILESYSTEM_H
7
8#include <cstdint>
9#include <string>
10
11namespace lampda {
12namespace physical {
14namespace fileSystem {
15
17void shutdown();
18
20void clear();
21
24
27
29namespace system {
30
32bool doKeyExists(const uint32_t key);
39bool get_value(const uint32_t key, uint32_t& value);
45void set_value(const uint32_t key, const uint32_t value);
46
55uint32_t dropMatchingKeys(const uint32_t bitMatch, const uint32_t bitSelect = 0xffffffff);
56
61void write_to_file();
62
67bool load_from_file();
68
69} // namespace system
70
72namespace user {
73
75bool doKeyExists(const uint32_t key);
82bool get_value(const uint32_t key, uint32_t& value);
88void set_value(const uint32_t key, const uint32_t value);
89
98uint32_t dropMatchingKeys(const uint32_t bitMatch, const uint32_t bitSelect = 0xffffffff);
99
104void write_to_file();
105
110bool load_from_file();
111
112} // namespace user
113
114} // namespace fileSystem
115} // namespace physical
116} // namespace lampda
117
118#endif
bool load_from_file()
Load system values from memory.
Definition: fileSystem.cpp:308
bool doKeyExists(const uint32_t key)
Return true if the given key exists in the filesystem.
Definition: fileSystem.cpp:224
void write_to_file()
Write the system parameters to a file.
Definition: fileSystem.cpp:286
uint32_t dropMatchingKeys(const uint32_t bitMatch, const uint32_t bitSelect)
Drop all keys using the given bit prefix.
Definition: fileSystem.cpp:260
void set_value(const uint32_t key, const uint32_t value)
Store a key/value in the filesystem.
Definition: fileSystem.cpp:251
bool get_value(const uint32_t key, uint32_t &value)
Check and return a value stored in a filesystem.
Definition: fileSystem.cpp:226
void write_to_file()
Write the user parameters to a file.
Definition: fileSystem.cpp:390
bool load_from_file()
Load user values from memory.
Definition: fileSystem.cpp:414
void set_value(const uint32_t key, const uint32_t value)
Store a key/value in the filesystem.
Definition: fileSystem.cpp:355
bool doKeyExists(const uint32_t key)
Return true if the given key exists in the filesystem.
Definition: fileSystem.cpp:328
uint32_t dropMatchingKeys(const uint32_t bitMatch, const uint32_t bitSelect)
Drop all keys using the given bit prefix.
Definition: fileSystem.cpp:364
bool get_value(const uint32_t key, uint32_t &value)
Check and return a value stored in a filesystem.
Definition: fileSystem.cpp:330
void shutdown()
call once on program stop.
Definition: fileSystem.cpp:70
void clear()
clear the stored values in the currently loaded file system.
Definition: fileSystem.cpp:79
void clear_system_parameters()
Clear the system parameters.
Definition: fileSystem.cpp:87
void clear_internal_fs()
hard clean of the whole filesystem, you will loose all stored data.
Definition: fileSystem.cpp:89
Program scope.
Definition: control_fixed_modes.hpp:12