-namespace {
-
-struct match : public binary_function<Branch, string, bool> {
- bool operator()(Branch const & br, string const & s) const {
- return (br.getBranch() == s);
- }
-};
-
-} // namespace anon.
-
-
-void BranchList::remove(string const & s)
-{
- list.remove_if(bind2nd(match(), s));
-}
-
-
-bool BranchList::selected(string const & s) const
-{
- List::const_iterator it = list.begin();
- List::const_iterator end = list.end();
- for (; it != end; ++it) {
- if (s == it->getBranch())
- return it->getSelected();
- }
- return false;
-}
-
-
-string BranchList::allBranches() const
-{
- List::const_iterator it = list.begin();
- List::const_iterator end = list.end();
- string ret;
- for (; it != end; ++it) {
- ret += it->getBranch() + separator();
- }
- // remove final '|':
- string::size_type i = ret.find_last_of(separator());
- if (i != string::npos)
- ret.erase(i);
- return ret;
-}
-
-
-string BranchList::allSelected() const