function_doc_signature.hpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright Nikolay Mladenov 2007.
  2. // Distributed under the Boost Software License, Version 1.0. (See
  3. // accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef FUNCTION_SIGNATURE_20070531_HPP
  6. # define FUNCTION_SIGNATURE_20070531_HPP
  7. #include <boost/python/object/function.hpp>
  8. #include <boost/python/converter/registrations.hpp>
  9. #include <boost/python/str.hpp>
  10. #include <boost/python/tuple.hpp>
  11. #include <boost/python/detail/signature.hpp>
  12. #include <vector>
  13. namespace boost { namespace python { namespace objects {
  14. class function_doc_signature_generator{
  15. static const char * py_type_str(const python::detail::signature_element &s);
  16. static bool arity_cmp( function const *f1, function const *f2 );
  17. static bool are_seq_overloads( function const *f1, function const *f2 , bool check_docs);
  18. static std::vector<function const*> flatten(function const *f);
  19. static std::vector<function const*> split_seq_overloads( const std::vector<function const *> &funcs, bool split_on_doc_change);
  20. static str raw_function_pretty_signature(function const *f, size_t n_overloads, bool cpp_types = false);
  21. static str parameter_string(py_function const &f, size_t n, object arg_names, bool cpp_types);
  22. static str pretty_signature(function const *f, size_t n_overloads, bool cpp_types = false);
  23. public:
  24. static list function_doc_signatures( function const * f);
  25. };
  26. }}}//end of namespace boost::python::objects
  27. #endif //FUNCTION_SIGNATURE_20070531_HPP