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

 1 mike  1.9 //%/////////////////////////////////////////////////////////////////////////////
 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.9 //
23           // Author: Mike Brasher (mbrasher@bmc.com)
24           //
25           // Modified By:
26           //
27           //%/////////////////////////////////////////////////////////////////////////////
28           
29           #include "CIMClass.h"
30           
31           PEGASUS_NAMESPACE_BEGIN
32           
33           #define PEGASUS_ARRAY_T CIMClass
34           # include "ArrayImpl.h"
35           #undef PEGASUS_ARRAY_T
36           
37 mike  1.10 ////////////////////////////////////////////////////////////////////////////////
38            //
39            // CIMClass
40            //
41            ////////////////////////////////////////////////////////////////////////////////
42            
43            CIMClass::CIMClass(const CIMObject& x)
44            {
45                if (!(_rep = dynamic_cast<CIMClassRep*>(x._rep)))
46            	throw DynamicCastFailed();
47            }
48            
49            CIMClass::CIMClass(const CIMObject& x, NoThrow&)
50            {
51                _rep = dynamic_cast<CIMClassRep*>(x._rep);
52            }
53            
54 mike  1.9  Boolean CIMClass::identical(const CIMConstClass& x) const
55            {
56                x._checkRep();
57                _checkRep();
58                return _rep->identical(x._rep);
59 mike  1.10 }
60            
61            ////////////////////////////////////////////////////////////////////////////////
62            //
63            // CIMConstClass
64            //
65            ////////////////////////////////////////////////////////////////////////////////
66            
67            CIMConstClass::CIMConstClass(const CIMObject& x)
68            {
69                if (!(_rep = dynamic_cast<CIMClassRep*>(x._rep)))
70            	throw DynamicCastFailed();
71            }
72            
73            CIMConstClass::CIMConstClass(const CIMConstObject& x)
74            {
75                if (!(_rep = dynamic_cast<CIMClassRep*>(x._rep)))
76            	throw DynamicCastFailed();
77            }
78            
79            CIMConstClass::CIMConstClass(const CIMObject& x, NoThrow&)
80 mike  1.10 {
81                _rep = dynamic_cast<CIMClassRep*>(x._rep);
82            }
83            
84            CIMConstClass::CIMConstClass(const CIMConstObject& x, NoThrow&)
85            {
86                _rep = dynamic_cast<CIMClassRep*>(x._rep);
87 mike  1.9  }
88            
89            PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2