2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
11 * ====================================================== */
23 #include <boost/signals/signal0.hpp>
24 #include <boost/signals/trackable.hpp>
29 class Counter : public boost::trackable {
44 boost::signal0<void> onstep;
51 /** This is a class of (La)TeX type counters. The counters is in a text
52 Style and can be reset by signals emitted from a single counter.
59 void newCounter(string const & newc);
61 void newCounter(string const & newc, string const & oldc);
63 void set(string const & ctr, int val);
65 void addto(string const & ctr, int val);
67 int value(string const & ctr) const;
69 void step(string const & ctr);
70 // string refstep(string const & cou);
73 typedef std::map<string, Counter*> CounterList;
75 CounterList counterList;