00001 /******************************************************************************* 00002 * Copyright (C) 2001-2004 Vintela, Inc. All rights reserved. * 00003 * Redistribution and use in source and binary forms, with or without 00004 * modification, are permitted provided that the following conditions are met: 00005 * 00006 * - Redistributions of source code must retain the above copyright notice, 00007 * this list of conditions and the following disclaimer. 00008 * 00009 * - Redistributions in binary form must reproduce the above copyright notice, 00010 * this list of conditions and the following disclaimer in the documentation 00011 * and/or other materials provided with the distribution. 00012 * 00013 * - Neither the name of Vintela, Inc. nor the names of its 00014 * contributors may be used to endorse or promote products derived from this 00015 * software without specific prior written permission. 00016 * 00017 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' 00018 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00019 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00020 * ARE DISCLAIMED. IN NO EVENT SHALL Vintela, Inc. OR THE CONTRIBUTORS 00021 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00022 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00023 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00024 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00025 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00026 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00027 * POSSIBILITY OF SUCH DAMAGE. 00028 *******************************************************************************/ 00029 00035 #ifndef OWBI1_CIMSCOPE_HPP_INCLUDE_GUARD_ 00036 #define OWBI1_CIMSCOPE_HPP_INCLUDE_GUARD_ 00037 #include "OWBI1_config.h" 00038 #include "OWBI1_CIMBase.hpp" 00039 00040 #if defined(BAD) 00041 #undef BAD 00042 #endif 00043 00044 namespace OWBI1 00045 { 00046 00051 class OWBI1_OWBI1PROVIFC_API CIMScope : public CIMBase 00052 { 00053 public: 00054 // An enumeration of the scope values that this class understands 00055 enum Scope 00056 { 00057 BAD = 0, // Indicates unset or bad 00058 SCHEMA = 1, // A CIM schema 00059 CLASS = 2, // A CIM class 00060 ASSOCIATION = 3, // A CIM association 00061 INDICATION = 4, // A CIM indication 00062 PROPERTY = 5, // A CIM property 00063 REFERENCE = 6, // A CIM reference 00064 METHOD = 7, // A CIM method 00065 PARAMETER = 8, // A CIM parameter 00066 QUALIFIER = 9, // A CIM qualifier 00067 ANY = 11, // Any CIM element 00068 MAXSCOPE = 12 00069 }; 00073 CIMScope(); 00078 CIMScope(Scope scopeVal); 00079 00084 CIMScope(const CIMScope& arg); 00085 00086 explicit CIMScope(const detail::CIMScopeRepRef& rep); 00087 ~CIMScope(); 00091 virtual void setNull(); 00097 CIMScope& operator= (const CIMScope& arg); 00101 Scope getScope() const; 00107 bool equals(const CIMScope& arg) const; 00113 bool operator == (const CIMScope& arg) const; 00119 bool operator != (const CIMScope& arg) const; 00120 00121 typedef detail::CIMScopeRepRef CIMScope::*safe_bool; 00125 operator safe_bool () const; 00126 bool operator!() const; 00130 virtual String toString() const; 00134 virtual String toMOF() const; 00139 virtual void readObject(std::istream &istrm); 00144 virtual void writeObject(std::ostream &ostrm) const; 00145 00146 detail::CIMScopeRepRef getRep() const; 00147 private: 00148 detail::CIMScopeRepRef m_rep; 00149 }; 00150 00151 bool operator<(const CIMScope& x, const CIMScope& y); 00152 00153 } // end namespace OWBI1 00154 00155 #endif