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

  1 r.kieninger 1.2 //%2005////////////////////////////////////////////////////////////////////////
  2                 //
  3                 // 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                 // IBM Corp.; EMC Corporation, The Open Group.
  7                 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8                 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9                 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10                 // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11                 //
 12                 // Permission is hereby granted, free of charge, to any person obtaining a copy
 13                 // of this software and associated documentation files (the "Software"), to
 14                 // deal in the Software without restriction, including without limitation the
 15                 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 16                 // sell copies of the Software, and to permit persons to whom the Software is
 17                 // furnished to do so, subject to the following conditions:
 18                 //
 19                 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 20                 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 21                 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 22 r.kieninger 1.2 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 23                 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 24                 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 25                 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 26                 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27                 //
 28                 //==============================================================================
 29                 //
 30                 //%/////////////////////////////////////////////////////////////////////////////
 31                 
 32                 /* If neither of these defined, suppress compilation of this header. */
 33                 #if !defined(PEGASUS_INTERNALONLY) && !defined(Pegasus_CIMNameInline_cxx)
 34                 # define Pegasus_CIMNameInline_h
 35                 #endif
 36                 
 37                 #ifndef Pegasus_CIMNameInline_h
 38                 #define Pegasus_CIMNameInline_h
 39                 
 40                 #include <Pegasus/Common/CIMName.h>
 41                 
 42                 #ifdef Pegasus_CIMNameInline_cxx
 43 r.kieninger 1.2 # define PEGASUS_CIMNAME_INLINE
 44                 #else
 45                 # define PEGASUS_CIMNAME_INLINE inline
 46                 #endif
 47                 
 48                 PEGASUS_NAMESPACE_BEGIN
 49                 
 50                 PEGASUS_CIMNAME_INLINE CIMName::CIMName()
 51                 {
 52                 }
 53                 
 54                 PEGASUS_CIMNAME_INLINE CIMName& CIMName::operator=(const CIMName& name)
 55                 {
 56                     cimName = name.cimName;
 57                     return *this;
 58                 }
 59                 
 60                 PEGASUS_CIMNAME_INLINE const String& CIMName::getString() const
 61                 {
 62                     return cimName;
 63                 }
 64 r.kieninger 1.2 
 65                 PEGASUS_CIMNAME_INLINE Boolean CIMName::isNull() const
 66                 {
 67                     return (cimName.size() == 0);
 68                 }
 69                 
 70                 PEGASUS_CIMNAME_INLINE void CIMName::clear()
 71                 {
 72                     cimName.clear();
 73                 }
 74                 
 75                 PEGASUS_CIMNAME_INLINE Boolean CIMName::equal(const CIMName& name) const
 76                 {
 77                     return String::equalNoCase(cimName, name.cimName);
 78                 }
 79                 
 80                 PEGASUS_CIMNAME_INLINE Boolean CIMName::equal(const char* name) const
 81                 {
 82                     return String::equalNoCase(cimName, name);
 83                 }
 84                 
 85 r.kieninger 1.2 PEGASUS_CIMNAME_INLINE Boolean operator==(
 86                     const CIMName& name1, const CIMName& name2)
 87                 {
 88                     return name1.equal(name2);
 89                 }
 90                 
 91                 PEGASUS_CIMNAME_INLINE Boolean operator==(
 92                     const CIMName& name1, const char* name2)
 93                 {
 94                     return name1.equal(name2);
 95                 }
 96                 
 97                 PEGASUS_CIMNAME_INLINE Boolean operator==(
 98                     const char* name1, const CIMName& name2)
 99                 {
100                     return name2.equal(name1);
101                 }
102                 
103                 PEGASUS_CIMNAME_INLINE Boolean operator!=(
104                     const CIMName& name1, const CIMName& name2)
105                 {
106 r.kieninger 1.2     return !name1.equal(name2);
107                 }
108                 
109                 PEGASUS_CIMNAME_INLINE Boolean operator!=(
110                     const CIMName& name1, const char* name2)
111                 {
112                     return !name1.equal(name2);
113                 }
114                 
115                 PEGASUS_CIMNAME_INLINE Boolean operator!=(
116                     const char* name1, const CIMName& name2)
117                 {
118                     return !name2.equal(name1);
119                 }
120                 
121                 PEGASUS_CIMNAME_INLINE CIMNamespaceName::CIMNamespaceName()
122                 {
123                 }
124                 
125                 PEGASUS_CIMNAME_INLINE const String& CIMNamespaceName::getString() const
126                 {
127 r.kieninger 1.2     return cimNamespaceName;
128                 }
129                 
130                 PEGASUS_CIMNAME_INLINE Boolean CIMNamespaceName::isNull() const
131                 {
132                     return (cimNamespaceName.size() == 0);
133                 }
134                 
135                 PEGASUS_CIMNAME_INLINE void CIMNamespaceName::clear()
136                 {
137                     cimNamespaceName.clear();
138                 }
139                 
140                 PEGASUS_CIMNAME_INLINE Boolean CIMNamespaceName::equal(
141                     const CIMNamespaceName& name) const
142                 {
143                     return String::equalNoCase(cimNamespaceName, name.cimNamespaceName);
144                 }
145                 
146                 PEGASUS_CIMNAME_INLINE Boolean CIMNamespaceName::equal(const char* name) const
147                 {
148 r.kieninger 1.2     return String::equalNoCase(cimNamespaceName, name);
149                 }
150                 
151                 PEGASUS_NAMESPACE_END
152                 
153                 #endif /* Pegasus_CIMNameInline_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2