- ///
- ~Counters();
- ///
- void newCounter(string const & newc);
- ///
- void newCounter(string const & newc, string const & oldc);
- ///
- void set(string const & ctr, int val);
- ///
- void addto(string const & ctr, int val);
- ///
- int value(string const & ctr) const;
- ///
- void step(string const & ctr);
- // string refstep(string const & cou);
+ /// Add a new counter to array.
+ void newCounter(lyx::docstring const & newc);
+ /// Add new counter having oldc as its master.
+ void newCounter(lyx::docstring const & newc,
+ lyx::docstring const & oldc);
+ ///
+ void set(lyx::docstring const & ctr, int val);
+ ///
+ void addto(lyx::docstring const & ctr, int val);
+ ///
+ int value(lyx::docstring const & ctr) const;
+ /// Step (increment by one) counter named by arg, and
+ /// zeroes slave counter(s) for which it is the master.
+ /// NOTE sub-slaves not zeroed! That happens at slave's
+ /// first step 0->1. Seems to be sufficient.
+ void step(lyx::docstring const & ctr);
+ /// Reset all counters.
+ void reset();
+ /// Reset counters matched by match string.
+ void reset(lyx::docstring const & match);
+ /// Copy counters whose name matches match from the &from to
+ /// the &to array of counters. Empty string matches all.
+ void copy(Counters & from, Counters & to,
+ lyx::docstring const & match = lyx::docstring());
+ /// A complete expanded label, like 2.1.4 for a subsubsection
+ /// according to the given format
+ lyx::docstring counterLabel(lyx::docstring const & format);