1 mike 1.1 /*
2 **==============================================================================
3 **
4 ** Open Management Infrastructure (OMI)
5 **
6 ** Copyright (c) Microsoft Corporation
7 **
8 ** Licensed under the Apache License, Version 2.0 (the "License"); you may not
9 ** use this file except in compliance with the License. You may obtain a copy
10 ** of the License at
11 **
12 ** http://www.apache.org/licenses/LICENSE-2.0
13 **
14 ** THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 ** KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
16 ** WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
17 ** MERCHANTABLITY OR NON-INFRINGEMENT.
18 **
19 ** See the Apache 2 License for the specific language governing permissions
20 ** and limitations under the License.
21 **
22 mike 1.1 **==============================================================================
23 */
24
25 #ifndef _micxx_dinstance_h
26 #define _micxx_dinstance_h
27
28 #include <MI.h>
29 #include "linkage.h"
30 #include "atomic.h"
31 #include "memory.h"
32 #include "string.h"
33 #include "array.h"
34 #include "types.h"
35 #include "instance.h"
36
37 MI_BEGIN_NAMESPACE
38
39 typedef class Array<class DInstance> DInstanceA;
40
41 #if defined(GetClassName)
42 # undef GetClassName
43 mike 1.1 #endif
44
45 class MICXX_LINKAGE DInstance
46 {
47 public:
48
49 enum MetaType { CLASS, ASSOCIATION, INDICATION, METHOD };
50
51 DInstance();
52
53 DInstance(const String& className, MetaType metaType);
54
55 DInstance(const DInstance& x);
56
57 ~DInstance();
58
59 DInstance& operator=(const DInstance& x);
60
61 void Swap(DInstance& x);
62
63 const MI_ClassDecl* GetClassDecl() const;
64 mike 1.1
65 String GetClassName() const;
66
67 void SetClassName(const String& className);
68
69 String GetNamespace() const;
70
71 void SetNamespace(const String& nameSpace);
72
73 Uint32 Count() const;
74
75 Uint32 Find(const String& name) const;
76
77 bool GetType(Uint32 index, Type& type) const;
78
79 bool GetName(Uint32 index, String& name) const;
80
81 bool GetFlags(Uint32 index, Uint32& flags) const;
82
83 bool Clear(const String& name);
84
85 mike 1.1 bool Clear(Uint32 index);
86
87 bool AddValue(
88 const String& name,
89 const MI_Value* value,
90 Type type,
91 bool null,
92 bool key);
93
94 bool SetValue(
95 const String& name,
96 const MI_Value* value,
97 Type type,
98 bool null);
99
100 bool GetValue(
101 const String& name,
102 MI_Value* value,
103 Type& type,
104 bool& null,
105 bool& key) const;
106 mike 1.1
107 bool GetValueAsType(
108 const String& name,
109 MI_Value* value,
110 Type expectedType,
111 bool& null,
112 bool& key) const;
113
114 bool AddBoolean(
115 const String& name,
116 const Boolean& x,
117 bool null = false,
118 bool key = false);
119
120 bool AddBooleanA(
121 const String& name,
122 const BooleanA& x,
123 bool null = false,
124 bool key = false);
125
126 bool AddUint8(
127 mike 1.1 const String& name,
128 const Uint8& x,
129 bool null = false,
130 bool key = false);
131
132 bool AddUint8A(
133 const String& name,
134 const Uint8A& x,
135 bool null = false,
136 bool key = false);
137
138 bool AddSint8(
139 const String& name,
140 const Sint8& x,
141 bool null = false,
142 bool key = false);
143
144 bool AddSint8A(
145 const String& name,
146 const Sint8A& x,
147 bool null = false,
148 mike 1.1 bool key = false);
149
150 bool AddUint16(
151 const String& name,
152 const Uint16& x,
153 bool null = false,
154 bool key = false);
155
156 bool AddUint16A(
157 const String& name,
158 const Uint16A& x,
159 bool null = false,
160 bool key = false);
161
162 bool AddSint16(
163 const String& name,
164 const Sint16& x,
165 bool null = false,
166 bool key = false);
167
168 bool AddSint16A(
169 mike 1.1 const String& name,
170 const Sint16A& x,
171 bool null = false,
172 bool key = false);
173
174 bool AddUint32(
175 const String& name,
176 const Uint32& x,
177 bool null = false,
178 bool key = false);
179
180 bool AddUint32A(
181 const String& name,
182 const Uint32A& x,
183 bool null = false,
184 bool key = false);
185
186 bool AddSint32(
187 const String& name,
188 const Sint32& x,
189 bool null = false,
190 mike 1.1 bool key = false);
191
192 bool AddSint32A(
193 const String& name,
194 const Sint32A& x,
195 bool null = false,
196 bool key = false);
197
198 bool AddUint64(
199 const String& name,
200 const Uint64& x,
201 bool null = false,
202 bool key = false);
203
204 bool AddUint64A(
205 const String& name,
206 const Uint64A& x,
207 bool null = false,
208 bool key = false);
209
210 bool AddSint64(
211 mike 1.1 const String& name,
212 const Sint64& x,
213 bool null = false,
214 bool key = false);
215
216 bool AddSint64A(
217 const String& name,
218 const Sint64A& x,
219 bool null = false,
220 bool key = false);
221
222 bool AddReal32(
223 const String& name,
224 const Real32& x,
225 bool null = false,
226 bool key = false);
227
228 bool AddReal32A(
229 const String& name,
230 const Real32A& x,
231 bool null = false,
232 mike 1.1 bool key = false);
233
234 bool AddReal64(
235 const String& name,
236 const Real64& x,
237 bool null = false,
238 bool key = false);
239
240 bool AddReal64A(
241 const String& name,
242 const Real64A& x,
243 bool null = false,
244 bool key = false);
245
246 bool AddChar16(
247 const String& name,
248 const Char16& x,
249 bool null = false,
250 bool key = false);
251
252 bool AddChar16A(
253 mike 1.1 const String& name,
254 const Char16A& x,
255 bool null = false,
256 bool key = false);
257
258 bool AddDatetime(
259 const String& name,
260 const Datetime& x,
261 bool null = false,
262 bool key = false);
263
264 bool AddDatetimeA(
265 const String& name,
266 const DatetimeA& x,
267 bool null = false,
268 bool key = false);
269
270 bool AddString(
271 const String& name,
272 const String& x,
273 bool null = false,
274 mike 1.1 bool key = false);
275
276 bool AddStringA(
277 const String& name,
278 const StringA& x,
279 bool null = false,
280 bool key = false);
281
282 bool AddReference(
283 const String& name,
284 const DInstance& x,
285 bool null = false,
286 bool key = false);
287
288 bool AddReferenceA(
289 const String& name,
290 const DInstanceA& x,
291 bool null = false,
292 bool key = false);
293
294 bool AddInstance(
295 mike 1.1 const String& name,
296 const DInstance& x,
297 bool null = false,
298 bool key = false);
299
300 bool AddInstanceA(
301 const String& name,
302 const DInstanceA& x,
303 bool null = false,
304 bool key = false);
305
306 bool SetBoolean(
307 const String& name,
308 const Boolean& x,
309 bool null = false);
310
311 bool SetBooleanA(
312 const String& name,
313 const BooleanA& x,
314 bool null = false);
315
316 mike 1.1 bool SetUint8(
317 const String& name,
318 const Uint8& x,
319 bool null = false);
320
321 bool SetUint8A(
322 const String& name,
323 const Uint8A& x,
324 bool null = false);
325
326 bool SetSint8(
327 const String& name,
328 const Sint8& x,
329 bool null = false);
330
331 bool SetSint8A(
332 const String& name,
333 const Sint8A& x,
334 bool null = false);
335
336 bool SetUint16(
337 mike 1.1 const String& name,
338 const Uint16& x,
339 bool null = false);
340
341 bool SetUint16A(
342 const String& name,
343 const Uint16A& x,
344 bool null = false);
345
346 bool SetSint16(
347 const String& name,
348 const Sint16& x,
349 bool null = false);
350
351 bool SetSint16A(
352 const String& name,
353 const Sint16A& x,
354 bool null = false);
355
356 bool SetUint32(
357 const String& name,
358 mike 1.1 const Uint32& x,
359 bool null = false);
360
361 bool SetUint32A(
362 const String& name,
363 const Uint32A& x,
364 bool null = false);
365
366 bool SetSint32(
367 const String& name,
368 const Sint32& x,
369 bool null = false);
370
371 bool SetSint32A(
372 const String& name,
373 const Sint32A& x,
374 bool null = false);
375
376 bool SetUint64(
377 const String& name,
378 const Uint64& x,
379 mike 1.1 bool null = false);
380
381 bool SetUint64A(
382 const String& name,
383 const Uint64A& x,
384 bool null = false);
385
386 bool SetSint64(
387 const String& name,
388 const Sint64& x,
389 bool null = false);
390
391 bool SetSint64A(
392 const String& name,
393 const Sint64A& x,
394 bool null = false);
395
396 bool SetReal32(
397 const String& name,
398 const Real32& x,
399 bool null = false);
400 mike 1.1
401 bool SetReal32A(
402 const String& name,
403 const Real32A& x,
404 bool null = false);
405
406 bool SetReal64(
407 const String& name,
408 const Real64& x,
409 bool null = false);
410
411 bool SetReal64A(
412 const String& name,
413 const Real64A& x,
414 bool null = false);
415
416 bool SetChar16(
417 const String& name,
418 const Char16& x,
419 bool null = false);
420
421 mike 1.1 bool SetChar16A(
422 const String& name,
423 const Char16A& x,
424 bool null = false);
425
426 bool SetDatetime(
427 const String& name,
428 const Datetime& x,
429 bool null = false);
430
431 bool SetDatetimeA(
432 const String& name,
433 const DatetimeA& x,
434 bool null = false);
435
436 bool SetString(
437 const String& name,
438 const String& x,
439 bool null = false);
440
441 bool SetStringA(
442 mike 1.1 const String& name,
443 const StringA& x,
444 bool null = false);
445
446 bool SetReference(
447 const String& name,
448 const DInstance& x,
449 bool null = false);
450
451 bool SetReferenceA(
452 const String& name,
453 const DInstanceA& x,
454 bool null = false);
455
456 bool SetInstance(
457 const String& name,
458 const DInstance& x,
459 bool null = false);
460
461 bool SetInstanceA(
462 const String& name,
463 mike 1.1 const DInstanceA& x,
464 bool null = false);
465
466 bool GetBoolean(
467 const String& name,
468 Boolean& x,
469 bool& null,
470 bool& key) const;
471
472 bool GetBooleanA(
473 const String& name,
474 BooleanA& x,
475 bool& null,
476 bool& key) const;
477
478 bool GetUint8(
479 const String& name,
480 Uint8& x,
481 bool& null,
482 bool& key) const;
483
484 mike 1.1 bool GetUint8A(
485 const String& name,
486 Uint8A& x,
487 bool& null,
488 bool& key) const;
489
490 bool GetSint8(
491 const String& name,
492 Sint8& x,
493 bool& null,
494 bool& key) const;
495
496 bool GetSint8A(
497 const String& name,
498 Sint8A& x,
499 bool& null,
500 bool& key) const;
501
502 bool GetUint16(
503 const String& name,
504 Uint16& x,
505 mike 1.1 bool& null,
506 bool& key) const;
507
508 bool GetUint16A(
509 const String& name,
510 Uint16A& x,
511 bool& null,
512 bool& key) const;
513
514 bool GetSint16(
515 const String& name,
516 Sint16& x,
517 bool& null,
518 bool& key) const;
519
520 bool GetSint16A(
521 const String& name,
522 Sint16A& x,
523 bool& null,
524 bool& key) const;
525
526 mike 1.1 bool GetUint32(
527 const String& name,
528 Uint32& x,
529 bool& null,
530 bool& key) const;
531
532 bool GetUint32A(
533 const String& name,
534 Uint32A& x,
535 bool& null,
536 bool& key) const;
537
538 bool GetSint32(
539 const String& name,
540 Sint32& x,
541 bool& null,
542 bool& key) const;
543
544 bool GetSint32A(
545 const String& name,
546 Sint32A& x,
547 mike 1.1 bool& null,
548 bool& key) const;
549
550 bool GetUint64(
551 const String& name,
552 Uint64& x,
553 bool& null,
554 bool& key) const;
555
556 bool GetUint64A(
557 const String& name,
558 Uint64A& x,
559 bool& null,
560 bool& key) const;
561
562 bool GetSint64(
563 const String& name,
564 Sint64& x,
565 bool& null,
566 bool& key) const;
567
568 mike 1.1 bool GetSint64A(
569 const String& name,
570 Sint64A& x,
571 bool& null,
572 bool& key) const;
573
574 bool GetReal32(
575 const String& name,
576 Real32& x,
577 bool& null,
578 bool& key) const;
579
580 bool GetReal32A(
581 const String& name,
582 Real32A& x,
583 bool& null,
584 bool& key) const;
585
586 bool GetReal64(
587 const String& name,
588 Real64& x,
589 mike 1.1 bool& null,
590 bool& key) const;
591
592 bool GetReal64A(
593 const String& name,
594 Real64A& x,
595 bool& null,
596 bool& key) const;
597
598 bool GetChar16(
599 const String& name,
600 Char16& x,
601 bool& null,
602 bool& key) const;
603
604 bool GetChar16A(
605 const String& name,
606 Char16A& x,
607 bool& null,
608 bool& key) const;
609
610 mike 1.1 bool GetDatetime(
611 const String& name,
612 Datetime& x,
613 bool& null,
614 bool& key) const;
615
616 bool GetDatetimeA(
617 const String& name,
618 DatetimeA& x,
619 bool& null,
620 bool& key) const;
621
622 bool GetString(
623 const String& name,
624 String& x,
625 bool& null,
626 bool& key) const;
627
628 bool GetStringA(
629 const String& name,
630 StringA& x,
631 mike 1.1 bool& null,
632 bool& key) const;
633
634 bool GetReference(
635 const String& name,
636 DInstance& x,
637 bool& null,
638 bool& key) const;
639
640 bool GetReferenceA(
641 const String& name,
642 DInstanceA& x,
643 bool& null,
644 bool& key) const;
645
646 bool GetInstance(
647 const String& name,
648 DInstance& x,
649 bool& null,
650 bool& key) const;
651
652 mike 1.1 bool GetInstanceA(
653 const String& name,
654 DInstanceA& x,
655 bool& null,
656 bool& key) const;
657
658 bool GetBoolean(const String& name, Boolean& x) const;
659 bool GetBooleanA(const String& name, BooleanA& x) const;
660 bool GetUint8(const String& name, Uint8& x) const;
661 bool GetUint8A(const String& name, Uint8A& x) const;
662 bool GetSint8(const String& name, Sint8& x) const;
663 bool GetSint8A(const String& name, Sint8A& x) const;
664 bool GetUint16(const String& name, Uint16& x) const;
665 bool GetUint16A(const String& name, Uint16A& x) const;
666 bool GetSint16(const String& name, Sint16& x) const;
667 bool GetSint16A(const String& name, Sint16A& x) const;
668 bool GetUint32(const String& name, Uint32& x) const;
669 bool GetUint32A(const String& name, Uint32A& x) const;
670 bool GetSint32(const String& name, Sint32& x) const;
671 bool GetSint32A(const String& name, Sint32A& x) const;
672 bool GetUint64(const String& name, Uint64& x) const;
673 mike 1.1 bool GetUint64A(const String& name, Uint64A& x) const;
674 bool GetSint64(const String& name, Sint64& x) const;
675 bool GetSint64A(const String& name, Sint64A& x) const;
676 bool GetReal32(const String& name, Real32& x) const;
677 bool GetReal32A(const String& name, Real32A& x) const;
678 bool GetReal64(const String& name, Real64& x) const;
679 bool GetReal64A(const String& name, Real64A& x) const;
680 bool GetChar16(const String& name, Char16& x) const;
681 bool GetChar16A(const String& name, Char16A& x) const;
682 bool GetDatetime(const String& name, Datetime& x) const;
683 bool GetDatetimeA(const String& name, DatetimeA& x) const;
684 bool GetString(const String& name, String& x) const;
685 bool GetStringA(const String& name, StringA& x) const;
686 bool GetReference(const String& name, DInstance& x) const;
687 bool GetReferenceA(const String& name, DInstanceA& x) const;
688 bool GetInstance(const String& name, DInstance& x) const;
689 bool GetInstanceA(const String& name, DInstanceA& x) const;
690
691 void Print(
692 FILE* os = stdout,
693 MI_Uint32 level = 0,
694 mike 1.1 bool showNulls = true) const;
695
696 static bool DynamicToStatic(
697 const DInstance& dynamicInstance,
698 bool keysOnly,
699 bool ignoreUnknownProperties,
700 Instance& staticInstance);
701
702 static bool StaticToDynamic(
703 const Instance& sinst,
704 bool keysOnly,
705 DInstance& dinst);
706
707 private:
708
709 enum AdoptTag { ADOPT };
710 explicit DInstance(MI_Instance* self, AdoptTag);
711
712 enum CloneTag { CLONE };
713 explicit DInstance(MI_Instance* self, CloneTag);
714
715 mike 1.1 void COW();
716 MI_Instance* m_self;
717 friend class DValue;
718 friend class ClientRep;
719 friend class DInstanceFriend;
720 };
721
722 inline bool DInstance::AddBoolean(
723 const String& name,
724 const Boolean& x,
725 bool null,
726 bool key)
727 {
728 return AddValue(name, (MI_Value*)&x, MI_BOOLEAN, null, key);
729 }
730
731 inline bool DInstance::AddBooleanA(
732 const String& name,
733 const BooleanA& x,
734 bool null,
735 bool key)
736 mike 1.1 {
737 return AddValue(name, (MI_Value*)&x, MI_BOOLEANA, null, key);
738 }
739
740 inline bool DInstance::AddUint8(
741 const String& name,
742 const Uint8& x,
743 bool null,
744 bool key)
745 {
746 return AddValue(name, (MI_Value*)&x, MI_UINT8, null, key);
747 }
748
749 inline bool DInstance::AddUint8A(
750 const String& name,
751 const Uint8A& x,
752 bool null,
753 bool key)
754 {
755 return AddValue(name, (MI_Value*)&x, MI_UINT8A, null, key);
756 }
757 mike 1.1
758 inline bool DInstance::AddSint8(
759 const String& name,
760 const Sint8& x,
761 bool null,
762 bool key)
763 {
764 return AddValue(name, (MI_Value*)&x, MI_SINT8, null, key);
765 }
766
767 inline bool DInstance::AddSint8A(
768 const String& name,
769 const Sint8A& x,
770 bool null,
771 bool key)
772 {
773 return AddValue(name, (MI_Value*)&x, MI_SINT8A, null, key);
774 }
775
776 inline bool DInstance::AddUint16(
777 const String& name,
778 mike 1.1 const Uint16& x,
779 bool null,
780 bool key)
781 {
782 return AddValue(name, (MI_Value*)&x, MI_UINT16, null, key);
783 }
784
785 inline bool DInstance::AddUint16A(
786 const String& name,
787 const Uint16A& x,
788 bool null,
789 bool key)
790 {
791 return AddValue(name, (MI_Value*)&x, MI_UINT16A, null, key);
792 }
793
794 inline bool DInstance::AddSint16(
795 const String& name,
796 const Sint16& x,
797 bool null,
798 bool key)
799 mike 1.1 {
800 return AddValue(name, (MI_Value*)&x, MI_SINT16, null, key);
801 }
802
803 inline bool DInstance::AddSint16A(
804 const String& name,
805 const Sint16A& x,
806 bool null,
807 bool key)
808 {
809 return AddValue(name, (MI_Value*)&x, MI_SINT16A, null, key);
810 }
811
812 inline bool DInstance::AddUint32(
813 const String& name,
814 const Uint32& x,
815 bool null,
816 bool key)
817 {
818 return AddValue(name, (MI_Value*)&x, MI_UINT32, null, key);
819 }
820 mike 1.1
821 inline bool DInstance::AddUint32A(
822 const String& name,
823 const Uint32A& x,
824 bool null,
825 bool key)
826 {
827 return AddValue(name, (MI_Value*)&x, MI_UINT32A, null, key);
828 }
829
830 inline bool DInstance::AddSint32(
831 const String& name,
832 const Sint32& x,
833 bool null,
834 bool key)
835 {
836 return AddValue(name, (MI_Value*)&x, MI_SINT32, null, key);
837 }
838
839 inline bool DInstance::AddSint32A(
840 const String& name,
841 mike 1.1 const Sint32A& x,
842 bool null,
843 bool key)
844 {
845 return AddValue(name, (MI_Value*)&x, MI_SINT32A, null, key);
846 }
847
848 inline bool DInstance::AddUint64(
849 const String& name,
850 const Uint64& x,
851 bool null,
852 bool key)
853 {
854 return AddValue(name, (MI_Value*)&x, MI_UINT64, null, key);
855 }
856
857 inline bool DInstance::AddUint64A(
858 const String& name,
859 const Uint64A& x,
860 bool null,
861 bool key)
862 mike 1.1 {
863 return AddValue(name, (MI_Value*)&x, MI_UINT64A, null, key);
864 }
865
866 inline bool DInstance::AddSint64(
867 const String& name,
868 const Sint64& x,
869 bool null,
870 bool key)
871 {
872 return AddValue(name, (MI_Value*)&x, MI_SINT64, null, key);
873 }
874
875 inline bool DInstance::AddSint64A(
876 const String& name,
877 const Sint64A& x,
878 bool null,
879 bool key)
880 {
881 return AddValue(name, (MI_Value*)&x, MI_SINT64A, null, key);
882 }
883 mike 1.1
884 inline bool DInstance::AddReal32(
885 const String& name,
886 const Real32& x,
887 bool null,
888 bool key)
889 {
890 return AddValue(name, (MI_Value*)&x, MI_REAL32, null, key);
891 }
892
893 inline bool DInstance::AddReal32A(
894 const String& name,
895 const Real32A& x,
896 bool null,
897 bool key)
898 {
899 return AddValue(name, (MI_Value*)&x, MI_REAL32A, null, key);
900 }
901
902 inline bool DInstance::AddReal64(
903 const String& name,
904 mike 1.1 const Real64& x,
905 bool null,
906 bool key)
907 {
908 return AddValue(name, (MI_Value*)&x, MI_REAL64, null, key);
909 }
910
911 inline bool DInstance::AddReal64A(
912 const String& name,
913 const Real64A& x,
914 bool null,
915 bool key)
916 {
917 return AddValue(name, (MI_Value*)&x, MI_REAL64A, null, key);
918 }
919
920 inline bool DInstance::AddChar16(
921 const String& name,
922 const Char16& x,
923 bool null,
924 bool key)
925 mike 1.1 {
926 return AddValue(name, (MI_Value*)&x, MI_CHAR16, null, key);
927 }
928
929 inline bool DInstance::AddChar16A(
930 const String& name,
931 const Char16A& x,
932 bool null,
933 bool key)
934 {
935 return AddValue(name, (MI_Value*)&x, MI_CHAR16A, null, key);
936 }
937
938 inline bool DInstance::AddDatetime(
939 const String& name,
940 const Datetime& x,
941 bool null,
942 bool key)
943 {
944 return AddValue(name, (MI_Value*)&x, MI_DATETIME, null, key);
945 }
946 mike 1.1
947 inline bool DInstance::AddDatetimeA(
948 const String& name,
949 const DatetimeA& x,
950 bool null,
951 bool key)
952 {
953 return AddValue(name, (MI_Value*)&x, MI_DATETIMEA, null, key);
954 }
955
956 inline bool DInstance::AddString(
957 const String& name,
958 const String& x,
959 bool null,
960 bool key)
961 {
962 return AddValue(name, (MI_Value*)&x, MI_STRING, null, key);
963 }
964
965 inline bool DInstance::AddStringA(
966 const String& name,
967 mike 1.1 const StringA& x,
968 bool null,
969 bool key)
970 {
971 return AddValue(name, (MI_Value*)&x, MI_STRINGA, null, key);
972 }
973
974 inline bool DInstance::AddReference(
975 const String& name,
976 const DInstance& x,
977 bool null,
978 bool key)
979 {
980 return AddValue(name, (MI_Value*)&x, MI_REFERENCE, null, key);
981 }
982
983 inline bool DInstance::AddReferenceA(
984 const String& name,
985 const DInstanceA& x,
986 bool null,
987 bool key)
988 mike 1.1 {
989 return AddValue(name, (MI_Value*)&x, MI_REFERENCEA, null, key);
990 }
991
992 inline bool DInstance::AddInstance(
993 const String& name,
994 const DInstance& x,
995 bool null,
996 bool key)
997 {
998 return AddValue(name, (MI_Value*)&x, MI_INSTANCE, null, key);
999 }
1000
1001 inline bool DInstance::AddInstanceA(
1002 const String& name,
1003 const DInstanceA& x,
1004 bool null,
1005 bool key)
1006 {
1007 return AddValue(name, (MI_Value*)&x, MI_INSTANCEA, null, key);
1008 }
1009 mike 1.1
1010 inline bool DInstance::SetBoolean(
1011 const String& name,
1012 const Boolean& x,
1013 bool null)
1014 {
1015 return SetValue(name, (MI_Value*)&x, MI_BOOLEAN, null);
1016 }
1017
1018 inline bool DInstance::SetBooleanA(
1019 const String& name,
1020 const BooleanA& x,
1021 bool null)
1022 {
1023 return SetValue(name, (MI_Value*)&x, MI_BOOLEANA, null);
1024 }
1025
1026 inline bool DInstance::SetUint8(
1027 const String& name,
1028 const Uint8& x,
1029 bool null)
1030 mike 1.1 {
1031 return SetValue(name, (MI_Value*)&x, MI_UINT8, null);
1032 }
1033
1034 inline bool DInstance::SetUint8A(
1035 const String& name,
1036 const Uint8A& x,
1037 bool null)
1038 {
1039 return SetValue(name, (MI_Value*)&x, MI_UINT8A, null);
1040 }
1041
1042 inline bool DInstance::SetSint8(
1043 const String& name,
1044 const Sint8& x,
1045 bool null)
1046 {
1047 return SetValue(name, (MI_Value*)&x, MI_SINT8, null);
1048 }
1049
1050 inline bool DInstance::SetSint8A(
1051 mike 1.1 const String& name,
1052 const Sint8A& x,
1053 bool null)
1054 {
1055 return SetValue(name, (MI_Value*)&x, MI_SINT8A, null);
1056 }
1057
1058 inline bool DInstance::SetUint16(
1059 const String& name,
1060 const Uint16& x,
1061 bool null)
1062 {
1063 return SetValue(name, (MI_Value*)&x, MI_UINT16, null);
1064 }
1065
1066 inline bool DInstance::SetUint16A(
1067 const String& name,
1068 const Uint16A& x,
1069 bool null)
1070 {
1071 return SetValue(name, (MI_Value*)&x, MI_UINT16A, null);
1072 mike 1.1 }
1073
1074 inline bool DInstance::SetSint16(
1075 const String& name,
1076 const Sint16& x,
1077 bool null)
1078 {
1079 return SetValue(name, (MI_Value*)&x, MI_SINT16, null);
1080 }
1081
1082 inline bool DInstance::SetSint16A(
1083 const String& name,
1084 const Sint16A& x,
1085 bool null)
1086 {
1087 return SetValue(name, (MI_Value*)&x, MI_SINT16A, null);
1088 }
1089
1090 inline bool DInstance::SetUint32(
1091 const String& name,
1092 const Uint32& x,
1093 mike 1.1 bool null)
1094 {
1095 return SetValue(name, (MI_Value*)&x, MI_UINT32, null);
1096 }
1097
1098 inline bool DInstance::SetUint32A(
1099 const String& name,
1100 const Uint32A& x,
1101 bool null)
1102 {
1103 return SetValue(name, (MI_Value*)&x, MI_UINT32A, null);
1104 }
1105
1106 inline bool DInstance::SetSint32(
1107 const String& name,
1108 const Sint32& x,
1109 bool null)
1110 {
1111 return SetValue(name, (MI_Value*)&x, MI_SINT32, null);
1112 }
1113
1114 mike 1.1 inline bool DInstance::SetSint32A(
1115 const String& name,
1116 const Sint32A& x,
1117 bool null)
1118 {
1119 return SetValue(name, (MI_Value*)&x, MI_SINT32A, null);
1120 }
1121
1122 inline bool DInstance::SetUint64(
1123 const String& name,
1124 const Uint64& x,
1125 bool null)
1126 {
1127 return SetValue(name, (MI_Value*)&x, MI_UINT64, null);
1128 }
1129
1130 inline bool DInstance::SetUint64A(
1131 const String& name,
1132 const Uint64A& x,
1133 bool null)
1134 {
1135 mike 1.1 return SetValue(name, (MI_Value*)&x, MI_UINT64A, null);
1136 }
1137
1138 inline bool DInstance::SetSint64(
1139 const String& name,
1140 const Sint64& x,
1141 bool null)
1142 {
1143 return SetValue(name, (MI_Value*)&x, MI_SINT64, null);
1144 }
1145
1146 inline bool DInstance::SetSint64A(
1147 const String& name,
1148 const Sint64A& x,
1149 bool null)
1150 {
1151 return SetValue(name, (MI_Value*)&x, MI_SINT64A, null);
1152 }
1153
1154 inline bool DInstance::SetReal32(
1155 const String& name,
1156 mike 1.1 const Real32& x,
1157 bool null)
1158 {
1159 return SetValue(name, (MI_Value*)&x, MI_REAL32, null);
1160 }
1161
1162 inline bool DInstance::SetReal32A(
1163 const String& name,
1164 const Real32A& x,
1165 bool null)
1166 {
1167 return SetValue(name, (MI_Value*)&x, MI_REAL32A, null);
1168 }
1169
1170 inline bool DInstance::SetReal64(
1171 const String& name,
1172 const Real64& x,
1173 bool null)
1174 {
1175 return SetValue(name, (MI_Value*)&x, MI_REAL64, null);
1176 }
1177 mike 1.1
1178 inline bool DInstance::SetReal64A(
1179 const String& name,
1180 const Real64A& x,
1181 bool null)
1182 {
1183 return SetValue(name, (MI_Value*)&x, MI_REAL64A, null);
1184 }
1185
1186 inline bool DInstance::SetChar16(
1187 const String& name,
1188 const Char16& x,
1189 bool null)
1190 {
1191 return SetValue(name, (MI_Value*)&x, MI_CHAR16, null);
1192 }
1193
1194 inline bool DInstance::SetChar16A(
1195 const String& name,
1196 const Char16A& x,
1197 bool null)
1198 mike 1.1 {
1199 return SetValue(name, (MI_Value*)&x, MI_CHAR16A, null);
1200 }
1201
1202 inline bool DInstance::SetDatetime(
1203 const String& name,
1204 const Datetime& x,
1205 bool null)
1206 {
1207 return SetValue(name, (MI_Value*)&x, MI_DATETIME, null);
1208 }
1209
1210 inline bool DInstance::SetDatetimeA(
1211 const String& name,
1212 const DatetimeA& x,
1213 bool null)
1214 {
1215 return SetValue(name, (MI_Value*)&x, MI_DATETIMEA, null);
1216 }
1217
1218 inline bool DInstance::SetString(
1219 mike 1.1 const String& name,
1220 const String& x,
1221 bool null)
1222 {
1223 return SetValue(name, (MI_Value*)&x, MI_STRING, null);
1224 }
1225
1226 inline bool DInstance::SetStringA(
1227 const String& name,
1228 const StringA& x,
1229 bool null)
1230 {
1231 return SetValue(name, (MI_Value*)&x, MI_STRINGA, null);
1232 }
1233
1234 inline bool DInstance::SetReference(
1235 const String& name,
1236 const DInstance& x,
1237 bool null)
1238 {
1239 return SetValue(name, (MI_Value*)&x, MI_REFERENCE, null);
1240 mike 1.1 }
1241
1242 inline bool DInstance::SetReferenceA(
1243 const String& name,
1244 const DInstanceA& x,
1245 bool null)
1246 {
1247 return SetValue(name, (MI_Value*)&x, MI_REFERENCEA, null);
1248 }
1249
1250 inline bool DInstance::SetInstance(
1251 const String& name,
1252 const DInstance& x,
1253 bool null)
1254 {
1255 return SetValue(name, (MI_Value*)&x, MI_INSTANCE, null);
1256 }
1257
1258 inline bool DInstance::SetInstanceA(
1259 const String& name,
1260 const DInstanceA& x,
1261 mike 1.1 bool null)
1262 {
1263 return SetValue(name, (MI_Value*)&x, MI_INSTANCEA, null);
1264 }
1265
1266 inline bool DInstance::GetBoolean(const String& name, Boolean& x) const
1267 {
1268 bool dummy;
1269 return GetBoolean(name, x, dummy, dummy);
1270 }
1271
1272 inline bool DInstance::GetBooleanA(const String& name, BooleanA& x) const
1273 {
1274 bool dummy;
1275 return GetBooleanA(name, x, dummy, dummy);
1276 }
1277
1278 inline bool DInstance::GetUint8(const String& name, Uint8& x) const
1279 {
1280 bool dummy;
1281 return GetUint8(name, x, dummy, dummy);
1282 mike 1.1 }
1283
1284 inline bool DInstance::GetUint8A(const String& name, Uint8A& x) const
1285 {
1286 bool dummy;
1287 return GetUint8A(name, x, dummy, dummy);
1288 }
1289
1290 inline bool DInstance::GetSint8(const String& name, Sint8& x) const
1291 {
1292 bool dummy;
1293 return GetSint8(name, x, dummy, dummy);
1294 }
1295
1296 inline bool DInstance::GetSint8A(const String& name, Sint8A& x) const
1297 {
1298 bool dummy;
1299 return GetSint8A(name, x, dummy, dummy);
1300 }
1301
1302 inline bool DInstance::GetUint16(const String& name, Uint16& x) const
1303 mike 1.1 {
1304 bool dummy;
1305 return GetUint16(name, x, dummy, dummy);
1306 }
1307
1308 inline bool DInstance::GetUint16A(const String& name, Uint16A& x) const
1309 {
1310 bool dummy;
1311 return GetUint16A(name, x, dummy, dummy);
1312 }
1313
1314 inline bool DInstance::GetSint16(const String& name, Sint16& x) const
1315 {
1316 bool dummy;
1317 return GetSint16(name, x, dummy, dummy);
1318 }
1319
1320 inline bool DInstance::GetSint16A(const String& name, Sint16A& x) const
1321 {
1322 bool dummy;
1323 return GetSint16A(name, x, dummy, dummy);
1324 mike 1.1 }
1325
1326 inline bool DInstance::GetUint32(const String& name, Uint32& x) const
1327 {
1328 bool dummy;
1329 return GetUint32(name, x, dummy, dummy);
1330 }
1331
1332 inline bool DInstance::GetUint32A(const String& name, Uint32A& x) const
1333 {
1334 bool dummy;
1335 return GetUint32A(name, x, dummy, dummy);
1336 }
1337
1338 inline bool DInstance::GetSint32(const String& name, Sint32& x) const
1339 {
1340 bool dummy;
1341 return GetSint32(name, x, dummy, dummy);
1342 }
1343
1344 inline bool DInstance::GetSint32A(const String& name, Sint32A& x) const
1345 mike 1.1 {
1346 bool dummy;
1347 return GetSint32A(name, x, dummy, dummy);
1348 }
1349
1350 inline bool DInstance::GetUint64(const String& name, Uint64& x) const
1351 {
1352 bool dummy;
1353 return GetUint64(name, x, dummy, dummy);
1354 }
1355
1356 inline bool DInstance::GetUint64A(const String& name, Uint64A& x) const
1357 {
1358 bool dummy;
1359 return GetUint64A(name, x, dummy, dummy);
1360 }
1361
1362 inline bool DInstance::GetSint64(const String& name, Sint64& x) const
1363 {
1364 bool dummy;
1365 return GetSint64(name, x, dummy, dummy);
1366 mike 1.1 }
1367
1368 inline bool DInstance::GetSint64A(const String& name, Sint64A& x) const
1369 {
1370 bool dummy;
1371 return GetSint64A(name, x, dummy, dummy);
1372 }
1373
1374 inline bool DInstance::GetReal32(const String& name, Real32& x) const
1375 {
1376 bool dummy;
1377 return GetReal32(name, x, dummy, dummy);
1378 }
1379
1380 inline bool DInstance::GetReal32A(const String& name, Real32A& x) const
1381 {
1382 bool dummy;
1383 return GetReal32A(name, x, dummy, dummy);
1384 }
1385
1386 inline bool DInstance::GetReal64(const String& name, Real64& x) const
1387 mike 1.1 {
1388 bool dummy;
1389 return GetReal64(name, x, dummy, dummy);
1390 }
1391
1392 inline bool DInstance::GetReal64A(const String& name, Real64A& x) const
1393 {
1394 bool dummy;
1395 return GetReal64A(name, x, dummy, dummy);
1396 }
1397
1398 inline bool DInstance::GetChar16(const String& name, Char16& x) const
1399 {
1400 bool dummy;
1401 return GetChar16(name, x, dummy, dummy);
1402 }
1403
1404 inline bool DInstance::GetChar16A(const String& name, Char16A& x) const
1405 {
1406 bool dummy;
1407 return GetChar16A(name, x, dummy, dummy);
1408 mike 1.1 }
1409
1410 inline bool DInstance::GetDatetime(const String& name, Datetime& x) const
1411 {
1412 bool dummy;
1413 return GetDatetime(name, x, dummy, dummy);
1414 }
1415
1416 inline bool DInstance::GetDatetimeA(const String& name, DatetimeA& x) const
1417 {
1418 bool dummy;
1419 return GetDatetimeA(name, x, dummy, dummy);
1420 }
1421
1422 inline bool DInstance::GetString(const String& name, String& x) const
1423 {
1424 bool dummy;
1425 return GetString(name, x, dummy, dummy);
1426 }
1427
1428 inline bool DInstance::GetStringA(const String& name, StringA& x) const
1429 mike 1.1 {
1430 bool dummy;
1431 return GetStringA(name, x, dummy, dummy);
1432 }
1433
1434 inline bool DInstance::GetReference(const String& name, DInstance& x) const
1435 {
1436 bool dummy;
1437 return GetReference(name, x, dummy, dummy);
1438 }
1439
1440 inline bool DInstance::GetReferenceA(const String& name, DInstanceA& x) const
1441 {
1442 bool dummy;
1443 return GetReferenceA(name, x, dummy, dummy);
1444 }
1445
1446 inline bool DInstance::GetInstance(const String& name, DInstance& x) const
1447 {
1448 bool dummy;
1449 return GetInstance(name, x, dummy, dummy);
1450 mike 1.1 }
1451
1452 inline bool DInstance::GetInstanceA(const String& name, DInstanceA& x) const
1453 {
1454 bool dummy;
1455 return GetInstanceA(name, x, dummy, dummy);
1456 }
1457
1458 MI_END_NAMESPACE
1459
1460 #endif /* _micxx_dinstance_h */
|