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

  1 kumpf 1.1 //%/////////////////////////////////////////////////////////////////////////////
  2           //
  3           // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
  4           // The Open Group, Tivoli Systems
  5           //
  6           // Permission is hereby granted, free of charge, to any person obtaining a copy
  7           // of this software and associated documentation files (the "Software"), to
  8           // deal in the Software without restriction, including without limitation the
  9           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 10           // sell copies of the Software, and to permit persons to whom the Software is
 11           // furnished to do so, subject to the following conditions:
 12           // 
 13           // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 14           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 15           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 16           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 17           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 18           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 19           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 20           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 21           //
 22 kumpf 1.1 //==============================================================================
 23           //
 24           // Author: Chip Vincent (cvincent@us.ibm.com)
 25           //
 26           // Modified By:
 27           //
 28           //%/////////////////////////////////////////////////////////////////////////////
 29           
 30           #include "OperationContextInternal.h"
 31           
 32           PEGASUS_NAMESPACE_BEGIN
 33           
 34           //
 35           // LocaleContainer
 36           //
 37           
 38           const String LocaleContainer::NAME = "LocaleContainer";
 39           
 40           LocaleContainer::LocaleContainer(const OperationContext::Container & container)
 41           {
 42               const LocaleContainer * p = dynamic_cast<const LocaleContainer *>(&container);
 43 kumpf 1.1 
 44               if(p == 0)
 45               {
 46                   throw DynamicCastFailedException();
 47               }
 48           
 49               *this = *p;
 50           }
 51           
 52           LocaleContainer::LocaleContainer(const String & languageId)
 53           #ifndef PEGASUS_REMOVE_DEPRECATED
 54               : OperationContext::Container(CONTEXT_LOCALE)
 55           #endif
 56           {
 57               _languageId = languageId;
 58           }
 59           
 60           LocaleContainer::~LocaleContainer(void)
 61           {
 62           }
 63           
 64 kumpf 1.1 String LocaleContainer::getName(void) const
 65           {
 66               return(NAME);
 67           }
 68           
 69           OperationContext::Container * LocaleContainer::clone(void) const
 70           {
 71               return(new LocaleContainer(*this));
 72           }
 73           
 74           void LocaleContainer::destroy(void)
 75           {
 76               delete this;
 77           }
 78           
 79           String LocaleContainer::getLanguageId(void) const
 80           {
 81               return(_languageId);
 82           }
 83           
 84           //
 85 kumpf 1.1 // ProviderIdContainer
 86           //
 87           
 88           const String ProviderIdContainer::NAME = "ProviderIdContainer";
 89           
 90           ProviderIdContainer::ProviderIdContainer(const OperationContext::Container & container)
 91           {
 92               const ProviderIdContainer * p = dynamic_cast<const ProviderIdContainer *>(&container);
 93           
 94               if(p == 0)
 95               {
 96                   throw DynamicCastFailedException();
 97               }
 98           
 99               *this = *p;
100           }
101           
102           ProviderIdContainer::ProviderIdContainer(const CIMInstance & module, const CIMInstance & provider)
103           #ifndef PEGASUS_REMOVE_DEPRECATED
104               : OperationContext::Container(CONTEXT_PROVIDERID)
105           #endif
106 kumpf 1.1 {
107               _module = module;
108               _provider = provider;
109           }
110           
111           ProviderIdContainer::~ProviderIdContainer(void)
112           {
113           }
114           
115           String ProviderIdContainer::getName(void) const
116           {
117               return(NAME);
118           }
119           
120           OperationContext::Container * ProviderIdContainer::clone(void) const
121           {
122               return(new ProviderIdContainer(*this));
123           }
124           
125           void ProviderIdContainer::destroy(void)
126           {
127 kumpf 1.1     delete this;
128           }
129           
130           CIMInstance ProviderIdContainer::getModule(void) const
131           {
132               return(_module);
133           }
134           
135           CIMInstance ProviderIdContainer::getProvider(void) const
136           {
137               return(_provider);
138           }
139           
140           PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2