OWBI1_CIMQualifier.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_CIMQUALIFIER_HPP_INCLUDE_GUARD_
00037 #define OWBI1_CIMQUALIFIER_HPP_INCLUDE_GUARD_
00038 #include "OWBI1_config.h"
00039 #include "OWBI1_CIMElement.hpp"
00040 #include "OWBI1_COWIntrusiveReference.hpp"
00041 #include "OWBI1_CIMFwd.hpp"
00042 #include "OWBI1_CIMNULL.hpp"
00043 #include "OWBI1_CIMName.hpp" // necessary for implicit conversion (const char* -> CIMName) to work
00044 
00045 namespace OWBI1
00046 {
00047 
00053 class OWBI1_OWBI1PROVIFC_API CIMQualifier : public CIMElement
00054 {
00055 public:
00056    // Meta qualifiers
00057    static const char* const CIM_QUAL_ASSOCIATION;
00058    static const char* const CIM_QUAL_INDICATION;
00059    // Standard qualifiers
00060    static const char* const CIM_QUAL_ABSTRACT;
00061    static const char* const CIM_QUAL_AGGREGATE;
00062    static const char* const CIM_QUAL_AGGREGATION;
00063    static const char* const CIM_QUAL_ALIAS;
00064    static const char* const CIM_QUAL_ARRAYTYPE;
00065    static const char* const CIM_QUAL_BITMAP;
00066    static const char* const CIM_QUAL_BITVALUES;
00067    static const char* const CIM_QUAL_COMPOSITION;
00068    static const char* const CIM_QUAL_COUNTER;
00069    static const char* const CIM_QUAL_DELETE;
00070    static const char* const CIM_QUAL_DEPRECATED;
00071    static const char* const CIM_QUAL_DESCRIPTION;
00072    static const char* const CIM_QUAL_DISPLAYNAME;
00073    static const char* const CIM_QUAL_DN;
00074    static const char* const CIM_QUAL_EMBEDDEDOBJECT;
00075    static const char* const CIM_QUAL_EXCEPTION;
00076    static const char* const CIM_QUAL_EXPENSIVE;
00077    static const char* const CIM_QUAL_EXPERIMENTAL;
00078    static const char* const CIM_QUAL_GAUGE;
00079    static const char* const CIM_QUAL_IFDELETED;
00080    static const char* const CIM_QUAL_IN;
00081    static const char* const CIM_QUAL_INVISIBLE;
00082    static const char* const CIM_QUAL_KEY;
00083    static const char* const CIM_QUAL_LARGE;
00084    static const char* const CIM_QUAL_MAPPINGSTRINGS;
00085    static const char* const CIM_QUAL_MAX;
00086    static const char* const CIM_QUAL_MAXLEN;
00087    static const char* const CIM_QUAL_MAXVALUE;
00088    static const char* const CIM_QUAL_MIN;
00089    static const char* const CIM_QUAL_MINLEN;
00090    static const char* const CIM_QUAL_MINVALUE;
00091    static const char* const CIM_QUAL_MODELCORRESPONDENCE;
00092    static const char* const CIM_QUAL_NONLOCAL;
00093    static const char* const CIM_QUAL_NONLOCALTYPE;
00094    static const char* const CIM_QUAL_NULLVALUE;
00095    static const char* const CIM_QUAL_OCTETSTRING;
00096    static const char* const CIM_QUAL_OUT;
00097    static const char* const CIM_QUAL_OVERRIDE;
00098    static const char* const CIM_QUAL_PROPAGATED;
00099    static const char* const CIM_QUAL_PROPERTYUSAGE;
00100    static const char* const CIM_QUAL_READ;
00101    static const char* const CIM_QUAL_REQUIRED;
00102    static const char* const CIM_QUAL_REVISION;
00103    static const char* const CIM_QUAL_SCHEMA;
00104    static const char* const CIM_QUAL_SOURCE;
00105    static const char* const CIM_QUAL_SOURCETYPE;
00106    static const char* const CIM_QUAL_STATIC;
00107    static const char* const CIM_QUAL_SYNTAX;
00108    static const char* const CIM_QUAL_SYNTAXTYPE;
00109    static const char* const CIM_QUAL_TERMINAL;
00110    static const char* const CIM_QUAL_TRIGGERTYPE;
00111    static const char* const CIM_QUAL_UNITS;
00112    static const char* const CIM_QUAL_UNKNOWNVALUES;
00113    static const char* const CIM_QUAL_UNSUPPORTEDVALUES;
00114    static const char* const CIM_QUAL_VALUEMAP;
00115    static const char* const CIM_QUAL_VALUES;
00116    static const char* const CIM_QUAL_VERSION;
00117    static const char* const CIM_QUAL_WEAK;
00118    static const char* const CIM_QUAL_WRITE;
00119    static const char* const CIM_QUAL_PROVIDER;
00123    CIMQualifier();
00127    explicit CIMQualifier(CIMNULL_t);
00132    CIMQualifier(const CIMName& name);
00138    CIMQualifier(const char* name);
00143    CIMQualifier(const CIMQualifierType& qtype);
00148    CIMQualifier(const CIMQualifier& arg);
00149 
00150    explicit CIMQualifier(const detail::CIMQualifierRepRef& rep);
00154    ~CIMQualifier();
00158    virtual void setNull();
00164    CIMQualifier& operator= (const CIMQualifier& arg);
00168    bool isKeyQualifier() const;
00172    bool isAssociationQualifier() const;
00176    CIMValue getValue() const;
00181    CIMValue getValueT() const;
00187    CIMQualifier& setValue(const CIMValue& value);
00193    CIMQualifier& setDefaults(const CIMQualifierType& qtype);
00198    CIMQualifierType getDefaults() const;
00204    bool hasFlavor(const CIMFlavor& flavor) const;
00210    CIMQualifier& addFlavor(const CIMFlavor& flavor);
00217    CIMQualifier& removeFlavor(Int32 flavor);
00221    bool hasValue() const;
00228    bool equals(const CIMQualifier& arg) const;
00232    CIMFlavorArray getFlavors() const;
00238    CIMQualifier& setPropagated(bool propagated=true);
00242    bool getPropagated() const;
00243 
00251    CIMQualifier& setLanguage(const String& language);
00255    String getLanguage() const;
00256 
00257    typedef detail::CIMQualifierRepRef CIMQualifier::*safe_bool;
00258    operator safe_bool () const;
00259    bool operator!() const;
00260    
00264    virtual CIMName getName() const;
00269    virtual void setName(const CIMName& name);
00270    
00275    virtual void readObject(std::istream &istrm);
00280    virtual void writeObject(std::ostream &ostrm) const;
00284    virtual String toMOF() const;
00288    virtual String toString() const;
00292    static CIMQualifier createKeyQualifier();
00293 
00298    enum { SERIALIZATION_VERSION = 1 };
00299 
00300    detail::CIMQualifierRepRef getRep() const;
00301 
00302 private:
00303 
00304 #ifdef OWBI1_WIN32
00305 #pragma warning (push)
00306 #pragma warning (disable: 4251)
00307 #endif
00308 
00309    detail::CIMQualifierRepRef m_rep;
00310 
00311 #ifdef OWBI1_WIN32
00312 #pragma warning (pop)
00313 #endif
00314 
00315    friend OWBI1_OWBI1PROVIFC_API bool operator<(const CIMQualifier& x, const CIMQualifier& y);
00316 };
00317 
00318 } // end namespace OWBI1
00319 
00320 #endif

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