16using System.Reflection;
17using System.Runtime.InteropServices;
18using System.Runtime.CompilerServices;
19using System.Collections.Generic;
20using System.Threading;
28 public partial class LcConfigC
30 public partial class LcConfigC :
MkObjectC
33 private readonly
static ConstructorInfo ctor =
getCtor(typeof(LcConfigC));
34 private readonly
static ThreadLocal<LcConfigC> MK_NULL =
new ThreadLocal<LcConfigC>(() => {
42 private static LcConfigC LcConfigC_ObjCreate (IntPtr
hdl) {
46 private static IntPtr LcConfigC_SelfCreate (IntPtr
mkrt, IntPtr obj, IntPtr env) {
50 private static void LcConfigC_SelfUnlink (IntPtr
mkrt, IntPtr
self, IntPtr env) {
54 internal static void SetupThreadCFG (IntPtr
mkrt) {
55 Lc.LcCsTypeUpdate(
mkrt, LcCsTypeLookupE.CFG, LcConfigC_SelfCreate, LcConfigC_SelfUnlink);
58 #if !META_STATIC_OVERWRITE
63 SetupThreadCFG(IntPtr.Zero);
69 internal LcConfigC (IntPtr cfgP) : base(cfgP) {
76 public partial class LcConfigC {
86 IntPtr __retVal__L = Lc.LcConfigHandleResolve(IntPtr.Zero, netHdl);
98 public partial class LcConfigC {
108 IntPtr __retVal__L = Lc.LcConfigNext(
hdl);
114 IntPtr __retVal__L = Lc.LcConfigPrev(
hdl);
122 IntPtr __retVal__L = Lc.LcConfigInstances(IntPtr.Zero);
130 public partial class LcConfigC {
140 IntPtr __retVal__L = Lc.LcConfigGetNull();
148 public partial class LcConfigC {
166 public partial class LcConfigC {
182 Int16 __retVal__L = Lc.LcConfigGetFloatPrecision(
hdl);
188 IntPtr __retVal__L = Lc.LcConfigGetIncludeDir(
hdl);
189 return Marshal.PtrToStringAnsi(__retVal__L);
194 bool __retVal__L = Lc.LcConfigGetOption(
hdl, option);
206 Int16 __retVal__L = Lc.LcConfigGetTabWidth(
hdl);
214 public partial class LcConfigC {
224 IntPtr path_cstr = Marshal.StringToHGlobalAnsi(path);
225 IntPtr __retVal__L = Lc.LcConfigLookup(
hdl, path_cstr);
226 Marshal.FreeHGlobal(path_cstr);
235 IntPtr path_cstr = Marshal.StringToHGlobalAnsi(path);
236 MkErrorE errVal = Lc.LcConfigLookupBool(
hdl, path_cstr, out value_out);
237 Marshal.FreeHGlobal(path_cstr);
245 IntPtr path_cstr = Marshal.StringToHGlobalAnsi(path);
246 MkErrorE errVal = Lc.LcConfigLookupFloat(
hdl, path_cstr, out value_out);
247 Marshal.FreeHGlobal(path_cstr);
255 IntPtr path_cstr = Marshal.StringToHGlobalAnsi(path);
256 MkErrorE errVal = Lc.LcConfigLookupInt(
hdl, path_cstr, out value_out);
257 Marshal.FreeHGlobal(path_cstr);
265 IntPtr path_cstr = Marshal.StringToHGlobalAnsi(path);
266 MkErrorE errVal = Lc.LcConfigLookupInt64(
hdl, path_cstr, out value_out);
267 Marshal.FreeHGlobal(path_cstr);
275 IntPtr path_cstr = Marshal.StringToHGlobalAnsi(path);
276 MkErrorE errVal = Lc.LcConfigLookupString(
hdl, path_cstr, out value_out);
277 Marshal.FreeHGlobal(path_cstr);
279 return Marshal.PtrToStringAnsi(value_out);
286 public partial class LcConfigC {
296 IntPtr __retVal__L = Lc.LcConfigRootSetting(
hdl);
304 Lc.LcConfigClear(
hdl);
308 new public void Log (
MkObjectC fmtobj =
null,
int debug = 0, [CallerMemberName]
string callfunc =
null,
int lvl = 0) {
311 IntPtr callfunc_cstr = Marshal.StringToHGlobalAnsi(callfunc);
312 Lc.LcConfigLog(
mkrt,
hdl, fmtobj_hdl, debug, callfunc_cstr, lvl);
313 Marshal.FreeHGlobal(callfunc_cstr);
318 IntPtr filename_cstr = Marshal.StringToHGlobalAnsi(filename);
319 MkErrorE errVal = Lc.LcConfigReadFile(
hdl, filename_cstr);
320 Marshal.FreeHGlobal(filename_cstr);
326 IntPtr str_cstr = Marshal.StringToHGlobalAnsi(str);
327 MkErrorE errVal = Lc.LcConfigReadString(
hdl, str_cstr);
328 Marshal.FreeHGlobal(str_cstr);
334 IntPtr filename_cstr = Marshal.StringToHGlobalAnsi(filename);
335 MkErrorE errVal = Lc.LcConfigWriteFile(
hdl, filename_cstr);
336 Marshal.FreeHGlobal(filename_cstr);
347 return Marshal.PtrToStringAnsi(val_out);
354 public partial class LcConfigC {
364 Lc.LcConfigSetDefaultFormat(
hdl, format);
369 Lc.LcConfigSetFloatPrecision(
hdl, digits);
374 IntPtr include_dir_cstr = Marshal.StringToHGlobalAnsi(include_dir);
375 Lc.LcConfigSetIncludeDir(
hdl, include_dir_cstr);
376 Marshal.FreeHGlobal(include_dir_cstr);
382 IntPtr fConfigIncludeData_ptr = fConfigIncludeData ==
null ? IntPtr.Zero : (IntPtr)GCHandle.Alloc(
new LcCall(
mkrt,fConfigIncludeData));
383 if (fConfigIncludeData_ptr == IntPtr.Zero) fConfigIncludeCall =
null;
384 MkErrorE errVal = Lc.LcConfigSetIncludeFunc(
mkrt,
hdl, fConfigIncludeCall, fConfigIncludeData_ptr, LcConfigIncludeFree);
390 Lc.LcConfigSetOption(
hdl, option, flag);
395 Lc.LcConfigSetOptions(
hdl, options);
401 IntPtr fSettingDeleteData_ptr = fSettingDeleteData ==
null ? IntPtr.Zero : (IntPtr)GCHandle.Alloc(
new LcCall(
mkrt,fSettingDeleteData));
402 if (fSettingDeleteData_ptr == IntPtr.Zero) fSettingDeleteCall =
null;
403 MkErrorE errVal = Lc.LcConfigSetSettingDeleteFunc(
mkrt,
hdl, fSettingDeleteCall, fSettingDeleteData_ptr, LcSettingDeleteFree);
409 Lc.LcConfigSetTabWidth(
hdl, width);
425 protected static IntPtr
CTOR () {
426 IntPtr __retVal__L = Lc.LcConfigCreate();
427 if (__retVal__L == IntPtr.Zero) {
430 return (IntPtr)__retVal__L;
438 IntPtr __retVal__L = Lc.LcConfigCreate();
439 if (__retVal__L == IntPtr.Zero) {
442 return LcConfigC.LcConfigC_ObjCreate(__retVal__L);
LcConfigC - the class known as lccfg or Config define the main-configuration-handle …
delegate void LcConfigIncludeCCB(string incDir, string path, MkBufferListC ret)
implements the cslcconfig API object: public version from LcConfigIncludeF as method
delegate void LcSettingDeleteCCB(long cfsH)
static LcConfigC LcConfigC_ObjNew(IntPtr hdl)
LcSettingC - the class known as lccfs or Setting define a single config-setting …
static LcSettingC LcSettingC_ObjNew(IntPtr hdl)
static void Check(IntPtr ctx, MkErrorE err)
static object atomObjNew(Type type, ConstructorInfo ctor, IntPtr obj)
static IntPtr getOBJ_null_allow(MkObjectC obj)
static object atomObjCreate(Type type, ConstructorInfo ctor, IntPtr obj)
static void atomSelfUnlink(IntPtr self, IntPtr env)
static object atomSelfNull(ConstructorInfo ctor)
static ConstructorInfo getCtor(Type type)
static IntPtr atomSelfCreate(ConstructorInfo ctor, IntPtr obj, IntPtr env)
enum MkErrorE(* LcSettingDeleteCallF)(LcSettingDeleteCallF_ARGS)
enum MkErrorE(* LcConfigIncludeCallF)(LcConfigIncludeCallF_ARGS)
new static LcConfigC Instances()
C#: [static] LcConfigC LcConfigC.Instances() → C-API get head-instance from linked-list of LcCon...
new static LcConfigC GetNull()
C#: [static] LcConfigC LcConfigC.GetNull() → C-API Null-Slot - return a LcConfigC typed NULL ins...
new LcConfigC Prev()
C#: LcConfigC cfg.Prev() → C-API get previous instance from linked-list of LcConfigS type
new LcConfigC Next()
C#: LcConfigC cfg.Next() → C-API get next instance from linked-list of LcConfigS type
new static LcConfigC HandleResolve(Int32 netHdl)
C#: [static] LcConfigC LcConfigC.HandleResolve(Int32 netHdl) → C-API Handle-Resolve-Slot - retur...
LcErrorTypeE ErrorType()
C#: LcErrorTypeE config.ErrorType() → C-API This function, which is implemented as a macro,...
short GetTabWidth()
C#: short config.GetTabWidth() → C-API These functions, which are implemented as macros,...
LcConfigFormatE GetDefaultFormat()
C#: LcConfigFormatE config.GetDefaultFormat() → C-API These functions, which are implemented as...
string GetIncludeDir()
C#: string config.GetIncludeDir() → C-API ConfigSetIncludeDir specifies the include directory,...
bool GetOption(LcConfigOptionsEF option)
C#: bool config.GetOption(LcConfigOptionsEF option) → C-API Since v1.7 These functions get and ...
short GetFloatPrecision()
C#: short config.GetFloatPrecision() → C-API Since v1.6 These functions get and set the number ...
LcConfigOptionsEF GetOptions()
C#: LcConfigOptionsEF config.GetOptions() → C-API These functions get and set the options for t...
double LookupFloat(string path)
C#: double config.LookupFloat(string path) → C-API These functions look up the value of the set...
int LookupInt(string path)
C#: int config.LookupInt(string path) → C-API These functions look up the value of the setting ...
LcSettingC Lookup(string path)
C#: LcSettingC config.Lookup(string path) → C-API This function locates the setting in the conf...
long LookupInt64(string path)
C#: long config.LookupInt64(string path) → C-API These functions look up the value of the setti...
string LookupString(string path)
C#: string config.LookupString(string path) → C-API These functions look up the value of the se...
bool LookupBool(string path)
C#: bool config.LookupBool(string path) → C-API These functions look up the value of the settin...
void ReadFile(string filename)
C#: config.ReadFile(string filename) → C-API This function reads and parses a configuration fro...
void WriteFile(string filename)
C#: config.WriteFile(string filename) → C-API This function writes the configuration config to ...
LcSettingC RootSetting()
C#: LcSettingC config.RootSetting() → C-API This function, which is implemented as a macro,...
new void Log(MkObjectC fmtobj=null, int debug=0, [CallerMemberName]string callfunc=null, int lvl=0)
C#: cfg.Log(MkObjectC fmtobj = null, int debug = 0, [CallerMemberName]string callfunc = null,...
void ReadString(string str)
C#: config.ReadString(string str) → C-API This function reads and parses a configuration from t...
string WriteString()
C#: string cfg.WriteString() → C-API read the entire configuration cfg into the string val_out ...
void Clear()
C#: config.Clear() → C-API Since v1.7 This function clears the configuration config …
void SetDefaultFormat(LcConfigFormatE format)
C#: config.SetDefaultFormat(LcConfigFormatE format) → C-API These functions,...
void SetSettingDeleteFunc(LcSettingDeleteCCB fSettingDeleteData=null)
C#: cfg.SetSettingDeleteFunc(LcSettingDeleteCCB fSettingDeleteData = null) → C-API set the call...
void SetOptions(LcConfigOptionsEF options)
C#: config.SetOptions(LcConfigOptionsEF options) → C-API These functions get and set the option...
void SetFloatPrecision(short digits)
C#: config.SetFloatPrecision(short digits) → C-API Since v1.6 These functions get and set the n...
void SetIncludeFunc(LcConfigIncludeCCB fConfigIncludeData=null)
C#: cfg.SetIncludeFunc(LcConfigIncludeCCB fConfigIncludeData = null) → C-API set the __parser__...
void SetIncludeDir(string include_dir)
C#: config.SetIncludeDir(string include_dir) → C-API ConfigSetIncludeDir specifies the include ...
void SetOption(LcConfigOptionsEF option, bool flag)
C#: config.SetOption(LcConfigOptionsEF option, bool flag) → C-API Since v1.7 These functions ge...
void SetTabWidth(short width)
C#: config.SetTabWidth(short width) → C-API These functions, which are implemented as macros,...
static IntPtr CTOR()
C#: [constructor,static] LcConfigC LcConfigC.Create() → C-API create a LcConfigC instance …
static LcConfigC Create()
C#: [constructor,static] LcConfigC LcConfigC.Create() → C-API create a LcConfigC instance …
LcConfigOptionsEF
→ C-API: LcConfigOptionsEF → C-API: LcConfigOptionsEF
LcErrorTypeE
→ C-API: LcErrorTypeE → C-API: LcErrorTypeE
LcConfigFormatE
→ C-API: LcConfigFormatE → C-API: LcConfigFormatE