diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-04 21:16:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-07 22:48:29 +0100 |
| commit | dd9be86db6cde0afa5da0d1d1ac43b42e05dca26 (patch) | |
| tree | e56a3f82fb9e1c8602f265bea0d0688d8a018644 /src/lib/dkdm_wrapper.h | |
| parent | 0d35820cf50d2789752b8776683b26d04642518d (diff) | |
std::shared_ptr
Diffstat (limited to 'src/lib/dkdm_wrapper.h')
| -rw-r--r-- | src/lib/dkdm_wrapper.h | 21 |
1 files changed, 11 insertions, 10 deletions
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 <dcp/encrypted_kdm.h> #include <libcxml/cxml.h> -#include <boost/enable_shared_from_this.hpp> +#include <memory> + namespace xmlpp { class Element; @@ -28,25 +29,25 @@ namespace xmlpp { class DKDMGroup; -class DKDMBase : public boost::enable_shared_from_this<DKDMBase> +class DKDMBase : public std::enable_shared_from_this<DKDMBase> { public: virtual ~DKDMBase () {} virtual std::string name () const = 0; virtual void as_xml (xmlpp::Element *) const = 0; - static boost::shared_ptr<DKDMBase> read (cxml::ConstNodePtr node); + static std::shared_ptr<DKDMBase> read (cxml::ConstNodePtr node); - boost::shared_ptr<DKDMGroup> parent () const { + std::shared_ptr<DKDMGroup> parent () const { return _parent; } - void set_parent (boost::shared_ptr<DKDMGroup> parent) { + void set_parent (std::shared_ptr<DKDMGroup> parent) { _parent = parent; } private: - boost::shared_ptr<DKDMGroup> _parent; + std::shared_ptr<DKDMGroup> _parent; }; class DKDM : public DKDMBase @@ -80,14 +81,14 @@ public: void as_xml (xmlpp::Element *) const; - std::list<boost::shared_ptr<DKDMBase> > children () const { + std::list<std::shared_ptr<DKDMBase> > children () const { return _children; } - void add (boost::shared_ptr<DKDMBase> child, boost::shared_ptr<DKDM> previous = boost::shared_ptr<DKDM> ()); - void remove (boost::shared_ptr<DKDMBase> child); + void add (std::shared_ptr<DKDMBase> child, std::shared_ptr<DKDM> previous = std::shared_ptr<DKDM> ()); + void remove (std::shared_ptr<DKDMBase> child); private: std::string _name; - std::list<boost::shared_ptr<DKDMBase> > _children; + std::list<std::shared_ptr<DKDMBase> > _children; }; |
