00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00036 #ifndef OW_CIMPARAMETER_HPP_INCLUDE_GUARD_
00037 #define OW_CIMPARAMETER_HPP_INCLUDE_GUARD_
00038 #include "OW_config.h"
00039 #include "OW_COWIntrusiveReference.hpp"
00040 #include "OW_CIMElement.hpp"
00041 #include "OW_CIMFwd.hpp"
00042 #include "OW_CIMNULL.hpp"
00043 #include "OW_CIMName.hpp" 
00044 
00045 namespace OW_NAMESPACE
00046 {
00047 
00052 class OW_COMMON_API CIMParameter : public CIMElement
00053 {
00054 public:
00055    struct PARMData;
00059    CIMParameter();
00063    explicit CIMParameter(CIMNULL_t);
00068    explicit CIMParameter(const CIMName& name);
00073    explicit CIMParameter(const char* name);
00078    CIMParameter(const CIMParameter& arg);
00082    ~CIMParameter();
00086    virtual void setNull();
00092    CIMParameter& operator= (const CIMParameter& arg);
00093 
00094    typedef COWIntrusiveReference<PARMData> CIMParameter::*safe_bool;
00098    operator safe_bool () const
00099       {  return m_pdata ? &CIMParameter::m_pdata : 0; }
00100    bool operator!() const
00101       {  return !m_pdata; }
00108    CIMParameter& setQualifiers(const CIMQualifierArray& quals);
00114    CIMQualifierArray getQualifiers() const;
00120    CIMParameter& setDataType(const CIMDataType& type);
00125    CIMDataType getType() const;
00129    Int32 getDataSize() const;
00136    CIMQualifier getQualifier(const CIMName& name) const;
00140    virtual String getName() const;
00145    virtual void setName(const CIMName& name);
00150    virtual void writeObject(std::ostream &ostrm) const;
00155    virtual void readObject(std::istream &istrm);
00159    virtual String toString() const;
00164    virtual String toMOF() const;
00165    
00172    bool hasTrueQualifier(const CIMName& name) const;
00173 private:
00174 
00175 #ifdef OW_WIN32
00176 #pragma warning (push)
00177 #pragma warning (disable: 4251)
00178 #endif
00179 
00180    COWIntrusiveReference<PARMData> m_pdata;
00181 
00182 #ifdef OW_WIN32
00183 #pragma warning (pop)
00184 #endif
00185 
00186    friend OW_COMMON_API bool operator<(const CIMParameter& x, const CIMParameter& y);
00187 };
00188 
00189 } 
00190 
00191 #endif