Return to CIMClassRep.h CVS log | Up to [Pegasus] / pegasus / src / Pegasus / Common |
1 mike 1.16 //%///////////////////////////////////////////////////////////////////////////// 2 // 3 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM 4 // 5 // Permission is hereby granted, free of charge, to any person obtaining a copy 6 // of this software and associated documentation files (the "Software"), to 7 // deal in the Software without restriction, including without limitation the 8 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9 // sell copies of the Software, and to permit persons to whom the Software is 10 // furnished to do so, subject to the following conditions: 11 // 12 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN 13 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED 14 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 16 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 17 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 18 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 19 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 // 21 //============================================================================== 22 mike 1.16 // 23 // Author: Mike Brasher (mbrasher@bmc.com) 24 // 25 // Modified By: 26 // 27 //%///////////////////////////////////////////////////////////////////////////// 28 29 #ifndef Pegasus_CIMClassRep_h 30 #define Pegasus_CIMClassRep_h 31 32 #include <Pegasus/Common/Config.h> | ||
33 mike 1.18 #include <Pegasus/Common/CIMObjectRep.h> | ||
34 mike 1.16 #include <Pegasus/Common/CIMMethod.h> 35 36 PEGASUS_NAMESPACE_BEGIN 37 38 class DeclContext; 39 class CIMClass; 40 class CIMConstClass; 41 class CIMInstanceRep; 42 | ||
43 mike 1.19 // REVIEW: document this class. 44 | ||
45 mike 1.18 class PEGASUS_COMMON_LINKAGE CIMClassRep : public CIMObjectRep | ||
46 mike 1.16 { 47 public: 48 49 CIMClassRep( 50 const String& className, 51 const String& superClassName); 52 | ||
53 mike 1.18 virtual ~CIMClassRep(); | ||
54 mike 1.16 55 Boolean isAssociation() const; 56 57 Boolean isAbstract() const; 58 59 const String& getSuperClassName() const { return _superClassName; } 60 61 void setSuperClassName(const String& superClassName); 62 | ||
63 mike 1.18 virtual void addProperty(const CIMProperty& x); | ||
64 mike 1.16 65 void addMethod(const CIMMethod& x); 66 67 Uint32 findMethod(const String& name); 68 69 Uint32 findMethod(const String& name) const 70 { 71 return ((CIMClassRep*)this)->findMethod(name); 72 } 73 74 Boolean existsMethod(const String& name); 75 76 Boolean existsMethod(const String& name) const 77 { 78 return ((CIMClassRep*)this)->existsMethod(name); 79 } 80 81 CIMMethod getMethod(Uint32 pos); 82 83 CIMConstMethod getMethod(Uint32 pos) const 84 { 85 mike 1.16 return ((CIMClassRep*)this)->getMethod(pos); 86 } 87 88 void removeMethod(Uint32 pos); 89 90 Uint32 getMethodCount() const; 91 92 void resolve( 93 DeclContext* context, 94 const String& nameSpace); 95 | ||
96 mike 1.18 Boolean identical(const CIMClassRep* x) const; 97 | ||
98 mike 1.16 void toXml(Array<Sint8>& out) const; 99 | ||
100 mike 1.18 void print(PEGASUS_STD(ostream)& os = PEGASUS_STD(cout)) const; | ||
101 mike 1.16 | ||
102 mike 1.17 void toMof(Array<Sint8>& out) const; 103 | ||
104 mike 1.18 void printMof(PEGASUS_STD(ostream)& os = PEGASUS_STD(cout)) const; | ||
105 mike 1.16 | ||
106 mike 1.18 virtual CIMObjectRep* clone() const | ||
107 mike 1.16 { 108 return new CIMClassRep(*this); 109 } 110 111 void getKeyNames(Array<String>& keyNames) const; 112 113 Boolean hasKeys() const; 114 115 private: 116 117 CIMClassRep(); 118 119 CIMClassRep(const CIMClassRep& x); 120 | ||
121 mike 1.18 CIMClassRep& operator=(const CIMClassRep& x) 122 { 123 return *this; 124 } | ||
125 mike 1.16 126 String _superClassName; 127 Array<CIMMethod> _methods; 128 129 friend class CIMClass; 130 friend class CIMInstanceRep; 131 }; 132 133 PEGASUS_NAMESPACE_END 134 135 #endif /* Pegasus_CIMClassRep_h */ |
No CVS admin address has been configured |
Powered by ViewCVS 0.9.2 |