]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fixed comments by Denis
authorLuca Heltai <luca.heltai@sissa.it>
Thu, 26 Oct 2017 12:48:26 +0000 (14:48 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Thu, 26 Oct 2017 12:48:26 +0000 (14:48 +0200)
include/deal.II/base/patterns.h

index 60e1fd1da9802037053caa270281e77598d945d4..17fb778c2b14b2d76ead5c6131c104b853fa5574 100644 (file)
@@ -666,9 +666,24 @@ namespace Patterns
    * This pattern matches comma-separated values of arbitrary types. Each type
    * has to match a pattern given to the constructor.
    *
-   * The constructor expects a vector of Patterns, and optionally an
-   * std::string, specifying the separator to use when parsing the Tuple from a
-   * string.
+   * An example usage is the following:
+   *
+   * @code
+   * std::vector< std::unique_ptr<Patterns::PatternBase> > ps;
+   *
+   * ps.push_back(std::unique_ptr<Patterns::Integer>());
+   * ps.push_back(std::unique_ptr<Patterns::Double>());
+   * ps.push_back(std::unique_ptr<Patterns::Anything>());
+   *
+   * Patterns::Tuple pattern(ps, ";");
+   *
+   * bool check = ps.match("5; 3.14; Ciao"); // check = true
+   * @endcode
+   *
+   * The constructor expects a vector of Patterns, and optionally a string
+   * specifying the separator to use when parsing the Tuple from a string.
+   *
+   * @author Luca Heltai, 2017.
    */
   class Tuple : public PatternBase
   {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.