theConfig 10.0
Loading...
Searching...
No Matches
LcConfig_Enum_TCL_API

LcConfig PACKAGE - definition of the enum type … More...

+ Collaboration diagram for LcConfig_Enum_TCL_API:

Functions

static OT_ProcRet tcllcconfig_LcConfig_ConfigFormatE_FromInt (OtClass_ARGS)
  Tcl: (static) LcConfigFormatE [LcConfig ConfigFormatE_FromInt value:int32] C-API
return the LcConfigFormatE from integer …
 
static OT_ProcRet tcllcconfig_LcConfig_ConfigOptionsEF_FromInt (OtClass_ARGS)
  Tcl: (static) LcConfigOptionsEF [LcConfig ConfigOptionsEF_FromInt value:int32] C-API
return the LcConfigOptionsEF from integer …
 
static OT_ProcRet tcllcconfig_LcConfig_ConfigTypeE_FromInt (OtClass_ARGS)
  Tcl: (static) LcConfigTypeE [LcConfig ConfigTypeE_FromInt value:int32] C-API
return the LcConfigTypeE from integer …
 
static OT_ProcRet tcllcconfig_LcConfig_ErrorE_FromInt (OtClass_ARGS)
  Tcl: (static) LcErrorE [LcConfig ErrorE_FromInt value:int32] C-API
return the LcErrorE from integer …
 
static OT_ProcRet tcllcconfig_LcConfig_ErrorTypeE_FromInt (OtClass_ARGS)
  Tcl: (static) LcErrorTypeE [LcConfig ErrorTypeE_FromInt value:int32] C-API
return the LcErrorTypeE from integer …
 
static OT_ProcRet tcllcconfig_LcConfig_ConfigFormatE_ToInt (OtClass_ARGS)
  Tcl: (static) int32 [LcConfig ConfigFormatE_ToInt value:LcConfigFormatE] C-API
return the LcConfigFormatE as integer …
 
static OT_ProcRet tcllcconfig_LcConfig_ConfigFormatE_ToString (OtClass_ARGS)
  Tcl: (static) string [LcConfig ConfigFormatE_ToString value:LcConfigFormatE] C-API
return the LcConfigFormatE as string …
 
static OT_ProcRet tcllcconfig_LcConfig_ConfigOptionsEF_ToInt (OtClass_ARGS)
  Tcl: (static) int32 [LcConfig ConfigOptionsEF_ToInt value:LcConfigOptionsEF] C-API
return the LcConfigOptionsEF as integer …
 
static OT_ProcRet tcllcconfig_LcConfig_ConfigOptionsEF_ToString (OtClass_ARGS)
  Tcl: (static) string [LcConfig ConfigOptionsEF_ToString value:LcConfigOptionsEF] C-API
return the LcConfigOptionsEF as string …
 
static OT_ProcRet tcllcconfig_LcConfig_ConfigTypeE_ToInt (OtClass_ARGS)
  Tcl: (static) int32 [LcConfig ConfigTypeE_ToInt value:LcConfigTypeE] C-API
return the LcConfigTypeE as integer …
 
static OT_ProcRet tcllcconfig_LcConfig_ConfigTypeE_ToString (OtClass_ARGS)
  Tcl: (static) string [LcConfig ConfigTypeE_ToString value:LcConfigTypeE] C-API
return the LcConfigTypeE as string …
 
static OT_ProcRet tcllcconfig_LcConfig_ErrorE_ToInt (OtClass_ARGS)
  Tcl: (static) int32 [LcConfig ErrorE_ToInt value:LcErrorE] C-API
return the LcErrorE as integer …
 
static OT_ProcRet tcllcconfig_LcConfig_ErrorE_ToString (OtClass_ARGS)
  Tcl: (static) string [LcConfig ErrorE_ToString value:LcErrorE] C-API
return the LcErrorE as string …
 
static OT_ProcRet tcllcconfig_LcConfig_ErrorTypeE_ToInt (OtClass_ARGS)
  Tcl: (static) int32 [LcConfig ErrorTypeE_ToInt value:LcErrorTypeE] C-API
return the LcErrorTypeE as integer …
 
static OT_ProcRet tcllcconfig_LcConfig_ErrorTypeE_ToString (OtClass_ARGS)
  Tcl: (static) string [LcConfig ErrorTypeE_ToString value:LcErrorTypeE] C-API
return the LcErrorTypeE as string …
 

Enum To String

OT_OBJ_T tcllcconfig_LcConfigFormatE_ToString (const enum LcConfigFormatE type)
 
OT_OBJ_T tcllcconfig_LcConfigOptionsEF_ToString (const enum LcConfigOptionsEF type)
 
OT_OBJ_T tcllcconfig_LcConfigTypeE_ToString (const enum LcConfigTypeE type)
 
OT_OBJ_T tcllcconfig_LcErrorE_ToString (const enum LcErrorE type)
 
OT_OBJ_T tcllcconfig_LcErrorTypeE_ToString (const enum LcErrorTypeE type)
 

Enum From Obj

int tcllcconfig_Get_LcConfigFormatE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum LcConfigFormatE *ret)
 
int tcllcconfig_Get_LcConfigOptionsEF_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum LcConfigOptionsEF *ret)
 
int tcllcconfig_Get_LcConfigTypeE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum LcConfigTypeE *ret)
 
int tcllcconfig_Get_LcErrorE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum LcErrorE *ret)
 
int tcllcconfig_Get_LcErrorTypeE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum LcErrorTypeE *ret)
 

Detailed Description

LcConfig PACKAGE - definition of the enum type …

read more at: MkKernel_Enum_C_API

Tcl has no build-in-enum-datatyp but theKernel support a enum using the data-type-checking API.

A C-enum like :

will be compiled into a internal tcl-c-check-proc :

int LC(Get_LcConfigFormatE_FromObj) (MK_RT_ARGS OT_ENV_T interp, OT_OBJ_T enumE, enum LcConfigFormatE *ret) {
const static struct LookupEnumE keys[] = {
{ "HEX" , CONFIG_FORMAT_HEX },
{ "DEFAULT" , CONFIG_FORMAT_DEFAULT },
{ "FORMAT_HEX" , CONFIG_FORMAT_HEX },
{ "FORMAT_DEFAULT" , CONFIG_FORMAT_DEFAULT },
{ "CONFIG_FORMAT_HEX" , CONFIG_FORMAT_HEX },
{ "CONFIG_FORMAT_DEFAULT" , CONFIG_FORMAT_DEFAULT },
{ NULL , 0 },
};
int index;
OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
*ret = keys[index].val;
return TCL_OK;
#define LC(n)
#define OtErrorCheckLng(cmd)
Tcl_Interp * OT_ENV_T
Tcl_Obj * OT_OBJ_T
LcConfigFormatE
set the format of a LcSettingC …
Definition LcEnum_lc.h:30
#define MK_RT_ARGS
#define CONFIG_FORMAT_DEFAULT
#define CONFIG_FORMAT_HEX
}

to return the integer identifier for an enum-definition-string or an error if string is not valid.

A valid string for an enum-value is any unique abbreviation of the original enum-value:

The tcl-c-check-proc is used in a tcl-c-api-wrapper like :

static OT_ProcRet NS(LcConfigC_SetDefaultFormat) (LcConfigC_ARGS) {
LcConfigFormatE format = 0;
OT_CHECK_REQUIRED(OT_CHECK_ENUM (LcConfigFormatE,format)) // << tcl-c-check-proc
if (hdl->nat == NULL) OT_ERROR_LNG_RETURN_HDL_NAT_NULL(hdl);
config_set_default_format (hdl->nat, format);
goto end;
error:
end:
}
#define OT_SETUP_hdl
#define SetDefaultFormat_doc
#define LcConfigC_ARGS
#define NS(n)
#define OT_SETUP_ONEARG(d)
#define OT_retObj_SET_Error
#define OT_ERROR_LNG_RETURN_HDL_NAT_NULL(_hdl)
#define OT_CHECK_REQUIRED(val)
#define OT_retObj_SET_None
#define OT_CHECK_ENUM(ename, val)
#define OT_retObj_RETURN
#define OT_CHECK_NOARGS
#define OT_ProcRet
#define config_set_default_format(C, F)

The usage of an enum-value in the tcl-code is quite simple, just use the string.

package require tcllcconfig
namespace import tcllcconfig::*
# create the configuration object
LcConfigC create cfg
# use CONFIG_FORMAT_HEX :
# If a non-default format has not been set for a setting with SettingSetFormat, this configuration-wide
# default format will be used instead when that setting is written to a file or stream.
cfg SetDefaultFormat FORMAT_HEX

read more at: MkKernel_Enum_C_API

Function Documentation

◆ tcllcconfig_Get_LcConfigFormatE_FromObj()

int tcllcconfig_Get_LcConfigFormatE_FromObj ( MK_RT mkrt,
OT_ENV_T interp,
OT_OBJ_T enumE,
enum LcConfigFormatE * ret )

Definition at line 191 of file LibLcConfig_tcl.c.

191 {
192 const static struct LookupEnumE keys[] = {
193 { "HEX" , CONFIG_FORMAT_HEX },
194 { "DEFAULT" , CONFIG_FORMAT_DEFAULT },
195 { "FORMAT_HEX" , CONFIG_FORMAT_HEX },
196 { "FORMAT_DEFAULT" , CONFIG_FORMAT_DEFAULT },
197 { "CONFIG_FORMAT_HEX" , CONFIG_FORMAT_HEX },
198 { "CONFIG_FORMAT_DEFAULT" , CONFIG_FORMAT_DEFAULT },
199 { NULL , 0 },
200 };
201
202 int index;
203 OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
204 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
205 *ret = keys[index].val;
206 return TCL_OK;
207}

◆ tcllcconfig_Get_LcConfigOptionsEF_FromObj()

int tcllcconfig_Get_LcConfigOptionsEF_FromObj ( MK_RT mkrt,
OT_ENV_T interp,
OT_OBJ_T enumE,
enum LcConfigOptionsEF * ret )

Definition at line 209 of file LibLcConfig_tcl.c.

209 {
210 const static struct LookupEnumE keys[] = {
211 { "NONE" , CONFIG_OPTION_NONE },
212 { "FSYNC" , CONFIG_OPTION_FSYNC },
213 { "OPTION_NONE" , CONFIG_OPTION_NONE },
214 { "AUTOCONVERT" , CONFIG_OPTION_AUTOCONVERT },
215 { "OPTION_FSYNC" , CONFIG_OPTION_FSYNC },
216 { "ALLOW_OVERRIDES" , CONFIG_OPTION_ALLOW_OVERRIDES },
217 { "OPTION_AUTOCONVERT" , CONFIG_OPTION_AUTOCONVERT },
218 { "CONFIG_OPTION_NONE" , CONFIG_OPTION_NONE },
219 { "CONFIG_OPTION_FSYNC" , CONFIG_OPTION_FSYNC },
220 { "SEMICOLON_SEPARATORS" , CONFIG_OPTION_SEMICOLON_SEPARATORS },
221 { "OPTION_ALLOW_OVERRIDES" , CONFIG_OPTION_ALLOW_OVERRIDES },
222 { "CONFIG_OPTION_AUTOCONVERT" , CONFIG_OPTION_AUTOCONVERT },
223 { "ALLOW_SCIENTIFIC_NOTATION" , CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION },
224 { "OPEN_BRACE_ON_SEPARATE_LINE" , CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE },
225 { "COLON_ASSIGNMENT_FOR_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS },
226 { "OPTION_SEMICOLON_SEPARATORS" , CONFIG_OPTION_SEMICOLON_SEPARATORS },
227 { "CONFIG_OPTION_ALLOW_OVERRIDES" , CONFIG_OPTION_ALLOW_OVERRIDES },
228 { "COLON_ASSIGNMENT_FOR_NON_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS },
229 { "OPTION_ALLOW_SCIENTIFIC_NOTATION" , CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION },
230 { "OPTION_OPEN_BRACE_ON_SEPARATE_LINE" , CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE },
231 { "OPTION_COLON_ASSIGNMENT_FOR_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS },
232 { "CONFIG_OPTION_SEMICOLON_SEPARATORS" , CONFIG_OPTION_SEMICOLON_SEPARATORS },
233 { "OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS },
234 { "CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION" , CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION },
235 { "CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE" , CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE },
236 { "CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS },
237 { "CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS },
238 { NULL , 0 },
239 };
240
241 int index;
242 OtErrorCheckLng(MK(EnumFlagWorker)(MK_RT_CALL interp,keys,enumE,&index));
243 *ret = (enum LcConfigOptionsEF) index;
244 return TCL_OK;
245}
#define MK(n)
LcConfigOptionsEF
define the configuration-option of a LcConfigC …
Definition LcEnum_lc.h:134
@ CONFIG_OPTION_NONE
Definition LcEnum_lc.h:135
#define MK_RT_CALL
#define CONFIG_OPTION_SEMICOLON_SEPARATORS
#define CONFIG_OPTION_FSYNC
#define CONFIG_OPTION_AUTOCONVERT
#define CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION
#define CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS
#define CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE
#define CONFIG_OPTION_ALLOW_OVERRIDES
#define CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS

◆ tcllcconfig_Get_LcConfigTypeE_FromObj()

int tcllcconfig_Get_LcConfigTypeE_FromObj ( MK_RT mkrt,
OT_ENV_T interp,
OT_OBJ_T enumE,
enum LcConfigTypeE * ret )

Definition at line 247 of file LibLcConfig_tcl.c.

247 {
248 const static struct LookupEnumE keys[] = {
249 { "INT" , CONFIG_TYPE_INT },
250 { "NONE" , CONFIG_TYPE_NONE },
251 { "BOOL" , CONFIG_TYPE_BOOL },
252 { "LIST" , CONFIG_TYPE_LIST },
253 { "GROUP" , CONFIG_TYPE_GROUP },
254 { "INT64" , CONFIG_TYPE_INT64 },
255 { "ARRAY" , CONFIG_TYPE_ARRAY },
256 { "FLOAT" , CONFIG_TYPE_FLOAT },
257 { "STRING" , CONFIG_TYPE_STRING },
258 { "TYPE_INT" , CONFIG_TYPE_INT },
259 { "TYPE_NONE" , CONFIG_TYPE_NONE },
260 { "TYPE_BOOL" , CONFIG_TYPE_BOOL },
261 { "TYPE_LIST" , CONFIG_TYPE_LIST },
262 { "TYPE_ARRAY" , CONFIG_TYPE_ARRAY },
263 { "TYPE_FLOAT" , CONFIG_TYPE_FLOAT },
264 { "TYPE_GROUP" , CONFIG_TYPE_GROUP },
265 { "TYPE_INT64" , CONFIG_TYPE_INT64 },
266 { "TYPE_STRING" , CONFIG_TYPE_STRING },
267 { "CONFIG_TYPE_INT" , CONFIG_TYPE_INT },
268 { "CONFIG_TYPE_BOOL" , CONFIG_TYPE_BOOL },
269 { "CONFIG_TYPE_LIST" , CONFIG_TYPE_LIST },
270 { "CONFIG_TYPE_NONE" , CONFIG_TYPE_NONE },
271 { "CONFIG_TYPE_GROUP" , CONFIG_TYPE_GROUP },
272 { "CONFIG_TYPE_INT64" , CONFIG_TYPE_INT64 },
273 { "CONFIG_TYPE_ARRAY" , CONFIG_TYPE_ARRAY },
274 { "CONFIG_TYPE_FLOAT" , CONFIG_TYPE_FLOAT },
275 { "CONFIG_TYPE_STRING" , CONFIG_TYPE_STRING },
276 { NULL , 0 },
277 };
278
279 int index;
280 OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
281 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
282 *ret = keys[index].val;
283 return TCL_OK;
284}
#define CONFIG_TYPE_STRING
#define CONFIG_TYPE_LIST
#define CONFIG_TYPE_INT
#define CONFIG_TYPE_ARRAY
#define CONFIG_TYPE_GROUP
#define CONFIG_TYPE_BOOL
#define CONFIG_TYPE_INT64
#define CONFIG_TYPE_NONE
#define CONFIG_TYPE_FLOAT

◆ tcllcconfig_Get_LcErrorE_FromObj()

int tcllcconfig_Get_LcErrorE_FromObj ( MK_RT mkrt,
OT_ENV_T interp,
OT_OBJ_T enumE,
enum LcErrorE * ret )

Definition at line 286 of file LibLcConfig_tcl.c.

286 {
287 const static struct LookupEnumE keys[] = {
288 { "TRUE" , CONFIG_TRUE },
289 { "FALSE" , CONFIG_FALSE },
290 { "CONFIG_TRUE" , CONFIG_TRUE },
291 { "CONFIG_FALSE" , CONFIG_FALSE },
292 { NULL , 0 },
293 };
294
295 int index;
296 OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
297 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
298 *ret = keys[index].val;
299 return TCL_OK;
300}
#define CONFIG_TRUE
#define CONFIG_FALSE

◆ tcllcconfig_Get_LcErrorTypeE_FromObj()

int tcllcconfig_Get_LcErrorTypeE_FromObj ( MK_RT mkrt,
OT_ENV_T interp,
OT_OBJ_T enumE,
enum LcErrorTypeE * ret )

Definition at line 302 of file LibLcConfig_tcl.c.

302 {
303 const static struct LookupEnumE keys[] = {
304 { "NONE" , CONFIG_ERRROR_NONE },
305 { "PARSE" , CONFIG_ERRROR_PARSE },
306 { "FILE_IO" , CONFIG_ERRROR_FILE_IO },
307 { "ERRROR_NONE" , CONFIG_ERRROR_NONE },
308 { "ERRROR_PARSE" , CONFIG_ERRROR_PARSE },
309 { "ERRROR_FILE_IO" , CONFIG_ERRROR_FILE_IO },
310 { "CONFIG_ERRROR_NONE" , CONFIG_ERRROR_NONE },
311 { "CONFIG_ERRROR_PARSE" , CONFIG_ERRROR_PARSE },
312 { "CONFIG_ERRROR_FILE_IO" , CONFIG_ERRROR_FILE_IO },
313 { NULL , 0 },
314 };
315
316 int index;
317 OtErrorCheckLng (Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
318 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index));
319 *ret = keys[index].val;
320 return TCL_OK;
321}
@ CONFIG_ERRROR_FILE_IO
Definition LcEnum_lc.h:230
@ CONFIG_ERRROR_PARSE
Definition LcEnum_lc.h:231
@ CONFIG_ERRROR_NONE
Definition LcEnum_lc.h:229

◆ tcllcconfig_LcConfig_ConfigFormatE_FromInt()

static OT_ProcRet tcllcconfig_LcConfig_ConfigFormatE_FromInt ( OtClass_ARGS )
static

Tcl: (static) LcConfigFormatE [LcConfig ConfigFormatE_FromInt value:int32] C-API
return the LcConfigFormatE from integer …

Definition at line 416 of file LibLcConfig_tcl.c.

416 {
419 MK_I32 value = 0;
422 enum LcConfigFormatE value_out;
424 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigFormatE,value_out));
425 goto end;
426 error:
428 end:
430}
#define ConfigFormatE_FromInt_doc
#define OT_SETUP_hdl_static
#define OT_NEW_Lc_enum_OBJ(typ, val)
#define OT_CHECK_NI4(val)
#define OT_retObj_SET(val)
#define MkErrorC_Check(mng, PROC)
enum MkErrorE LcConfigFormatE_FromInt(MK_I32 const value, enum LcConfigFormatE *value_out)
return the LcConfigFormatE from integer …
#define MK_ERROR_FORMAT
signed int MK_I32

◆ tcllcconfig_LcConfig_ConfigFormatE_ToInt()

static OT_ProcRet tcllcconfig_LcConfig_ConfigFormatE_ToInt ( OtClass_ARGS )
static

Tcl: (static) int32 [LcConfig ConfigFormatE_ToInt value:LcConfigFormatE] C-API
return the LcConfigFormatE as integer …

Definition at line 503 of file LibLcConfig_tcl.c.

503 {
506 enum LcConfigFormatE value = 0;
510 goto end;
511 error:
513 end:
515}
#define ConfigFormatE_ToInt_doc
#define OT_retObj_SET_I32(nat)
static MK_I32 LcConfigFormatE_ToInt(enum LcConfigFormatE value)
return the LcConfigFormatE as integer …
Definition LcEnum_lc.h:55

◆ tcllcconfig_LcConfig_ConfigFormatE_ToString()

static OT_ProcRet tcllcconfig_LcConfig_ConfigFormatE_ToString ( OtClass_ARGS )
static

Tcl: (static) string [LcConfig ConfigFormatE_ToString value:LcConfigFormatE] C-API
return the LcConfigFormatE as string …

Definition at line 518 of file LibLcConfig_tcl.c.

518 {
521 enum LcConfigFormatE value = 0;
525 goto end;
526 error:
528 end:
530}
#define ConfigFormatE_ToString_doc
#define OT_retObj_SET_STR(nat)
MK_STRN LcConfigFormatE_ToString(enum LcConfigFormatE value)
return the LcConfigFormatE as string …

◆ tcllcconfig_LcConfig_ConfigOptionsEF_FromInt()

static OT_ProcRet tcllcconfig_LcConfig_ConfigOptionsEF_FromInt ( OtClass_ARGS )
static

Tcl: (static) LcConfigOptionsEF [LcConfig ConfigOptionsEF_FromInt value:int32] C-API
return the LcConfigOptionsEF from integer …

Definition at line 433 of file LibLcConfig_tcl.c.

433 {
436 MK_I32 value = 0;
439 enum LcConfigOptionsEF value_out;
441 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigOptionsEF,value_out));
442 goto end;
443 error:
445 end:
447}
#define ConfigOptionsEF_FromInt_doc
enum MkErrorE LcConfigOptionsEF_FromInt(MK_I32 const value, enum LcConfigOptionsEF *value_out)
return the LcConfigOptionsEF from integer …

◆ tcllcconfig_LcConfig_ConfigOptionsEF_ToInt()

static OT_ProcRet tcllcconfig_LcConfig_ConfigOptionsEF_ToInt ( OtClass_ARGS )
static

Tcl: (static) int32 [LcConfig ConfigOptionsEF_ToInt value:LcConfigOptionsEF] C-API
return the LcConfigOptionsEF as integer …

Definition at line 533 of file LibLcConfig_tcl.c.

533 {
536 enum LcConfigOptionsEF value = 0;
540 goto end;
541 error:
543 end:
545}
#define ConfigOptionsEF_ToInt_doc
static MK_I32 LcConfigOptionsEF_ToInt(enum LcConfigOptionsEF value)
return the LcConfigOptionsEF as integer …
Definition LcEnum_lc.h:166

◆ tcllcconfig_LcConfig_ConfigOptionsEF_ToString()

static OT_ProcRet tcllcconfig_LcConfig_ConfigOptionsEF_ToString ( OtClass_ARGS )
static

Tcl: (static) string [LcConfig ConfigOptionsEF_ToString value:LcConfigOptionsEF] C-API
return the LcConfigOptionsEF as string …

Definition at line 548 of file LibLcConfig_tcl.c.

548 {
551 enum LcConfigOptionsEF value = 0;
555 goto end;
556 error:
558 end:
560}
#define ConfigOptionsEF_ToString_doc
MK_STRN LcConfigOptionsEF_ToString(enum LcConfigOptionsEF value)
return the LcConfigOptionsEF as string …

◆ tcllcconfig_LcConfig_ConfigTypeE_FromInt()

static OT_ProcRet tcllcconfig_LcConfig_ConfigTypeE_FromInt ( OtClass_ARGS )
static

Tcl: (static) LcConfigTypeE [LcConfig ConfigTypeE_FromInt value:int32] C-API
return the LcConfigTypeE from integer …

Definition at line 450 of file LibLcConfig_tcl.c.

450 {
453 MK_I32 value = 0;
456 enum LcConfigTypeE value_out;
458 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigTypeE,value_out));
459 goto end;
460 error:
462 end:
464}
#define ConfigTypeE_FromInt_doc
LcConfigTypeE
define the data-type of a LcSettingC …
Definition LcEnum_lc.h:78
enum MkErrorE LcConfigTypeE_FromInt(MK_I32 const value, enum LcConfigTypeE *value_out)
return the LcConfigTypeE from integer …

◆ tcllcconfig_LcConfig_ConfigTypeE_ToInt()

static OT_ProcRet tcllcconfig_LcConfig_ConfigTypeE_ToInt ( OtClass_ARGS )
static

Tcl: (static) int32 [LcConfig ConfigTypeE_ToInt value:LcConfigTypeE] C-API
return the LcConfigTypeE as integer …

Definition at line 563 of file LibLcConfig_tcl.c.

563 {
566 enum LcConfigTypeE value = 0;
570 goto end;
571 error:
573 end:
575}
#define ConfigTypeE_ToInt_doc
static MK_I32 LcConfigTypeE_ToInt(enum LcConfigTypeE value)
return the LcConfigTypeE as integer …
Definition LcEnum_lc.h:110

◆ tcllcconfig_LcConfig_ConfigTypeE_ToString()

static OT_ProcRet tcllcconfig_LcConfig_ConfigTypeE_ToString ( OtClass_ARGS )
static

Tcl: (static) string [LcConfig ConfigTypeE_ToString value:LcConfigTypeE] C-API
return the LcConfigTypeE as string …

Definition at line 578 of file LibLcConfig_tcl.c.

578 {
581 enum LcConfigTypeE value = 0;
585 goto end;
586 error:
588 end:
590}
#define ConfigTypeE_ToString_doc
MK_STRN LcConfigTypeE_ToString(enum LcConfigTypeE value)
return the LcConfigTypeE as string …

◆ tcllcconfig_LcConfig_ErrorE_FromInt()

static OT_ProcRet tcllcconfig_LcConfig_ErrorE_FromInt ( OtClass_ARGS )
static

Tcl: (static) LcErrorE [LcConfig ErrorE_FromInt value:int32] C-API
return the LcErrorE from integer …

Definition at line 467 of file LibLcConfig_tcl.c.

467 {
470 MK_I32 value = 0;
473 enum LcErrorE value_out;
475 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ErrorE,value_out));
476 goto end;
477 error:
479 end:
481}
#define ErrorE_FromInt_doc
LcErrorE
Signals an error and is used as the return value of a function …
Definition LcEnum_lc.h:188
enum MkErrorE LcErrorE_FromInt(MK_I32 const value, enum LcErrorE *value_out)
return the LcErrorE from integer …

◆ tcllcconfig_LcConfig_ErrorE_ToInt()

static OT_ProcRet tcllcconfig_LcConfig_ErrorE_ToInt ( OtClass_ARGS )
static

Tcl: (static) int32 [LcConfig ErrorE_ToInt value:LcErrorE] C-API
return the LcErrorE as integer …

Definition at line 593 of file LibLcConfig_tcl.c.

593 {
596 enum LcErrorE value = 0;
600 goto end;
601 error:
603 end:
605}
#define ErrorE_ToInt_doc
static MK_I32 LcErrorE_ToInt(enum LcErrorE value)
return the LcErrorE as integer …
Definition LcEnum_lc.h:205

◆ tcllcconfig_LcConfig_ErrorE_ToString()

static OT_ProcRet tcllcconfig_LcConfig_ErrorE_ToString ( OtClass_ARGS )
static

Tcl: (static) string [LcConfig ErrorE_ToString value:LcErrorE] C-API
return the LcErrorE as string …

Definition at line 608 of file LibLcConfig_tcl.c.

608 {
611 enum LcErrorE value = 0;
615 goto end;
616 error:
618 end:
620}
#define ErrorE_ToString_doc
MK_STRN LcErrorE_ToString(enum LcErrorE value)
return the LcErrorE as string …

◆ tcllcconfig_LcConfig_ErrorTypeE_FromInt()

static OT_ProcRet tcllcconfig_LcConfig_ErrorTypeE_FromInt ( OtClass_ARGS )
static

Tcl: (static) LcErrorTypeE [LcConfig ErrorTypeE_FromInt value:int32] C-API
return the LcErrorTypeE from integer …

Definition at line 484 of file LibLcConfig_tcl.c.

484 {
487 MK_I32 value = 0;
490 enum LcErrorTypeE value_out;
492 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ErrorTypeE,value_out));
493 goto end;
494 error:
496 end:
498}
#define ErrorTypeE_FromInt_doc
enum MkErrorE LcErrorTypeE_FromInt(MK_I32 const value, enum LcErrorTypeE *value_out)
return the LcErrorTypeE from integer …
LcErrorTypeE
error types
Definition LcEnum_lc.h:228

◆ tcllcconfig_LcConfig_ErrorTypeE_ToInt()

static OT_ProcRet tcllcconfig_LcConfig_ErrorTypeE_ToInt ( OtClass_ARGS )
static

Tcl: (static) int32 [LcConfig ErrorTypeE_ToInt value:LcErrorTypeE] C-API
return the LcErrorTypeE as integer …

Definition at line 623 of file LibLcConfig_tcl.c.

623 {
626 enum LcErrorTypeE value = 0;
630 goto end;
631 error:
633 end:
635}
#define ErrorTypeE_ToInt_doc
static MK_I32 LcErrorTypeE_ToInt(enum LcErrorTypeE value)
return the LcErrorTypeE as integer …
Definition LcEnum_lc.h:246

◆ tcllcconfig_LcConfig_ErrorTypeE_ToString()

static OT_ProcRet tcllcconfig_LcConfig_ErrorTypeE_ToString ( OtClass_ARGS )
static

Tcl: (static) string [LcConfig ErrorTypeE_ToString value:LcErrorTypeE] C-API
return the LcErrorTypeE as string …

Definition at line 638 of file LibLcConfig_tcl.c.

638 {
641 enum LcErrorTypeE value = 0;
645 goto end;
646 error:
648 end:
650}
#define ErrorTypeE_ToString_doc
MK_STRN LcErrorTypeE_ToString(enum LcErrorTypeE value)
return the LcErrorTypeE as string …

◆ tcllcconfig_LcConfigFormatE_ToString()

OT_OBJ_T tcllcconfig_LcConfigFormatE_ToString ( const enum LcConfigFormatE type)

Definition at line 118 of file LibLcConfig_tcl.c.

119{
120 switch (type) {
121 case CONFIG_FORMAT_DEFAULT : return ot_fixstrobj("DEFAULT") ;
122 case CONFIG_FORMAT_HEX : return ot_fixstrobj("HEX" ) ;
123 }
124 return ot_fixstrobj("NOTHING");
125}
#define ot_fixstrobj(_s)

◆ tcllcconfig_LcConfigOptionsEF_ToString()

OT_OBJ_T tcllcconfig_LcConfigOptionsEF_ToString ( const enum LcConfigOptionsEF type)

Definition at line 127 of file LibLcConfig_tcl.c.

128{
129 if (type == CONFIG_OPTION_NONE) {
130 return ot_fixstrobj("NONE");
131 } else {
132 OT_OBJ_T tmpO = Tcl_NewObj();
133 if (mk_bit_compare(type,CONFIG_OPTION_AUTOCONVERT )) ot_enum_append(tmpO,"AUTOCONVERT" ) ;
134 if (mk_bit_compare(type,CONFIG_OPTION_SEMICOLON_SEPARATORS )) ot_enum_append(tmpO,"SEMICOLON_SEPARATORS" ) ;
135 if (mk_bit_compare(type,CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS )) ot_enum_append(tmpO,"COLON_ASSIGNMENT_FOR_GROUPS" ) ;
136 if (mk_bit_compare(type,CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS)) ot_enum_append(tmpO,"COLON_ASSIGNMENT_FOR_NON_GROUPS") ;
137 if (mk_bit_compare(type,CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE )) ot_enum_append(tmpO,"OPEN_BRACE_ON_SEPARATE_LINE" ) ;
138 if (mk_bit_compare(type,CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION )) ot_enum_append(tmpO,"ALLOW_SCIENTIFIC_NOTATION" ) ;
139 if (mk_bit_compare(type,CONFIG_OPTION_FSYNC )) ot_enum_append(tmpO,"FSYNC" ) ;
140 if (mk_bit_compare(type,CONFIG_OPTION_ALLOW_OVERRIDES )) ot_enum_append(tmpO,"ALLOW_OVERRIDES" ) ;
141 return tmpO;
142 }
143}
#define ot_enum_append(_o, _s)
#define mk_bit_compare(t, f)

◆ tcllcconfig_LcConfigTypeE_ToString()

OT_OBJ_T tcllcconfig_LcConfigTypeE_ToString ( const enum LcConfigTypeE type)

Definition at line 145 of file LibLcConfig_tcl.c.

146{
147 switch (type) {
148 case CONFIG_TYPE_NONE : return ot_fixstrobj("NONE" ) ;
149 case CONFIG_TYPE_GROUP : return ot_fixstrobj("GROUP" ) ;
150 case CONFIG_TYPE_INT : return ot_fixstrobj("INT" ) ;
151 case CONFIG_TYPE_INT64 : return ot_fixstrobj("INT64" ) ;
152 case CONFIG_TYPE_FLOAT : return ot_fixstrobj("FLOAT" ) ;
153 case CONFIG_TYPE_STRING : return ot_fixstrobj("STRING") ;
154 case CONFIG_TYPE_BOOL : return ot_fixstrobj("BOOL" ) ;
155 case CONFIG_TYPE_ARRAY : return ot_fixstrobj("ARRAY" ) ;
156 case CONFIG_TYPE_LIST : return ot_fixstrobj("LIST" ) ;
157 }
158 return ot_fixstrobj("NOTHING");
159}

◆ tcllcconfig_LcErrorE_ToString()

OT_OBJ_T tcllcconfig_LcErrorE_ToString ( const enum LcErrorE type)

Definition at line 161 of file LibLcConfig_tcl.c.

162{
163 switch (type) {
164 case CONFIG_FALSE : return ot_fixstrobj("FALSE") ;
165 case CONFIG_TRUE : return ot_fixstrobj("TRUE" ) ;
166 }
167 return ot_fixstrobj("NOTHING");
168}

◆ tcllcconfig_LcErrorTypeE_ToString()

OT_OBJ_T tcllcconfig_LcErrorTypeE_ToString ( const enum LcErrorTypeE type)

Definition at line 170 of file LibLcConfig_tcl.c.

171{
172 switch (type) {
173 case CONFIG_ERRROR_NONE : return ot_fixstrobj("NONE" ) ;
174 case CONFIG_ERRROR_FILE_IO : return ot_fixstrobj("FILE_IO") ;
175 case CONFIG_ERRROR_PARSE : return ot_fixstrobj("PARSE" ) ;
176 }
177 return ot_fixstrobj("NOTHING");
178}