diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-09 16:18:00 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-09 16:18:00 +0100 |
| commit | 2a01820de9229fd778787421ec4f7bbf1e4b8bf1 (patch) | |
| tree | 9243a62fb21cea583f6b012fcc0ec1088ae19c84 /src/lib/font.h | |
| parent | ea3e9db20ede512d5e5d73b41c4cb796eeef56d3 (diff) | |
Hide Font members behind accessors.
Diffstat (limited to 'src/lib/font.h')
| -rw-r--r-- | src/lib/font.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/lib/font.h b/src/lib/font.h index 8021ab5bc..0dedf7e49 100644 --- a/src/lib/font.h +++ b/src/lib/font.h @@ -28,16 +28,29 @@ class Font { public: - Font (std::string id_) - : id (id_) {} + Font (std::string id) + : _id (id) {} Font (cxml::NodePtr node); void as_xml (xmlpp::Node* node); - + + std::string id () const { + return _id; + } + + boost::optional<boost::filesystem::path> file () const { + return _file; + } + + void set_file (boost::filesystem::path file) { + _file = file; + } + +private: /** Font ID, used to describe it in the subtitle content */ - std::string id; - boost::optional<boost::filesystem::path> file; + std::string _id; + boost::optional<boost::filesystem::path> _file; }; bool |
