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

  1 karl  1.15 //%2006////////////////////////////////////////////////////////////////////////
  2 kumpf 1.1  //
  3 karl  1.6  // 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.2  // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.6  // 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.12 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.15 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 kumpf 1.1  //
 14            // Permission is hereby granted, free of charge, to any person obtaining a copy
 15            // 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            // 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 karl  1.15 // 
 21 kumpf 1.1  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22            // 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            // 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            // 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: Chip Vincent (cvincent@us.ibm.com)
 33            //
 34            // Modified By:
 35            //
 36            //%/////////////////////////////////////////////////////////////////////////////
 37            
 38            #include "OperationContextInternal.h"
 39            
 40            PEGASUS_NAMESPACE_BEGIN
 41            
 42 kumpf 1.1  //
 43            // LocaleContainer
 44            //
 45            
 46            const String LocaleContainer::NAME = "LocaleContainer";
 47            
 48            LocaleContainer::LocaleContainer(const OperationContext::Container & container)
 49            {
 50                const LocaleContainer * p = dynamic_cast<const LocaleContainer *>(&container);
 51            
 52                if(p == 0)
 53                {
 54                    throw DynamicCastFailedException();
 55                }
 56            
 57                *this = *p;
 58            }
 59            
 60            LocaleContainer::LocaleContainer(const String & languageId)
 61            {
 62                _languageId = languageId;
 63 kumpf 1.1  }
 64            
 65            LocaleContainer::~LocaleContainer(void)
 66            {
 67            }
 68            
 69 chip  1.11 LocaleContainer & LocaleContainer::operator=(const LocaleContainer &container)
 70 brian.campbell 1.7  {
 71 chip           1.11     if(this == &container)
 72                         {
 73                             return(*this);
 74                         }
 75 brian.campbell 1.7  
 76 chip           1.11     _languageId = container._languageId;
 77                     
 78                         return(*this);
 79 brian.campbell 1.7  }
 80                     
 81 kumpf          1.1  String LocaleContainer::getName(void) const
 82                     {
 83                         return(NAME);
 84                     }
 85                     
 86                     OperationContext::Container * LocaleContainer::clone(void) const
 87                     {
 88                         return(new LocaleContainer(*this));
 89                     }
 90                     
 91                     void LocaleContainer::destroy(void)
 92                     {
 93                         delete this;
 94                     }
 95                     
 96                     String LocaleContainer::getLanguageId(void) const
 97                     {
 98                         return(_languageId);
 99                     }
100                     
101                     //
102 kumpf          1.1  // ProviderIdContainer
103                     //
104                     
105                     const String ProviderIdContainer::NAME = "ProviderIdContainer";
106                     
107                     ProviderIdContainer::ProviderIdContainer(const OperationContext::Container & container)
108                     {
109                         const ProviderIdContainer * p = dynamic_cast<const ProviderIdContainer *>(&container);
110                     
111                         if(p == 0)
112                         {
113                             throw DynamicCastFailedException();
114                         }
115                     
116                         *this = *p;
117                     }
118                     
119 chip           1.11 ProviderIdContainer::ProviderIdContainer(
120                         const CIMInstance & module,
121                         const CIMInstance & provider,
122 chip           1.14     Boolean isRemoteNameSpace,
123 chip           1.13     const String & remoteInfo)
124                         : _module(module),
125                         _provider(provider),
126                         _isRemoteNameSpace(isRemoteNameSpace),
127                         _remoteInfo(remoteInfo)
128 kumpf          1.1  {
129                     }
130                     
131                     ProviderIdContainer::~ProviderIdContainer(void)
132                     {
133                     }
134                     
135 chip           1.11 ProviderIdContainer & ProviderIdContainer::operator=(const ProviderIdContainer & container)
136 brian.campbell 1.7  {
137 chip           1.11     if(this == &container)
138 brian.campbell 1.7      {
139 chip           1.11         return(*this);
140 brian.campbell 1.7      }
141                     
142                         _module = container._module;
143                         _provider = container._provider;
144 chip           1.13     _isRemoteNameSpace = container._isRemoteNameSpace;
145 brian.campbell 1.7      _remoteInfo = container._remoteInfo;
146                     
147 chip           1.11     return(*this);
148 brian.campbell 1.7  }
149                     
150 kumpf          1.1  String ProviderIdContainer::getName(void) const
151                     {
152                         return(NAME);
153                     }
154                     
155                     OperationContext::Container * ProviderIdContainer::clone(void) const
156                     {
157                         return(new ProviderIdContainer(*this));
158                     }
159                     
160                     void ProviderIdContainer::destroy(void)
161                     {
162                         delete this;
163                     }
164                     
165                     CIMInstance ProviderIdContainer::getModule(void) const
166                     {
167                         return(_module);
168                     }
169                     
170                     CIMInstance ProviderIdContainer::getProvider(void) const
171 kumpf          1.1  {
172                         return(_provider);
173                     }
174                     
175 schuur         1.5  Boolean ProviderIdContainer::isRemoteNameSpace(void) const
176                     {
177 chip           1.13     return(_isRemoteNameSpace);
178 schuur         1.5  }
179                     
180 chip           1.13 String ProviderIdContainer::getRemoteInfo(void) const
181 schuur         1.5  {
182                         return(_remoteInfo);
183                     }
184                     
185 chip           1.11 //
186                     // CachedClassDefinitionContainer
187                     //
188                     
189                     const String CachedClassDefinitionContainer::NAME = "CachedClassDefinitionContainer";
190                     
191                     CachedClassDefinitionContainer::CachedClassDefinitionContainer(const OperationContext::Container & container)
192                     {
193                         const CachedClassDefinitionContainer * p = dynamic_cast<const CachedClassDefinitionContainer *>(&container);
194                     
195                         if(p == 0)
196                         {
197                             throw DynamicCastFailedException();
198                         }
199                     
200                         *this = *p;
201                     }
202                     
203                     
204                     CachedClassDefinitionContainer::CachedClassDefinitionContainer(const CIMClass & cimClass)
205                         : _cimClass(cimClass)
206 chip           1.11 {
207                     }
208                     
209                     CachedClassDefinitionContainer::~CachedClassDefinitionContainer(void)
210                     {
211                     }
212                     
213                     CachedClassDefinitionContainer & CachedClassDefinitionContainer::operator=(const CachedClassDefinitionContainer & container)
214                     {
215                         if(this == &container)
216                         {
217                             return(*this);
218                         }
219                     
220                         _cimClass = container._cimClass;
221                     
222                         return(*this);
223                     }
224                     
225                     String CachedClassDefinitionContainer::getName(void) const
226                     {
227 chip           1.11     return(NAME);
228                     }
229                     
230                     OperationContext::Container * CachedClassDefinitionContainer::clone(void) const
231                     {
232                         return(new CachedClassDefinitionContainer(*this));
233                     }
234                     
235                     void CachedClassDefinitionContainer::destroy(void)
236                     {
237                         delete this;
238                     }
239                     
240                     CIMClass CachedClassDefinitionContainer::getClass(void) const
241                     {
242                         return(_cimClass);
243                     }
244                     
245 kumpf          1.1  PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2