[breaking] Change signature of do_get_options()
This commit is contained in:
parent
bb4527ff93
commit
9c8260e685
3 changed files with 8 additions and 14 deletions
|
|
@ -370,23 +370,15 @@ namespace cppast
|
|||
return {};
|
||||
}
|
||||
|
||||
/// \returns The generation options for that entity.
|
||||
/// The base class version always returns no special options.
|
||||
/// \notes This function will not be called if the one with the access specifier is overridden.
|
||||
virtual generation_options do_get_options(const cpp_entity& e)
|
||||
{
|
||||
(void)e;
|
||||
return {};
|
||||
}
|
||||
|
||||
/// \returns The generation options for that entity with the given access specifier.
|
||||
/// If an entity is not part of a class, returns [cppast::cpp_public]().
|
||||
/// The base class version forwards to the overload that doesn't take an access specifier.
|
||||
/// If an entity is not part of a class the access specifier is alwasy [cppast::cpp_public]().
|
||||
/// The base class version always returns no special options.
|
||||
virtual generation_options do_get_options(const cpp_entity& e,
|
||||
cppast::cpp_access_specifier_kind access)
|
||||
{
|
||||
(void)e;
|
||||
(void)access;
|
||||
return do_get_options(e);
|
||||
return {};
|
||||
}
|
||||
|
||||
/// \effects Will be invoked before code of an entity is generated.
|
||||
|
|
|
|||
|
|
@ -59,7 +59,8 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
generation_options do_get_options(const cppast::cpp_entity&) override
|
||||
generation_options do_get_options(const cppast::cpp_entity&,
|
||||
cppast::cpp_access_specifier_kind) override
|
||||
{
|
||||
return options_;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ void print_entity(std::ostream& out, const cppast::cpp_entity& e)
|
|||
|
||||
private:
|
||||
// called to retrieve the generation options of an entity
|
||||
generation_options do_get_options(const cppast::cpp_entity&) override
|
||||
generation_options do_get_options(const cppast::cpp_entity&,
|
||||
cppast::cpp_access_specifier_kind) override
|
||||
{
|
||||
// generate declaration only
|
||||
return code_generator::declaration;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue