theConfig 10.0
Loading...
Searching...
No Matches
LcConfigC_jv.c File Reference

tag: nhi1-release-250425 More...

#include "jni_h/jvlcconfig_LcConfigC.h"
#include "LibLcConfig_private_jv.h"
+ Include dependency graph for LcConfigC_jv.c:

Go to the source code of this file.

Macros

#define META_FILE_NAME   "LcConfigC_jv.c"
 
#define ClassInit   \
 

Functions

jobject jvlcconfig_LcConfigC_ObjNew (MK_RT mkrt, JNIEnv *env, LC_CFG hdl)
 
static MK_UNUSED jobject jvlcconfig_LcConfigC_ObjCreate (MK_RT mkrt, JNIEnv *env, LC_CFG hdl)
 
static MK_PTR jvlcconfig_LcConfigC_selfCreate (MK_RT mkrt, MK_OBJ obj, MK_PTR envP)
 
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_HandleResolve (JNIEnv *env, jclass class, jint netHdl)
  Java: [static] LcConfigC LcConfigC.HandleResolve(int netHdl) C-API
Handle-Resolve-Slot - return a LcConfigC from netHdl or null if invalid…
 
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Next (JNIEnv *env, jobject self)
  Java: LcConfigC cfg.Next() C-API
get next instance from linked-list of LcConfigS type
 
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Prev (JNIEnv *env, jobject self)
  Java: LcConfigC cfg.Prev() C-API
get previous instance from linked-list of LcConfigS type
 
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Instances (JNIEnv *env, jclass class)
  Java: [static] LcConfigC LcConfigC.Instances() C-API
get head-instance from linked-list of LcConfigS type …
 
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_GetNull (JNIEnv *env, jclass class)
  Java: [static] LcConfigC LcConfigC.GetNull() C-API
Null-Slot - return a LcConfigC typed NULL instance …
 
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_ErrorType (JNIEnv *env, jobject self)
  Java: LcErrorTypeE config.ErrorType() C-API
This function, which is implemented as a macro, returns the type of error that occurred during the last call to one of the read or write functions …
 
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_GetDefaultFormat (JNIEnv *env, jobject self)
  Java: LcConfigFormatE config.GetDefaultFormat() C-API
These functions, which are implemented as macros, get and set the default external format for settings in the configuration config
 
JNIEXPORT jshort JNICALL Java_jvlcconfig_LcConfigC_GetFloatPrecision (JNIEnv *env, jobject self)
  Java: short config.GetFloatPrecision() C-API
Since v1.6 These functions get and set the number of decimal digits to output after the radix character when writing the configuration to a file or stream …
 
JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfigC_GetIncludeDir (JNIEnv *env, jobject self)
  Java: String config.GetIncludeDir() C-API
ConfigSetIncludeDir specifies the include directory, include_dir, relative to which the files specified in '@include' directives will be located for the configuration config
 
JNIEXPORT jboolean JNICALL Java_jvlcconfig_LcConfigC_GetOption (JNIEnv *env, jobject self, jobject option)
  Java: boolean config.GetOption(LcConfigOptionsEF option) C-API
Since v1.7 These functions get and set the given option of the configuration config
 
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_GetOptions (JNIEnv *env, jobject self)
  Java: LcConfigOptionsEF config.GetOptions() C-API
These functions get and set the options for the configuration config
 
JNIEXPORT jshort JNICALL Java_jvlcconfig_LcConfigC_GetTabWidth (JNIEnv *env, jobject self)
  Java: short config.GetTabWidth() C-API
These functions, which are implemented as macros, get and set the tab width for the configuration config
 
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Lookup (JNIEnv *env, jobject self, jstring path)
  Java: LcSettingC config.Lookup(String path) C-API
This function locates the setting in the configuration config specified by the path path
 
JNIEXPORT jboolean JNICALL Java_jvlcconfig_LcConfigC_LookupBool (JNIEnv *env, jobject self, jstring path)
  Java: boolean config.LookupBool(String path) C-API
These functions look up the value of the setting in the configuration config specified by the path path
 
JNIEXPORT jdouble JNICALL Java_jvlcconfig_LcConfigC_LookupFloat (JNIEnv *env, jobject self, jstring path)
  Java: double config.LookupFloat(String path) C-API
These functions look up the value of the setting in the configuration config specified by the path path
 
JNIEXPORT jint JNICALL Java_jvlcconfig_LcConfigC_LookupInt (JNIEnv *env, jobject self, jstring path)
  Java: int config.LookupInt(String path) C-API
These functions look up the value of the setting in the configuration config specified by the path path
 
JNIEXPORT jlong JNICALL Java_jvlcconfig_LcConfigC_LookupInt64 (JNIEnv *env, jobject self, jstring path)
  Java: long config.LookupInt64(String path) C-API
These functions look up the value of the setting in the configuration config specified by the path path
 
JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfigC_LookupString (JNIEnv *env, jobject self, jstring path)
  Java: String config.LookupString(String path) C-API
These functions look up the value of the setting in the configuration config specified by the path path
 
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_RootSetting (JNIEnv *env, jobject self)
  Java: LcSettingC config.RootSetting() C-API
This function, which is implemented as a macro, returns the root setting for the configuration config
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_Clear (JNIEnv *env, jobject self)
  Java: config.Clear() C-API
Since v1.7 This function clears the configuration config
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_Log (JNIEnv *env, jobject self, jobject fmtobj, jint debug, jstring callfunc, jint lvl)
  Java: cfg.Log(?MkObjectC fmtobj = null?, ?int debug = 0?, ?String callfunc = null?, ?int lvl = 0?) C-API
log the config
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_ReadFile (JNIEnv *env, jobject self, jstring filename)
  Java: config.ReadFile(String filename) C-API
This function reads and parses a configuration from the file named filename into the configuration object config
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_ReadString (JNIEnv *env, jobject self, jstring str)
  Java: config.ReadString(String str) C-API
This function reads and parses a configuration from the string str into the configuration object config
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_WriteFile (JNIEnv *env, jobject self, jstring filename)
  Java: config.WriteFile(String filename) C-API
This function writes the configuration config to the file named filename
 
JNIEXPORT jstring JNICALL Java_jvlcconfig_LcConfigC_WriteString (JNIEnv *env, jobject self)
  Java: String cfg.WriteString() C-API
read the entire configuration cfg into the string val_out
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetDefaultFormat (JNIEnv *env, jobject self, jobject format)
  Java: config.SetDefaultFormat(LcConfigFormatE format) C-API
These functions, which are implemented as macros, get and set the default external format for settings in the configuration config
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetFloatPrecision (JNIEnv *env, jobject self, jshort digits)
  Java: config.SetFloatPrecision(short digits) C-API
Since v1.6 These functions get and set the number of decimal digits to output after the radix character when writing the configuration to a file or stream …
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetIncludeDir (JNIEnv *env, jobject self, jstring include_dir)
  Java: config.SetIncludeDir(String include_dir) C-API
ConfigSetIncludeDir specifies the include directory, include_dir, relative to which the files specified in '@include' directives will be located for the configuration config
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetIncludeFunc (JNIEnv *env, jobject self, jobject fConfigIncludeData)
  Java: cfg.SetIncludeFunc(?LcConfigIncludeIF fConfigIncludeData = null?) C-API
set the __parser__(callback-name) for the include-config-file
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetOption (JNIEnv *env, jobject self, jobject option, jboolean flag)
  Java: config.SetOption(LcConfigOptionsEF option, boolean flag) C-API
Since v1.7 These functions get and set the given option of the configuration config
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetOptions (JNIEnv *env, jobject self, jobject options)
  Java: config.SetOptions(LcConfigOptionsEF options) C-API
These functions get and set the options for the configuration config
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetSettingDeleteFunc (JNIEnv *env, jobject self, jobject fSettingDeleteData)
  Java: cfg.SetSettingDeleteFunc(?LcSettingDeleteIF fSettingDeleteData = null?) C-API
set the callback-name for the setting-delete
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetTabWidth (JNIEnv *env, jobject self, jshort width)
  Java: config.SetTabWidth(short width) C-API
These functions, which are implemented as macros, get and set the tab width for the configuration config
 
JNIEXPORT jlong JNICALL Java_jvlcconfig_LcConfigC_CTOR (JNIEnv *env, jclass class)
  Java: [constructor,static] LcConfigC LcConfigC.Create() C-API
create a LcConfigC instance …
 
JNIEXPORT jobject JNICALL Java_jvlcconfig_LcConfigC_Create (JNIEnv *env, jclass class)
  Java: [constructor,static] LcConfigC LcConfigC.Create() C-API
create a LcConfigC instance …
 
void jvlcconfig_LcConfigC_Init (MK_RT mkrt)
 
JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetIncludeFunc__Ljava_C_langlass_2Ljava_lang_String_2 (JNIEnv *env, jobject self, jclass searchClass, jstring fConfigIncludeDataString)
  Java: cfg.SetIncludeFunc(?LcConfigIncludeIF fConfigIncludeData = null?) C-API
set the __parser__(callback-name) for the include-config-file
 

Detailed Description

tag: nhi1-release-250425

Definition in file LcConfigC_jv.c.

Macro Definition Documentation

◆ ClassInit

#define ClassInit   \

Definition at line 31 of file LcConfigC_jv.c.

31#define ClassInit \
32

◆ META_FILE_NAME

#define META_FILE_NAME   "LcConfigC_jv.c"

Definition at line 10 of file LcConfigC_jv.c.

Function Documentation

◆ Java_jvlcconfig_LcConfigC_SetIncludeFunc__Ljava_C_langlass_2Ljava_lang_String_2()

JNIEXPORT void JNICALL Java_jvlcconfig_LcConfigC_SetIncludeFunc__Ljava_C_langlass_2Ljava_lang_String_2 ( JNIEnv * env,
jobject self,
jclass searchClass,
jstring fConfigIncludeDataString )

Java: cfg.SetIncludeFunc(?LcConfigIncludeIF fConfigIncludeData = null?) C-API
set the __parser__(callback-name) for the include-config-file

Definition at line 606 of file LcConfigC_jv.c.

611 {
612 LC_CFG hdl = (LC_CFG)pObj2Hdl(env,"LcConfigC",self);
613 JavaErrorCheck;
614 MkRtSetup_XN(hdl);
615 jmethodID meth = (*env)->GetStaticMethodID(env,MK(Class_MkKernel),"resolveCallback",
616 "(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Class;");
617 JavaErrorCheck;
618 jclass fConfigIncludeData = (*env)->CallStaticObjectMethod(env, MK(Class_MkKernel), meth, searchClass,
619 LC(Class_LcConfigIncludeIF), fConfigIncludeDataString);
620 JavaErrorCheck;
621 LC_CBP fConfigIncludeData_ptr = MK(ProcCreate)(MK_RT_CALL_NULL env, fConfigIncludeData, NULL, NS(MID_fConfigIncludeData), true);
622 JavaErrorCheck;
623 enum MkErrorE errVal = LcConfigSetIncludeFunc(hdl, NS(ConfigIncludeCall), fConfigIncludeData_ptr, NS(ConfigIncludeFree));
624 MkErrorC_Check(hdl, errVal)
625error:
626 return;
627}
MK_PTRB * LC_CBP
struct LcConfigS * LC_CFG
class-shortcut for struct LcConfigS *, all shortcut using the XX_YYY syntax (only for public API) …
#define LcConfigSetIncludeFunc(...)
MkErrorE
#define MK_RT_CALL_NULL
#define MkRtSetup_XN(x)
Struct to represent the data from the LcConfigC …

◆ jvlcconfig_LcConfigC_Init()

void jvlcconfig_LcConfigC_Init ( MK_RT mkrt)

Definition at line 595 of file LcConfigC_jv.c.

595 {
597
598 LcConfigC_TT->selfCreate = NS(LcConfigC_selfCreate) ;
599 LcConfigC_TT->selfUnlink = MK(AtomSelfUnlink) ;
600}
#define ClassInit
__thread MK_TYP LcConfigC_TT
class as MkTypeDefS-class-type …
MkSelfUnlinkF selfUnlink
MkSelfCreateF selfCreate

◆ jvlcconfig_LcConfigC_ObjCreate()

static MK_UNUSED jobject jvlcconfig_LcConfigC_ObjCreate ( MK_RT mkrt,
JNIEnv * env,
LC_CFG hdl )
static

Definition at line 22 of file LcConfigC_jv.c.

22 {
23 return MK(AtomObjCreate)(MK_RT_CALL env, LcConfigC_X2obj(hdl));
24}
#define LcConfigC_X2obj(x)
#define MK_RT_CALL

◆ jvlcconfig_LcConfigC_ObjNew()

jobject jvlcconfig_LcConfigC_ObjNew ( MK_RT mkrt,
JNIEnv * env,
LC_CFG hdl )

Definition at line 16 of file LcConfigC_jv.c.

16 {
17 static MkThreadLocal jobject NS_NULL = NULL;
18 return (hdl ? MK(AtomObjNew)(MK_RT_CALL env, LcConfigC_X2obj(hdl)) : MK_GET__NS_NULL(LcConfigC));
19}
#define MkThreadLocal

◆ jvlcconfig_LcConfigC_selfCreate()

static MK_PTR jvlcconfig_LcConfigC_selfCreate ( MK_RT mkrt,
MK_OBJ obj,
MK_PTR envP )
static

Definition at line 26 of file LcConfigC_jv.c.

26 {
27 JNIEnv *env = (JNIEnv*) envP;
28 return (*env)->NewObject(env, NS(Class_LcConfigC), NS(MID_LcConfigC_INIT), (jlong) obj, JNI_TRUE);
29}