-namespace {
-
-class IndexNamesEqual : public std::unary_function<Index, bool>
-{
-public:
- IndexNamesEqual(docstring const & name) : name_(name) {}
-
- bool operator()(Index const & index) const
- {
- return index.index() == name_;
- }
-private:
- docstring name_;
-};
-
-
-class IndexHasShortcut : public std::unary_function<Index, bool>
-{
-public:
- IndexHasShortcut(docstring const & shortcut) : shortc_(shortcut) {}
-
- bool operator()(Index const & index) const
- {
- return index.shortcut() == shortc_;
- }
-private:
- docstring shortc_;
-};
-
-}
-
-