aqhome: added PATH module, started VARS module.
those might later get incorporated into libgwenhywfar.
This commit is contained in:
63
aqhome/data/vars.h
Normal file
63
aqhome/data/vars.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/****************************************************************************
|
||||
* This file is part of the project Gwenhywfar.
|
||||
* Gwenhywfar (c) by 2023 Martin Preuss, all rights reserved.
|
||||
*
|
||||
* The license for this file can be found in the file COPYING which you
|
||||
* should have received along with this file.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef AQH_VARS_H
|
||||
#define AQH_VARS_H
|
||||
|
||||
|
||||
#include <gwenhywfar/tree2.h>
|
||||
|
||||
|
||||
|
||||
typedef enum {
|
||||
AQH_Vars_DataType_Unknown=0,
|
||||
AQH_Vars_DataType_Group,
|
||||
AQH_Vars_DataType_Variable,
|
||||
AQH_Vars_DataType_ValueString=100,
|
||||
AQH_Vars_DataType_ValueInt,
|
||||
AQH_Vars_DataType_ValueDouble
|
||||
} AQH_VARS_DATATYPE;
|
||||
|
||||
|
||||
|
||||
typedef struct AQH_VARS AQH_VARS;
|
||||
GWEN_TREE2_FUNCTION_DEFS(AQH_VARS, AQH_Vars);
|
||||
|
||||
|
||||
AQH_VARS *AQH_Vars_CreateGroup(char *s);
|
||||
AQH_VARS *AQH_Vars_CreateVariable(char *s);
|
||||
AQH_VARS *AQH_Vars_CreateStringValue(char *s);
|
||||
AQH_VARS *AQH_Vars_CreateIntValue(int d);
|
||||
AQH_VARS *AQH_Vars_CreateDoubleValue(double d);
|
||||
|
||||
void AQH_Vars_free(AQH_VARS *vt);
|
||||
|
||||
|
||||
AQH_VARS_DATATYPE AQH_Vars_GetDataType(const AQH_VARS *vt);
|
||||
uint32_t AQH_Vars_GetFlags(const AQH_VARS *vt);
|
||||
|
||||
const char *AQH_Vars_GetStringData(const AQH_VARS *vt, const char *defValue);
|
||||
void AQH_Vars_SetStringData(AQH_VARS *vt, char *s);
|
||||
|
||||
int AQH_Vars_GetIntData(const AQH_VARS *vt, int defValue);
|
||||
void AQH_Vars_SetIntData(AQH_VARS *vt, int d);
|
||||
|
||||
double AQH_Vars_GetDoubleData(const AQH_VARS *vt, double defValue);
|
||||
void AQH_Vars_SetDoubleData(AQH_VARS *vt, double d);
|
||||
|
||||
|
||||
AQH_VARS *AQH_Vars_GetFirstChildByType(const AQH_VARS *vt, AQH_VARS_DATATYPE dt);
|
||||
AQH_VARS *AQH_Vars_GetNextByType(const AQH_VARS *vt, AQH_VARS_DATATYPE dt);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user