|
@@ -3,13 +3,13 @@
|
3
|
3
|
// cmCtx_t is used to hold application supplied cmRpt_t, cmErr_t and
|
4
|
4
|
// other global values for easy distribution throughtout a cm based application.
|
5
|
5
|
//
|
6
|
|
-// Most the cm components need at least an application supplied cmRpt_t function
|
|
6
|
+// Most the libcm components need at least an application supplied cmRpt_t function
|
7
|
7
|
// to initialize their own internal cmErr_t error class. Likewise classes which
|
8
|
8
|
// use a cmLHeapH_t based internal heap manager require application wide memory
|
9
|
9
|
// manager configuration information. The cmCtx_t packages this information and
|
10
|
10
|
// allows it to be easily distributed. The applicaton and its constituent objects
|
11
|
11
|
// then need only maintain and pass pointers to a single cmCtx_t object to have access to
|
12
|
|
-// this all the global program information.
|
|
12
|
+// all the global program information.
|
13
|
13
|
//)
|
14
|
14
|
|
15
|
15
|
#ifndef cmCtx_h
|
|
@@ -22,26 +22,26 @@ extern "C" {
|
22
|
22
|
//(
|
23
|
23
|
|
24
|
24
|
// cmCtx_t data type.
|
25
|
|
-typedef struct
|
26
|
|
-{
|
27
|
|
- cmRpt_t rpt; //< Application supplied global reporter. This reporter is also use by \ref err.
|
28
|
|
- cmErr_t err; //< Application error reporter which can be used to report errors prior to the client object being initialized to the point where it can use it's own cmErr_t.
|
29
|
|
- unsigned guardByteCnt; //< Guard byte count in use by \ref cmMallocDebug.h .
|
30
|
|
- unsigned alignByteCnt; //< Align byte count used by the \ref cmMallocDebug.h
|
31
|
|
- unsigned mmFlags; //< Initialization flags used by \ref cmMallocDebug.h.
|
32
|
|
- void* userDefPtr; //< Application defined pointer.
|
33
|
|
-} cmCtx_t;
|
|
25
|
+ typedef struct
|
|
26
|
+ {
|
|
27
|
+ cmRpt_t rpt; // Application supplied global reporter. This reporter is also use by \ref err.
|
|
28
|
+ cmErr_t err; // Application error reporter which can be used to report errors prior to the client object being initialized to the point where it can use it's own cmErr_t.
|
|
29
|
+ unsigned guardByteCnt; // Guard byte count in use by \ref cmMallocDebug.h .
|
|
30
|
+ unsigned alignByteCnt; // Align byte count used by the \ref cmMallocDebug.h
|
|
31
|
+ unsigned mmFlags; // Initialization flags used by \ref cmMallocDebug.h.
|
|
32
|
+ void* userDefPtr; // Application defined pointer.
|
|
33
|
+ } cmCtx_t;
|
34
|
34
|
|
35
|
35
|
// cmCtx_t initialization function.
|
36
|
36
|
void cmCtxSetup(
|
37
|
|
- cmCtx_t* ctx, //< The cmCtx_t to initialize.
|
38
|
|
- const cmChar_t* title, //< The cmCtx_t error label. See cmErrSetup().
|
39
|
|
- cmRptPrintFunc_t prtFunc, //< The printFunc() to assign to the cmCtx_t.rpt.
|
40
|
|
- cmRptPrintFunc_t errFunc, //< The errFunc() to assign to cmCtx_t.rpt.
|
41
|
|
- void* cbPtr, //< Callback data to use with prtFunc() and errFunc().
|
42
|
|
- unsigned guardByteCnt,//< Guard byte count used to configure \ref cmMallocDebug.h
|
43
|
|
- unsigned alignByteCnt,//< Align byte count used to configure \ref cmMallocDebug.h
|
44
|
|
- unsigned mmFlags //< Initialization flags used to configure \ref cmMallocDebug.h
|
|
37
|
+ cmCtx_t* ctx, // The cmCtx_t to initialize.
|
|
38
|
+ const cmChar_t* title, // The cmCtx_t error label. See cmErrSetup().
|
|
39
|
+ cmRptPrintFunc_t prtFunc, // The printFunc() to assign to the cmCtx_t.rpt.
|
|
40
|
+ cmRptPrintFunc_t errFunc, // The errFunc() to assign to cmCtx_t.rpt.
|
|
41
|
+ void* cbPtr, // Callback data to use with prtFunc() and errFunc().
|
|
42
|
+ unsigned guardByteCnt,// Guard byte count used to configure \ref cmMallocDebug.h
|
|
43
|
+ unsigned alignByteCnt,// Align byte count used to configure \ref cmMallocDebug.h
|
|
44
|
+ unsigned mmFlags // Initialization flags used to configure \ref cmMallocDebug.h
|
45
|
45
|
);
|
46
|
46
|
//)
|
47
|
47
|
//}
|