[ekiga] RefLister: Make more methods public. Added explicit destruction.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] RefLister: Make more methods public. Added explicit destruction.
- Date: Sun, 15 Mar 2015 15:46:16 +0000 (UTC)
commit a0e0dddc6df595afd770d6143e5672cb4dd792f3
Author: Damien Sandras <dsandras seconix com>
Date: Sun Mar 1 12:50:48 2015 +0100
RefLister: Make more methods public. Added explicit destruction.
The explicit destruction is not strictly useful, but it helps
understanding things a bit better due to boost weird memory management.
We need to make more methods public if we want to "use" the RefLister
instead of "inheriting" from it.
lib/engine/framework/reflister.h | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/lib/engine/framework/reflister.h b/lib/engine/framework/reflister.h
index 134edda..b0bb0a8 100644
--- a/lib/engine/framework/reflister.h
+++ b/lib/engine/framework/reflister.h
@@ -53,12 +53,14 @@ namespace Ekiga
class RefLister:
public virtual LiveObject
{
- protected:
+ public:
typedef std::map<boost::shared_ptr<ObjectType>, boost::shared_ptr<scoped_connections> > container_type;
typedef Ekiga::map_key_iterator<container_type> iterator;
typedef Ekiga::map_key_const_iterator<container_type> const_iterator;
+ ~RefLister ();
+
void visit_objects (boost::function1<bool, boost::shared_ptr<ObjectType> > visitor) const;
void add_object (boost::shared_ptr<ObjectType> obj);
@@ -90,6 +92,13 @@ namespace Ekiga
template<typename ObjectType>
+Ekiga::RefLister<ObjectType>::~RefLister ()
+{
+ remove_all_objects ();
+}
+
+
+template<typename ObjectType>
void
Ekiga::RefLister<ObjectType>::visit_objects (boost::function1<bool, boost::shared_ptr<ObjectType> > visitor)
const
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]