diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-24 04:15:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-24 04:15:26 +0100 |
| commit | ceaf7bc52712cb60708ed5eb5c62c5e463dd8e89 (patch) | |
| tree | c55e4b85ee30138ce83263045d77d01631378b2e /src/name_format.h | |
| parent | 6c37cc1979b2a01205a888c4c98f3334685ee8dd (diff) | |
Tidying.
Diffstat (limited to 'src/name_format.h')
| -rw-r--r-- | src/name_format.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/name_format.h b/src/name_format.h index e6fc9d72..6401fe82 100644 --- a/src/name_format.h +++ b/src/name_format.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2016 Carl Hetherington <cth@carlh.net> + Copyright (C) 2016-2021 Carl Hetherington <cth@carlh.net> This file is part of libdcp. @@ -31,16 +31,25 @@ files in the program, then also delete it here. */ + +/** @file src/name_format.h + * @brief NameFormat class + */ + + #ifndef LIBDCP_NAME_FORMAT #define LIBDCP_NAME_FORMAT + #include <string> #include <boost/optional.hpp> #include <map> #include <list> + namespace dcp { + class NameFormat { public: @@ -60,14 +69,24 @@ public: typedef std::map<char, std::string> Map; + /** @param values Values to replace our specifications with; e.g. + * if the specification contains %c it will be be replaced with the + * value corresponding to the key 'c'. + * @param suffix Suffix to add on after processing the specification. + * @param ignore Any specification characters in this string will not + * be replaced, but left as-is. + */ std::string get (Map, std::string suffix, std::string ignore = "") const; private: std::string _specification; }; + extern bool operator== (NameFormat const & a, NameFormat const & b); + } + #endif |
