diff options
Diffstat (limited to 'libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/parameter_predicates.hpp')
-rw-r--r-- | libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/parameter_predicates.hpp | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/parameter_predicates.hpp b/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/parameter_predicates.hpp new file mode 100644 index 000000000..8d58709fb --- /dev/null +++ b/libs/geometry/doc/src/docutils/tools/doxygen_xml2qbk/parameter_predicates.hpp @@ -0,0 +1,61 @@ +// Boost.Geometry (aka GGL, Generic Geometry Library) +// +// Copyright (c) 2010-2013 Barend Gehrels, Amsterdam, the Netherlands. +// Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland. +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// +#ifndef PARAMETER_PREDICATES_HPP +#define PARAMETER_PREDICATES_HPP + + +#include <string> + +#include <doxygen_elements.hpp> + + +// Predicate for std::find_if +struct par_by_name +{ + par_by_name(std::string const& n) + : m_name(n) + {} + + inline bool operator()(parameter const& p) + { + return p.name == m_name; + } +private : + std::string m_name; +}; + + +// Predicate for std::find_if +struct par_by_type +{ + par_by_type(std::string const& n) + : m_type(n) + {} + + inline bool operator()(parameter const& p) + { + return p.type == m_type; + } +private : + std::string m_type; +}; + + +template <typename Element> +struct sort_on_line +{ + inline bool operator()(Element const& left, Element const& right) + { + return left.line < right.line; + } +}; + + +#endif // PARAMETER_PREDICATES_HPP |