From dd9be86db6cde0afa5da0d1d1ac43b42e05dca26 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 4 Jan 2021 21:16:53 +0100 Subject: std::shared_ptr --- src/lib/dkdm_wrapper.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/lib/dkdm_wrapper.h') diff --git a/src/lib/dkdm_wrapper.h b/src/lib/dkdm_wrapper.h index 09e9d25c4..261cdc767 100644 --- a/src/lib/dkdm_wrapper.h +++ b/src/lib/dkdm_wrapper.h @@ -20,7 +20,8 @@ #include #include -#include +#include + namespace xmlpp { class Element; @@ -28,25 +29,25 @@ namespace xmlpp { class DKDMGroup; -class DKDMBase : public boost::enable_shared_from_this +class DKDMBase : public std::enable_shared_from_this { public: virtual ~DKDMBase () {} virtual std::string name () const = 0; virtual void as_xml (xmlpp::Element *) const = 0; - static boost::shared_ptr read (cxml::ConstNodePtr node); + static std::shared_ptr read (cxml::ConstNodePtr node); - boost::shared_ptr parent () const { + std::shared_ptr parent () const { return _parent; } - void set_parent (boost::shared_ptr parent) { + void set_parent (std::shared_ptr parent) { _parent = parent; } private: - boost::shared_ptr _parent; + std::shared_ptr _parent; }; class DKDM : public DKDMBase @@ -80,14 +81,14 @@ public: void as_xml (xmlpp::Element *) const; - std::list > children () const { + std::list > children () const { return _children; } - void add (boost::shared_ptr child, boost::shared_ptr previous = boost::shared_ptr ()); - void remove (boost::shared_ptr child); + void add (std::shared_ptr child, std::shared_ptr previous = std::shared_ptr ()); + void remove (std::shared_ptr child); private: std::string _name; - std::list > _children; + std::list > _children; }; -- cgit v1.2.3