tetengo 1.8.1
A multipurpose library set
|
A storage. More...
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Functions | |
void | tetengo_property_storage_destroy (const tetengo_property_storage_t *p_storage) |
Destroys a storage. | |
bool | tetengo_property_storage_getBool (const tetengo_property_storage_t *p_storage, const char *key, bool *p_value) |
Returns the value in a boolean. | |
void | tetengo_property_storage_setBool (tetengo_property_storage_t *p_storage, const char *key, bool value) |
Sets a value in a boolean. | |
bool | tetengo_property_storage_getUint32 (const tetengo_property_storage_t *p_storage, const char *key, uint32_t *p_value) |
Returns the value in an unsigned 32-bit integer. | |
void | tetengo_property_storage_setUint32 (tetengo_property_storage_t *p_storage, const char *key, uint32_t value) |
Sets a value in an unsigned 32-bit integer. | |
size_t | tetengo_property_storage_getString (const tetengo_property_storage_t *p_storage, const char *key, char *p_value, size_t value_capacity) |
Returns the value in a string. | |
void | tetengo_property_storage_setString (tetengo_property_storage_t *p_storage, const char *key, const char *value) |
Sets a value in a string. | |
void | tetengo_property_storage_save (const tetengo_property_storage_t *p_storage) |
Saves the values. | |
tetengo_property_storageLoader_t * | tetengo_property_storageLoader_createMemoryStorageLoader () |
Creates a memory storage loader. | |
tetengo_property_storageLoader_t * | tetengo_property_storageLoader_createFileStorageLoader () |
Creates a file storage loader. | |
tetengo_property_storageLoader_t * | tetengo_property_storageLoader_createWindowsRegistoryStorageLoader () |
Creates a Windows registry storage loader. | |
tetengo_property_storageLoader_t * | tetengo_property_storageLoader_createStorageLoaderProxy (tetengo_property_storageLoader_t *p_real_storage_loader) |
Creates a storage loader proxy. | |
void | tetengo_property_storageLoader_destroy (const tetengo_property_storageLoader_t *p_storage_loader) |
Destroys a storage loader. | |
tetengo_property_storage_t * | tetengo_property_storageLoader_load (const tetengo_property_storageLoader_t *p_storage_loader, const char *path) |
Loads a storage. | |
A storage.
Copyright (C) 2019-2023 kaoru https://www.tetengo.org/
void tetengo_property_storage_destroy | ( | const tetengo_property_storage_t * | p_storage | ) |
Destroys a storage.
p_storage | A pointer to a storage. |
bool tetengo_property_storage_getBool | ( | const tetengo_property_storage_t * | p_storage, |
const char * | key, | ||
bool * | p_value | ||
) |
Returns the value in a boolean.
p_storage | A pointer to a storage. |
key | A key. |
p_value | The storage for a value. |
true | When the value is set to p_value. |
false | Otherwise. |
size_t tetengo_property_storage_getString | ( | const tetengo_property_storage_t * | p_storage, |
const char * | key, | ||
char * | p_value, | ||
size_t | value_capacity | ||
) |
Returns the value in a string.
p_storage | A pointer to a storage. |
key | A key. |
p_value | The storage for a value. Can be NULL. |
value_capacity | A value capacity. |
bool tetengo_property_storage_getUint32 | ( | const tetengo_property_storage_t * | p_storage, |
const char * | key, | ||
uint32_t * | p_value | ||
) |
Returns the value in an unsigned 32-bit integer.
p_storage | A pointer to a storage. |
key | A key. |
p_value | The storage for a value. |
true | When the value is set to p_value. |
false | Otherwise. |
void tetengo_property_storage_save | ( | const tetengo_property_storage_t * | p_storage | ) |
Saves the values.
p_storage | A pointer to a storage. |
void tetengo_property_storage_setBool | ( | tetengo_property_storage_t * | p_storage, |
const char * | key, | ||
bool | value | ||
) |
Sets a value in a boolean.
p_storage | A pointer to a storage. |
key | A key. |
value | A value. |
void tetengo_property_storage_setString | ( | tetengo_property_storage_t * | p_storage, |
const char * | key, | ||
const char * | value | ||
) |
Sets a value in a string.
p_storage | A pointer to a storage. |
key | A key. |
value | A value. |
void tetengo_property_storage_setUint32 | ( | tetengo_property_storage_t * | p_storage, |
const char * | key, | ||
uint32_t | value | ||
) |
Sets a value in an unsigned 32-bit integer.
p_storage | A pointer to a storage. |
key | A key. |
value | A value. |
tetengo_property_storageLoader_t * tetengo_property_storageLoader_createFileStorageLoader | ( | ) |
Creates a file storage loader.
tetengo_property_storageLoader_t * tetengo_property_storageLoader_createMemoryStorageLoader | ( | ) |
Creates a memory storage loader.
tetengo_property_storageLoader_t * tetengo_property_storageLoader_createStorageLoaderProxy | ( | tetengo_property_storageLoader_t * | p_real_storage_loader | ) |
Creates a storage loader proxy.
The ownership of the real storage loader pointed by p_real_storage_loader is transferred into the storage loader proxy. There is no need to destroy the real storage loader after calling this function.
p_real_storage_loader | A pointer to a real storage loader. |
tetengo_property_storageLoader_t * tetengo_property_storageLoader_createWindowsRegistoryStorageLoader | ( | ) |
Creates a Windows registry storage loader.
void tetengo_property_storageLoader_destroy | ( | const tetengo_property_storageLoader_t * | p_storage_loader | ) |
Destroys a storage loader.
p_storage_loader | A pointer to a storage loader. |
tetengo_property_storage_t * tetengo_property_storageLoader_load | ( | const tetengo_property_storageLoader_t * | p_storage_loader, |
const char * | path | ||
) |
Loads a storage.
p_storage_loader | A pointer to a storage loader. |
path | A path. |