11#define META_FILE_NAME "LcSettingC_tcl.c"
15#define OT_CLASS NS(LcSettingC)
16#define OT_CLASS_NAME "LcSettingC"
18#define OBJECT2CFS(O) MkAssertCastM(LcSettingC,(Tcl_ObjectGetMetadata(O, &MK(AtomMeta))))
48#define OT_SETUP_hdl_static_constr_pre
49#define OT_SETUP_hdl_static_constr \
50 OT_SETUP_hdl_static_constr_pre; \
53#define OT_SETUP_hdl_static \
54 int __skip=Tcl_ObjectContextSkippedArgs(objCtx); \
56 __attribute__((unused)) OT_SELF_T selfO = Tcl_ObjectContextObject(objCtx); \
57 __attribute__((unused)) MK_TYP hdl = LcSettingC##_TT;
59#define OT_SETUP_hdl SetupHdlFromMetaData_2(CFS,LC_CFS);
60#define OT_SETUP_hdl__null_allow SetupHdlFromMetaData__null_allow_2(CFS,LC_CFS);
61#define OT_SETUP_hdl_destr SetupHdlFromMetaData__null_allow_2(CFS,LC_CFS);
63#define OT_SETUP_hdl_constr_pre
64#define OT_SETUP_hdl_constr \
65 OT_SETUP_hdl_constr_pre; \
66 int __skip=Tcl_ObjectContextSkippedArgs(objCtx); \
68 MK_RT_UNUSED OT_SELF_T selfO = Tcl_ObjectContextObject(objCtx); \
69 LC_CFS hdl = (LC_CFS) &MkERROR;
71#if !defined(SetupRtFromHdl_XN)
72 #define SetupRtFromHdl_XN(hdl) AllRtSetup_XN(hdl)
73 #define SetupRtFromHdl_X(hdl) AllRtSetup_X(hdl)
79 if (LcSettingCTT == NULL) LcSettingCTT = LcSettingSTT; \
82 if (LcSettingCTT->selfCreate == NS(LcSettingC_selfCreate)) return MK_OK; \
85 LcSettingCTT->selfCreate = NS(LcSettingC_selfCreate); \
86 LcSettingCTT->selfDelete = NS(LcSettingC_selfDelete); \
87 LcSettingCTT->selfUnlink = NS(LcSettingC_selfUnlink); \
90 OT_SELF_T classO = MK(ClassDef)(interp,ns,LcSettingCTT); \
91 check_NULL(classO) goto error; \
92 OT_CLASS = Tcl_GetObjectAsClass(classO); \
95 static MkThreadLocal OtUnknownS NS(sClassUnknown) = {OT_UNKNOWN_CLASS}; \
96 check_LNG(MK(UnknownSetup) (interp,classO,NS(sOtClassDef),&NS(sClassUnknown))) goto error; \
99 static MkThreadLocal OtUnknownS NS(sInstanceUnknown) = {OT_UNKNOWN_INSTANCE}; \
100 check_LNG(MK(UnknownSetup) (interp,classO,NS(sInstanceDef),&NS(sInstanceUnknown))) goto error; \
103 LC(LcSettingC_MK_NULL) = Tcl_GetObjectName(interp, \
104 MK(AtomCreate) (MK_RT_CALL interp, NULL , OT_CLASS, "MK_NULL" , "::tcllcconfig::LcSettingC" ) \
106 Tcl_IncrRefCount(LC(LcSettingC_MK_NULL));
108#define VER TCL_OO_METHOD_VERSION_CURRENT
115#define GetNull_doc "LcSettingC [LcSettingC GetNull]"
116#define HandleResolve_doc "LcSettingC [LcSettingC HandleResolve netHdl:MK_HDL]"
117#define Instances_doc "LcSettingC [LcSettingC Instances]"
120#define Add_doc "LcSettingC [$parent Add name:string __type:LcConfigTypeE]"
123#define AddIfNotExists_doc "LcSettingC [$setting AddIfNotExists name:string cfgtype:LcConfigTypeE]"
124#define GetConfig_doc "LcConfigC [$setting GetConfig] (const)"
125#define GetElem_doc "LcSettingC [$setting GetElem idx:int32] (const)"
126#define GetMember_doc "LcSettingC [$setting GetMember name:string] (const)"
127#define Lookup_doc "LcSettingC [$setting Lookup path:string]"
128#define LookupAll_doc "MkBufferListC [$setting LookupAll] (const)"
129#define Next_doc "LcSettingC [$cfs Next]"
130#define Parent_doc "LcSettingC [$setting Parent] (const)"
131#define Prev_doc "LcSettingC [$cfs Prev]"
132#define SetBoolElem_doc "LcSettingC [$setting SetBoolElem idx:int32 value:int32]"
133#define SetFloatElem_doc "LcSettingC [$setting SetFloatElem idx:int32 value:double]"
134#define SetInt64Elem_doc "LcSettingC [$setting SetInt64Elem idx:int32 value:int64]"
135#define SetIntElem_doc "LcSettingC [$setting SetIntElem idx:int32 value:int32]"
136#define SetStringElem_doc "LcSettingC [$setting SetStringElem idx:int32 value:string]"
139#define Exists_doc "bool [$setting Exists name:string]"
140#define GetBool_doc "bool [$setting GetBool] (const)"
141#define GetBoolElem_doc "bool [$setting GetBoolElem idx:int32] (const)"
142#define GetFloat_doc "double [$setting GetFloat] (const)"
143#define GetFloatElem_doc "double [$setting GetFloatElem idx:int32] (const)"
144#define GetFormat_doc "LcConfigFormatE [$setting GetFormat] (const)"
145#define GetInt_doc "int32 [$setting GetInt] (const)"
146#define GetInt64_doc "int64 [$setting GetInt64] (const)"
147#define GetInt64Elem_doc "int64 [$setting GetInt64Elem idx:int32] (const)"
148#define GetIntElem_doc "int32 [$setting GetIntElem idx:int32] (const)"
149#define GetString_doc "string [$setting GetString] (const)"
150#define GetStringElem_doc "string [$setting GetStringElem idx:int32] (const)"
152#define Index_doc "int32 [$setting Index] (const)"
153#define IsAggregate_doc "bool [$setting IsAggregate] (const)"
154#define IsArray_doc "bool [$setting IsArray] (const)"
155#define IsGroup_doc "bool [$setting IsGroup] (const)"
156#define IsList_doc "bool [$setting IsList] (const)"
157#define IsNumber_doc "bool [$setting IsNumber] (const)"
158#define IsRoot_doc "bool [$setting IsRoot] (const)"
159#define IsScalar_doc "bool [$setting IsScalar] (const)"
160#define Length_doc "int32 [$setting Length] (const)"
162#define Name_doc "string [$setting Name] (const)"
163#define Remove_doc "$parent Remove name:string"
164#define RemoveElem_doc "$parent RemoveElem idx:int32"
165#define SetBool_doc "$setting SetBool value:bool"
166#define SetFloat_doc "$setting SetFloat value:double"
167#define SetFormat_doc "$setting SetFormat format:LcConfigFormatE"
168#define SetInt_doc "$setting SetInt value:int32"
169#define SetInt64_doc "$setting SetInt64 value:int64"
170#define SetString_doc "$setting SetString value:string"
171#define SourceFile_doc "string [$setting SourceFile] (const)"
172#define SourceLine_doc "int32 [$setting SourceLine] (const)"
173#define Type_doc "LcConfigTypeE [$setting Type] (const)"
176#define LookupBool_doc "bool [$setting LookupBool name:string] (const)"
177#define LookupFloat_doc "double [$setting LookupFloat name:string] (const)"
178#define LookupInt_doc "int32 [$setting LookupInt name:string] (const)"
179#define LookupInt64_doc "int64 [$setting LookupInt64 name:string] (const)"
180#define LookupString_doc "string [$setting LookupString name:string] (const)"
319 if (retVal == NULL) {
339 if (retVal == NULL) {
623 if (retVal == NULL) {
769 if (retVal == NULL) {
931 if (retVal == NULL) {
953 if (retVal == NULL) {
975 if (retVal == NULL) {
997 if (retVal == NULL) {
1019 if (retVal == NULL) {
1148 if (retVal == NULL) {
1183static Tcl_MethodType
NS(sOtClassDef)[] = {
1187 {
VER,
"GetNull" ,
NS(LcSettingC_GetNull) , NULL, NULL},
1188 {
VER,
"HandleResolve" ,
NS(LcSettingC_HandleResolve) , NULL, NULL},
1189 {
VER,
"Instances" ,
NS(LcSettingC_Instances) , NULL, NULL},
1192 {0, NULL, NULL, NULL}
1197static Tcl_MethodType
NS(sInstanceDef)[] = {
1201 {
VER,
"Add" ,
NS(LcSettingC_Add) , NULL, NULL},
1204 {
VER,
"AddIfNotExists" ,
NS(LcSettingC_AddIfNotExists) , NULL, NULL},
1205 {
VER,
"GetConfig" ,
NS(LcSettingC_GetConfig) , NULL, NULL},
1206 {
VER,
"GetElem" ,
NS(LcSettingC_GetElem) , NULL, NULL},
1207 {
VER,
"GetMember" ,
NS(LcSettingC_GetMember) , NULL, NULL},
1208 {
VER,
"Lookup" ,
NS(LcSettingC_Lookup) , NULL, NULL},
1209 {
VER,
"LookupAll" ,
NS(LcSettingC_LookupAll) , NULL, NULL},
1210 {
VER,
"Next" ,
NS(LcSettingC_Next) , NULL, NULL},
1211 {
VER,
"Parent" ,
NS(LcSettingC_Parent) , NULL, NULL},
1212 {
VER,
"Prev" ,
NS(LcSettingC_Prev) , NULL, NULL},
1213 {
VER,
"SetBoolElem" ,
NS(LcSettingC_SetBoolElem) , NULL, NULL},
1214 {
VER,
"SetFloatElem" ,
NS(LcSettingC_SetFloatElem) , NULL, NULL},
1215 {
VER,
"SetInt64Elem" ,
NS(LcSettingC_SetInt64Elem) , NULL, NULL},
1216 {
VER,
"SetIntElem" ,
NS(LcSettingC_SetIntElem) , NULL, NULL},
1217 {
VER,
"SetStringElem" ,
NS(LcSettingC_SetStringElem) , NULL, NULL},
1220 {
VER,
"Exists" ,
NS(LcSettingC_Exists) , NULL, NULL},
1221 {
VER,
"GetBool" ,
NS(LcSettingC_GetBool) , NULL, NULL},
1222 {
VER,
"GetBoolElem" ,
NS(LcSettingC_GetBoolElem) , NULL, NULL},
1223 {
VER,
"GetFloat" ,
NS(LcSettingC_GetFloat) , NULL, NULL},
1224 {
VER,
"GetFloatElem" ,
NS(LcSettingC_GetFloatElem) , NULL, NULL},
1225 {
VER,
"GetFormat" ,
NS(LcSettingC_GetFormat) , NULL, NULL},
1226 {
VER,
"GetInt" ,
NS(LcSettingC_GetInt) , NULL, NULL},
1227 {
VER,
"GetInt64" ,
NS(LcSettingC_GetInt64) , NULL, NULL},
1228 {
VER,
"GetInt64Elem" ,
NS(LcSettingC_GetInt64Elem) , NULL, NULL},
1229 {
VER,
"GetIntElem" ,
NS(LcSettingC_GetIntElem) , NULL, NULL},
1230 {
VER,
"GetString" ,
NS(LcSettingC_GetString) , NULL, NULL},
1231 {
VER,
"GetStringElem" ,
NS(LcSettingC_GetStringElem) , NULL, NULL},
1233 {
VER,
"Index" ,
NS(LcSettingC_Index) , NULL, NULL},
1234 {
VER,
"IsAggregate" ,
NS(LcSettingC_IsAggregate) , NULL, NULL},
1235 {
VER,
"IsArray" ,
NS(LcSettingC_IsArray) , NULL, NULL},
1236 {
VER,
"IsGroup" ,
NS(LcSettingC_IsGroup) , NULL, NULL},
1237 {
VER,
"IsList" ,
NS(LcSettingC_IsList) , NULL, NULL},
1238 {
VER,
"IsNumber" ,
NS(LcSettingC_IsNumber) , NULL, NULL},
1239 {
VER,
"IsRoot" ,
NS(LcSettingC_IsRoot) , NULL, NULL},
1240 {
VER,
"IsScalar" ,
NS(LcSettingC_IsScalar) , NULL, NULL},
1241 {
VER,
"Length" ,
NS(LcSettingC_Length) , NULL, NULL},
1243 {
VER,
"Name" ,
NS(LcSettingC_Name) , NULL, NULL},
1244 {
VER,
"Remove" ,
NS(LcSettingC_Remove) , NULL, NULL},
1245 {
VER,
"RemoveElem" ,
NS(LcSettingC_RemoveElem) , NULL, NULL},
1246 {
VER,
"SetBool" ,
NS(LcSettingC_SetBool) , NULL, NULL},
1247 {
VER,
"SetFloat" ,
NS(LcSettingC_SetFloat) , NULL, NULL},
1248 {
VER,
"SetFormat" ,
NS(LcSettingC_SetFormat) , NULL, NULL},
1249 {
VER,
"SetInt" ,
NS(LcSettingC_SetInt) , NULL, NULL},
1250 {
VER,
"SetInt64" ,
NS(LcSettingC_SetInt64) , NULL, NULL},
1251 {
VER,
"SetString" ,
NS(LcSettingC_SetString) , NULL, NULL},
1252 {
VER,
"SourceFile" ,
NS(LcSettingC_SourceFile) , NULL, NULL},
1253 {
VER,
"SourceLine" ,
NS(LcSettingC_SourceLine) , NULL, NULL},
1254 {
VER,
"Type" ,
NS(LcSettingC_Type) , NULL, NULL},
1257 {
VER,
"LookupBool" ,
NS(LcSettingC_LookupBool) , NULL, NULL},
1258 {
VER,
"LookupFloat" ,
NS(LcSettingC_LookupFloat) , NULL, NULL},
1259 {
VER,
"LookupInt" ,
NS(LcSettingC_LookupInt) , NULL, NULL},
1260 {
VER,
"LookupInt64" ,
NS(LcSettingC_LookupInt64) , NULL, NULL},
1261 {
VER,
"LookupString" ,
NS(LcSettingC_LookupString) , NULL, NULL},
1264 {0, NULL, NULL, NULL, NULL}
1273int NS(pLcSettingC_Init) (
MK_RT_ARGS Tcl_Interp *interp, Tcl_Namespace *ns)
#define GetStringElem_doc
static __thread MK_TYP LcSettingCTT
#define SetStringElem_doc
#define HandleResolve_doc
#define OT_SETUP_hdl_static
#define AddIfNotExists_doc
#define OT_retObj_SET_CFG(nat)
#define OT_retObj_SET_CFS(nat)
#define OT_NEW_Lc_enum_OBJ(typ, val)
#define OT_CHECK_bool(val)
#define OT_SETUP_VARARGS(min, max, d)
#define OT_CHECK_NIH(val)
#define OT_retObj_SET_BOL(nat)
#define OT_SETUP_NOARG(d)
#define OT_SETUP_ONEARG(d)
#define OT_ERROR_LNG_RETURN
#define OT_CHECK_NI4(val)
#define OT_CHECK_NI8(val)
#define OT_retObj_SET_Error
#define OT_CHECK_NF8(val)
#define OT_ERROR_CONSTRUCTOR(class)
#define OT_retObj_SET_DBL(nat)
#define OT_retObj_SET_I64(nat)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
#define OT_retObj_SET_I32(nat)
#define OT_retObj_SET_BFL(nat)
#define OT_CHECK_ENUM(ename, val)
#define OT_retObj_SET_STR(nat)
#define OT_retObj_SET(val)
#define MkErrorC_Check(mng, PROC)
#define OT_ERROR_SOFT_CONSTRUCTOR(class)
#define OT_CHECK_STRN(val)
LcConfigFormatE
set the format of a LcSettingC …
LcConfigTypeE
define the data-type of a LcSettingC …
#define LcSettingHandleResolve(...)
static LC_CFS LcSettingPrev(LC_CFS const cfs)
get previous instance from linked-list of LcSettingS type
static LC_CFS LcSettingNext(LC_CFS const cfs)
get next instance from linked-list of LcSettingS type
#define LcSettingInstances()
static LC_CFS LcSettingGetNull(void)
Null-Slot - return a LcSettingC typed NULL instance …
static MK_STRN LcSettingGetString(LC_CFSN setting)
These functions return the value of the given setting …
static LC_CFG LcSettingGetConfig(LC_CFSN setting)
addon - return the LcConfigC from the LcSettingC …
static LC_CFS LcSettingGetElem(LC_CFSN setting, MK_I32 idx)
This function fetches the element at the given index index in the setting setting,...
static MK_BOOL LcSettingGetBool(LC_CFSN setting)
These functions return the value of the given setting …
static MK_DBL LcSettingGetFloat(LC_CFSN setting)
These functions return the value of the given setting …
static MK_BOOL LcSettingGetBoolElem(LC_CFSN setting, MK_I32 idx)
These functions return the value at the specified index index in the setting setting …
static MK_I64 LcSettingGetInt64Elem(LC_CFSN setting, MK_I32 idx)
These functions return the value at the specified index index in the setting setting …
static LC_CFS LcSettingGetMember(LC_CFSN setting, MK_STRN name)
This function fetches the child setting named name from the group setting …
static enum LcConfigFormatE LcSettingGetFormat(LC_CFSN setting)
These functions get and set the external format for the setting setting …
static MK_I32 LcSettingGetInt(LC_CFSN setting)
These functions return the value of the given setting …
static MK_I32 LcSettingGetIntElem(LC_CFSN setting, MK_I32 idx)
These functions return the value at the specified index index in the setting setting …
static MK_I64 LcSettingGetInt64(LC_CFSN setting)
These functions return the value of the given setting …
static MK_STRN LcSettingGetStringElem(LC_CFSN setting, MK_I32 idx)
These functions return the value at the specified index index in the setting setting …
static MK_DBL LcSettingGetFloatElem(LC_CFSN setting, MK_I32 idx)
These functions return the value at the specified index index in the setting setting …
static MK_BOOL LcSettingIsArray(LC_CFSN setting)
These convenience functions, which are implemented as macros, test if the setting setting is of a giv...
static MK_BOOL LcSettingIsNumber(LC_CFSN setting)
These convenience functions, some of which are implemented as macros, test if the setting setting is ...
static MK_BOOL LcSettingIsRoot(LC_CFSN setting)
This function returns CONFIG_TRUE if the given setting is the root setting, and CONFIG_FALSE otherwis...
static MK_BOOL LcSettingIsList(LC_CFSN setting)
These convenience functions, which are implemented as macros, test if the setting setting is of a giv...
static MK_BOOL LcSettingIsAggregate(LC_CFSN setting)
These convenience functions, some of which are implemented as macros, test if the setting setting is ...
static MK_BOOL LcSettingIsGroup(LC_CFSN setting)
These convenience functions, which are implemented as macros, test if the setting setting is of a giv...
static MK_BOOL LcSettingIsScalar(LC_CFSN setting)
These convenience functions, some of which are implemented as macros, test if the setting setting is ...
static enum MkErrorE LcSettingLookupString(LC_CFSN setting, MK_STRN name, MK_STRN *value_out)
These functions look up the value of the child setting named name of the setting setting …
static LC_CFS LcSettingLookup(LC_CFS setting, MK_STRN path)
This function locates a setting by a path path relative to the setting setting …
static enum MkErrorE LcSettingLookupBool(LC_CFSN setting, MK_STRN name, MK_BOOL *value_out)
These functions look up the value of the child setting named name of the setting setting …
static enum MkErrorE LcSettingLookupInt(LC_CFSN setting, MK_STRN name, MK_I32 *value_out)
These functions look up the value of the child setting named name of the setting setting …
static enum MkErrorE LcSettingLookupInt64(LC_CFSN setting, MK_STRN name, MK_I64 *value_out)
These functions look up the value of the child setting named name of the setting setting …
static enum MkErrorE LcSettingLookupFloat(LC_CFSN setting, MK_STRN name, MK_DBL *value_out)
These functions look up the value of the child setting named name of the setting setting …
MK_BFL LcSettingLookupAll(LC_CFSN setting)
addon - read an entire configuration below setting into MkBufferListC …
static LC_CFS LcSettingParent(LC_CFSN setting)
This function returns the parent setting of the given setting, or NULL if setting is the root setting...
static MK_I32 LcSettingIndex(LC_CFSN setting)
This function returns the index of the given setting within its parent setting …
static enum MkErrorE LcSettingRemoveElem(LC_CFS parent, MK_I32 idx)
This function removes the child setting at the given index index from the setting parent,...
static MK_STRN LcSettingName(LC_CFSN setting)
This function returns the name of the given setting, or NULL if the setting has no name …
static bool LcSettingExists(const LC_CFS setting, MK_STRN name)
addon - return true if name exists in the setting otherwise false …
static MK_I32 LcSettingSourceLine(LC_CFSN setting)
This function returns the line number of the configuration file or stream at which the setting settin...
static MK_STRN LcSettingSourceFile(LC_CFSN setting)
This function returns the name of the file from which the setting setting was read,...
static enum MkErrorE LcSettingRemove(LC_CFS parent, MK_STRN name)
This function removes and destroys the setting named name from the parent setting parent,...
static enum LcConfigTypeE LcSettingType(LC_CFSN setting)
This function returns the type of the given setting …
static MK_I32 LcSettingLength(LC_CFSN setting)
This function returns the number of settings in a group, or the number of elements in a list or array...
static LC_CFS LcSettingAddIfNotExists(LC_CFS setting, MK_STRN name, enum LcConfigTypeE cfgtype)
addon - add name with type only if not exists in the setting …
static LC_CFS LcSettingSetFloatElem(LC_CFS setting, MK_I32 idx, MK_DBL value)
These functions set the value at the specified index index in the setting setting to value …
static enum MkErrorE LcSettingSetInt64(LC_CFS setting, MK_I64 value)
These functions set the value of the given setting to value …
static enum MkErrorE LcSettingSetBool(LC_CFS setting, MK_BOOL value)
These functions set the value of the given setting to value …
static LC_CFS LcSettingSetIntElem(LC_CFS setting, MK_I32 idx, MK_I32 value)
These functions set the value at the specified index index in the setting setting to value …
static enum MkErrorE LcSettingSetString(LC_CFS setting, MK_STRN value)
These functions set the value of the given setting to value …
static enum MkErrorE LcSettingSetFormat(LC_CFS setting, enum LcConfigFormatE format)
These functions get and set the external format for the setting setting …
static LC_CFS LcSettingSetBoolElem(LC_CFS setting, MK_I32 idx, MK_I32 value)
These functions set the value at the specified index index in the setting setting to value …
static enum MkErrorE LcSettingSetFloat(LC_CFS setting, MK_DBL value)
These functions set the value of the given setting to value …
static LC_CFS LcSettingSetStringElem(LC_CFS setting, MK_I32 idx, MK_STRN value)
These functions set the value at the specified index index in the setting setting to value …
static LC_CFS LcSettingSetInt64Elem(LC_CFS setting, MK_I32 idx, MK_I64 value)
These functions set the value at the specified index index in the setting setting to value …
static enum MkErrorE LcSettingSetInt(LC_CFS setting, MK_I32 value)
These functions set the value of the given setting to value …
static LC_CFS LcSettingAdd(LC_CFS parent, MK_STRN name, enum LcConfigTypeE __type)
This function adds a new child setting or element to the setting parent, which must be a group,...
Struct to represent the data from the LcConfigC …
Struct to represent the data from the LcSettingC …