X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpattern.h;h=4c79b4b83b732656d96d8866bb4f3cf9f45318f9;hb=740d7cdd71fc2f068e44bfc6c8cc7e9565de16f6;hp=de8e7b2de962b8a1b1bb33ea887000e42b72202c;hpb=40177b0cfc0d4e67f971941f632e4f1f7e7c3f88;p=builder.git diff --git a/source/pattern.h b/source/pattern.h index de8e7b2..4c79b4b 100644 --- a/source/pattern.h +++ b/source/pattern.h @@ -3,6 +3,11 @@ #include +/** +Stores a filename pattern. A pattern consists of a prefix and a suffix, and +can be applied to a body to form a complete filename. Either or both of the +prefix and suffix may be empty. +*/ class Pattern { private: @@ -10,8 +15,11 @@ private: std::string suffix; public: + /** Constructs a pattern from a single string. The string must have exactly + one percent sign (%) to separate the prefix and suffix. */ Pattern(const std::string &); + /** Applies the pattern to a body string. */ std::string apply(const std::string &) const; };