theConfig 10.0
Loading...
Searching...
No Matches
LcConfigC_Misc_CS_API

LcConfigC - various functions to perform misc operations … More...

+ Collaboration diagram for LcConfigC_Misc_CS_API:

Functions

LcSettingC cslcconfig.LcConfigC.RootSetting ()
  C#: LcSettingC config.RootSetting() C-API
This function, which is implemented as a macro, returns the root setting for the configuration config
 
void cslcconfig.LcConfigC.Clear ()
  C#: config.Clear() C-API
Since v1.7 This function clears the configuration config
 
new void cslcconfig.LcConfigC.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, int lvl = 0) C-API
log the config
 
void cslcconfig.LcConfigC.ReadFile (string filename)
  C#: config.ReadFile(string filename) C-API
This function reads and parses a configuration from the file named filename into the configuration object config
 
void cslcconfig.LcConfigC.ReadString (string str)
  C#: config.ReadString(string str) C-API
This function reads and parses a configuration from the string str into the configuration object config
 
void cslcconfig.LcConfigC.WriteFile (string filename)
  C#: config.WriteFile(string filename) C-API
This function writes the configuration config to the file named filename
 
string cslcconfig.LcConfigC.WriteString ()
  C#: string cfg.WriteString() C-API
read the entire configuration cfg into the string val_out
 

Detailed Description

LcConfigC - various functions to perform misc operations …

Function Documentation

◆ Clear()

void cslcconfig.LcConfigC.Clear ( )
inline

C#: config.Clear() C-API
Since v1.7 This function clears the configuration config

Definition at line 303 of file LcConfigC.cs.

303 {
304 Lc.LcConfigClear(hdl);
305 }

◆ Log()

new void cslcconfig.LcConfigC.Log ( MkObjectC fmtobj = null,
int debug = 0,
[CallerMemberName] string callfunc = null,
int lvl = 0 )
inline

C#: cfg.Log(MkObjectC fmtobj = null, int debug = 0, [CallerMemberName]string callfunc = null, int lvl = 0) C-API
log the config

Definition at line 308 of file LcConfigC.cs.

308 {
309 IntPtr fmtobj_hdl = MkObjectC.getOBJ_null_allow(fmtobj);
310 if (debug > (int)(MkRuntimeC.DebugGet())) {return;}
311 IntPtr callfunc_cstr = Marshal.StringToHGlobalAnsi(callfunc);
312 Lc.LcConfigLog(mkrt, hdl, fmtobj_hdl, debug, callfunc_cstr, lvl);
313 Marshal.FreeHGlobal(callfunc_cstr);
314 }
static IntPtr getOBJ_null_allow(MkObjectC obj)

◆ ReadFile()

void cslcconfig.LcConfigC.ReadFile ( string filename)
inline

C#: config.ReadFile(string filename) C-API
This function reads and parses a configuration from the file named filename into the configuration object config

Definition at line 317 of file LcConfigC.cs.

317 {
318 IntPtr filename_cstr = Marshal.StringToHGlobalAnsi(filename);
319 MkErrorE errVal = Lc.LcConfigReadFile(hdl, filename_cstr);
320 Marshal.FreeHGlobal(filename_cstr);
321 MkErrorC.Check(hdl, errVal);
322 }
static void Check(IntPtr ctx, MkErrorE err)
MkErrorE

◆ ReadString()

void cslcconfig.LcConfigC.ReadString ( string str)
inline

C#: config.ReadString(string str) C-API
This function reads and parses a configuration from the string str into the configuration object config

Definition at line 325 of file LcConfigC.cs.

325 {
326 IntPtr str_cstr = Marshal.StringToHGlobalAnsi(str);
327 MkErrorE errVal = Lc.LcConfigReadString(hdl, str_cstr);
328 Marshal.FreeHGlobal(str_cstr);
329 MkErrorC.Check(hdl, errVal);
330 }

◆ RootSetting()

LcSettingC cslcconfig.LcConfigC.RootSetting ( )
inline

C#: LcSettingC config.RootSetting() C-API
This function, which is implemented as a macro, returns the root setting for the configuration config

Definition at line 295 of file LcConfigC.cs.

295 {
296 IntPtr __retVal__L = Lc.LcConfigRootSetting(hdl);
297 return LcSettingC.LcSettingC_ObjNew(__retVal__L);
298 }

◆ WriteFile()

void cslcconfig.LcConfigC.WriteFile ( string filename)
inline

C#: config.WriteFile(string filename) C-API
This function writes the configuration config to the file named filename

Definition at line 333 of file LcConfigC.cs.

333 {
334 IntPtr filename_cstr = Marshal.StringToHGlobalAnsi(filename);
335 MkErrorE errVal = Lc.LcConfigWriteFile(hdl, filename_cstr);
336 Marshal.FreeHGlobal(filename_cstr);
337 MkErrorC.Check(hdl, errVal);
338 }

◆ WriteString()

string cslcconfig.LcConfigC.WriteString ( )
inline

C#: string cfg.WriteString() C-API
read the entire configuration cfg into the string val_out

Definition at line 343 of file LcConfigC.cs.

343 {
344 IntPtr val_out;
345 MkErrorE errVal = Lc.LcConfigWriteString(mkrt, hdl, out val_out);
346 MkErrorC.Check(hdl, errVal);
347 return Marshal.PtrToStringAnsi(val_out);
348 }