00001
00002
00003
00004
00005
00006
00007
00008 #ifndef SAGA_ATTRIBUTE_HPP
00009 #define SAGA_ATTRIBUTE_HPP
00010
00011
00012 #include <map>
00013 #include <vector>
00014 #include <string>
00015
00016
00017 #include <saga/saga/util.hpp>
00018 #include <saga/saga/base.hpp>
00019
00020 #include <saga/saga/detail/attribute.hpp>
00021
00022
00023 #if defined(BOOST_MSVC)
00024 #pragma warning(push)
00025 #pragma warning(disable : 4251 4231 4660)
00026 #endif
00027
00029
00030
00031
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
00063
00064
00065
00067
00069 namespace saga
00070 {
00072 namespace attributes
00073 {
00074
00075 char const* const common_true = "True";
00076 char const* const common_false = "False";
00077 }
00078
00083 class SAGA_EXPORT attribute
00084 : public saga::detail::attribute<attribute>
00085 {
00086 private:
00087 friend struct saga::detail::attribute<attribute>;
00088 TR1::shared_ptr <saga::impl::object> impl_;
00089
00090 public:
00092
00093 typedef saga::impl::object implementation_base_type;
00094 typedef std::vector <std::string> strvec_type;
00095 typedef std::map <std::string, std::string> strmap_type;
00097
00098 protected:
00100
00101 TR1::shared_ptr<saga::impl::object> get_impl_sp (void) const { return impl_; }
00102 saga::impl::object* get_impl (void) const { return impl_.get(); }
00103 bool is_impl_valid() const { return impl_ ? true : false; }
00105
00106 public:
00111 explicit attribute (saga::impl::object *impl);
00112
00117 attribute (saga::object rhs);
00118
00123 attribute (void);
00124
00129 ~attribute (void);
00130 };
00131
00133 }
00134
00135 #if defined(BOOST_MSVC)
00136 #pragma warning(pop)
00137 #endif
00138
00139 #endif // SAGA_ATTRIBUTE_HPP
00140