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 
00035 #ifndef OWBI1_CIMNAME_HPP_INCLUDE_GUARD_
00036 #define OWBI1_CIMNAME_HPP_INCLUDE_GUARD_
00037 #include "OWBI1_config.h"
00038 #include "OWBI1_SerializableIFC.hpp"
00039 #include "OWBI1_String.hpp"
00040 
00041 #include <iosfwd>
00042 
00043 namespace OWBI1
00044 {
00045 
00050 class OWBI1_OWBI1PROVIFC_API CIMName : public SerializableIFC
00051 {
00052 public:
00053 
00057    CIMName();
00058 
00064    CIMName(const String& name);
00065    
00072    CIMName(const char* name);
00073    CIMName(const CIMName& other);
00074 
00075    explicit CIMName(const detail::CIMNameRepRef& rep);
00076 
00077    ~CIMName();
00078    
00079    CIMName& operator=(const String& name);
00080    CIMName& operator=(const char* name);
00081    CIMName& operator=(const CIMName& other);
00082 
00086    String toString() const;
00087    const char* c_str() const;
00088    
00094    virtual void readObject(std::istream &istrm);
00095    
00101    virtual void writeObject(std::ostream &ostrm) const;
00102 
00106    bool isValid() const;
00107 
00108    typedef detail::CIMNameRepRef CIMName::*safe_bool;
00109    operator safe_bool () const;
00110    bool operator!() const;
00111 
00112    friend OWBI1_OWBI1PROVIFC_API bool operator<(const CIMName& x, const CIMName& y);
00113    friend OWBI1_OWBI1PROVIFC_API bool operator==(const CIMName& x, const CIMName& y);
00114    detail::CIMNameRepRef getRep() const;
00115 
00116 private:
00117    detail::CIMNameRepRef m_rep;
00118 
00119 };
00120 
00121 OWBI1_OWBI1PROVIFC_API bool operator<=(const CIMName& x, const CIMName& y);
00122 OWBI1_OWBI1PROVIFC_API bool operator>(const CIMName& x, const CIMName& y);
00123 OWBI1_OWBI1PROVIFC_API bool operator>=(const CIMName& x, const CIMName& y);
00124 OWBI1_OWBI1PROVIFC_API bool operator!=(const CIMName& x, const CIMName& y);
00125 
00126 OWBI1_OWBI1PROVIFC_API std::ostream& operator<<(std::ostream& ostr, const CIMName& name);
00127 
00128 } 
00129 
00130 #endif
00131