Add signature() to cpp_function_base
This commit is contained in:
parent
592eb0284f
commit
93d2c58f7f
8 changed files with 112 additions and 22 deletions
|
|
@ -94,6 +94,14 @@ namespace cppast
|
|||
return variadic_;
|
||||
}
|
||||
|
||||
/// \returns The signature of the function,
|
||||
/// i.e. parameters and cv/ref-qualifiers if a member function.
|
||||
/// It has the form `(int,char,...) const`.
|
||||
std::string signature() const
|
||||
{
|
||||
return do_get_signature();
|
||||
}
|
||||
|
||||
protected:
|
||||
/// Builder class for functions.
|
||||
///
|
||||
|
|
@ -176,6 +184,10 @@ namespace cppast
|
|||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
/// \returns The signature, it is called by [*signature()]().
|
||||
virtual std::string do_get_signature() const;
|
||||
|
||||
private:
|
||||
detail::intrusive_list<cpp_function_parameter> parameters_;
|
||||
std::unique_ptr<cpp_expression> noexcept_expr_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue