(file) Return to CIMClassRep.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

  1 martin 1.52 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.53 //
  3 martin 1.52 // 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 martin 1.53 //
 10 martin 1.52 // 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 martin 1.53 //
 17 martin 1.52 // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19 martin 1.53 //
 20 martin 1.52 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.53 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.52 // 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 martin 1.53 //
 28 martin 1.52 //////////////////////////////////////////////////////////////////////////
 29 mike   1.16 //
 30             //%/////////////////////////////////////////////////////////////////////////////
 31             
 32             #ifndef Pegasus_CIMClassRep_h
 33             #define Pegasus_CIMClassRep_h
 34             
 35             #include <Pegasus/Common/Config.h>
 36 kumpf  1.33 #include <Pegasus/Common/InternalException.h>
 37 kumpf  1.31 #include <Pegasus/Common/CIMName.h>
 38 mike   1.18 #include <Pegasus/Common/CIMObjectRep.h>
 39 mike   1.16 #include <Pegasus/Common/CIMMethod.h>
 40 marek  1.50 #include <Pegasus/Common/CIMMethodRep.h>
 41 karl   1.38 #include <Pegasus/Common/CIMInstance.h>
 42 karl   1.37 #include <Pegasus/Common/CIMPropertyList.h>
 43 kumpf  1.30 #include <Pegasus/Common/Linkage.h>
 44 mike   1.16 
 45             PEGASUS_NAMESPACE_BEGIN
 46             
 47             class DeclContext;
 48             class CIMClass;
 49             class CIMConstClass;
 50             class CIMInstanceRep;
 51             
 52 karl   1.21 // ATTN: KS P3 -document the CIMClass and CIMObjectRep  classes.
 53 mike   1.19 
 54 mike   1.45 class CIMClassRep : public CIMObjectRep
 55 mike   1.16 {
 56             public:
 57             
 58                 CIMClassRep(
 59 kumpf  1.46         const CIMName& className,
 60                     const CIMName& superClassName);
 61 mike   1.16 
 62 mike   1.18     virtual ~CIMClassRep();
 63 mike   1.16 
 64                 Boolean isAssociation() const;
 65             
 66                 Boolean isAbstract() const;
 67 karl   1.21 
 68 kumpf  1.31     const CIMName& getSuperClassName() const { return _superClassName; }
 69 mike   1.16 
 70 marek  1.50     void setSuperClassName(const CIMName& superClassName)
 71                 {
 72                     _superClassName = superClassName;
 73                 }
 74 mike   1.16 
 75 mike   1.18     virtual void addProperty(const CIMProperty& x);
 76 mike   1.16 
 77                 void addMethod(const CIMMethod& x);
 78             
 79 marek  1.50     Uint32 findMethod(const CIMName& name) const
 80                 {
 81                     return _methods.find(name, generateCIMNameTag(name));
 82                 }
 83 mike   1.16 
 84 marek  1.50     CIMMethod getMethod(Uint32 index)
 85                 {
 86                     return _methods[index];
 87                 }
 88 mike   1.16 
 89 kumpf  1.34     CIMConstMethod getMethod(Uint32 index) const
 90 mike   1.16     {
 91 kumpf  1.46         return ((CIMClassRep*)this)->getMethod(index);
 92 mike   1.16     }
 93             
 94 marek  1.50     void removeMethod(Uint32 index)
 95                 {
 96                     _methods.remove(index);
 97                 }
 98 mike   1.16 
 99 marek  1.50     Uint32 getMethodCount() const
100                 {
101                     return _methods.size();
102                 }
103 mike   1.16 
104                 void resolve(
105 kumpf  1.46         DeclContext* context,
106                     const CIMNamespaceName& nameSpace);
107 mike   1.16 
108 kumpf  1.23     virtual Boolean identical(const CIMObjectRep* x) const;
109 mike   1.18 
110                 virtual CIMObjectRep* clone() const
111 mike   1.16     {
112 kumpf  1.46         return new CIMClassRep(*this);
113 mike   1.16     }
114             
115 kumpf  1.31     void getKeyNames(Array<CIMName>& keyNames) const;
116 mike   1.16 
117                 Boolean hasKeys() const;
118             
119 karl   1.39     CIMInstance buildInstance(Boolean includeQualifiers,
120 karl   1.37         Boolean includeClassOrigin,
121                     const CIMPropertyList & propertyList) const;
122             
123 mike   1.16 private:
124             
125                 CIMClassRep(const CIMClassRep& x);
126             
127 kumpf  1.47     CIMClassRep();    // Unimplemented
128                 CIMClassRep& operator=(const CIMClassRep& x);    // Unimplemented
129 mike   1.16 
130 kumpf  1.31     CIMName _superClassName;
131 marek  1.48     typedef OrderedSet<CIMMethod,
132                                    CIMMethodRep,
133                                    PEGASUS_METHOD_ORDEREDSET_HASHSIZE> MethodSet;
134                 MethodSet _methods;
135 mike   1.16 
136                 friend class CIMClass;
137                 friend class CIMInstanceRep;
138 schuur 1.36     friend class BinaryStreamer;
139 mike   1.51     friend class CIMBuffer;
140 mike   1.16 };
141             
142             PEGASUS_NAMESPACE_END
143             
144             #endif /* Pegasus_CIMClassRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2