1 karl 1.44 //%2006////////////////////////////////////////////////////////////////////////
|
2 mike 1.16 //
|
3 karl 1.40 // 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 karl 1.35 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.40 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.42 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.44 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mike 1.16 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
15 chip 1.20 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
18 mike 1.16 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
|
20 kumpf 1.28 //
|
21 chip 1.20 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
22 mike 1.16 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
24 chip 1.20 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
27 mike 1.16 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 //%/////////////////////////////////////////////////////////////////////////////
33
34 #ifndef Pegasus_CIMClassRep_h
35 #define Pegasus_CIMClassRep_h
36
37 #include <Pegasus/Common/Config.h>
|
38 kumpf 1.33 #include <Pegasus/Common/InternalException.h>
|
39 kumpf 1.31 #include <Pegasus/Common/CIMName.h>
|
40 mike 1.18 #include <Pegasus/Common/CIMObjectRep.h>
|
41 mike 1.16 #include <Pegasus/Common/CIMMethod.h>
|
42 marek 1.50 #include <Pegasus/Common/CIMMethodRep.h>
|
43 karl 1.38 #include <Pegasus/Common/CIMInstance.h>
|
44 karl 1.37 #include <Pegasus/Common/CIMPropertyList.h>
|
45 kumpf 1.30 #include <Pegasus/Common/Linkage.h>
|
46 mike 1.16
47 PEGASUS_NAMESPACE_BEGIN
48
49 class DeclContext;
50 class CIMClass;
51 class CIMConstClass;
52 class CIMInstanceRep;
53
|
54 karl 1.21 // ATTN: KS P3 -document the CIMClass and CIMObjectRep classes.
|
55 mike 1.19
|
56 mike 1.45 class CIMClassRep : public CIMObjectRep
|
57 mike 1.16 {
58 public:
59
60 CIMClassRep(
|
61 kumpf 1.46 const CIMName& className,
62 const CIMName& superClassName);
|
63 mike 1.16
|
64 mike 1.18 virtual ~CIMClassRep();
|
65 mike 1.16
66 Boolean isAssociation() const;
67
68 Boolean isAbstract() const;
|
69 karl 1.21
|
70 kumpf 1.31 const CIMName& getSuperClassName() const { return _superClassName; }
|
71 mike 1.16
|
72 marek 1.50 void setSuperClassName(const CIMName& superClassName)
73 {
74 _superClassName = superClassName;
75 }
|
76 mike 1.16
|
77 mike 1.18 virtual void addProperty(const CIMProperty& x);
|
78 mike 1.16
79 void addMethod(const CIMMethod& x);
80
|
81 marek 1.50 Uint32 findMethod(const CIMName& name) const
82 {
83 return _methods.find(name, generateCIMNameTag(name));
84 }
|
85 mike 1.16
|
86 marek 1.50 CIMMethod getMethod(Uint32 index)
87 {
88 return _methods[index];
89 }
|
90 mike 1.16
|
91 kumpf 1.34 CIMConstMethod getMethod(Uint32 index) const
|
92 mike 1.16 {
|
93 kumpf 1.46 return ((CIMClassRep*)this)->getMethod(index);
|
94 mike 1.16 }
95
|
96 marek 1.50 void removeMethod(Uint32 index)
97 {
98 _methods.remove(index);
99 }
|
100 mike 1.16
|
101 marek 1.50 Uint32 getMethodCount() const
102 {
103 return _methods.size();
104 }
|
105 mike 1.16
106 void resolve(
|
107 kumpf 1.46 DeclContext* context,
108 const CIMNamespaceName& nameSpace);
|
109 mike 1.16
|
110 kumpf 1.23 virtual Boolean identical(const CIMObjectRep* x) const;
|
111 mike 1.18
112 virtual CIMObjectRep* clone() const
|
113 mike 1.16 {
|
114 kumpf 1.46 return new CIMClassRep(*this);
|
115 mike 1.16 }
116
|
117 kumpf 1.31 void getKeyNames(Array<CIMName>& keyNames) const;
|
118 mike 1.16
119 Boolean hasKeys() const;
120
|
121 karl 1.39 CIMInstance buildInstance(Boolean includeQualifiers,
|
122 karl 1.37 Boolean includeClassOrigin,
123 const CIMPropertyList & propertyList) const;
124
|
125 mike 1.16 private:
126
127 CIMClassRep(const CIMClassRep& x);
128
|
129 kumpf 1.47 CIMClassRep(); // Unimplemented
130 CIMClassRep& operator=(const CIMClassRep& x); // Unimplemented
|
131 mike 1.16
|
132 kumpf 1.31 CIMName _superClassName;
|
133 marek 1.48 typedef OrderedSet<CIMMethod,
134 CIMMethodRep,
135 PEGASUS_METHOD_ORDEREDSET_HASHSIZE> MethodSet;
136 MethodSet _methods;
|
137 mike 1.16
138 friend class CIMClass;
139 friend class CIMInstanceRep;
|
140 schuur 1.36 friend class BinaryStreamer;
|
141 mike 1.16 };
142
143 PEGASUS_NAMESPACE_END
144
145 #endif /* Pegasus_CIMClassRep_h */
|