Bv2.1 8.6.{1.2}: CompositionMetadataAsset must exist and it must have some <VersionNu...
[libdcp.git] / src / name_format.h
index 7eb2713ffb3fe2e26b194d635387f6026d0b1197..e6fc9d724dab2b98db6df11346253073a124cf99 100644 (file)
@@ -34,6 +34,7 @@
 #ifndef LIBDCP_NAME_FORMAT
 #define LIBDCP_NAME_FORMAT
 
+#include <string>
 #include <boost/optional.hpp>
 #include <map>
 #include <list>
@@ -43,9 +44,11 @@ namespace dcp {
 class NameFormat
 {
 public:
-       std::list<char> components () const {
-               return _components;
-       }
+       NameFormat () {}
+
+       NameFormat (std::string specification)
+               : _specification (specification)
+       {}
 
        std::string specification () const {
                return _specification;
@@ -57,20 +60,9 @@ public:
 
        typedef std::map<char, std::string> Map;
 
-       std::string get (Map) const;
-
-protected:
-       NameFormat () {}
-
-       NameFormat (std::string specification)
-               : _specification (specification)
-       {}
-
-       void add (char placeholder);
+       std::string get (Map, std::string suffix, std::string ignore = "") const;
 
 private:
-       /** placeholders for each component */
-       std::list<char> _components;
        std::string _specification;
 };