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
00014
00015 #if defined(BOOST_MSVC)
00016 #pragma warning(push)
00017 #pragma warning(disable: 4251 4231 4275 4660)
00018 #endif
00019
00021
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
00063 namespace saga
00064 {
00069 class SAGA_EXPORT object
00070 {
00071 public:
00072
00073 enum type
00074 {
00075 Unknown = -1,
00076 Exception = 1,
00077 URL = 2,
00078 Buffer = 3,
00079 Session = 4,
00080 Context = 5,
00081 Task = 6,
00082 TaskContainer = 7,
00083 Metric = 8,
00084 NSEntry = 9,
00085 NSDirectory = 10,
00086 IOVec = 11,
00087 File = 12,
00088 Directory = 13,
00089 LogicalFile = 14,
00090 LogicalDirectory = 15,
00091 JobDescription = 16,
00092 JobService = 17,
00093 Job = 18,
00094 JobSelf = 19,
00095 StreamService = 20,
00096 Stream = 21,
00097 Parameter = 22,
00098 RPC = 23,
00099
00100
00101 Msg = 24,
00102 Endpoint = 25,
00103
00104
00105 Advert = 26,
00106 AdvertDirectory = 27,
00107
00108
00109 ServiceDescription = 28,
00110 ServiceDiscoverer = 29,
00111 ServiceData = 30,
00112
00113
00114 CPRJobDescription = 31,
00115 CPRJobService = 32,
00116 CPRJob = 33,
00117 CPRJobSelf = 34,
00118 CPRCheckpoint = 35,
00119 CPRDirectory = 36
00120 };
00121
00122 private:
00124
00125 TR1::shared_ptr <saga::impl::object> impl_;
00126
00127 friend struct impl::runtime;
00128 friend class attribute;
00129 friend class adaptors::attribute;
00130 friend class monitorable;
00131 friend class permissions;
00133
00134 public:
00135 typedef saga::impl::object implementation_base_type;
00136
00137 protected:
00139
00140 TR1::shared_ptr<saga::impl::object> get_impl_sp (void) const
00141 {
00142 return impl_;
00143 }
00144 saga::impl::object* get_impl (void) const
00145 {
00146 return impl_.get();
00147 }
00148 bool is_impl_valid() const
00149 {
00150 return impl_ ? true : false;
00151 }
00152
00153 explicit object (saga::impl::object * init);
00154 explicit object (TR1::shared_ptr<saga::impl::object> init);
00156
00157 public:
00162 object();
00163
00168 saga::object::type get_type (void) const;
00169
00174 saga::uuid get_id (void) const;
00175
00180 saga::session get_session (void) const;
00181
00186 saga::object clone() const;
00187
00188 };
00189
00191
00192 SAGA_EXPORT std::string get_object_type_name(saga::object::type t);
00194
00195 }
00197
00198
00199 #if defined(BOOST_MSVC)
00200 # pragma warning(pop)
00201 #endif
00202
00203 #endif // SAGA_SAGA_OBJECT_HPP
00204