version 1.13, 2002/09/05 01:02:43
|
version 1.25, 2008/11/12 17:22:32
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// 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. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec 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 |
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com) |
|
// |
|
// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#ifndef Pegasus_ParamValueRep_h | #ifndef Pegasus_ParamValueRep_h |
|
|
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/InternalException.h> | #include <Pegasus/Common/InternalException.h> |
#include <Pegasus/Common/String.h> | #include <Pegasus/Common/String.h> |
#include <Pegasus/Common/Sharable.h> |
|
#include <Pegasus/Common/CIMValue.h> | #include <Pegasus/Common/CIMValue.h> |
#include <Pegasus/Common/Linkage.h> | #include <Pegasus/Common/Linkage.h> |
|
#include <Pegasus/Common/Buffer.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
class PEGASUS_COMMON_LINKAGE CIMParamValueRep : public Sharable |
class CIMParamValueRep |
{ | { |
public: | public: |
| |
|
|
CIMValue value, | CIMValue value, |
Boolean isTyped=true); | Boolean isTyped=true); |
| |
~CIMParamValueRep(); |
|
|
|
const String & getParameterName() const | const String & getParameterName() const |
{ | { |
return _parameterName; | return _parameterName; |
|
|
| |
void setIsTyped(Boolean isTyped); | void setIsTyped(Boolean isTyped); |
| |
void toXml(Array<Sint8>& out) const; |
|
|
|
CIMParamValueRep* clone() const | CIMParamValueRep* clone() const |
{ | { |
return new CIMParamValueRep(*this); | return new CIMParamValueRep(*this); |
} | } |
| |
private: |
void Inc() |
|
{ |
|
_refCounter++; |
|
} |
| |
CIMParamValueRep(); |
void Dec() |
|
{ |
|
if (_refCounter.decAndTestIfZero()) |
|
delete this; |
|
} |
|
|
|
private: |
| |
CIMParamValueRep(const CIMParamValueRep& x); | CIMParamValueRep(const CIMParamValueRep& x); |
| |
// This method is declared and made private so that the compiler does |
CIMParamValueRep(); // Unimplemented |
// not implicitly define a default copy constructor. |
CIMParamValueRep& operator=(const CIMParamValueRep& x); // Unimplemented |
CIMParamValueRep& operator=(const CIMParamValueRep& x) |
|
{ |
|
//PEGASUS_ASSERT(0); |
|
return *this; |
|
} |
|
| |
String _parameterName; | String _parameterName; |
CIMValue _value; | CIMValue _value; |
Boolean _isTyped; | Boolean _isTyped; |
|
|
|
// reference counter as member to avoid |
|
// virtual function resolution overhead |
|
AtomicInt _refCounter; |
|
|
|
friend class CIMBuffer; |
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |