using std::find_if;
using std::make_pair;
+using boost::bind;
+
using std::ifstream;
using std::list;
using std::map;
void setAscentFractions(vector<double> & ascent_fractions,
string const & metrics_file);
-struct FindFirst {
+class FindFirst : public std::unary_function<StrPair, bool> {
+public:
FindFirst(string const & comp) : comp_(comp) {}
- bool operator()(StrPair const & sp)
+ bool operator()(StrPair const & sp) const
{
return sp.first == comp_;
}
namespace {
-struct FindSnippet {
+class FindSnippet : public std::unary_function<InProgressProcess, bool> {
+public:
FindSnippet(string const & s) : snippet_(s) {}
- bool operator()(InProgressProcess const & process)
+ bool operator()(InProgressProcess const & process) const
{
BitmapFile const & snippets = process.second.snippets;
- BitmapFile::const_iterator it = snippets.begin();
+ BitmapFile::const_iterator beg = snippets.begin();
BitmapFile::const_iterator end = snippets.end();
- it = find_if(it, end, FindFirst(snippet_));
- return it != end;
+ return find_if(beg, end, FindFirst(snippet_)) != end;
}
private:
- string const & snippet_;
+ string const snippet_;
};
} // namespace anon
// Initiate the conversion from LaTeX to bitmap images files.
support::Forkedcall::SignalTypePtr
convert_ptr(new support::Forkedcall::SignalType);
- convert_ptr->connect(
- boost::bind(&Impl::finishedGenerating, this, _1, _2));
+ convert_ptr->connect(bind(&Impl::finishedGenerating, this, _1, _2));
support::Forkedcall call;
int ret = call.startscript(command, convert_ptr);