OW_CIMBase.hpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002 * Copyright (C) 2001-2004 Vintela, Inc. All rights reserved.
00003 *
00004 * Redistribution and use in source and binary forms, with or without
00005 * modification, are permitted provided that the following conditions are met:
00006 *
00007 *  - Redistributions of source code must retain the above copyright notice,
00008 *    this list of conditions and the following disclaimer.
00009 *
00010 *  - Redistributions in binary form must reproduce the above copyright notice,
00011 *    this list of conditions and the following disclaimer in the documentation
00012 *    and/or other materials provided with the distribution.
00013 *
00014 *  - Neither the name of Vintela, Inc. nor the names of its
00015 *    contributors may be used to endorse or promote products derived from this
00016 *    software without specific prior written permission.
00017 *
00018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00021 * ARE DISCLAIMED. IN NO EVENT SHALL Vintela, Inc. OR THE CONTRIBUTORS
00022 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00023 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00024 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00025 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00026 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00027 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00028 * POSSIBILITY OF SUCH DAMAGE.
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 // signatures for non-versioned format of objects. These are pass to the
00145 // readSig and writeSig methods.
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 // signatures for versioned format of objects. These are pass to the
00166 // readSig and writeSig methods.
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 } // end namespace OW_NAMESPACE
00187 
00188 #endif   // OW_CIMBASE_HPP_

Generated on Thu Feb 9 08:47:52 2006 for openwbem by  doxygen 1.4.6