Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #ifndef SAGA_SAGA_DETAIL_STEERABLE_HPP
00007 #define SAGA_SAGA_DETAIL_STEERABLE_HPP
00008
00009
00010 #include <vector>
00011 #include <string>
00012
00013
00014 #include <saga/saga/util.hpp>
00015 #include <saga/saga/base.hpp>
00016 #include <saga/saga/monitorable.hpp>
00017 #include <saga/saga/detail/monitorable.hpp>
00018
00019
00020 #include <saga/saga-defs.hpp>
00021
00022
00023 #if defined(BOOST_MSVC)
00024 #pragma warning(push)
00025 #pragma warning(disable : 4251 4231 4660)
00026 #endif
00027
00029
00030 #if !defined (SAGA_CREATE_PREPROCESSED_FILES) && !defined(SAGA_EXPORT_STEERABLE)
00031
00032 # if defined(SAGA_ENGINE_EXPORTS) || defined(SAGA_STEERABLE_EXPORTS)
00033 # define SAGA_EXPORT_STEERABLE SAGA_SYMBOL_EXPORT
00034 # elif !defined (SAGA_NO_EXPORT_STEERABLE) && !defined(BUILD_SAGA_LITE)
00035 # define SAGA_EXPORT_STEERABLE SAGA_SYMBOL_IMPORT
00036 # else
00037 # define SAGA_EXPORT_STEERABLE
00038 # endif
00039
00040 #endif // !SAGA_CREATE_PREPROCESSED_FILES
00041
00043 namespace saga { namespace detail
00044 {
00049 template <typename Derived>
00050 struct SAGA_EXPORT_STEERABLE steerable
00051 {
00053 Derived& derived()
00054 { return static_cast<Derived&>(*this); }
00055 Derived const& derived() const
00056 { return static_cast<Derived const&>(*this); }
00058
00065 bool add_metric (saga::metric m);
00066
00073 void remove_metric (std::string name);
00074
00081 void fire_metric (std::string name);
00082 };
00083
00085 }}
00086
00087 #if defined(BOOST_MSVC)
00088 #pragma warning(pop)
00089 #endif
00090
00091 #endif // SAGA_SAGA_DETAIL_STEERABLE_HPP
00092