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_CIMBASE_HPP_
00037 #define OW_CIMBASE_HPP_
00038 #include "OW_config.h"
00039 #include "OW_Types.hpp"
00040 #include "OW_SerializableIFC.hpp"
00041 #include "OW_CommonFwd.hpp"
00042 #include <iosfwd>
00043 
00044 namespace OW_NAMESPACE
00045 {
00046 
00052 class OW_COMMON_API CIMBase : public SerializableIFC
00053 {
00054 public:
00055    virtual ~CIMBase();
00060    virtual void setNull() = 0;
00064    virtual String toString() const = 0;
00068    virtual String toMOF() const = 0;
00069 
00070    enum EErrorCodes
00071    {
00072       E_UNEXPECTED_SIGNATURE,
00073       E_UNKNOWN_VERSION
00074    };
00075 
00090    static void readSig(std::istream& istrm, const char* const sig);
00091 
00118    static UInt32 readSig(std::istream& istrm, const char* const sig,
00119       const char* const verSig, UInt32 maxVersion);
00120 
00129    static void writeSig(std::ostream& ostrm, const char* const sig);
00130 
00138    static void writeSig(std::ostream& ostrm, const char* const sig,
00139       UInt32 version);
00140 
00141 };
00142 OW_COMMON_API std::ostream& operator<<(std::ostream& ostr, const CIMBase& cb);
00144 
00145 
00146 #define OW_CIMCLASSSIG              "C"   // OW_CIMClass
00147 #define OW_CIMINSTANCESIG           "I"   // OW_CIMInstance
00148 #define OW_CIMMETHODSIG             "M"   // OW_CIMMethod
00149 #define OW_CIMPARAMETERSIG          "P"   // OW_CIMParameter
00150 #define OW_CIMPARAMVALSIG           "A"   // OW_CIMParamValue
00151 #define OW_CIMPROPERTYSIG           "R"   // OW_CIMProperty
00152 #define OW_CIMQUALIFIERSIG          "Q"   // OW_CIMQualifier
00153 #define OW_CIMQUALIFIERTYPESIG         "T"   // OW_CIMQualifierType
00154 #define OW_CIMDATATYPESIG           "D"   // OW_CIMDataType
00155 #define OW_CIMFLAVORSIG             "F"   // OW_CIMFlavor
00156 #define OW_CIMNAMESPACESIG          "N"   // OW_CIMNameSpace
00157 #define OW_CIMOBJECTPATHSIG            "O"   // OW_CIMObjectPath
00158 #define OW_CIMSCOPESIG              "S"   // OW_CIMScope
00159 #define OW_CIMVALUESIG              "V"   // OW_CIMValue
00160 #define OW_CIMURLSIG             "U"   // OW_CIMUrl
00161 #define OW_INTERNNAMESPACESIG       "E"   // Internval namespace class
00162 #define OW_CIMPARAMVALUESIG            "L"   // OW_CIMParamValue
00163 
00165 
00166 
00167 #define OW_CIMCLASSSIG_V               "c"   // OW_CIMClass
00168 #define OW_CIMINSTANCESIG_V            "i"   // OW_CIMInstance
00169 #define OW_CIMMETHODSIG_V           "m"   // OW_CIMMethod
00170 #define OW_CIMPARAMETERSIG_V        "p"   // OW_CIMParameter
00171 #define OW_CIMPARAMVALSIG_V            "a"   // OW_CIMParamValue
00172 #define OW_CIMPROPERTYSIG_V            "r"   // OW_CIMProperty
00173 #define OW_CIMQUALIFIERSIG_V        "q"   // OW_CIMQualifier
00174 #define OW_CIMQUALIFIERTYPESIG_V    "t"   // OW_CIMQualifierType
00175 #define OW_CIMDATATYPESIG_V            "d"   // OW_CIMDataType
00176 #define OW_CIMFLAVORSIG_V           "f"   // OW_CIMFlavor
00177 #define OW_CIMNAMESPACESIG_V        "n"   // OW_CIMNameSpace
00178 #define OW_CIMOBJECTPATHSIG_V       "o"   // OW_CIMObjectPath
00179 #define OW_CIMSCOPESIG_V            "s"   // OW_CIMScope
00180 #define OW_CIMVALUESIG_V            "v"   // OW_CIMValue
00181 #define OW_CIMURLSIG_V              "u"   // OW_CIMUrl
00182 #define OW_INTERNNAMESPACESIG_V        "e"   // Internval namespace class
00183 #define OW_CIMPARAMVALUESIG_V       "l"   // OW_CIMParamValue
00184 
00185 
00186 } 
00187 
00188 #endif   // OW_CIMBASE_HPP_