summaryrefslogtreecommitdiff
path: root/src/lib/font.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-09 16:18:00 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-09 16:18:00 +0100
commit2a01820de9229fd778787421ec4f7bbf1e4b8bf1 (patch)
tree9243a62fb21cea583f6b012fcc0ec1088ae19c84 /src/lib/font.h
parentea3e9db20ede512d5e5d73b41c4cb796eeef56d3 (diff)
Hide Font members behind accessors.
Diffstat (limited to 'src/lib/font.h')
-rw-r--r--src/lib/font.h23
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