diff options
author | Marcin Kolny <marcin.kolny@gmail.com> | 2015-08-08 14:45:12 +0200 |
---|---|---|
committer | Marcin Kolny <marcin.kolny@gmail.com> | 2015-08-08 14:45:59 +0200 |
commit | 0d5f63b18f5766760cf39e82ee11482984e0a938 (patch) | |
tree | e3f74b9b37e7618c92840024077dff43e6d08f0d /glib/glibmm/main.h | |
parent | dce7a844e48a582e42eb2b60eef5c1f2527540ac (diff) | |
parent | d94115843f38967b5e883f5f7d8057882ae364cb (diff) | |
download | glibmm-gir-gmmproc.tar.gz |
Merge branch 'master' into glibmm-gir-gmmprocglibmm-gir-gmmproc
Diffstat (limited to 'glib/glibmm/main.h')
-rw-r--r-- | glib/glibmm/main.h | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/glib/glibmm/main.h b/glib/glibmm/main.h index 94d495c1..53a23705 100644 --- a/glib/glibmm/main.h +++ b/glib/glibmm/main.h @@ -107,7 +107,7 @@ public: * is equivalent to: * @code * bool timeout_handler() { ... } - * const Glib::RefPtr<Glib::TimeoutSource> timeout_source = Glib::TimeoutSource::create(1000); + * const auto timeout_source = Glib::TimeoutSource::create(1000); * timeout_source->connect(sigc::ptr_fun(&timeout_handler)); * timeout_source->attach(Glib::MainContext::get_default()); * @endcode @@ -165,7 +165,7 @@ public: * is equivalent to: * @code * bool timeout_handler() { ... } - * const Glib::RefPtr<Glib::TimeoutSource> timeout_source = Glib::TimeoutSource::create(5000); + * const auto timeout_source = Glib::TimeoutSource::create(5000); * timeout_source->connect(sigc::ptr_fun(&timeout_handler)); * timeout_source->attach(Glib::MainContext::get_default()); * @endcode @@ -232,7 +232,7 @@ public: * is equivalent to: * @code * bool idle_handler() { ... } - * const Glib::RefPtr<Glib::IdleSource> idle_source = Glib::IdleSource::create(); + * const auto idle_source = Glib::IdleSource::create(); * idle_source->connect(sigc::ptr_fun(&idle_handler)); * idle_source->attach(Glib::MainContext::get_default()); * @endcode @@ -291,7 +291,7 @@ public: * is equivalent to: * @code * bool io_handler(Glib::IOCondition io_condition) { ... } - * const Glib::RefPtr<Glib::IOSource> io_source = Glib::IOSource::create(fd, Glib::IO_IN | Glib::IO_HUP); + * const auto io_source = Glib::IOSource::create(fd, Glib::IO_IN | Glib::IO_HUP); * io_source->connect(sigc::ptr_fun(&io_handler)); * io_source->attach(Glib::MainContext::get_default()); * @endcode @@ -319,7 +319,7 @@ public: * is equivalent to: * @code * bool io_handler(Glib::IOCondition io_condition) { ... } - * const Glib::RefPtr<Glib::IOSource> io_source = Glib::IOSource::create(channel, Glib::IO_IN | Glib::IO_HUP); + * const auto io_source = Glib::IOSource::create(channel, Glib::IO_IN | Glib::IO_HUP); * io_source->connect(sigc::ptr_fun(&io_handler)); * io_source->attach(Glib::MainContext::get_default()); * @endcode @@ -405,6 +405,10 @@ public: typedef Glib::MainContext CppObjectType; typedef GMainContext BaseObjectType; + // noncopyable + MainContext(const MainContext& other) = delete; + MainContext& operator=(const MainContext& other) = delete; + /** Creates a new MainContext. * @return The new MainContext. */ @@ -587,11 +591,6 @@ private: // Glib::MainContext can neither be constructed nor deleted. MainContext(); void operator delete(void*, std::size_t); - - // noncopyable - MainContext(const MainContext& other); - MainContext& operator=(const MainContext& other); - }; /** @relates Glib::MainContext */ @@ -662,6 +661,10 @@ public: typedef Glib::Source CppObjectType; typedef GSource BaseObjectType; + // noncopyable + Source(const Source&) = delete; + Source& operator=(const Source&) = delete; + static Glib::RefPtr<Source> create() /* = 0 */; /** Adds a Source to a context so that it will be executed within that context. @@ -802,13 +805,7 @@ public: static sigc::slot_base* get_slot_from_connection_node(void* data); // Used by derived Source classes in other files. static sigc::slot_base* get_slot_from_callback_data(void* data); - -private: #endif /* DOXYGEN_SHOULD_SKIP_THIS */ - - // noncopyable - Source(const Source&); - Source& operator=(const Source&); }; |