(file) Return to CIMClassRep.h CVS log (file) (dir) 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 chip  1.20 // 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 mike  1.16 // 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 chip  1.20 //
 12            // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 13 mike  1.16 // 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 chip  1.20 // 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 mike  1.16 // 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            //
 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 karl  1.21 // ATTN: KS P3 -document the CIMClass and CIMObjectRep  classes.
 44 mike  1.19 
 45 mike  1.18 class PEGASUS_COMMON_LINKAGE CIMClassRep : public CIMObjectRep
 46 mike  1.16 {
 47            public:
 48            
 49                CIMClassRep(
 50 kumpf 1.26 	const CIMObjectPath& reference,
 51 mike  1.16 	const String& superClassName);
 52            
 53 mike  1.18     virtual ~CIMClassRep();
 54 mike  1.16 
 55                Boolean isAssociation() const;
 56            
 57                Boolean isAbstract() const;
 58 karl  1.21 
 59                Boolean isTrueQualifier(const String& name) const;
 60 mike  1.16 
 61                const String& getSuperClassName() const { return _superClassName; }
 62            
 63                void setSuperClassName(const String& superClassName);
 64            
 65 mike  1.18     virtual void addProperty(const CIMProperty& x);
 66 mike  1.16 
 67                void addMethod(const CIMMethod& x);
 68            
 69 kumpf 1.22     Uint32 findMethod(const String& name) const;
 70 mike  1.16 
 71 kumpf 1.22     Boolean existsMethod(const String& name) const;
 72 mike  1.16 
 73                CIMMethod getMethod(Uint32 pos);
 74            
 75                CIMConstMethod getMethod(Uint32 pos) const
 76                {
 77            	return ((CIMClassRep*)this)->getMethod(pos);
 78                }
 79            
 80                void removeMethod(Uint32 pos);
 81            
 82                Uint32 getMethodCount() const;
 83            
 84                void resolve(
 85            	DeclContext* context,
 86            	const String& nameSpace);
 87            
 88 kumpf 1.23     virtual Boolean identical(const CIMObjectRep* x) const;
 89 mike  1.18 
 90 mike  1.16     void toXml(Array<Sint8>& out) const;
 91            
 92 mike  1.17     void toMof(Array<Sint8>& out) const;
 93            
 94 mike  1.18     virtual CIMObjectRep* clone() const
 95 mike  1.16     {
 96            	return new CIMClassRep(*this);
 97                }
 98            
 99                void getKeyNames(Array<String>& keyNames) const;
100            
101                Boolean hasKeys() const;
102            
103            private:
104            
105                CIMClassRep();
106            
107                CIMClassRep(const CIMClassRep& x);
108            
109 kumpf 1.22     // This method is declared and made private so that the compiler does
110                // not implicitly define a default copy constructor.
111 mike  1.18     CIMClassRep& operator=(const CIMClassRep& x)
112                {
113 kumpf 1.27         //PEGASUS_ASSERT(0);
114 kumpf 1.22         return *this;
115 mike  1.18     }
116 mike  1.16 
117                String _superClassName;
118                Array<CIMMethod> _methods;
119            
120                friend class CIMClass;
121                friend class CIMInstanceRep;
122            };
123            
124            PEGASUS_NAMESPACE_END
125            
126            #endif /* Pegasus_CIMClassRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2