![]() ![]() |
![]() |
1 mike 1.1 //BEGIN_LICENSE 2 // 3 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM 4 // 5 // Permission is hereby granted, free of charge, to any person obtaining a 6 // copy of this software and associated documentation files (the "Software"), 7 // to deal in the Software without restriction, including without limitation 8 // the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 // and/or sell copies of the Software, and to permit persons to whom the 10 // Software is furnished to do so, subject to the following conditions: 11 // 12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 // DEALINGS IN THE SOFTWARE. 19 // 20 //END_LICENSE 21 //BEGIN_HISTORY 22 mike 1.1 // 23 // Author: 24 // 25 // $Log: CIMClassRep.h,v $ | ||
26 bob 1.4 // Revision 1.3 2001/02/20 05:16:57 mike 27 // Implemented CIMInstance::getInstanceName() 28 // | ||
29 mike 1.3 // Revision 1.2 2001/02/19 01:47:16 mike | ||
30 mike 1.5 // Renamed names of the form CIMConst to CIMConst. | ||
31 mike 1.3 // | ||
32 mike 1.2 // Revision 1.1 2001/02/18 18:39:05 mike 33 // new 34 // | ||
35 mike 1.1 // Revision 1.2 2001/02/18 03:56:00 mike | ||
36 mike 1.5 // Changed more class names (e.g., ConstClassDecl -> CIMConstClass) | ||
37 mike 1.1 // 38 // Revision 1.1 2001/02/16 02:06:06 mike 39 // Renamed many classes and headers. 40 // 41 // Revision 1.2 2001/01/15 04:31:43 mike 42 // worked on resolve scheme 43 // 44 // Revision 1.1.1.1 2001/01/14 19:50:39 mike 45 // Pegasus import 46 // 47 // 48 //END_HISTORY 49 50 #ifndef Pegasus_ClassDeclRep_h 51 #define Pegasus_ClassDeclRep_h 52 53 #include <Pegasus/Common/Config.h> 54 #include <Pegasus/Common/Exception.h> 55 #include <Pegasus/Common/String.h> 56 #include <Pegasus/Common/CIMQualifier.h> 57 #include <Pegasus/Common/CIMQualifierList.h> 58 mike 1.1 #include <Pegasus/Common/CIMProperty.h> 59 #include <Pegasus/Common/CIMMethod.h> 60 61 PEGASUS_NAMESPACE_BEGIN 62 63 class DeclContext; 64 class CIMClass; | ||
65 mike 1.5 class CIMConstClass; | ||
66 mike 1.1 class CIMInstanceRep; 67 68 class PEGASUS_COMMON_LINKAGE CIMClassRep : public Sharable 69 { 70 public: 71 72 CIMClassRep( 73 const String& className, 74 const String& superClassName); 75 76 ~CIMClassRep(); 77 78 Boolean isAssociation() const; 79 80 Boolean isAbstract() const; 81 82 const String& getClassName() const { return _className; } 83 84 const String& getSuperClassName() const { return _superClassName; } 85 86 void setSuperClassName(const String& superClassName); 87 mike 1.1 88 void addQualifier(const CIMQualifier& qualifier) 89 { 90 _qualifiers.add(qualifier); 91 } 92 93 Uint32 findQualifier(const String& name) const 94 { 95 return _qualifiers.find(name); 96 } 97 98 CIMQualifier getQualifier(Uint32 pos) 99 { 100 return _qualifiers.getQualifier(pos); 101 } 102 103 CIMConstQualifier getQualifier(Uint32 pos) const 104 { 105 return _qualifiers.getQualifier(pos); 106 } 107 108 mike 1.1 Uint32 getQualifierCount() const 109 { 110 return _qualifiers.getCount(); 111 } 112 113 void addProperty(const CIMProperty& x); 114 115 void removeProperty(Uint32 pos); 116 117 Uint32 findProperty(const String& name); 118 119 Uint32 findProperty(const String& name) const 120 { 121 return ((CIMClassRep*)this)->findProperty(name); 122 } 123 124 CIMProperty getProperty(Uint32 pos); 125 | ||
126 mike 1.5 CIMConstProperty getProperty(Uint32 pos) const | ||
127 mike 1.1 { 128 return ((CIMClassRep*)this)->getProperty(pos); 129 } 130 131 Uint32 getPropertyCount() const; 132 133 void addMethod(const CIMMethod& x); 134 135 Uint32 findMethod(const String& name); 136 137 Uint32 findMethod(const String& name) const 138 { 139 return ((CIMClassRep*)this)->findMethod(name); 140 } 141 142 CIMMethod getMethod(Uint32 pos); 143 144 CIMConstMethod getMethod(Uint32 pos) const 145 { 146 return ((CIMClassRep*)this)->getMethod(pos); 147 } 148 mike 1.1 149 Uint32 getMethodCount() const; 150 151 void resolve( 152 DeclContext* context, 153 const String& nameSpace); 154 155 void toXml(Array<Sint8>& out) const; 156 | ||
157 bob 1.4 void print(std::ostream &o=std::cout) const; | ||
158 mike 1.1 159 Boolean identical(const CIMClassRep* x) const; 160 161 CIMClassRep* clone() const 162 { 163 return new CIMClassRep(*this); 164 } | ||
165 mike 1.2 | ||
166 mike 1.3 /** Return the names of all properties which bear a true key qualifier. 167 Sort the keys in ascending order. 168 */ | ||
169 mike 1.2 void getKeyNames(Array<String>& keyNames) const; | ||
170 mike 1.1 171 private: 172 173 CIMClassRep(); 174 175 CIMClassRep(const CIMClassRep& x); 176 177 CIMClassRep& operator=(const CIMClassRep& x); 178 179 String _className; 180 String _superClassName; 181 CIMQualifierList _qualifiers; 182 Array<CIMProperty> _properties; 183 Array<CIMMethod> _methods; 184 Boolean _resolved; 185 186 friend class CIMClass; 187 friend class CIMInstanceRep; 188 }; 189 190 PEGASUS_NAMESPACE_END 191 mike 1.1 192 #endif /* Pegasus_ClassDeclRep_h */ |
No CVS admin address has been configured |
Powered by ViewCVS 0.9.2 |