• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
8 #include <boost/python/object/function.hpp>
9 #include <boost/python/converter/registrations.hpp>
10 #include <boost/python/str.hpp>
11 #include <boost/python/tuple.hpp>
12 
13 #include <boost/python/detail/signature.hpp>
14 
15 
16 #include <vector>
17 
18 namespace boost { namespace python { namespace objects {
19 
20 class function_doc_signature_generator{
21     static const  char * py_type_str(const python::detail::signature_element &s);
22     static bool arity_cmp( function const *f1, function const *f2 );
23     static bool are_seq_overloads( function const *f1, function const *f2 , bool check_docs);
24     static std::vector<function const*> flatten(function const *f);
25     static std::vector<function const*> split_seq_overloads( const std::vector<function const *> &funcs, bool split_on_doc_change);
26     static str raw_function_pretty_signature(function const *f, size_t n_overloads,  bool cpp_types = false);
27     static str parameter_string(py_function const &f, size_t n, object arg_names, bool cpp_types);
28     static str pretty_signature(function const *f, size_t n_overloads,  bool cpp_types = false);
29 
30 public:
31     static list function_doc_signatures( function const * f);
32 };
33 
34 }}}//end of namespace boost::python::objects
35 
36 #endif //FUNCTION_SIGNATURE_20070531_HPP
37