Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef SAGA_SAGA_OBJECT_HPP
00009 #define SAGA_SAGA_OBJECT_HPP
00010
00011 #include <saga/saga/util.hpp>
00012 #include <saga/saga/base.hpp>
00013 #include <boost/mpl/bool.hpp>
00014
00015
00016 #if defined(BOOST_MSVC)
00017 #pragma warning(push)
00018 #pragma warning(disable: 4251 4231 4275 4660)
00019 #endif
00020
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00064 namespace saga
00065 {
00070 class SAGA_EXPORT object
00071 {
00072 public:
00073
00074 enum type
00075 {
00076 Unknown = -1,
00077 Exception = 1,
00078 URL = 2,
00079 Buffer = 3,
00080 Session = 4,
00081 Context = 5,
00082 Task = 6,
00083 TaskContainer = 7,
00084 Metric = 8,
00085 NSEntry = 9,
00086 NSDirectory = 10,
00087 IOVec = 11,
00088 File = 12,
00089 Directory = 13,
00090 LogicalFile = 14,
00091 LogicalDirectory = 15,
00092 JobDescription = 16,
00093 JobService = 17,
00094 Job = 18,
00095 JobSelf = 19,
00096 StreamServer = 20,
00097 Stream = 21,
00098 Parameter = 22,
00099 RPC = 23,
00100
00101
00102 Msg = 24,
00103 Endpoint = 25,
00104
00105
00106 Advert = 26,
00107 AdvertDirectory = 27,
00108
00109
00110 ServiceDescription = 28,
00111 ServiceDiscoverer = 29,
00112 ServiceData = 30,
00113
00114
00115 CPRJobDescription = 31,
00116 CPRJobService = 32,
00117 CPRJob = 33,
00118 CPRJobSelf = 34,
00119 CPRCheckpoint = 35,
00120 CPRDirectory = 36,
00121
00122
00123 EntityData = 37,
00124 EntityDataSet = 38,
00125 EntityNavigator = 39
00126 };
00127
00128 private:
00130
00131 TR1::shared_ptr <saga::impl::object> impl_;
00132
00133 friend struct impl::runtime;
00134 friend class attribute;
00135 friend class adaptors::attribute;
00136 friend class monitorable;
00137 friend class permissions;
00139
00140 public:
00141 typedef saga::impl::object implementation_base_type;
00142
00143 protected:
00145
00146 TR1::shared_ptr<saga::impl::object> get_impl_sp (void) const
00147 {
00148 return impl_;
00149 }
00150 saga::impl::object* get_impl (void) const
00151 {
00152 return impl_.get();
00153 }
00154 bool is_impl_valid() const
00155 {
00156 return impl_ ? true : false;
00157 }
00158
00159 explicit object (saga::impl::object * init);
00160 explicit object (TR1::shared_ptr<saga::impl::object> init);
00162
00163 public:
00168 object();
00169
00174 saga::object::type get_type (void) const;
00175
00180 saga::uuid get_id (void) const;
00181
00186 saga::session& get_session();
00187 saga::session const& get_session() const;
00188
00193 saga::object clone() const;
00194
00195 };
00196
00198
00199 SAGA_EXPORT std::string get_object_type_name(saga::object::type t);
00201
00203 namespace detail
00204 {
00205
00206 template <typename T>
00207 struct is_saga_object : TR1::is_base_of<saga::object, T> {};
00208
00209 template <>
00210 struct is_saga_object<saga::object> : boost::mpl::true_ {};
00211 }
00213
00214 }
00216
00217
00218 #if defined(BOOST_MSVC)
00219 # pragma warning(pop)
00220 #endif
00221
00222 #endif // SAGA_SAGA_OBJECT_HPP
00223