1 karl 1.2 //%LICENSE////////////////////////////////////////////////////////////////
2 //
3 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
9 //
10 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
16 //
17 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
19 //
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 karl 1.2 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28 //////////////////////////////////////////////////////////////////////////
29 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32
33 #ifndef _Pegasus_Common_Uint32ArgsRep_h
34 #define _Pegasus_Common_Uint32ArgsRep_h
35
36 #include <Pegasus/Common/Config.h>
37 #include <Pegasus/Common/AtomicInt.h>
38
39
40 PEGASUS_NAMESPACE_BEGIN
41
42 class Uint32ArgRep
43 karl 1.2 {
44 public:
45 Uint32ArgRep()
46 : _refCounter(1),
47 _null(true),
48 _value(0)
49 {
50 }
51 Uint32ArgRep(const Uint32ArgRep& x)
52 : _refCounter(1),
53 _null(x._null),
54 _value(x._value)
55 {
56 }
57 Uint32ArgRep& operator=(const Uint32ArgRep& x)
58 {
59 if (&x != this)
60 {
61 _null = x._null;
62 _value = x._value;
63 }
64 karl 1.2 return *this;
65 }
66 ~Uint32ArgRep()
67 {
68 }
69
70 // reference counter as member to avoid
71 // virtual function resolution overhead
72 AtomicInt _refCounter;
73 bool _null;
74 Uint32 _value;
75 };
76
77 class Uint64ArgRep
78 {
79 public:
80 Uint64ArgRep()
81 : _refCounter(1),
82 _null(true),
83 _value(0)
84 {
85 karl 1.2 }
86
87 Uint64ArgRep(const Uint64ArgRep& x)
88 : _refCounter(1),
89 _null(x._null),
90 _value(x._value)
91 {
92 }
93
94 Uint64ArgRep& operator=(const Uint64ArgRep& x)
95 {
96 if (&x != this)
97 {
98 _null = x._null;
99 _value = x._value;
100 }
101 return *this;
102 }
103
104 ~Uint64ArgRep()
105 {
106 karl 1.2 }
107
108 // reference counter as member to avoid
109 // virtual function resolution overhead
110 AtomicInt _refCounter;
111 bool _null;
112 Uint64 _value;
113 };
114
115 PEGASUS_NAMESPACE_END
116
117 #endif /* _Pegasus_Common_Uint32ArgsRep_h */
|