• Main Page
  • Classes
  • Files
  • File List

/var/tmp/axbld-24884/rpm/BUILD/pegasus/src/Pegasus/Common/CIMName.h

00001 //%LICENSE////////////////////////////////////////////////////////////////
00002 //
00003 // Licensed to The Open Group (TOG) under one or more contributor license
00004 // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
00005 // this work for additional information regarding copyright ownership.
00006 // Each contributor licenses this file to you under the OpenPegasus Open
00007 // Source License; you may not use this file except in compliance with the
00008 // License.
00009 //
00010 // Permission is hereby granted, free of charge, to any person obtaining a
00011 // copy of this software and associated documentation files (the "Software"),
00012 // to deal in the Software without restriction, including without limitation
00013 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
00014 // and/or sell copies of the Software, and to permit persons to whom the
00015 // Software is furnished to do so, subject to the following conditions:
00016 //
00017 // The above copyright notice and this permission notice shall be included
00018 // in all copies or substantial portions of the Software.
00019 //
00020 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00021 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00022 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00023 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
00024 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
00025 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
00026 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00027 //
00029 //
00030 //%/////////////////////////////////////////////////////////////////////////////
00031 
00032 #ifndef Pegasus_Name_h
00033 #define Pegasus_Name_h
00034 
00035 #include <Pegasus/Common/Config.h>
00036 #include <Pegasus/Common/Linkage.h>
00037 #include <Pegasus/Common/String.h>
00038 #include <Pegasus/Common/Array.h>
00039 #include <Pegasus/Common/Exception.h>
00040 
00041 PEGASUS_NAMESPACE_BEGIN
00042 
00044 //
00045 // CIMName
00046 //
00048 
00064 class PEGASUS_COMMON_LINKAGE CIMName
00065 {
00066 public:
00067 
00071     CIMName();
00072 
00079     CIMName(const String& name);
00080 
00089     CIMName(const char* name);
00090 
00096     CIMName& operator=(const CIMName& name);
00097 
00112     CIMName& operator=(const String& name);
00113 
00123     const String& getString() const;
00124 
00136     Boolean isNull() const;
00137 
00147     void clear();
00148 
00162     Boolean equal(const CIMName& name) const;
00163 
00175     static Boolean legal(const String& name);
00176 
00177 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
00178 
00186     Boolean equal(const char* name) const;
00187 
00198     CIMName& operator=(const char* name);
00199 
00200 #endif /* PEGASUS_USE_EXPERIMENTAL_INTERFACES */
00201 
00202 private:
00203     String cimName;
00204 };
00205 
00218 PEGASUS_COMMON_LINKAGE Boolean operator==(
00219     const CIMName& name1,
00220     const CIMName& name2);
00221 
00228 PEGASUS_COMMON_LINKAGE Boolean operator!=(
00229     const CIMName& name1,
00230     const CIMName& name2);
00231 
00232 #define PEGASUS_ARRAY_T CIMName
00233 # include "ArrayInter.h"
00234 #undef PEGASUS_ARRAY_T
00235 
00236 
00238 //
00239 // CIMNamespaceName
00240 //
00242 
00255 class PEGASUS_COMMON_LINKAGE CIMNamespaceName
00256 {
00257 public:
00258 
00262     CIMNamespaceName();
00263 
00270     CIMNamespaceName(const String& name);
00271 
00280     CIMNamespaceName(const char* name);
00281 
00288     CIMNamespaceName& operator=(const CIMNamespaceName& name);
00289 
00304     CIMNamespaceName& operator=(const String& name);
00305 
00315     const String& getString() const;
00316 
00328     Boolean isNull() const;
00329 
00339     void clear();
00340 
00354     Boolean equal(const CIMNamespaceName& name) const;
00355 
00367     static Boolean legal(const String& name);
00368 
00369 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
00370 
00378     Boolean equal(const char* name) const;
00379 
00391     CIMNamespaceName& operator=(const char* name);
00392 
00393 #endif /* PEGASUS_USE_EXPERIMENTAL_INTERFACES */
00394 
00395 private:
00396     String cimNamespaceName;
00397 };
00398 
00411 PEGASUS_COMMON_LINKAGE Boolean operator==(
00412     const CIMNamespaceName& name1,
00413     const CIMNamespaceName& name2);
00414 
00421 PEGASUS_COMMON_LINKAGE Boolean operator!=(
00422     const CIMNamespaceName& name1,
00423     const CIMNamespaceName& name2);
00424 
00425 #define PEGASUS_ARRAY_T CIMNamespaceName
00426 # include "ArrayInter.h"
00427 #undef PEGASUS_ARRAY_T
00428 
00429 PEGASUS_NAMESPACE_END
00430 
00431 #ifdef PEGASUS_INTERNALONLY
00432 # include "CIMNameInline.h"
00433 #endif
00434 
00435 #endif /* Pegasus_Name_h */