PEP 55 Update license on source files to current license text and date
[tpot/pegasus/.git] / src / Pegasus / Common / CIMQualifierDeclRep.h
1 //%2003////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development
4 // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
6 // IBM Corp.; EMC Corporation, The Open Group.
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to
10 // deal in the Software without restriction, including without limitation the
11 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12 // sell copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 // 
15 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
16 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
17 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
18 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
19 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 //
24 //==============================================================================
25 //
26 // Author: Mike Brasher (mbrasher@bmc.com)
27 //
28 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
29 //                (carolann_graves@hp.com)
30 //
31 //%/////////////////////////////////////////////////////////////////////////////
32
33 #ifndef Pegasus_QualifierDeclRep_h
34 #define Pegasus_QualifierDeclRep_h
35
36 #include <Pegasus/Common/Config.h>
37 #include <Pegasus/Common/Linkage.h>
38 #include <Pegasus/Common/CIMName.h>
39 #include <Pegasus/Common/CIMValue.h>
40 #include <Pegasus/Common/Sharable.h>
41 #include <Pegasus/Common/Array.h>
42 #include <Pegasus/Common/InternalException.h>
43 #include <Pegasus/Common/CIMFlavor.h>
44 #include <Pegasus/Common/CIMScope.h>
45
46 PEGASUS_NAMESPACE_BEGIN
47
48 class CIMConstQualifierDecl;
49 class CIMQualifierDecl;
50
51 class PEGASUS_COMMON_LINKAGE CIMQualifierDeclRep : public Sharable
52 {
53 public:
54
55     CIMQualifierDeclRep(
56         const CIMName& name, 
57         const CIMValue& value, 
58         const CIMScope & scope,
59         const CIMFlavor & flavor,
60         Uint32 arraySize);
61
62     virtual ~CIMQualifierDeclRep();
63
64     const CIMName& getName() const 
65     { 
66         return _name; 
67     }
68
69     void setName(const CIMName& name);
70
71     CIMType getType() const 
72     {
73         return _value.getType(); 
74     }
75
76     Boolean isArray() const 
77     {
78         return _value.isArray(); 
79     }
80
81     const CIMValue& getValue() const 
82     { 
83         return _value; 
84     }
85
86     void setValue(const CIMValue& value);
87
88     const CIMScope & getScope () const 
89     {
90         return _scope; 
91     }
92
93     const CIMFlavor & getFlavor() const 
94     {
95         return _flavor; 
96     }
97
98     Uint32 getArraySize() const 
99     {
100         return _arraySize; 
101     }
102
103     void toXml(Array<Sint8>& out) const;
104
105     void toMof(Array<Sint8>& out) const;
106
107     Boolean identical(const CIMQualifierDeclRep* x) const;
108
109     CIMQualifierDeclRep* clone() const
110     {
111         return new CIMQualifierDeclRep(*this);
112     }
113
114 private:
115
116     CIMQualifierDeclRep();
117
118     CIMQualifierDeclRep(const CIMQualifierDeclRep& x);
119
120     // This method is declared and made private so that the compiler does
121     // not implicitly define a default copy constructor.
122     CIMQualifierDeclRep& operator=(const CIMQualifierDeclRep& x)
123     {
124         //PEGASUS_ASSERT(0);
125         return *this;
126     }
127
128     CIMName _name;
129     CIMValue _value;
130     CIMScope _scope;
131     CIMFlavor _flavor;
132     Uint32 _arraySize;
133 };
134
135 PEGASUS_NAMESPACE_END
136
137 #endif /* Pegasus_QualifierDeclRep_h */