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

  1 karl  1.28 //%2006////////////////////////////////////////////////////////////////////////
  2 mike  1.1  //
  3 karl  1.23 // 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.21 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.23 // 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.26 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.28 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 mike  1.1  //
 14            // Permission is hereby granted, free of charge, to any person obtaining a copy
 15 chip  1.2  // 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.1  // 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.16 // 
 21 chip  1.2  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 mike  1.1  // 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.2  // 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.1  // 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            // Author: Mike Brasher (mbrasher@bmc.com)
 33            //
 34 kumpf 1.15 // Modified By: Carol Ann Krug Graves, Hewlett-Packard Company
 35            //                  (carolann_graves@hp.com)
 36 schuur 1.22 //              Adriann Schuur (schuur@de.ibm.com) PEP 164
 37 dave.sudlik 1.24 //              Dave Sudlik, IBM (dsudlik@us.ibm.com)
 38 david.dillard 1.25 //              David Dillard, VERITAS Software Corp.
 39                    //                  (david.dillard@veritas.com)
 40 mike          1.1  //
 41                    //%/////////////////////////////////////////////////////////////////////////////
 42                    
 43                    #ifndef Pegasus_CIMObjectRep_h
 44                    #define Pegasus_CIMObjectRep_h
 45                    
 46                    #include <Pegasus/Common/Config.h>
 47 kumpf         1.19 #include <Pegasus/Common/Linkage.h>
 48 mike          1.1  #include <Pegasus/Common/String.h>
 49 kumpf         1.10 #include <Pegasus/Common/Sharable.h>
 50 kumpf         1.19 #include <Pegasus/Common/CIMName.h>
 51 mike          1.1  #include <Pegasus/Common/CIMProperty.h>
 52                    #include <Pegasus/Common/CIMQualifier.h>
 53 kumpf         1.8  #include <Pegasus/Common/CIMQualifierList.h>
 54 mike          1.1  #include <Pegasus/Common/Array.h>
 55                    
 56                    PEGASUS_NAMESPACE_BEGIN
 57                    
 58                    /** This class defines the internal representation of the CIMObject class.
 59                    
 60                        This base class has two implementations: CIMClassRep CIMInstanceRep. The
 61                        CIMObjectRep pointer member of CIMObject points to one of these.
 62                    
 63                        This class contains what is common to CIMClass and CIMInstance.
 64                    */
 65                    class PEGASUS_COMMON_LINKAGE CIMObjectRep : public Sharable
 66                    {
 67                    public:
 68                    
 69 kumpf         1.12     CIMObjectRep(const CIMObjectPath& className);
 70 mike          1.1  
 71                        virtual ~CIMObjectRep();
 72                    
 73 kumpf         1.19     const CIMName& getClassName() const
 74 chip          1.2      {
 75 chip          1.4  	return _reference.getClassName();
 76                        }
 77                    
 78 kumpf         1.12     const CIMObjectPath& getPath() const
 79 chip          1.4      {
 80                    	return _reference;
 81 mike          1.1      }
 82 kumpf         1.15 
 83                        /**
 84                          Sets the object path for the object
 85                          @param  path  CIMObjectPath containing the object path
 86                         */
 87                        void setPath (const CIMObjectPath & path);
 88 mike          1.1  
 89                        void addQualifier(const CIMQualifier& qualifier)
 90                        {
 91                    	_qualifiers.add(qualifier);
 92                        }
 93                    
 94 kumpf         1.19     Uint32 findQualifier(const CIMName& name) const
 95 mike          1.1      {
 96                    	return _qualifiers.find(name);
 97                        }
 98                    
 99 kumpf         1.20     CIMQualifier getQualifier(Uint32 index)
100 mike          1.1      {
101 kumpf         1.20 	return _qualifiers.getQualifier(index);
102 mike          1.1      }
103                    
104 kumpf         1.20     CIMConstQualifier getQualifier(Uint32 index) const
105 mike          1.1      {
106 kumpf         1.20 	return _qualifiers.getQualifier(index);
107 mike          1.1      }
108                    
109 kumpf         1.19     Boolean isTrueQualifer(CIMName& name) const
110 karl          1.5      {
111                    	return _qualifiers.isTrue(name);
112                        }
113                    
114 mike          1.1      Uint32 getQualifierCount() const
115                        {
116                    	return _qualifiers.getCount();
117                        }
118                    
119 kumpf         1.20     void removeQualifier(Uint32 index)
120 mike          1.1      {
121 kumpf         1.20 	_qualifiers.removeQualifier(index);
122 mike          1.1      }
123                    
124                        virtual void addProperty(const CIMProperty& x);
125                    
126 kumpf         1.19     Uint32 findProperty(const CIMName& name) const;
127 mike          1.1  
128 kumpf         1.20     CIMProperty getProperty(Uint32 index);
129 mike          1.1  
130 kumpf         1.20     CIMConstProperty getProperty(Uint32 index) const
131 mike          1.1      {
132 kumpf         1.20 	return ((CIMObjectRep*)this)->getProperty(index);
133 mike          1.1      }
134                    
135 kumpf         1.20     void removeProperty(Uint32 index);
136 mike          1.1  
137                        Uint32 getPropertyCount() const;
138                    
139                        virtual Boolean identical(const CIMObjectRep* x) const;
140                    
141 mike          1.27     virtual void toXml(Buffer& out) const = 0;
142 mike          1.1  
143 mike          1.27     virtual void toMof(Buffer& out) const = 0;
144 dave.sudlik   1.24 
145 mike          1.1      virtual CIMObjectRep* clone() const = 0;
146                    
147                    protected:
148                    
149                        CIMObjectRep();
150                    
151                        CIMObjectRep(const CIMObjectRep& x);
152                    
153 kumpf         1.12     CIMObjectPath _reference;
154 kumpf         1.9      CIMQualifierList _qualifiers;
155                        Array<CIMProperty> _properties;
156                        Boolean _resolved;
157                    
158                    private:
159                    
160                        // This method is declared and made private so that the compiler does
161                        // not implicitly define a default copy constructor.
162 mike          1.1      CIMObjectRep& operator=(const CIMObjectRep& x)
163                        {
164 kumpf         1.14 	//PEGASUS_ASSERT(0);
165 mike          1.1  	return *this;
166                        }
167                    
168                        friend class CIMObject;
169 schuur        1.22     friend class BinaryStreamer;
170 mike          1.1  };
171                    
172                    PEGASUS_NAMESPACE_END
173                    
174                    #endif /* Pegasus_CIMObjectRep_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2