Changed scope_t to access_t and fixed friend access specifier handling
This commit is contained in:
@@ -264,13 +264,6 @@ ContainsMatcher IsAssociation(std::string const &from, std::string const &to,
|
||||
fmt::format(format_string, from, to, label), caseSensitivity));
|
||||
}
|
||||
|
||||
ContainsMatcher IsFriend(std::string const &from, std::string const &to,
|
||||
CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes)
|
||||
{
|
||||
return ContainsMatcher(CasedString(
|
||||
fmt::format("{} <.. {} : <<friend>>", from, to), caseSensitivity));
|
||||
}
|
||||
|
||||
ContainsMatcher IsComposition(std::string const &from, std::string const &to,
|
||||
std::string const &label, std::string multiplicity_source = "",
|
||||
std::string multiplicity_dest = "",
|
||||
@@ -424,6 +417,24 @@ ContainsMatcher IsField(std::string const &name,
|
||||
CasedString(pattern + " : " + type, caseSensitivity));
|
||||
}
|
||||
|
||||
template <typename... Ts>
|
||||
ContainsMatcher IsFriend(std::string const &from, std::string const &to,
|
||||
CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes)
|
||||
{
|
||||
std::string pattern;
|
||||
|
||||
if constexpr (has_type<Public, Ts...>())
|
||||
pattern = "+";
|
||||
else if constexpr (has_type<Protected, Ts...>())
|
||||
pattern = "#";
|
||||
else
|
||||
pattern = "-";
|
||||
|
||||
return ContainsMatcher(
|
||||
CasedString(fmt::format("{} <.. {} : {}<<friend>>", from, to, pattern),
|
||||
caseSensitivity));
|
||||
}
|
||||
|
||||
ContainsMatcher IsPackage(std::string const &str,
|
||||
CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user