X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fname_format.h;h=eb6f430845bc4329de6493ba0e998c35bf50b772;hb=refs%2Fheads%2F1.0-templates;hp=c2a712802a1599e675a9f84b8197e8c08d298ccf;hpb=8ef91325f4e565d04493bc05202f8e066b5e3e0c;p=libdcp.git diff --git a/src/name_format.h b/src/name_format.h index c2a71280..eb6f4308 100644 --- a/src/name_format.h +++ b/src/name_format.h @@ -43,22 +43,11 @@ namespace dcp { class NameFormat { public: - struct Component - { - Component (std::string name_, char placeholder_, std::string title_) - : name (name_) - , placeholder (placeholder_) - , title (title_) - {} - - std::string name; - char placeholder; - std::string title; - }; - - std::list components () const { - return _components; - } + NameFormat () {} + + NameFormat (std::string specification) + : _specification (specification) + {} std::string specification () const { return _specification; @@ -68,23 +57,11 @@ public: _specification = specification; } - typedef std::map Map; - - std::string get (Map) const; + typedef std::map Map; -protected: - NameFormat () {} - - NameFormat (std::string specification) - : _specification (specification) - {} - - void add (std::string name, char placeholder, std::string title); + std::string get (Map, std::string suffix) const; private: - boost::optional component_by_placeholder (char p) const; - - std::list _components; std::string _specification; };