11#define META_FILE_NAME "LcConfigC_atl.c"
15#define OT_CLASS alcrt->AtlLcConfigC
16#define OT_NULL alcrt->AtlLcConfigC_MK_NULL
17#define OT_CLASS_NAME "LcConfigC"
19#define SELF2HDL(O) LcCfg(VAL2MNG(O))
47#define OT_SETUP_hdl SetupHdlFromMetaData_2(LC_CFG)
48#define OT_SETUP_hdl__null_allow SetupHdlFromMetaData__null_allow_2(LC_CFG)
49#define OT_SETUP_hdl_destr SetupHdlFromMetaData__null_allow_2(LC_CFG)
50#define OT_SETUP_hdl_constr SetupHdlConstr(LcConfigC)
51#define OT_SETUP_hdl_static_constr OT_SETUP_hdl_static
52#define OT_SETUP_hdl_static SetupHdlStatic(LcConfigC)
54#define OT_retObj_CONSTR(x) OT_retObj_SET(AtomInit(OT_SELF,LcConfigC_X2obj(x),alcrt))
59 if (LcConfigCTT == NULL) LcConfigCTT = LcConfigSTT; \
62 if (LcConfigCTT->selfCreate == NS(LcConfigC_selfCreate)) return MK_OK; \
65 LcConfigCTT->selfCreate = NS(LcConfigC_selfCreate); \
66 LcConfigCTT->selfDelete = NS(LcConfigC_selfDelete); \
67 LcConfigCTT->selfUnlink = NS(LcConfigC_selfUnlink); \
70 OT_CLASS = AltClassDef(LcConfigCTT,&alcrt->AtlLcConfigC_NS); \
71 if (OT_CLASS == NULL) goto error; \
72 OT_REF_INCR(OT_CLASS); \
75 check_LNG(AtlUnknownSetup (NS(sOtClassDef),alcrt)) goto error; \
78 check_LNG(AtlUnknownSetup (NS(sInstanceDef),alcrt)) goto error; \
81 RL_init(2, recompile, RL_T(0,RecompileN)); RL_O(1,OT_CLASS) ; \
82 int retI = RL_EvalEx(0); \
83 if (retI != TCL_OK) return retI; \
86 OT_NULL = AtomCreateNULL(OT_CLASS, "::LcConfigC::MK_NULL", (MK_PTR)alcrt); \
87 if (OT_NULL == NULL) goto error; \
94#define CTOR_doc "LcConfigC [LcConfigC::CTOR]"
95#define Create_doc "LcConfigC [LcConfigC::Create]"
98#define GetNull_doc "LcConfigC [LcConfigC::GetNull]"
99#define HandleResolve_doc "LcConfigC [LcConfigC::HandleResolve netHdl:MK_HDL]"
100#define Instances_doc "LcConfigC [LcConfigC::Instances]"
103#define Lookup_doc "LcSettingC [LcConfigC::Lookup $config path:string] (const)"
104#define Next_doc "LcConfigC [LcConfigC::Next $cfg]"
105#define Prev_doc "LcConfigC [LcConfigC::Prev $cfg]"
106#define RootSetting_doc "LcSettingC [LcConfigC::RootSetting $config] (const)"
109#define Clear_doc "LcConfigC::Clear $config"
110#define ErrorType_doc "LcErrorTypeE [LcConfigC::ErrorType $config] (const)"
111#define GetDefaultFormat_doc "LcConfigFormatE [LcConfigC::GetDefaultFormat $config] (const)"
112#define GetFloatPrecision_doc "int16 [LcConfigC::GetFloatPrecision $config] (const)"
113#define GetIncludeDir_doc "string [LcConfigC::GetIncludeDir $config] (const)"
114#define GetOption_doc "bool [LcConfigC::GetOption $config option:LcConfigOptionsEF] (const)"
115#define GetOptions_doc "LcConfigOptionsEF [LcConfigC::GetOptions $config] (const)"
116#define GetTabWidth_doc "int16 [LcConfigC::GetTabWidth $config] (const)"
118#define Log_doc "LcConfigC::Log $cfg ?fmtobj:MkObjectC=NULL? ?debug:int32=0? ?callfunc:string=\"MK_NULL\"? ?lvl:int32=0? (const)"
119#define ReadFile_doc "LcConfigC::ReadFile $config filename:string"
120#define ReadString_doc "LcConfigC::ReadString $config str:string"
121#define SetDefaultFormat_doc "LcConfigC::SetDefaultFormat $config format:LcConfigFormatE"
122#define SetFloatPrecision_doc "LcConfigC::SetFloatPrecision $config digits:int16"
123#define SetIncludeDir_doc "LcConfigC::SetIncludeDir $config include_dir:string"
124#define SetIncludeFunc_doc "LcConfigC::SetIncludeFunc $cfg ?fConfigIncludeData:LC_CBP=NULL?"
125#define SetOption_doc "LcConfigC::SetOption $config option:LcConfigOptionsEF flag:bool"
126#define SetOptions_doc "LcConfigC::SetOptions $config options:LcConfigOptionsEF"
127#define SetSettingDeleteFunc_doc "LcConfigC::SetSettingDeleteFunc $cfg ?fSettingDeleteData:LC_CBP=NULL?"
128#define SetTabWidth_doc "LcConfigC::SetTabWidth $config width:int16"
129#define WriteFile_doc "LcConfigC::WriteFile $config filename:string"
132#define LookupBool_doc "bool [LcConfigC::LookupBool $config path:string] (const)"
133#define LookupFloat_doc "double [LcConfigC::LookupFloat $config path:string] (const)"
134#define LookupInt_doc "int32 [LcConfigC::LookupInt $config path:string] (const)"
135#define LookupInt64_doc "int64 [LcConfigC::LookupInt64 $config path:string] (const)"
136#define LookupString_doc "string [LcConfigC::LookupString $config path:string] (const)"
137#define WriteString_doc "string [LcConfigC::WriteString $cfg] (const)"
775 if (retVal == NULL) {
794 if (retVal == NULL) {
816char* printBits(
size_t const size,
void const *
const ptr)
818 static char buf[100];
819 char * bufP = &buf[0];
820 unsigned char *b = (
unsigned char*) ptr;
825 for (i = (
int)size-1; i >= 0; i--) {
826 for (j = 7; j >= 0; j--) {
827 byte = (b[i] >> j) & 1;
828 num = sprintf(bufP,
"%u",
byte);
836#define myprint(num) ({ \
837 unsigned int tmp=num; \
838 printf("%-40s → %s\n", #num, printBits(4,&tmp)); \
846 __skip = Tcl_ObjectContextSkippedArgs(objCtx); \
847 selfO = Tcl_ObjectContextObject(objCtx); \
848 hdl = OBJECT2CFG(selfO); \
850 Tcl_SetResult(interp,
"PointerError: 'LcConfigC' hdl is NULL", TCL_STATIC); \
855myprint(
MkOBJ_R(hdl).signature);
856myprint(
MkOBJ_R(hdl).type->objmask);
857myprint(LcConfigS_SIGNATURE);
858myprint(LcConfigS_MASK);
859myprint(MkObjectS_SIGNATURE);
860myprint(MkObjectS_MASK);
867 hdl = (
LC_CFG) clientData; \
897 {
"::LcConfigC::Create" ,
NS(LcConfigC_Create) },
900 {
"::LcConfigC::GetNull" ,
NS(LcConfigC_GetNull) },
901 {
"::LcConfigC::HandleResolve" ,
NS(LcConfigC_HandleResolve) },
902 {
"::LcConfigC::Instances" ,
NS(LcConfigC_Instances) },
915 {
"::LcConfigC::LcConfigC" ,
NS(LcConfigC_CTOR) },
918 {
"::LcConfigC::Lookup" ,
NS(LcConfigC_Lookup) },
919 {
"::LcConfigC::Next" ,
NS(LcConfigC_Next) },
920 {
"::LcConfigC::Prev" ,
NS(LcConfigC_Prev) },
921 {
"::LcConfigC::RootSetting" ,
NS(LcConfigC_RootSetting) },
924 {
"::LcConfigC::Clear" ,
NS(LcConfigC_Clear) },
925 {
"::LcConfigC::ErrorType" ,
NS(LcConfigC_ErrorType) },
926 {
"::LcConfigC::GetDefaultFormat" ,
NS(LcConfigC_GetDefaultFormat) },
927 {
"::LcConfigC::GetFloatPrecision" ,
NS(LcConfigC_GetFloatPrecision) },
928 {
"::LcConfigC::GetIncludeDir" ,
NS(LcConfigC_GetIncludeDir) },
929 {
"::LcConfigC::GetOption" ,
NS(LcConfigC_GetOption) },
930 {
"::LcConfigC::GetOptions" ,
NS(LcConfigC_GetOptions) },
931 {
"::LcConfigC::GetTabWidth" ,
NS(LcConfigC_GetTabWidth) },
933 {
"::LcConfigC::Log" ,
NS(LcConfigC_Log) },
934 {
"::LcConfigC::ReadFile" ,
NS(LcConfigC_ReadFile) },
935 {
"::LcConfigC::ReadString" ,
NS(LcConfigC_ReadString) },
936 {
"::LcConfigC::SetDefaultFormat" ,
NS(LcConfigC_SetDefaultFormat) },
937 {
"::LcConfigC::SetFloatPrecision" ,
NS(LcConfigC_SetFloatPrecision) },
938 {
"::LcConfigC::SetIncludeDir" ,
NS(LcConfigC_SetIncludeDir) },
939 {
"::LcConfigC::SetIncludeFunc" ,
NS(LcConfigC_SetIncludeFunc) },
940 {
"::LcConfigC::SetOption" ,
NS(LcConfigC_SetOption) },
941 {
"::LcConfigC::SetOptions" ,
NS(LcConfigC_SetOptions) },
942 {
"::LcConfigC::SetSettingDeleteFunc" ,
NS(LcConfigC_SetSettingDeleteFunc) },
943 {
"::LcConfigC::SetTabWidth" ,
NS(LcConfigC_SetTabWidth) },
944 {
"::LcConfigC::WriteFile" ,
NS(LcConfigC_WriteFile) },
947 {
"::LcConfigC::LookupBool" ,
NS(LcConfigC_LookupBool) },
948 {
"::LcConfigC::LookupFloat" ,
NS(LcConfigC_LookupFloat) },
949 {
"::LcConfigC::LookupInt" ,
NS(LcConfigC_LookupInt) },
950 {
"::LcConfigC::LookupInt64" ,
NS(LcConfigC_LookupInt64) },
951 {
"::LcConfigC::LookupString" ,
NS(LcConfigC_LookupString) },
952 {
"::LcConfigC::WriteString" ,
NS(LcConfigC_WriteString) },
#define SetIncludeFunc_doc
#define SetIncludeDir_doc
#define OT_SETUP_hdl_static_constr
#define SetSettingDeleteFunc_doc
#define HandleResolve_doc
#define SetFloatPrecision_doc
#define OT_SETUP_hdl_static
#define OT_SETUP_hdl_constr
#define GetFloatPrecision_doc
#define SetDefaultFormat_doc
#define OT_retObj_CONSTR(x)
#define GetDefaultFormat_doc
#define GetIncludeDir_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_retObj_SET_I16(nat)
#define OT_retObj_SET_Error
#define OT_CONSTRUCTOR_POST(x)
#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_SETUP_CONSTRUCTOR_ARGS(...)
#define OT_CHECK_ENUM(ename, val)
#define OT_CHECK_NI2(val)
#define OT_retObj_SET_STR(nat)
#define OT_CHECK_OPTIONAL(val)
#define OT_retObj_SET(val)
#define MkErrorC_Check(mng, PROC)
#define OT_CHECK_STRN(val)
enum MkErrorE(* LcSettingDeleteCallF)(LcSettingDeleteCallF_ARGS)
enum MkErrorE(* LcConfigIncludeCallF)(LcConfigIncludeCallF_ARGS)
struct LcConfigS * LC_CFG
class-shortcut for struct LcConfigS *, all shortcut using the XX_YYY syntax (only for public API) …
#define LcConfigInstances()
static LC_CFG LcConfigPrev(LC_CFG const cfg)
get previous instance from linked-list of LcConfigS type
static LC_CFG LcConfigNext(LC_CFG const cfg)
get next instance from linked-list of LcConfigS type
static LC_CFG LcConfigGetNull(void)
Null-Slot - return a LcConfigC typed NULL instance …
#define LcConfigHandleResolve(...)
static enum LcErrorTypeE LcConfigErrorType(LC_CFGN config)
This function, which is implemented as a macro, returns the type of error that occurred during the la...
static enum LcConfigFormatE LcConfigGetDefaultFormat(LC_CFGN config)
These functions, which are implemented as macros, get and set the default external format for setting...
static MK_I16 LcConfigGetTabWidth(LC_CFGN config)
These functions, which are implemented as macros, get and set the tab width for the configuration con...
static MK_BOOL LcConfigGetOption(LC_CFGN config, enum LcConfigOptionsEF option)
Since v1.7 These functions get and set the given option of the configuration config …
static MK_I16 LcConfigGetFloatPrecision(LC_CFGN config)
Since v1.6 These functions get and set the number of decimal digits to output after the radix charact...
static enum LcConfigOptionsEF LcConfigGetOptions(LC_CFGN config)
These functions get and set the options for the configuration config …
static MK_STRN LcConfigGetIncludeDir(LC_CFGN config)
ConfigSetIncludeDir specifies the include directory, include_dir, relative to which the files specifi...
static enum MkErrorE LcConfigLookupFloat(LC_CFGN config, MK_STRN path, MK_DBL *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupBool(LC_CFGN config, MK_STRN path, MK_BOOL *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupString(LC_CFGN config, MK_STRN path, MK_STRN *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupInt(LC_CFGN config, MK_STRN path, MK_I32 *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static enum MkErrorE LcConfigLookupInt64(LC_CFGN config, MK_STRN path, MK_I64 *value_out)
These functions look up the value of the setting in the configuration config specified by the path pa...
static LC_CFS LcConfigLookup(LC_CFGN config, MK_STRN path)
This function locates the setting in the configuration config specified by the path path …
static enum MkErrorE LcConfigWriteFile(LC_CFG config, MK_STRN filename)
This function writes the configuration config to the file named filename …
#define LcConfigWriteString(...)
static LC_CFS LcConfigRootSetting(LC_CFGN config)
This function, which is implemented as a macro, returns the root setting for the configuration config...
static void LcConfigClear(LC_CFG config)
Since v1.7 This function clears the configuration config …
static enum MkErrorE LcConfigReadFile(LC_CFG config, MK_STRN filename)
This function reads and parses a configuration from the file named filename into the configuration ob...
static enum MkErrorE LcConfigReadString(LC_CFG config, MK_STRN str)
This function reads and parses a configuration from the string str into the configuration object conf...
static void LcConfigSetTabWidth(LC_CFG config, MK_I16 width)
These functions, which are implemented as macros, get and set the tab width for the configuration con...
static void LcConfigSetFloatPrecision(LC_CFG config, MK_I16 digits)
Since v1.6 These functions get and set the number of decimal digits to output after the radix charact...
#define LcConfigSetSettingDeleteFunc(...)
static void LcConfigSetOptions(LC_CFG config, enum LcConfigOptionsEF options)
These functions get and set the options for the configuration config …
static void LcConfigSetOption(LC_CFG config, enum LcConfigOptionsEF option, MK_BOOL flag)
Since v1.7 These functions get and set the given option of the configuration config …
static void LcConfigSetIncludeDir(LC_CFG config, MK_STRN include_dir)
ConfigSetIncludeDir specifies the include directory, include_dir, relative to which the files specifi...
#define LcConfigSetIncludeFunc(...)
static void LcConfigSetDefaultFormat(LC_CFG config, enum LcConfigFormatE format)
These functions, which are implemented as macros, get and set the default external format for setting...
static LC_CFG LcConfigCreate(MK_TYP type, config_t *nat)
create a LcConfigC instance …
LcConfigFormatE
set the format of a LcSettingC …
LcConfigOptionsEF
define the configuration-option of a LcConfigC …
static bool MkSysStringIsNULL(MK_STRN str)
static MK_I32 MkRuntimeDebugGet(void)
#define OT_CHECK_CALLABLE(val)
#define OT_CLEANUP_CALLABLE(val)
#define OT_SETUP_CALLABLE(val)
#define OT_CHECK_OBJN(val, nullB)
Struct to represent the data from the LcConfigC …
Struct to represent the data from the LcSettingC …