00001 #ifndef PROTON_DEFAULT_CONTAINER_HPP
00002 #define PROTON_DEFAULT_CONTAINER_HPP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "./container.hpp"
00026
00027 #include "./internal/config.hpp"
00028 #include "./internal/export.hpp"
00029
00030 #include <memory>
00031 #include <string>
00032
00033 namespace proton {
00034 class messaging_handler;
00035
00036
00037 #if defined(__GNUC__) && __GNUC__*100 + __GNUC_MINOR__ >= 406 || defined(__clang__)
00038 #pragma GCC diagnostic push
00039 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
00040 #endif
00042 PN_CPP_EXTERN std::auto_ptr<container> make_auto_default_container(messaging_handler&, const std::string& id="");
00043 PN_CPP_EXTERN std::auto_ptr<container> make_auto_default_container(const std::string& id="");
00044
00045 #if PN_CPP_HAS_UNIQUE_PTR
00047 PN_CPP_EXTERN std::unique_ptr<container> make_default_container(messaging_handler&, const std::string& id="");
00048 PN_CPP_EXTERN std::unique_ptr<container> make_default_container(const std::string& id="");
00049 #endif
00050
00051 #if PN_CPP_HAS_UNIQUE_PTR
00052 class default_container : public container_ref<std::unique_ptr<container> > {
00053 public:
00054 default_container(messaging_handler& h, const std::string& id="") : container_ref(make_default_container(h, id)) {}
00055 default_container(const std::string& id="") : container_ref(make_default_container(id)) {}
00056 };
00057 #else
00058 class default_container : public container_ref<std::auto_ptr<container> > {
00059 public:
00060 default_container(messaging_handler& h, const std::string& id="") : container_ref<std::auto_ptr<container> >(make_auto_default_container(h, id)) {}
00061 default_container(const std::string& id="") : container_ref<std::auto_ptr<container> >(make_auto_default_container(id)) {}
00062 };
00063 #endif
00064
00065 #if defined(__GNUC__) && __GNUC__*100 + __GNUC_MINOR__ >= 406 || defined(__clang__)
00066 #pragma GCC diagnostic pop
00067 #endif
00068
00069 }
00070
00071 #endif // PROTON_DEFAULT_CONTAINER_HPP