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

Diff for /pegasus/src/Pegasus/Common/CIMType.cpp between version 1.10 and 1.18

version 1.10, 2002/05/17 16:58:07 version 1.18, 2004/11/29 18:48:19
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%2004////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM  // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
   // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
   // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation, The Open Group.
   // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
   // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 23 
Line 28 
 // Author: Mike Brasher (mbrasher@bmc.com) // Author: Mike Brasher (mbrasher@bmc.com)
 // //
 // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) // Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
   //              Carol Ann Krug Graves, Hewlett-Packard Company
   //                (carolann_graves@hp.com)
   //              Dave Sudlik, IBM (dsudlik@us.ibm.com)
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 32 
Line 40 
  
 static const char* _typeStrings[] = static const char* _typeStrings[] =
 { {
     "none", "boolean", "uint8", "sint8", "uint16", "sint16", "uint32", "sint32",      "boolean", "uint8", "sint8", "uint16", "sint16", "uint32", "sint32",
     "uint64", "sint64", "real32", "real64", "char16", "string", "datetime",     "uint64", "sint64", "real32", "real64", "char16", "string", "datetime",
     "reference"      "reference", "object"
 }; };
  
 static const Uint32 _NUM_TYPES = sizeof(_typeStrings) / sizeof(_typeStrings[0]); static const Uint32 _NUM_TYPES = sizeof(_typeStrings) / sizeof(_typeStrings[0]);
  
 CIMType::CIMType() : _tag(NONE)  const char * cimTypeToString (
 {      const CIMType type)
 }  
   
 CIMType::CIMType(Tag tag) : _tag(tag)  
 {  
 }  
   
 CIMType::CIMType(const CIMType& x) : _tag(x._tag)  
 {  
 }  
   
 CIMType& CIMType::operator=(Tag tag)  
 {  
     _tag = tag;  
     return *this;  
 }  
   
 CIMType::operator CIMType::Tag() const  
 {  
     return _tag;  
 }  
   
 Boolean CIMType::equal(const CIMType& x) const  
 {  
     return x._tag == _tag;  
 }  
   
 const char* CIMType::toString() const  
 {  
     return _typeStrings[Uint32(_tag)];  
 }  
   
   
 Boolean operator==(CIMType x, CIMType y)  
 {  
     return CIMType::Tag(x) == CIMType::Tag(y);  
 }  
   
 Boolean operator!=(CIMType x, CIMType y)  
 {  
     return CIMType::Tag(x) != CIMType::Tag(y);  
 }  
   
 Boolean operator==(CIMType x, CIMType::Tag y)  
 {  
     return x.equal(y);  
 }  
   
 Boolean operator==(CIMType::Tag x, CIMType y)  
 {  
     return y.equal(x);  
 }  
   
 Boolean operator!=(CIMType x, CIMType::Tag y)  
 {  
     return !operator==(x, y);  
 }  
   
 Boolean operator!=(CIMType::Tag x, CIMType y)  
 { {
     return !operator==(x, y);      return _typeStrings [Uint32 (type)];
 } }
  
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.10  
changed lines
  Added in v.1.18

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2