projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
C++11 tidying.
[dcpomatic.git]
/
src
/
lib
/
ratio.h
diff --git
a/src/lib/ratio.h
b/src/lib/ratio.h
index 42f29458ab883deead8b9ea4f826d3eefa6da5d1..016a22edca438460a13ccdb8e249ebb33b9cadcb 100644
(file)
--- a/
src/lib/ratio.h
+++ b/
src/lib/ratio.h
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013
-2021
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-18,14
+18,20
@@
*/
*/
+
#ifndef DCPOMATIC_RATIO_H
#define DCPOMATIC_RATIO_H
#ifndef DCPOMATIC_RATIO_H
#define DCPOMATIC_RATIO_H
+
#include <dcp/util.h>
#include <boost/utility.hpp>
#include <vector>
#include <dcp/util.h>
#include <boost/utility.hpp>
#include <vector>
-class Ratio : public boost::noncopyable
+
+/** @class Ratio
+ * @brief Description of an image ratio.
+ */
+class Ratio
{
public:
Ratio (float ratio, std::string id, std::string in, boost::optional<std::string> cn, std::string d)
{
public:
Ratio (float ratio, std::string id, std::string in, boost::optional<std::string> cn, std::string d)
@@
-36,6
+42,9
@@
public:
, _isdcf_name (d)
{}
, _isdcf_name (d)
{}
+ Ratio (Ratio const&) = delete;
+ Ratio& operator= (Ratio const&) = delete;
+
std::string id () const {
return _id;
}
std::string id () const {
return _id;
}
@@
-46,6
+55,10
@@
public:
std::string container_nickname () const;
std::string container_nickname () const;
+ bool used_for_container () const {
+ return static_cast<bool>(_container_nickname);
+ }
+
std::string isdcf_name () const {
return _isdcf_name;
}
std::string isdcf_name () const {
return _isdcf_name;
}
@@
-78,4
+91,5
@@
private:
static std::vector<Ratio const *> _ratios;
};
static std::vector<Ratio const *> _ratios;
};
+
#endif
#endif