theConfig 10.0
Loading...
Searching...
No Matches
LcConfig_Enum_ATL_API

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

+ Collaboration diagram for LcConfig_Enum_ATL_API:

Functions

static OT_ProcRet atllcconfig_LcConfig_ConfigFormatE_FromInt (OtClass_ARGS)
  Atl: (static) LcConfigFormatE [LcConfig::ConfigFormatE_FromInt value:int32] C-API
return the LcConfigFormatE from integer …
 
static OT_ProcRet atllcconfig_LcConfig_ConfigOptionsEF_FromInt (OtClass_ARGS)
  Atl: (static) LcConfigOptionsEF [LcConfig::ConfigOptionsEF_FromInt value:int32] C-API
return the LcConfigOptionsEF from integer …
 
static OT_ProcRet atllcconfig_LcConfig_ConfigTypeE_FromInt (OtClass_ARGS)
  Atl: (static) LcConfigTypeE [LcConfig::ConfigTypeE_FromInt value:int32] C-API
return the LcConfigTypeE from integer …
 
static OT_ProcRet atllcconfig_LcConfig_ErrorE_FromInt (OtClass_ARGS)
  Atl: (static) LcErrorE [LcConfig::ErrorE_FromInt value:int32] C-API
return the LcErrorE from integer …
 
static OT_ProcRet atllcconfig_LcConfig_ErrorTypeE_FromInt (OtClass_ARGS)
  Atl: (static) LcErrorTypeE [LcConfig::ErrorTypeE_FromInt value:int32] C-API
return the LcErrorTypeE from integer …
 
static OT_ProcRet atllcconfig_LcConfig_ConfigFormatE_ToInt (OtClass_ARGS)
  Atl: (static) int32 [LcConfig::ConfigFormatE_ToInt value:LcConfigFormatE] C-API
return the LcConfigFormatE as integer …
 
static OT_ProcRet atllcconfig_LcConfig_ConfigFormatE_ToString (OtClass_ARGS)
  Atl: (static) string [LcConfig::ConfigFormatE_ToString value:LcConfigFormatE] C-API
return the LcConfigFormatE as string …
 
static OT_ProcRet atllcconfig_LcConfig_ConfigOptionsEF_ToInt (OtClass_ARGS)
  Atl: (static) int32 [LcConfig::ConfigOptionsEF_ToInt value:LcConfigOptionsEF] C-API
return the LcConfigOptionsEF as integer …
 
static OT_ProcRet atllcconfig_LcConfig_ConfigOptionsEF_ToString (OtClass_ARGS)
  Atl: (static) string [LcConfig::ConfigOptionsEF_ToString value:LcConfigOptionsEF] C-API
return the LcConfigOptionsEF as string …
 
static OT_ProcRet atllcconfig_LcConfig_ConfigTypeE_ToInt (OtClass_ARGS)
  Atl: (static) int32 [LcConfig::ConfigTypeE_ToInt value:LcConfigTypeE] C-API
return the LcConfigTypeE as integer …
 
static OT_ProcRet atllcconfig_LcConfig_ConfigTypeE_ToString (OtClass_ARGS)
  Atl: (static) string [LcConfig::ConfigTypeE_ToString value:LcConfigTypeE] C-API
return the LcConfigTypeE as string …
 
static OT_ProcRet atllcconfig_LcConfig_ErrorE_ToInt (OtClass_ARGS)
  Atl: (static) int32 [LcConfig::ErrorE_ToInt value:LcErrorE] C-API
return the LcErrorE as integer …
 
static OT_ProcRet atllcconfig_LcConfig_ErrorE_ToString (OtClass_ARGS)
  Atl: (static) string [LcConfig::ErrorE_ToString value:LcErrorE] C-API
return the LcErrorE as string …
 
static OT_ProcRet atllcconfig_LcConfig_ErrorTypeE_ToInt (OtClass_ARGS)
  Atl: (static) int32 [LcConfig::ErrorTypeE_ToInt value:LcErrorTypeE] C-API
return the LcErrorTypeE as integer …
 
static OT_ProcRet atllcconfig_LcConfig_ErrorTypeE_ToString (OtClass_ARGS)
  Atl: (static) string [LcConfig::ErrorTypeE_ToString value:LcErrorTypeE] C-API
return the LcErrorTypeE as string …
 

Enum To String

OT_OBJ_T atllcconfig_LcConfigFormatE_ToString (const enum LcConfigFormatE type)
 
OT_OBJ_T atllcconfig_LcConfigOptionsEF_ToString (const enum LcConfigOptionsEF type)
 
OT_OBJ_T atllcconfig_LcConfigTypeE_ToString (const enum LcConfigTypeE type)
 
OT_OBJ_T atllcconfig_LcErrorE_ToString (const enum LcErrorE type)
 
OT_OBJ_T atllcconfig_LcErrorTypeE_ToString (const enum LcErrorTypeE type)
 

Enum From Obj

int atllcconfig_Get_LcConfigFormatE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum LcConfigFormatE *ret)
 
int atllcconfig_Get_LcConfigOptionsEF_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum LcConfigOptionsEF *ret)
 
int atllcconfig_Get_LcConfigTypeE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum LcConfigTypeE *ret)
 
int atllcconfig_Get_LcErrorE_FromObj (MK_RT mkrt, OT_ENV_T interp, OT_OBJ_T enumE, enum LcErrorE *ret)
 
int atllcconfig_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 atl-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;
check_LNG(Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
sizeof(struct LookupClassS), "enum", TCL_EXACT, &index)) return TCL_ERROR;
*ret = keys[index].val;
return TCL_OK;
#define LC(n)
MOX_ENV_T OT_ENV_T
#define check_LNG(code)
MOX_OBJ_T 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 atl-c-check-proc is used in a atl-c-api-wrapper like :

static OT_ProcRet NS(LcConfigC_SetDefaultFormat) (LcConfigC_ARGS) {
LcConfigFormatE format = 0;
OT_CHECK_REQUIRED(OT_CHECK_ENUM (LcConfigFormatE,format)) // << atl-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 atl-code is quite simple, just use the string.

package require atllcconfig
namespace import atllcconfig::*
# 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

◆ atllcconfig_Get_LcConfigFormatE_FromObj()

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

Definition at line 192 of file LibLcConfig_atl.c.

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

◆ atllcconfig_Get_LcConfigOptionsEF_FromObj()

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

Definition at line 210 of file LibLcConfig_atl.c.

210 {
211 const static struct LookupEnumE keys[] = {
212 { "NONE" , CONFIG_OPTION_NONE },
213 { "FSYNC" , CONFIG_OPTION_FSYNC },
214 { "OPTION_NONE" , CONFIG_OPTION_NONE },
215 { "AUTOCONVERT" , CONFIG_OPTION_AUTOCONVERT },
216 { "OPTION_FSYNC" , CONFIG_OPTION_FSYNC },
217 { "ALLOW_OVERRIDES" , CONFIG_OPTION_ALLOW_OVERRIDES },
218 { "OPTION_AUTOCONVERT" , CONFIG_OPTION_AUTOCONVERT },
219 { "CONFIG_OPTION_NONE" , CONFIG_OPTION_NONE },
220 { "CONFIG_OPTION_FSYNC" , CONFIG_OPTION_FSYNC },
221 { "SEMICOLON_SEPARATORS" , CONFIG_OPTION_SEMICOLON_SEPARATORS },
222 { "OPTION_ALLOW_OVERRIDES" , CONFIG_OPTION_ALLOW_OVERRIDES },
223 { "CONFIG_OPTION_AUTOCONVERT" , CONFIG_OPTION_AUTOCONVERT },
224 { "ALLOW_SCIENTIFIC_NOTATION" , CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION },
225 { "OPEN_BRACE_ON_SEPARATE_LINE" , CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE },
226 { "COLON_ASSIGNMENT_FOR_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS },
227 { "OPTION_SEMICOLON_SEPARATORS" , CONFIG_OPTION_SEMICOLON_SEPARATORS },
228 { "CONFIG_OPTION_ALLOW_OVERRIDES" , CONFIG_OPTION_ALLOW_OVERRIDES },
229 { "COLON_ASSIGNMENT_FOR_NON_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS },
230 { "OPTION_ALLOW_SCIENTIFIC_NOTATION" , CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION },
231 { "OPTION_OPEN_BRACE_ON_SEPARATE_LINE" , CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE },
232 { "OPTION_COLON_ASSIGNMENT_FOR_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS },
233 { "CONFIG_OPTION_SEMICOLON_SEPARATORS" , CONFIG_OPTION_SEMICOLON_SEPARATORS },
234 { "OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS },
235 { "CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION" , CONFIG_OPTION_ALLOW_SCIENTIFIC_NOTATION },
236 { "CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE" , CONFIG_OPTION_OPEN_BRACE_ON_SEPARATE_LINE },
237 { "CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_GROUPS },
238 { "CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS" , CONFIG_OPTION_COLON_ASSIGNMENT_FOR_NON_GROUPS },
239 { NULL , 0 },
240 };
241
242 int index;
243 check_LNG(MK(EnumFlagWorker)(MK_RT_CALL interp,keys,enumE,&index)) return TCL_ERROR;
244 *ret = (enum LcConfigOptionsEF) index;
245 return TCL_OK;
246}
#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

◆ atllcconfig_Get_LcConfigTypeE_FromObj()

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

Definition at line 248 of file LibLcConfig_atl.c.

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

◆ atllcconfig_Get_LcErrorE_FromObj()

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

Definition at line 287 of file LibLcConfig_atl.c.

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

◆ atllcconfig_Get_LcErrorTypeE_FromObj()

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

Definition at line 303 of file LibLcConfig_atl.c.

303 {
304 const static struct LookupEnumE keys[] = {
305 { "NONE" , CONFIG_ERRROR_NONE },
306 { "PARSE" , CONFIG_ERRROR_PARSE },
307 { "FILE_IO" , CONFIG_ERRROR_FILE_IO },
308 { "ERRROR_NONE" , CONFIG_ERRROR_NONE },
309 { "ERRROR_PARSE" , CONFIG_ERRROR_PARSE },
310 { "ERRROR_FILE_IO" , CONFIG_ERRROR_FILE_IO },
311 { "CONFIG_ERRROR_NONE" , CONFIG_ERRROR_NONE },
312 { "CONFIG_ERRROR_PARSE" , CONFIG_ERRROR_PARSE },
313 { "CONFIG_ERRROR_FILE_IO" , CONFIG_ERRROR_FILE_IO },
314 { NULL , 0 },
315 };
316
317 int index;
318 check_LNG(Tcl_GetIndexFromObjStruct (interp, enumE, &keys,
319 sizeof(struct LookupClassS), "enum", TCL_EXACT, &index)) return TCL_ERROR;
320 *ret = keys[index].val;
321 return TCL_OK;
322}
@ 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

◆ atllcconfig_LcConfig_ConfigFormatE_FromInt()

static OT_ProcRet atllcconfig_LcConfig_ConfigFormatE_FromInt ( OtClass_ARGS )
static

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

Definition at line 417 of file LibLcConfig_atl.c.

417 {
420 MK_I32 value = 0;
423 enum LcConfigFormatE value_out;
425 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigFormatE,value_out));
426 goto end;
427 error:
429 end:
431}
#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

◆ atllcconfig_LcConfig_ConfigFormatE_ToInt()

static OT_ProcRet atllcconfig_LcConfig_ConfigFormatE_ToInt ( OtClass_ARGS )
static

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

Definition at line 504 of file LibLcConfig_atl.c.

504 {
507 enum LcConfigFormatE value = 0;
511 goto end;
512 error:
514 end:
516}
#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

◆ atllcconfig_LcConfig_ConfigFormatE_ToString()

static OT_ProcRet atllcconfig_LcConfig_ConfigFormatE_ToString ( OtClass_ARGS )
static

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

Definition at line 519 of file LibLcConfig_atl.c.

519 {
522 enum LcConfigFormatE value = 0;
526 goto end;
527 error:
529 end:
531}
#define ConfigFormatE_ToString_doc
#define OT_retObj_SET_STR(nat)
MK_STRN LcConfigFormatE_ToString(enum LcConfigFormatE value)
return the LcConfigFormatE as string …

◆ atllcconfig_LcConfig_ConfigOptionsEF_FromInt()

static OT_ProcRet atllcconfig_LcConfig_ConfigOptionsEF_FromInt ( OtClass_ARGS )
static

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

Definition at line 434 of file LibLcConfig_atl.c.

434 {
437 MK_I32 value = 0;
440 enum LcConfigOptionsEF value_out;
442 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigOptionsEF,value_out));
443 goto end;
444 error:
446 end:
448}
#define ConfigOptionsEF_FromInt_doc
enum MkErrorE LcConfigOptionsEF_FromInt(MK_I32 const value, enum LcConfigOptionsEF *value_out)
return the LcConfigOptionsEF from integer …

◆ atllcconfig_LcConfig_ConfigOptionsEF_ToInt()

static OT_ProcRet atllcconfig_LcConfig_ConfigOptionsEF_ToInt ( OtClass_ARGS )
static

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

Definition at line 534 of file LibLcConfig_atl.c.

534 {
537 enum LcConfigOptionsEF value = 0;
541 goto end;
542 error:
544 end:
546}
#define ConfigOptionsEF_ToInt_doc
static MK_I32 LcConfigOptionsEF_ToInt(enum LcConfigOptionsEF value)
return the LcConfigOptionsEF as integer …
Definition LcEnum_lc.h:166

◆ atllcconfig_LcConfig_ConfigOptionsEF_ToString()

static OT_ProcRet atllcconfig_LcConfig_ConfigOptionsEF_ToString ( OtClass_ARGS )
static

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

Definition at line 549 of file LibLcConfig_atl.c.

549 {
552 enum LcConfigOptionsEF value = 0;
556 goto end;
557 error:
559 end:
561}
#define ConfigOptionsEF_ToString_doc
MK_STRN LcConfigOptionsEF_ToString(enum LcConfigOptionsEF value)
return the LcConfigOptionsEF as string …

◆ atllcconfig_LcConfig_ConfigTypeE_FromInt()

static OT_ProcRet atllcconfig_LcConfig_ConfigTypeE_FromInt ( OtClass_ARGS )
static

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

Definition at line 451 of file LibLcConfig_atl.c.

451 {
454 MK_I32 value = 0;
457 enum LcConfigTypeE value_out;
459 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ConfigTypeE,value_out));
460 goto end;
461 error:
463 end:
465}
#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 …

◆ atllcconfig_LcConfig_ConfigTypeE_ToInt()

static OT_ProcRet atllcconfig_LcConfig_ConfigTypeE_ToInt ( OtClass_ARGS )
static

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

Definition at line 564 of file LibLcConfig_atl.c.

564 {
567 enum LcConfigTypeE value = 0;
571 goto end;
572 error:
574 end:
576}
#define ConfigTypeE_ToInt_doc
static MK_I32 LcConfigTypeE_ToInt(enum LcConfigTypeE value)
return the LcConfigTypeE as integer …
Definition LcEnum_lc.h:110

◆ atllcconfig_LcConfig_ConfigTypeE_ToString()

static OT_ProcRet atllcconfig_LcConfig_ConfigTypeE_ToString ( OtClass_ARGS )
static

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

Definition at line 579 of file LibLcConfig_atl.c.

579 {
582 enum LcConfigTypeE value = 0;
586 goto end;
587 error:
589 end:
591}
#define ConfigTypeE_ToString_doc
MK_STRN LcConfigTypeE_ToString(enum LcConfigTypeE value)
return the LcConfigTypeE as string …

◆ atllcconfig_LcConfig_ErrorE_FromInt()

static OT_ProcRet atllcconfig_LcConfig_ErrorE_FromInt ( OtClass_ARGS )
static

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

Definition at line 468 of file LibLcConfig_atl.c.

468 {
471 MK_I32 value = 0;
474 enum LcErrorE value_out;
476 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ErrorE,value_out));
477 goto end;
478 error:
480 end:
482}
#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 …

◆ atllcconfig_LcConfig_ErrorE_ToInt()

static OT_ProcRet atllcconfig_LcConfig_ErrorE_ToInt ( OtClass_ARGS )
static

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

Definition at line 594 of file LibLcConfig_atl.c.

594 {
597 enum LcErrorE value = 0;
601 goto end;
602 error:
604 end:
606}
#define ErrorE_ToInt_doc
static MK_I32 LcErrorE_ToInt(enum LcErrorE value)
return the LcErrorE as integer …
Definition LcEnum_lc.h:205

◆ atllcconfig_LcConfig_ErrorE_ToString()

static OT_ProcRet atllcconfig_LcConfig_ErrorE_ToString ( OtClass_ARGS )
static

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

Definition at line 609 of file LibLcConfig_atl.c.

609 {
612 enum LcErrorE value = 0;
616 goto end;
617 error:
619 end:
621}
#define ErrorE_ToString_doc
MK_STRN LcErrorE_ToString(enum LcErrorE value)
return the LcErrorE as string …

◆ atllcconfig_LcConfig_ErrorTypeE_FromInt()

static OT_ProcRet atllcconfig_LcConfig_ErrorTypeE_FromInt ( OtClass_ARGS )
static

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

Definition at line 485 of file LibLcConfig_atl.c.

485 {
488 MK_I32 value = 0;
491 enum LcErrorTypeE value_out;
493 OT_retObj_SET(OT_NEW_Lc_enum_OBJ(ErrorTypeE,value_out));
494 goto end;
495 error:
497 end:
499}
#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

◆ atllcconfig_LcConfig_ErrorTypeE_ToInt()

static OT_ProcRet atllcconfig_LcConfig_ErrorTypeE_ToInt ( OtClass_ARGS )
static

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

Definition at line 624 of file LibLcConfig_atl.c.

624 {
627 enum LcErrorTypeE value = 0;
631 goto end;
632 error:
634 end:
636}
#define ErrorTypeE_ToInt_doc
static MK_I32 LcErrorTypeE_ToInt(enum LcErrorTypeE value)
return the LcErrorTypeE as integer …
Definition LcEnum_lc.h:246

◆ atllcconfig_LcConfig_ErrorTypeE_ToString()

static OT_ProcRet atllcconfig_LcConfig_ErrorTypeE_ToString ( OtClass_ARGS )
static

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

Definition at line 639 of file LibLcConfig_atl.c.

639 {
642 enum LcErrorTypeE value = 0;
646 goto end;
647 error:
649 end:
651}
#define ErrorTypeE_ToString_doc
MK_STRN LcErrorTypeE_ToString(enum LcErrorTypeE value)
return the LcErrorTypeE as string …

◆ atllcconfig_LcConfigFormatE_ToString()

OT_OBJ_T atllcconfig_LcConfigFormatE_ToString ( const enum LcConfigFormatE type)

Definition at line 119 of file LibLcConfig_atl.c.

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

◆ atllcconfig_LcConfigOptionsEF_ToString()

OT_OBJ_T atllcconfig_LcConfigOptionsEF_ToString ( const enum LcConfigOptionsEF type)

Definition at line 128 of file LibLcConfig_atl.c.

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

◆ atllcconfig_LcConfigTypeE_ToString()

OT_OBJ_T atllcconfig_LcConfigTypeE_ToString ( const enum LcConfigTypeE type)

Definition at line 146 of file LibLcConfig_atl.c.

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

◆ atllcconfig_LcErrorE_ToString()

OT_OBJ_T atllcconfig_LcErrorE_ToString ( const enum LcErrorE type)

Definition at line 162 of file LibLcConfig_atl.c.

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

◆ atllcconfig_LcErrorTypeE_ToString()

OT_OBJ_T atllcconfig_LcErrorTypeE_ToString ( const enum LcErrorTypeE type)

Definition at line 171 of file LibLcConfig_atl.c.

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