theConfig 10.0
Loading...
Searching...
No Matches
LcSettingC_cc.hh
Go to the documentation of this file.
1
9/* LABEL-INIT */
10
11#pragma once
12
13namespace cclcconfig {
14
17 typedef struct {
21
24 class LcSettingC : public MkObjectC {
25
26 friend class LcConfig;
27
28 static inline MK_PTR LcSettingC_selfCreateTLS (MK_OBJ obj);
29
30/* LABEL-START */
31
34
35 public:
36 static thread_local LcSettingC MK_NULL_REF;
37
38 private:
39
40 static LcSettingC* LcSettingC_GetSelf (LC_CFS hdl) {
41 return (hdl != NULL ? static_cast<LcSettingC*>((*LcSettingC_X2obj(hdl)).self) : &MK_NULL_REF);
42 }
43
44 #ifdef LcSettingC_selfCreate_overload
45 static MK_PTR LcSettingC_selfCreate (MK_RT_ARGS MK_OBJ obj, MK_PTR const env);
46 #else
47 static MK_PTR LcSettingC_selfCreate (MK_RT_ARGS MK_OBJ obj, MK_PTR const env) {
48 return new LcSettingC(obj);
49 }
50 #endif
51
52 static void LcSettingC_selfDelete (MK_RT_ARGS MK_PTR self, MK_PTR env) {
53 delete static_cast<LcSettingC*>(self);
54 }
55
56 static void LcSettingC_selfUnlink (MK_RT_ARGS MK_PTR self, MK_PTR env) {
57 LcSettingC* selfO = static_cast<LcSettingC*>(self);
58 selfO->atomUnlink();
59 }
60
61 void LcSettingC_Init (LC_CFS hdl) { atomInit(LcSettingC_X2obj(hdl)); };
62
63
64 static LcSettingC* LcSettingC_ObjCreate (MK_RT_ARGS LC_CFS hdl) {
65 return static_cast<LcSettingC*>(MkObjectC::atomObjCreate(MK_RT_CALL LcSettingC_X2obj(hdl)));
66 }
67
68#ifndef META_IS_MkObjectC
69 LcSettingC (MK_OBJ obj) : MkObjectC(obj) {};
70#endif
71
72 public:
73
74#ifndef META_IS_MkObjectC
76#endif
77
82
84 LC_CFS getCFS() const {
85 LC_CFS ret = reinterpret_cast<LC_CFS>(hdl);
86 if (unlikely(ret == NULL)) InstHdlIsNullError();
87 return ret;
88 };
89
92 return reinterpret_cast<LC_CFS>(hdl);
93 };
94
96 LC_CFSN getCFSN() const {
97 LC_CFSN ret = reinterpret_cast<LC_CFSN>(hdl);
98 if (unlikely(ret == NULL)) InstHdlIsNullError();
99 return ret;
100 };
101
104 return reinterpret_cast<LC_CFSN>(hdl);
105 };
106
108 static LC_CFS getCFS(LcSettingC* clsHdl) {
109 LC_CFS ret = clsHdl ? reinterpret_cast<LC_CFS>(clsHdl->hdl) : NULL;
110 if (unlikely(ret == NULL)) ClassHdlIsNullError(LcSettingC);
111 return ret;
112 };
113
116 return clsHdl ? reinterpret_cast<LC_CFS>(clsHdl->hdl) : NULL;
117 };
118
120 static LC_CFSN getCFSN(const LcSettingC* clsHdl) {
121 LC_CFSN ret = clsHdl ? reinterpret_cast<LC_CFSN>(clsHdl->hdl) : NULL;
122 if (unlikely(ret == NULL)) ClassHdlIsNullError(LcSettingC);
123 return ret;
124 };
125
127 static LC_CFSN getCFSN__null_allow(const LcSettingC* clsHdl) {
128 return clsHdl ? reinterpret_cast<LC_CFSN>(clsHdl->hdl) : NULL;
129 };
130
132 static LC_CFS getCFS(const LcSettingC& clsHdl) {
133 return clsHdl.getCFS();
134 };
135
137 static LC_CFS getCFS__null_allow(const LcSettingC& clsHdl) {
138 return clsHdl.getCFS__null_allow();
139 };
140
142 static LC_CFSN getCFSN(const LcSettingC& clsHdl) {
143 return clsHdl.getCFSN();
144 };
145
147 static LC_CFSN getCFSN__null_allow(const LcSettingC& clsHdl) {
148 return clsHdl.getCFSN__null_allow();
149 };
150
152 bool Check() const {
153 return (hdl && LcCfsCheck(hdl));
154 };
155
156/* LABEL-END */
157
158 public:
159
160/* NO copy constructor
161 inline LcSettingC (const LcSettingC* hdl);
162 inline LcSettingC (const LcSettingC& ref);
163 inline LcSettingC& operator= (const LcSettingC& buf);
164 inline LcSettingC& operator= (const LcSettingC* buf);
165*/
166
167 // BEGIN-LcSettingC - created by 'cc_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
168
172
173 public:
174
175 // doc-key: LcSettingC,LcSettingC-Class-Export,sc_,public
176
178 static LcSettingC* HandleResolve (MK_HDL netHdl);
179
180 // doc-key: LcSettingC,LcSettingC-Class-Export,om_,public
181
182 // skip class-overload: MK_HDL HandleGet ()
183
185 // LcSettingC_Class_CC_API
186
190
191 public:
192
193 // doc-key: LcSettingC,LcSettingC-Class-Introspection,oc_,public
194
196 LcSettingC* Next ();
197
199 LcSettingC* Prev ();
200
201 // doc-key: LcSettingC,LcSettingC-Class-Introspection,sc_,public
202
204 static LcSettingC* Instances ();
205
207 // LcSettingC_Class_CC_API
208
212
213 public:
214
215 // doc-key: LcSettingC,LcSettingC-Class-Misc,sc_,public
216
218 static LcSettingC* GetNull ();
219
221 // LcSettingC_Class_CC_API
222
226
227 public:
228
229 // doc-key: LcSettingC,LcSettingC-Get,oc_,public
230
232 LcSettingC* GetElem (MK_I32 idx) const;
233
235 LcSettingC* GetMember (MK_STRN name) const;
236
238 LcSettingC* GetMember (const std::string& name) const;
239
240 // doc-key: LcSettingC,LcSettingC-Get,om_,public
241
243 MK_BOOL GetBool () const;
244
246 MK_BOOL GetBoolElem (MK_I32 idx) const;
247
249 MK_DBL GetFloat () const;
250
252 MK_DBL GetFloatElem (MK_I32 idx) const;
253
255 LcConfigFormatE GetFormat () const;
256
258 MK_I32 GetInt () const;
259
261 MK_I64 GetInt64 () const;
262
264 MK_I64 GetInt64Elem (MK_I32 idx) const;
265
267 MK_I32 GetIntElem (MK_I32 idx) const;
268
270 MK_STRN GetString () const;
271
273 MK_STRN GetStringElem (MK_I32 idx) const;
274
276 // LcSettingC_Get_CC_API
277
281
282 public:
283
284 // doc-key: LcSettingC,LcSettingC-Is,om_,public
285
287 MK_BOOL IsAggregate () const;
288
290 MK_BOOL IsArray () const;
291
293 MK_BOOL IsGroup () const;
294
296 MK_BOOL IsList () const;
297
299 MK_BOOL IsNumber () const;
300
302 MK_BOOL IsRoot () const;
303
305 MK_BOOL IsScalar () const;
306
308 // LcSettingC_Is_CC_API
309
313
314 public:
315
316 // doc-key: LcSettingC,LcSettingC-Lookup,oc_,public
317
319 LcSettingC* Lookup (MK_STRN path);
320
322 LcSettingC* Lookup (const std::string& path);
323
325 MkBufferListC* LookupAll () const;
326
327 // doc-key: LcSettingC,LcSettingC-Lookup,omo,public
328
330 MK_BOOL LookupBool (MK_STRN name) const;
331
333 MK_BOOL LookupBool (const std::string& name) const;
334
336 MK_DBL LookupFloat (MK_STRN name) const;
337
339 MK_DBL LookupFloat (const std::string& name) const;
340
342 MK_I32 LookupInt (MK_STRN name) const;
343
345 MK_I32 LookupInt (const std::string& name) const;
346
348 MK_I64 LookupInt64 (MK_STRN name) const;
349
351 MK_I64 LookupInt64 (const std::string& name) const;
352
354 MK_STRN LookupString (MK_STRN name) const;
355
357 MK_STRN LookupString (const std::string& name) const;
358
360 // LcSettingC_Lookup_CC_API
361
365
366 public:
367
368 // doc-key: LcSettingC,LcSettingC-Misc,oc_,public
369
372
374 LcSettingC* AddIfNotExists (const std::string& name, LcConfigTypeE cfgtype);
375
377 LcSettingC* Parent () const;
378
379 // doc-key: LcSettingC,LcSettingC-Misc,om_,public
380
382 MK_BOOL Exists (MK_STRN name);
383
385 MK_BOOL Exists (const std::string& name);
386
388 MK_I32 Index () const;
389
391 MK_I32 Length () const;
392
393 // skip class-overload: void Log (const MkObjectC* fmtobj = NULL, MK_DBG debug = 0, MK_STRN callfunc = __builtin_FUNCTION(), MK_I32 lvl = 0) const
394
395 // skip class-overload: void Log (const MkObjectC& fmtobj, MK_DBG debug = 0, MK_STRN callfunc = __builtin_FUNCTION(), MK_I32 lvl = 0) const
396
398 MK_STRN Name () const;
399
401 void Remove (MK_STRN name);
402
404 void Remove (const std::string& name);
405
407 void RemoveElem (MK_I32 idx);
408
410 MK_STRN SourceFile () const;
411
413 MK_I32 SourceLine () const;
414
416 LcConfigTypeE Type () const;
417
419 // LcSettingC_Misc_CC_API
420
424
425 public:
426
427 // doc-key: LcSettingC,LcSettingC-Set,oc_,public
428
430 LcSettingC* SetBoolElem (MK_I32 idx, MK_I32 value);
431
433 LcSettingC* SetFloatElem (MK_I32 idx, MK_DBL value);
434
436 LcSettingC* SetInt64Elem (MK_I32 idx, MK_I64 value);
437
439 LcSettingC* SetIntElem (MK_I32 idx, MK_I32 value);
440
443
445 LcSettingC* SetStringElem (MK_I32 idx, const std::string& value);
446
447 // doc-key: LcSettingC,LcSettingC-Set,om_,public
448
450 void SetBool (MK_BOOL value);
451
453 void SetFloat (MK_DBL value);
454
456 void SetFormat (LcConfigFormatE format);
457
459 void SetInt (MK_I32 value);
460
462 void SetInt64 (MK_I64 value);
463
465 void SetString (MK_STRN value);
466
468 void SetString (const std::string& value);
469
471 // LcSettingC_Set_CC_API
472
476
477 public:
478
479 // doc-key: LcSettingC,LcSettingC-TOR,oC_,public
480
482 LcSettingC* Add (MK_STRN name, LcConfigTypeE __type);
483
485 LcSettingC* Add (const std::string& name, LcConfigTypeE __type);
486
487 // doc-key: LcSettingC,LcSettingC-TOR,oc_,public
488
490 LcConfigC* GetConfig () const;
491
493 // LcSettingC_TOR_CC_API
494
495 // END-LcSettingC - created by 'cc_MqS.tcl -i NHI1_HOME/theConfig/c/gen/c_lcconfig.meta' - DO NOT change
496
498
499 }; // class LcSettingC
500} // namespace cclcconfig
Struct to represent the data from the LcConfigC … → C-API: liblcconfig::LcConfigS
LcConfig PACKAGE - the package is the toplevel structure of the cclcconfig …
Struct to represent the data from the LcSettingC … → C-API: liblcconfig::LcSettingS
LcConfigFormatE
set the format of a LcSettingC …
Definition LcEnum_lc.h:30
LcConfigTypeE
define the data-type of a LcSettingC …
Definition LcEnum_lc.h:78
LC_CFS getCFS() const
return the LibMsgqueObject from current LcSettingC instance
LC_CFSN getCFSN() const
(const) return the LibMsgqueObject from current LcSettingC instance
static LC_CFSN getCFSN__null_allow(const LcSettingC &clsHdl)
(const) return LibMsgqueObject from current LcSettingC reference
static LC_CFS getCFS(LcSettingC *clsHdl)
return LibMsgqueObject from current LcSettingC pointer
static LcSettingC * LcSettingC_ObjNew(MK_RT_ARGS LC_CFS hdl)
return LcSettingC from LibMsgqueObject
static LC_CFS getCFS(const LcSettingC &clsHdl)
return LibMsgqueObject from current LcSettingC reference
static LC_CFSN getCFSN(const LcSettingC &clsHdl)
(const) return LibMsgqueObject from current LcSettingC reference
static LC_CFS getCFS__null_allow(const LcSettingC &clsHdl)
return LibMsgqueObject from current LcSettingC reference
LC_CFSN getCFSN__null_allow() const
(const) return the LibMsgqueObject from current LcSettingC instance
bool Check() const
check if pointer is still valid
LC_CFS getCFS__null_allow() const
return the LibMsgqueObject from current LcSettingC instance
static LC_CFSN getCFSN__null_allow(const LcSettingC *clsHdl)
(const) return LibMsgqueObject from current LcSettingC pointer
static thread_local LcSettingC MK_NULL_REF
static LC_CFS getCFS__null_allow(LcSettingC *clsHdl)
return LibMsgqueObject from current LcSettingC pointer
static LC_CFSN getCFSN(const LcSettingC *clsHdl)
(const) return LibMsgqueObject from current LcSettingC pointer
static LcSettingC * GetNull()
C++: [static] LcSettingC* LcSettingC::GetNull() → C-API Null-Slot - return a LcSettingC typed NU...
LcSettingC * Prev()
C++: LcSettingC* cfs.Prev() → C-API get previous instance from linked-list of LcSettingS type
LcSettingC * Next()
C++: LcSettingC* cfs.Next() → C-API get next instance from linked-list of LcSettingS type
static LcSettingC * HandleResolve(MK_HDL netHdl)
C++: [static] LcSettingC* LcSettingC::HandleResolve(MK_HDL netHdl) → C-API Handle-Resolve-Slot -...
static LcSettingC * Instances()
C++: [static] LcSettingC* LcSettingC::Instances() → C-API get head-instance from linked-list of ...
struct LcSettingS * LC_CFS
class-shortcut for struct LcSettingS *, all shortcut using the XX_YYY syntax (only for public API) …
static bool LcCfsCheck(MK_MNGN mng)
check LcSettingS -> libmkkernel::MkObjectS::signature …
#define LcSettingC_X2obj(x)
MK_I64 GetInt64() const
C++: MK_I64 setting.GetInt64() → C-API These functions return the value of the given setting …
LcSettingC * GetElem(MK_I32 idx) const
C++: LcSettingC* setting.GetElem(MK_I32 idx) → C-API This function fetches the element at the g...
MK_STRN GetString() const
C++: MK_STRN setting.GetString() → C-API These functions return the value of the given setting ...
MK_I32 GetIntElem(MK_I32 idx) const
C++: MK_I32 setting.GetIntElem(MK_I32 idx) → C-API These functions return the value at the spec...
MK_STRN GetStringElem(MK_I32 idx) const
C++: MK_STRN setting.GetStringElem(MK_I32 idx) → C-API These functions return the value at the ...
LcSettingC * GetMember(MK_STRN name) const
C++: LcSettingC* setting.GetMember(MK_STRN name) → C-API This function fetches the child settin...
MK_I64 GetInt64Elem(MK_I32 idx) const
C++: MK_I64 setting.GetInt64Elem(MK_I32 idx) → C-API These functions return the value at the sp...
MK_DBL GetFloat() const
C++: MK_DBL setting.GetFloat() → C-API These functions return the value of the given setting …
MK_BOOL GetBoolElem(MK_I32 idx) const
C++: MK_BOOL setting.GetBoolElem(MK_I32 idx) → C-API These functions return the value at the sp...
MK_DBL GetFloatElem(MK_I32 idx) const
C++: MK_DBL setting.GetFloatElem(MK_I32 idx) → C-API These functions return the value at the sp...
MK_I32 GetInt() const
C++: MK_I32 setting.GetInt() → C-API These functions return the value of the given setting …
MK_BOOL GetBool() const
C++: MK_BOOL setting.GetBool() → C-API These functions return the value of the given setting …
LcConfigFormatE GetFormat() const
C++: LcConfigFormatE setting.GetFormat() → C-API These functions get and set the external forma...
MK_BOOL IsNumber() const
C++: MK_BOOL setting.IsNumber() → C-API These convenience functions, some of which are implemen...
MK_BOOL IsArray() const
C++: MK_BOOL setting.IsArray() → C-API These convenience functions, which are implemented as ma...
MK_BOOL IsAggregate() const
C++: MK_BOOL setting.IsAggregate() → C-API These convenience functions, some of which are imple...
MK_BOOL IsList() const
C++: MK_BOOL setting.IsList() → C-API These convenience functions, which are implemented as mac...
MK_BOOL IsGroup() const
C++: MK_BOOL setting.IsGroup() → C-API These convenience functions, which are implemented as ma...
MK_BOOL IsRoot() const
C++: MK_BOOL setting.IsRoot() → C-API This function returns CONFIG_TRUE if the given setting is...
MK_BOOL IsScalar() const
C++: MK_BOOL setting.IsScalar() → C-API These convenience functions, some of which are implemen...
MK_BOOL LookupBool(MK_STRN name) const
C++: MK_BOOL setting.LookupBool(MK_STRN name) → C-API These functions look up the value of the ...
LcSettingC * Lookup(MK_STRN path)
C++: LcSettingC* setting.Lookup(MK_STRN path) → C-API This function locates a setting by a path...
MK_DBL LookupFloat(MK_STRN name) const
C++: MK_DBL setting.LookupFloat(MK_STRN name) → C-API These functions look up the value of the ...
MK_I32 LookupInt(MK_STRN name) const
C++: MK_I32 setting.LookupInt(MK_STRN name) → C-API These functions look up the value of the ch...
MkBufferListC * LookupAll() const
C++: MkBufferListC* setting.LookupAll() → C-API addon - read an entire configuration below sett...
MK_STRN LookupString(MK_STRN name) const
C++: MK_STRN setting.LookupString(MK_STRN name) → C-API These functions look up the value of th...
MK_I64 LookupInt64(MK_STRN name) const
C++: MK_I64 setting.LookupInt64(MK_STRN name) → C-API These functions look up the value of the ...
MK_I32 Length() const
C++: MK_I32 setting.Length() → C-API This function returns the number of settings in a group,...
MK_STRN SourceFile() const
C++: MK_STRN setting.SourceFile() → C-API This function returns the name of the file from which...
void RemoveElem(MK_I32 idx)
C++: parent.RemoveElem(MK_I32 idx) → C-API This function removes the child setting at the given...
void Remove(MK_STRN name)
C++: parent.Remove(MK_STRN name) → C-API This function removes and destroys the setting named n...
LcConfigTypeE Type() const
C++: LcConfigTypeE setting.Type() → C-API This function returns the type of the given setting …
MK_I32 SourceLine() const
C++: MK_I32 setting.SourceLine() → C-API This function returns the line number of the configura...
MK_I32 Index() const
C++: MK_I32 setting.Index() → C-API This function returns the index of the given setting within...
MK_STRN Name() const
C++: MK_STRN setting.Name() → C-API This function returns the name of the given setting,...
LcSettingC * Parent() const
C++: LcSettingC* setting.Parent() → C-API This function returns the parent setting of the given...
LcSettingC * AddIfNotExists(MK_STRN name, LcConfigTypeE cfgtype)
C++: LcSettingC* setting.AddIfNotExists(MK_STRN name, LcConfigTypeE cfgtype) → C-API addon - ad...
MK_BOOL Exists(MK_STRN name)
C++: MK_BOOL setting.Exists(MK_STRN name) → C-API addon - return true if name exists in the set...
void SetFormat(LcConfigFormatE format)
C++: setting.SetFormat(LcConfigFormatE format) → C-API These functions get and set the external...
LcSettingC * SetStringElem(MK_I32 idx, MK_STRN value)
C++: LcSettingC* setting.SetStringElem(MK_I32 idx, MK_STRN value) → C-API These functions set t...
void SetFloat(MK_DBL value)
C++: setting.SetFloat(MK_DBL value) → C-API These functions set the value of the given setting ...
LcSettingC * SetFloatElem(MK_I32 idx, MK_DBL value)
C++: LcSettingC* setting.SetFloatElem(MK_I32 idx, MK_DBL value) → C-API These functions set the...
void SetBool(MK_BOOL value)
C++: setting.SetBool(MK_BOOL value) → C-API These functions set the value of the given setting ...
void SetString(MK_STRN value)
C++: setting.SetString(MK_STRN value) → C-API These functions set the value of the given settin...
void SetInt(MK_I32 value)
C++: setting.SetInt(MK_I32 value) → C-API These functions set the value of the given setting to...
LcSettingC * SetInt64Elem(MK_I32 idx, MK_I64 value)
C++: LcSettingC* setting.SetInt64Elem(MK_I32 idx, MK_I64 value) → C-API These functions set the...
LcSettingC * SetIntElem(MK_I32 idx, MK_I32 value)
C++: LcSettingC* setting.SetIntElem(MK_I32 idx, MK_I32 value) → C-API These functions set the v...
LcSettingC * SetBoolElem(MK_I32 idx, MK_I32 value)
C++: LcSettingC* setting.SetBoolElem(MK_I32 idx, MK_I32 value) → C-API These functions set the ...
void SetInt64(MK_I64 value)
C++: setting.SetInt64(MK_I64 value) → C-API These functions set the value of the given setting ...
LcConfigC * GetConfig() const
C++: LcConfigC* setting.GetConfig() → C-API addon - return the LcConfigC from the LcSettingC …
LcSettingC * Add(MK_STRN name, LcConfigTypeE __type)
C++: [constructor] LcSettingC* parent.Add(MK_STRN name, LcConfigTypeE __type) → C-API This funct...
#define unlikely(x)
double MK_DBL
signed long long MK_I64
int32_t MK_HDL
int32_t MK_NUM
signed int MK_I32
MK_PTRB * MK_PTR
const MK_STRB * MK_STRN
static MK_PTR atomObjCreate(MK_RT_ARGS MK_OBJ obj)
void atomInit(MK_OBJ obj)
static MK_PTR atomObjNew(MK_RT_ARGS MK_OBJ obj)
struct MkObjectS * MK_OBJ
#define MK_RT_CALL
#define MK_RT_ARGS
namespace for the CcLcConfig "C++"-API
Definition LcCall_cc.cc:21
Struct to represent the data from the LcSettingC … → C-API: liblcconfig::LcSettingS
Struct to represent the data from the LcSettingC …