/* This file is part of
- * ======================================================
- *
+ * ======================================================
+ *
* LyX, The Document Processor
*
* Copyright 1995 Matthias Ettrich
- * Copyright 1995-2000 The LyX Team.
+ * Copyright 1995-2001 The LyX Team.
*
*
* ====================================================== */
#include "counters.h"
#include "debug.h"
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Connection;
-using SigC::slot;
-#endif
-
using std::endl;
}
-Counters::~Counters()
+Counters::~Counters()
{
// We need this since we store the Counter's as pointers in
// the counterList.
for (CounterList::iterator it = counterList.begin();
it != counterList.end();
++it)
- delete (*it).second;
+ delete it->second;
}
}
Counter * tmp = new Counter;
- (*it).second->onstep.connect(slot(tmp,
- &Counter::reset));
+ it->second->onstep.connect(SigC::slot(tmp,
+ &Counter::reset));
counterList[newc] = tmp;
}
-void Counters::set(string const & ctr, int val)
+void Counters::set(string const & ctr, int val)
{
CounterList::iterator it = counterList.find(ctr);
if (it == counterList.end()) {
lyxerr << "Counter does not exist." << endl;
return;
}
- (*it).second->set(val);
+ it->second->set(val);
}
lyxerr << "Counter does not exist." << endl;
return;
}
- (*it).second->addto(val);
+ it->second->addto(val);
}
-int Counters::value(string const & ctr) const
+int Counters::value(string const & ctr) const
{
CounterList::const_iterator cit = counterList.find(ctr);
if (cit == counterList.end()) {
lyxerr << "Counter does not exist." << endl;
return 0;
}
- return (*cit).second->value();
+ return cit->second->value();
}
lyxerr << "Counter does not exist." << endl;
return;
}
- (*it).second->step();
+ it->second->step();
}