theLink 10.0
Loading...
Searching...
No Matches
MqDumpC.cs
Go to the documentation of this file.
1
9/* LABEL-INIT */
10
11using csmkkernel;
12//using Mk = csmkkernel.MkKernel;
13
14/* LABEL-START */
15
16using System;
17using System.Reflection;
18using System.Runtime.InteropServices;
19using System.Runtime.CompilerServices;
20using System.Collections.Generic;
21using System.Threading;
22
23namespace csmqmsgque {
24
28#if META_IS_OBJECT
29 public partial class MqDumpC
30#else
31 public partial class MqDumpC : MkObjectC
32#endif
33 {
34 private readonly static ConstructorInfo ctor = getCtor(typeof(MqDumpC));
35 private readonly static ThreadLocal<MqDumpC> MK_NULL = new ThreadLocal<MqDumpC>(() => {
36 return (MqDumpC) atomSelfNull(ctor);
37 });
38
39 public static MqDumpC MqDumpC_ObjNew (IntPtr hdl) {
40 return hdl != IntPtr.Zero ? (MqDumpC) atomObjNew(typeof(MqDumpC), ctor, hdl) : MK_NULL.Value;
41 }
42
43 private static MqDumpC MqDumpC_ObjCreate (IntPtr hdl) {
44 return hdl != IntPtr.Zero ? (MqDumpC) atomObjCreate(typeof(MqDumpC), ctor, hdl) : MK_NULL.Value;
45 }
46
47 private static IntPtr MqDumpC_SelfCreate (IntPtr mkrt, IntPtr obj, IntPtr env) {
48 return atomSelfCreate(ctor, obj, env);
49 }
50
51 private static void MqDumpC_SelfUnlink (IntPtr mkrt, IntPtr self, IntPtr env) {
52 atomSelfUnlink(self, env);
53 }
54
55 internal static void SetupThreadDMP (IntPtr mkrt) {
56 Mq.MqCsTypeUpdate(mkrt, MqCsTypeLookupE.DMP, MqDumpC_SelfCreate, MqDumpC_SelfUnlink);
57 }
58
59 #if !META_STATIC_OVERWRITE
60
61 static MqDumpC() {
62 // M0("MqDumpC");
63 MqMsgque.Setup();
64 SetupThreadDMP(IntPtr.Zero);
65 }
66
67 #endif
68/* LABEL-END */
69
70 internal MqDumpC (IntPtr dumpP) : base(dumpP) {
71 }
72
73 } // END - class "MqDumpC"
74
75 // BEGIN-MqDumpC - created by 'cs_MqC.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
76
77 public partial class MqDumpC {
78
82
83 // doc-key: MqDumpC,MqDumpC-Class-Export,sc_
84
86 new public static MqDumpC HandleResolve (Int32 netHdl) {
87 IntPtr __retVal__L = Mq.MqDumpHandleResolve(IntPtr.Zero, netHdl);
88 return MqDumpC.MqDumpC_ObjNew(__retVal__L);
89 }
90
91 // doc-key: MqDumpC,MqDumpC-Class-Export,om_
92
93 // skip class-overload: HandleGet = MqDumpHandleGet → MkObjectHandleGet
94
96 // MqDumpC_Class_CS_API
97 }
98
99 public partial class MqDumpC {
100
104
105 // doc-key: MqDumpC,MqDumpC-Class-Introspection,oc_
106
108 new public MqDumpC Next () {
109 IntPtr __retVal__L = Mq.MqDumpNext(hdl);
110 return MqDumpC.MqDumpC_ObjNew(__retVal__L);
111 }
112
114 new public MqDumpC Prev () {
115 IntPtr __retVal__L = Mq.MqDumpPrev(hdl);
116 return MqDumpC.MqDumpC_ObjNew(__retVal__L);
117 }
118
119 // doc-key: MqDumpC,MqDumpC-Class-Introspection,sc_
120
122 new public static MqDumpC Instances () {
123 IntPtr __retVal__L = Mq.MqDumpInstances(IntPtr.Zero);
124 return MqDumpC.MqDumpC_ObjNew(__retVal__L);
125 }
126
128 // MqDumpC_Class_CS_API
129 }
130
131 public partial class MqDumpC {
132
136
137 // doc-key: MqDumpC,MqDumpC-Class-Misc,sc_
138
140 new public static MqDumpC GetNull () {
141 IntPtr __retVal__L = Mq.MqDumpGetNull();
142 return MqDumpC.MqDumpC_ObjNew(__retVal__L);
143 }
144
146 // MqDumpC_Class_CS_API
147 }
148
149 public partial class MqDumpC {
150
154
155 // doc-key: MqDumpC,MqDumpC-Misc,om_
156
157 // skip class-overload: Log = MqDumpLog → MkObjectLog
158
160 public long SizeGet () {
161 long __retVal__L = Mq.MqDumpSizeGet(hdl);
162 return __retVal__L;
163 }
164
166 public string TokenGet () {
167 IntPtr __retVal__L = Mq.MqDumpTokenGet(hdl);
168 return Marshal.PtrToStringAnsi(__retVal__L);
169 }
170
172 // MqDumpC_Misc_CS_API
173 }
174
175 public partial class MqDumpC {
176
180
181 // doc-key: MqDumpC,MqDumpC-TOR,sCi
182
184 protected static IntPtr CTOR (MqContextC ctx, MqDumpC dumpP_inout = null) {
185 IntPtr ctx_hdl = MqContextC.getOBJ("MqContextC",ctx);
186 IntPtr dumpP_inout_hdl = MqDumpC.getOBJ_null_allow(dumpP_inout);
187 MkErrorE errVal = Mq.MqDumpExport(IntPtr.Zero, ctx_hdl, ref dumpP_inout_hdl);
188 if (errVal > MkErrorE.CONTINUE) MkErrorC.Check(errVal);
189 return (IntPtr)dumpP_inout_hdl;
190 }
191
193 public static MqDumpC Error (MqContextC error, MqDumpC dumpP_inout = null) {
194 IntPtr error_hdl = MqContextC.getOBJ("MqContextC",error);
195 IntPtr dumpP_inout_hdl = MqDumpC.getOBJ_null_allow(dumpP_inout);
196 MkErrorE errVal = Mq.MqDumpError(IntPtr.Zero, error_hdl, ref dumpP_inout_hdl);
197 if (errVal > MkErrorE.CONTINUE) MkErrorC.Check(errVal);
198 return MqDumpC.MqDumpC_ObjCreate(dumpP_inout_hdl);
199 }
200
202 public MqDumpC(MqContextC ctx, MqDumpC dumpP_inout = null) : this(CTOR(ctx, dumpP_inout)) {}
203
205 public static MqDumpC Export (MqContextC ctx, MqDumpC dumpP_inout = null) {
206 IntPtr ctx_hdl = MqContextC.getOBJ("MqContextC",ctx);
207 IntPtr dumpP_inout_hdl = MqDumpC.getOBJ_null_allow(dumpP_inout);
208 MkErrorE errVal = Mq.MqDumpExport(IntPtr.Zero, ctx_hdl, ref dumpP_inout_hdl);
209 if (errVal > MkErrorE.CONTINUE) MkErrorC.Check(errVal);
210 return MqDumpC.MqDumpC_ObjCreate(dumpP_inout_hdl);
211 }
212
213 // doc-key: MqDumpC,MqDumpC-TOR,sCo
214
216 public static MqDumpC BinSet (byte[] data) {
217 IntPtr dmp_out;
218 var data_size = Marshal.SizeOf(data[0]) * data.Length;
219 var data_data = Marshal.AllocHGlobal(data_size);
220 Marshal.Copy(data,0,data_data,data_size);
221 Mk.MkBinaryR data_ref = Mk.MkBinaryCreate(data_size,data_data);
222 MkErrorE errVal = Mq.MqDumpBinSet(IntPtr.Zero, data_ref, out dmp_out);
223 if (errVal > MkErrorE.CONTINUE) MkErrorC.Check(errVal);
224 return MqDumpC.MqDumpC_ObjCreate(dmp_out);
225 }
226
227 // doc-key: MqDumpC,MqDumpC-TOR,om_
228
230 public byte[] BinGet () {
231 Mk.MkBinaryR __retVal__L = Mq.MqDumpBinGet(hdl);
232 int __retVal__L_size = (int) __retVal__L.size;
233 byte[] ____retVal__L__S = new byte[__retVal__L_size];
234 Marshal.Copy(__retVal__L.data,____retVal__L__S,0,(int)__retVal__L_size);
235 return ____retVal__L__S;
236 }
237
239 public void Import (MqContextC ctx) {
240 IntPtr ctx_hdl = MqContextC.getOBJ("MqContextC",ctx);
241 MkErrorE errVal = Mq.MqDumpImport(mkrt, hdl, ctx_hdl);
242 MkErrorC.Check(hdl, errVal);
243 }
244
246 // MqDumpC_TOR_CS_API
247 }
248
249 // END-MqDumpC - created by 'cs_MqC.tcl -i NHI1_HOME/theLink/c/gen/c_mqmsgque.meta' - DO NOT change
250
251} // END - namespace "csmqmsgque"
csmqmsgque.MqMsgque Mq
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 IntPtr getOBJ(string cls, MkObjectC obj)
static ConstructorInfo getCtor(Type type)
static IntPtr atomSelfCreate(ConstructorInfo ctor, IntPtr obj, IntPtr env)
static Mk.MkBinaryR MkBinaryCreate(long size, IntPtr data)
MqContextC - the class known as ctx or context is the application-handle of the application-server an...
Definition MqHigh.cs:22
MqDumpC - the class known as dmp or dump is used to export a csmqmsgque data package as binary …
Definition MqDumpC.cs:175
static MqDumpC MqDumpC_ObjNew(IntPtr hdl)
Definition MqDumpC.cs:39
#define MK_NULL
MkErrorE
new MqDumpC Prev()
C#: MqDumpC dmp.Prev() → C-API get previous instance from linked-list of MqDumpS type
Definition MqDumpC.cs:114
new static MqDumpC GetNull()
C#: [static] MqDumpC MqDumpC.GetNull() → C-API Null-Slot - return a MqDumpC typed NULL instance ...
Definition MqDumpC.cs:140
new static MqDumpC Instances()
C#: [static] MqDumpC MqDumpC.Instances() → C-API get head-instance from linked-list of MqDumpS t...
Definition MqDumpC.cs:122
new static MqDumpC HandleResolve(Int32 netHdl)
C#: [static] MqDumpC MqDumpC.HandleResolve(Int32 netHdl) → C-API Handle-Resolve-Slot - return a ...
Definition MqDumpC.cs:86
new MqDumpC Next()
C#: MqDumpC dmp.Next() → C-API get next instance from linked-list of MqDumpS type
Definition MqDumpC.cs:108
long SizeGet()
C#: long dump.SizeGet() → C-API report the binary data size from an MqDumpS object
Definition MqDumpC.cs:160
string TokenGet()
C#: string dump.TokenGet() → C-API return the MqContextC_ServiceApi_Identifer …
Definition MqDumpC.cs:166
byte[] BinGet()
C#: byte[] dump.BinGet() → C-API export the binary data from an MqDumpS object
Definition MqDumpC.cs:230
static MqDumpC Export(MqContextC ctx, MqDumpC dumpP_inout=null)
C#: [constructor,static] MqDumpC MqDumpC.Export(MqContextC ctx, MqDumpC dumpP_inout = null) → C-API ...
Definition MqDumpC.cs:205
void Import(MqContextC ctx)
C#: dump.Import(MqContextC ctx) → C-API import the dump-package into the ctx-read-data-package ...
Definition MqDumpC.cs:239
static MqDumpC Error(MqContextC error, MqDumpC dumpP_inout=null)
C#: [constructor,static] MqDumpC MqDumpC.Error(MqContextC error, MqDumpC dumpP_inout = null) → C-API...
Definition MqDumpC.cs:193
static IntPtr CTOR(MqContextC ctx, MqDumpC dumpP_inout=null)
C#: [constructor,static] MqDumpC MqDumpC.Export(MqContextC ctx, MqDumpC dumpP_inout = null) → C-API ...
Definition MqDumpC.cs:184
MqDumpC(MqContextC ctx, MqDumpC dumpP_inout=null)
CONSTRUCTOR.
Definition MqDumpC.cs:202
static MqDumpC BinSet(byte[] data)
C#: [constructor,static] MqDumpC MqDumpC.BinSet(byte[] data) → C-API create an MqDumpS object fr...
Definition MqDumpC.cs:216