name_fwd.hppGo to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef ADOBE_NAME_FWD_HPP
00010 #define ADOBE_NAME_FWD_HPP
00011
00012 #include <adobe/config.hpp>
00013
00014 #include <cstddef>
00015 #include <cassert>
00016
00017 #include <boost/operators.hpp>
00018 #include <boost/type_traits/is_pod.hpp>
00019 #include <boost/type_traits/has_nothrow_constructor.hpp>
00020
00021 #include <adobe/implementation/swap.hpp>
00022
00023 #include <adobe/empty.hpp>
00024
00025 #if defined(ADOBE_STD_SERIALIZATION)
00026 #include <iosfwd>
00027 #endif
00028
00029
00030
00031 namespace adobe {
00032
00033 namespace version_1 {
00034
00035 class name_t;
00036
00037 inline bool operator < (const name_t& x, const name_t& y);
00038 inline bool operator == (const name_t& x, const name_t& y);
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 class name_t : boost::totally_ordered<name_t, name_t, empty_base<name_t> >
00050 {
00051 private:
00052 operator int () const;
00053 public:
00054
00055 explicit name_t (const char* string_name = "");
00056
00057 const char* c_str() const;
00058
00059 #if !defined(ADOBE_NO_DOCUMENTATION)
00060 operator bool() const;
00061 bool operator!() const;
00062
00063 friend void swap(name_t& x, name_t& y) { std::swap(x.name_m, y.name_m); }
00064 #endif
00065
00066 private:
00067 friend class static_name_t;
00068 friend struct aggregate_name_t;
00069
00070 struct dont_copy_t { };
00071 struct dont_initialize_t { };
00072
00073 name_t (const char* x, dont_copy_t)
00074 {
00075
00076
00077
00078
00079
00080
00081 assert(x && "WARNING (sparent) : Null string_name in name_t");
00082 name_m = x;
00083 }
00084
00085 name_t (dont_initialize_t) { }
00086
00087 const char* name_m;
00088 };
00089
00090
00091
00092 class static_name_t;
00093 struct aggregate_name_t;
00094
00095
00096
00097 #if defined(ADOBE_STD_SERIALIZATION)
00098 std::ostream& operator << (std::ostream& os, const name_t& t);
00099 #endif
00100
00101
00102
00103 }
00104
00105 using version_1::name_t;
00106 using version_1::static_name_t;
00107 using version_1::aggregate_name_t;
00108
00109 }
00110
00111
00112
00113 namespace boost {
00114
00115 template <> struct is_pod<adobe::name_t> : boost::mpl::true_ { };
00116
00117
00118 }
00119
00120
00121
00122 #endif // ADOBE_NAME_FWD_HPP
00123
00124
|