OWBI1_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 OWBI1_CIMBASE_HPP_
00037 #define OWBI1_CIMBASE_HPP_
00038 #include "OWBI1_config.h"
00039 #include "OWBI1_Types.hpp"
00040 #include "OWBI1_SerializableIFC.hpp"
00041 #include "OWBI1_CommonFwd.hpp"
00042 #include <iosfwd>
00043 
00044 namespace OWBI1
00045 {
00046 
00052 class OWBI1_OWBI1PROVIFC_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 OWBI1_OWBI1PROVIFC_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 OWBI1_CIMCLASSSIG              "C"   // OWBI1_CIMClass
00147 #define OWBI1_CIMINSTANCESIG           "I"   // OWBI1_CIMInstance
00148 #define OWBI1_CIMMETHODSIG             "M"   // OWBI1_CIMMethod
00149 #define OWBI1_CIMPARAMETERSIG          "P"   // OWBI1_CIMParameter
00150 #define OWBI1_CIMPARAMVALSIG           "A"   // OWBI1_CIMParamValue
00151 #define OWBI1_CIMPROPERTYSIG           "R"   // OWBI1_CIMProperty
00152 #define OWBI1_CIMQUALIFIERSIG          "Q"   // OWBI1_CIMQualifier
00153 #define OWBI1_CIMQUALIFIERTYPESIG         "T"   // OWBI1_CIMQualifierType
00154 #define OWBI1_CIMDATATYPESIG           "D"   // OWBI1_CIMDataType
00155 #define OWBI1_CIMFLAVORSIG             "F"   // OWBI1_CIMFlavor
00156 #define OWBI1_CIMNAMESPACESIG          "N"   // OWBI1_CIMNameSpace
00157 #define OWBI1_CIMOBJECTPATHSIG            "O"   // OWBI1_CIMObjectPath
00158 #define OWBI1_CIMSCOPESIG              "S"   // OWBI1_CIMScope
00159 #define OWBI1_CIMVALUESIG              "V"   // OWBI1_CIMValue
00160 #define OWBI1_CIMURLSIG             "U"   // OWBI1_CIMUrl
00161 #define OWBI1_INTERNNAMESPACESIG       "E"   // Internval namespace class
00162 #define OWBI1_CIMPARAMVALUESIG            "L"   // OWBI1_CIMParamValue
00163 
00165 // signatures for versioned format of objects. These are pass to the
00166 // readSig and writeSig methods.
00167 #define OWBI1_CIMCLASSSIG_V               "c"   // OWBI1_CIMClass
00168 #define OWBI1_CIMINSTANCESIG_V            "i"   // OWBI1_CIMInstance
00169 #define OWBI1_CIMMETHODSIG_V           "m"   // OWBI1_CIMMethod
00170 #define OWBI1_CIMPARAMETERSIG_V        "p"   // OWBI1_CIMParameter
00171 #define OWBI1_CIMPARAMVALSIG_V            "a"   // OWBI1_CIMParamValue
00172 #define OWBI1_CIMPROPERTYSIG_V            "r"   // OWBI1_CIMProperty
00173 #define OWBI1_CIMQUALIFIERSIG_V        "q"   // OWBI1_CIMQualifier
00174 #define OWBI1_CIMQUALIFIERTYPESIG_V    "t"   // OWBI1_CIMQualifierType
00175 #define OWBI1_CIMDATATYPESIG_V            "d"   // OWBI1_CIMDataType
00176 #define OWBI1_CIMFLAVORSIG_V           "f"   // OWBI1_CIMFlavor
00177 #define OWBI1_CIMNAMESPACESIG_V        "n"   // OWBI1_CIMNameSpace
00178 #define OWBI1_CIMOBJECTPATHSIG_V       "o"   // OWBI1_CIMObjectPath
00179 #define OWBI1_CIMSCOPESIG_V            "s"   // OWBI1_CIMScope
00180 #define OWBI1_CIMVALUESIG_V            "v"   // OWBI1_CIMValue
00181 #define OWBI1_CIMURLSIG_V              "u"   // OWBI1_CIMUrl
00182 #define OWBI1_INTERNNAMESPACESIG_V        "e"   // Internval namespace class
00183 #define OWBI1_CIMPARAMVALUESIG_V       "l"   // OWBI1_CIMParamValue
00184 
00185 
00186 } // end namespace OWBI1
00187 
00188 #endif   // OWBI1_CIMBASE_HPP_

Generated on Thu Feb 9 08:48:25 2006 for openwbem by  doxygen 1.4.6