projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pot/merge.
[dcpomatic.git]
/
src
/
lib
/
dkdm_wrapper.h
diff --git
a/src/lib/dkdm_wrapper.h
b/src/lib/dkdm_wrapper.h
index d3ee2a09566c34afaa48036fa8bff507ed6ccf9b..0c2992bc41f6f1d413b8eefce6a90b3a1a3a80f6 100644
(file)
--- a/
src/lib/dkdm_wrapper.h
+++ b/
src/lib/dkdm_wrapper.h
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2017 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2017
-2021
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-18,40
+18,46
@@
*/
*/
+
#include <dcp/encrypted_kdm.h>
#include <libcxml/cxml.h>
#include <dcp/encrypted_kdm.h>
#include <libcxml/cxml.h>
-#include <boost/enable_shared_from_this.hpp>
+#include <memory>
+
namespace xmlpp {
class Element;
}
namespace xmlpp {
class Element;
}
+
class DKDMGroup;
class DKDMGroup;
-class DKDMBase : public boost::enable_shared_from_this<DKDMBase>
+
+class DKDMBase : public std::enable_shared_from_this<DKDMBase>
{
public:
{
public:
+ virtual ~DKDMBase () {}
virtual std::string name () const = 0;
virtual void as_xml (xmlpp::Element *) const = 0;
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;
}
return _parent;
}
- void set_parent (
boost
::shared_ptr<DKDMGroup> parent) {
+ void set_parent (
std
::shared_ptr<DKDMGroup> parent) {
_parent = parent;
}
private:
_parent = parent;
}
private:
-
boost
::shared_ptr<DKDMGroup> _parent;
+
std
::shared_ptr<DKDMGroup> _parent;
};
};
+
class DKDM : public DKDMBase
{
public:
class DKDM : public DKDMBase
{
public:
- DKDM (dcp::EncryptedKDM k)
+
explicit
DKDM (dcp::EncryptedKDM k)
: _dkdm (k)
{}
: _dkdm (k)
{}
@@
-66,10
+72,11
@@
private:
dcp::EncryptedKDM _dkdm;
};
dcp::EncryptedKDM _dkdm;
};
+
class DKDMGroup : public DKDMBase
{
public:
class DKDMGroup : public DKDMBase
{
public:
- DKDMGroup (std::string name)
+
explicit
DKDMGroup (std::string name)
: _name (name)
{}
: _name (name)
{}
@@
-79,14
+86,14
@@
public:
void as_xml (xmlpp::Element *) const;
void as_xml (xmlpp::Element *) const;
- std::list<
boost::shared_ptr<DKDMBase>
> children () const {
+ std::list<
std::shared_ptr<DKDMBase>
> children () const {
return _children;
}
return _children;
}
- void add (
boost::shared_ptr<DKDMBase> child
);
- 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;
private:
std::string _name;
- std::list<
boost::shared_ptr<DKDMBase>
> _children;
+ std::list<
std::shared_ptr<DKDMBase>
> _children;
};
};