From b3701fa8108d48503441972864ee5c4f74e953d1 Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sat, 21 Jan 2023 17:28:39 +0100 Subject: [PATCH 01/11] Updated glob dependency to commit b66732b0e72 --- thirdparty/glob/glob.hpp | 715 ++++++++++++++++++--------------------- 1 file changed, 338 insertions(+), 377 deletions(-) diff --git a/thirdparty/glob/glob.hpp b/thirdparty/glob/glob.hpp index 0df3f96e..3ac7f099 100644 --- a/thirdparty/glob/glob.hpp +++ b/thirdparty/glob/glob.hpp @@ -1,460 +1,421 @@ #pragma once #include -#include #include #include #include #include #include #include -namespace fs = std::filesystem; + +#ifdef GLOB_USE_GHC_FILESYSTEM +#include +#else +#include +#endif namespace glob { +#ifdef GLOB_USE_GHC_FILESYSTEM +namespace fs = ghc::filesystem; +#else +namespace fs = std::filesystem; +#endif + namespace { -static inline bool string_replace( - std::string &str, const std::string &from, const std::string &to) -{ - std::size_t start_pos = str.find(from); - if (start_pos == std::string::npos) - return false; - str.replace(start_pos, from.length(), to); - return true; +static inline +bool string_replace(std::string &str, const std::string &from, const std::string &to) { + std::size_t start_pos = str.find(from); + if (start_pos == std::string::npos) + return false; + str.replace(start_pos, from.length(), to); + return true; } -static inline std::string translate(const std::string &pattern) -{ - std::size_t i = 0, n = pattern.size(); - std::string result_string; +static inline +std::string translate(const std::string &pattern) { + std::size_t i = 0, n = pattern.size(); + std::string result_string; - while (i < n) { - auto c = pattern[i]; - i += 1; - if (c == '*') { - result_string += ".*"; + while (i < n) { + auto c = pattern[i]; + i += 1; + if (c == '*') { + result_string += ".*"; + } else if (c == '?') { + result_string += "."; + } else if (c == '[') { + auto j = i; + if (j < n && pattern[j] == '!') { + j += 1; + } + if (j < n && pattern[j] == ']') { + j += 1; + } + while (j < n && pattern[j] != ']') { + j += 1; + } + if (j >= n) { + result_string += "\\["; + } else { + auto stuff = std::string(pattern.begin() + i, pattern.begin() + j); + if (stuff.find("--") == std::string::npos) { + string_replace(stuff, std::string{"\\"}, std::string{R"(\\)"}); + } else { + std::vector chunks; + std::size_t k = 0; + if (pattern[i] == '!') { + k = i + 2; + } else { + k = i + 1; + } + + while (true) { + k = pattern.find("-", k, j); + if (k == std::string::npos) { + break; + } + chunks.push_back(std::string(pattern.begin() + i, pattern.begin() + k)); + i = k + 1; + k = k + 3; + } + + chunks.push_back(std::string(pattern.begin() + i, pattern.begin() + j)); + // Escape backslashes and hyphens for set difference (--). + // Hyphens that create ranges shouldn't be escaped. + bool first = false; + for (auto &s : chunks) { + string_replace(s, std::string{"\\"}, std::string{R"(\\)"}); + string_replace(s, std::string{"-"}, std::string{R"(\-)"}); + if (first) { + stuff += s; + first = false; + } else { + stuff += "-" + s; + } + } } - else if (c == '?') { - result_string += "."; + + // Escape set operations (&&, ~~ and ||). + std::string result; + std::regex_replace(std::back_inserter(result), // result + stuff.begin(), stuff.end(), // string + std::regex(std::string{R"([&~|])"}), // pattern + std::string{R"(\\\1)"}); // repl + stuff = result; + i = j + 1; + if (stuff[0] == '!') { + stuff = "^" + std::string(stuff.begin() + 1, stuff.end()); + } else if (stuff[0] == '^' || stuff[0] == '[') { + stuff = "\\\\" + stuff; } - else if (c == '[') { - auto j = i; - if (j < n && pattern[j] == '!') { - j += 1; - } - if (j < n && pattern[j] == ']') { - j += 1; - } - while (j < n && pattern[j] != ']') { - j += 1; - } - if (j >= n) { - result_string += "\\["; - } - else { - auto stuff = - std::string(pattern.begin() + i, pattern.begin() + j); - if (stuff.find("--") == std::string::npos) { - string_replace( - stuff, std::string{"\\"}, std::string{R"(\\)"}); - } - else { - std::vector chunks; - std::size_t k = 0; - if (pattern[i] == '!') { - k = i + 2; - } - else { - k = i + 1; - } - - while (true) { - k = pattern.find("-", k, j); - if (k == std::string::npos) { - break; - } - chunks.push_back(std::string( - pattern.begin() + i, pattern.begin() + k)); - i = k + 1; - k = k + 3; - } - - chunks.push_back( - std::string(pattern.begin() + i, pattern.begin() + j)); - // Escape backslashes and hyphens for set difference (--). - // Hyphens that create ranges shouldn't be escaped. - bool first = false; - for (auto &s : chunks) { - string_replace( - s, std::string{"\\"}, std::string{R"(\\)"}); - string_replace( - s, std::string{"-"}, std::string{R"(\-)"}); - if (first) { - stuff += s; - first = false; - } - else { - stuff += "-" + s; - } - } - } - - // Escape set operations (&&, ~~ and ||). - std::string result; - std::regex_replace(std::back_inserter(result), // ressult - stuff.begin(), stuff.end(), // string - std::regex(std::string{R"([&~|])"}), // pattern - std::string{R"(\\\1)"}); // repl - stuff = result; - i = j + 1; - if (stuff[0] == '!') { - stuff = "^" + std::string(stuff.begin() + 1, stuff.end()); - } - else if (stuff[0] == '^' || stuff[0] == '[') { - stuff = "\\\\" + stuff; - } - result_string = result_string + "[" + stuff + "]"; - } + result_string = result_string + "[" + stuff + "]"; + } + } else { + // SPECIAL_CHARS + // closing ')', '}' and ']' + // '-' (a range in character set) + // '&', '~', (extended character set operations) + // '#' (comment) and WHITESPACE (ignored) in verbose mode + static std::string special_characters = "()[]{}?*+-|^$\\.&~# \t\n\r\v\f"; + static std::map special_characters_map; + if (special_characters_map.empty()) { + for (auto &sc : special_characters) { + special_characters_map.insert( + std::make_pair(static_cast(sc), std::string{"\\"} + std::string(1, sc))); } - else { - // SPECIAL_CHARS - // closing ')', '}' and ']' - // '-' (a range in character set) - // '&', '~', (extended character set operations) - // '#' (comment) and WHITESPACE (ignored) in verbose mode - static std::string special_characters = - "()[]{}?*+-|^$\\.&~# \t\n\r\v\f"; - static std::map special_characters_map; - if (special_characters_map.empty()) { - for (auto &c : special_characters) { - special_characters_map.insert( - std::make_pair(static_cast(c), - std::string{"\\"} + std::string(1, c))); - } - } + } - if (special_characters.find(c) != std::string::npos) { - result_string += special_characters_map[static_cast(c)]; - } - else { - result_string += c; - } - } + if (special_characters.find(c) != std::string::npos) { + result_string += special_characters_map[static_cast(c)]; + } else { + result_string += c; + } } - return std::string{"(("} + result_string + std::string{R"()|[\r\n])$)"}; + } + return std::string{"(("} + result_string + std::string{R"()|[\r\n])$)"}; } -static inline std::regex compile_pattern(const std::string &pattern) -{ - return std::regex(translate(pattern), std::regex::ECMAScript); +static inline +std::regex compile_pattern(const std::string &pattern) { + return std::regex(translate(pattern), std::regex::ECMAScript); } -static inline bool fnmatch_case( - const fs::path &name, const std::string &pattern) -{ - return std::regex_match(name.string(), compile_pattern(pattern)); +static inline +bool fnmatch(const fs::path &name, const std::string &pattern) { + return std::regex_match(name.string(), compile_pattern(pattern)); } -static inline std::vector filter( - const std::vector &names, const std::string &pattern) -{ - // std::cout << "Pattern: " << pattern << "\n"; - std::vector result; - for (auto &name : names) { - // std::cout << "Checking for " << name.string() << "\n"; - if (fnmatch_case(name, pattern)) { - result.push_back(name); - } +static inline +std::vector filter(const std::vector &names, + const std::string &pattern) { + // std::cout << "Pattern: " << pattern << "\n"; + std::vector result; + for (auto &name : names) { + // std::cout << "Checking for " << name.string() << "\n"; + if (fnmatch(name, pattern)) { + result.push_back(name); } - return result; + } + return result; } -static inline fs::path expand_tilde(fs::path path) -{ - if (path.empty()) - return path; +static inline +fs::path expand_tilde(fs::path path) { + if (path.empty()) return path; + #ifdef _WIN32 - char *home; - size_t sz; - [[maybe_unused]] errno_t err = _dupenv_s(&home, &sz, "USERPROFILE"); + const char * home_variable = "USERNAME"; #else - const char *home = std::getenv("HOME"); + const char * home_variable = "USER"; #endif - if (home == nullptr) { - throw std::invalid_argument( - "error: Unable to expand `~` - HOME environment variable not set."); - } + const char * home = std::getenv(home_variable); + if (home == nullptr) { + throw std::invalid_argument("error: Unable to expand `~` - HOME environment variable not set."); + } - std::string s = path.string(); - if (s[0] == '~') { - s = std::string(home) + s.substr(1, s.size() - 1); - return fs::path(s); - } - else { - return path; - } + std::string s = path.string(); + if (s[0] == '~') { + s = std::string(home) + s.substr(1, s.size() - 1); + return fs::path(s); + } else { + return path; + } } -static inline bool has_magic(const std::string &pathname) -{ - static const auto magic_check = std::regex("([*?[])"); - return std::regex_search(pathname, magic_check); +static inline +bool has_magic(const std::string &pathname) { + static const auto magic_check = std::regex("([*?[])"); + return std::regex_search(pathname, magic_check); } -static inline bool is_hidden(const std::string &pathname) -{ - return std::regex_match( - pathname, std::regex("^(.*\\/)*\\.[^\\.\\/]+\\/*$")); +static inline +bool is_hidden(const std::string &pathname) { + return std::regex_match(pathname, std::regex("^(.*\\/)*\\.[^\\.\\/]+\\/*$")); } -static inline bool is_recursive(const std::string &pattern) -{ - return pattern == "**"; -} +static inline +bool is_recursive(const std::string &pattern) { return pattern == "**"; } -static inline std::vector iter_directory( - const fs::path &dirname, bool dironly) -{ - std::vector result; +static inline +std::vector iter_directory(const fs::path &dirname, bool dironly) { + std::vector result; - auto current_directory = dirname; - if (current_directory.empty()) { - current_directory = fs::current_path(); - } + auto current_directory = dirname; + if (current_directory.empty()) { + current_directory = fs::current_path(); + } - if (fs::exists(current_directory)) { - try { - for (auto &entry : fs::directory_iterator(current_directory, - fs::directory_options::follow_directory_symlink | - fs::directory_options::skip_permission_denied)) { - if (!dironly || entry.is_directory()) { - if (dirname.is_absolute()) { - result.push_back(entry.path()); - } - else { - result.push_back(fs::relative(entry.path())); - } - } - } - } - catch (std::exception &) { - // not a directory - // do nothing + if (fs::exists(current_directory)) { + try { + for (auto &entry : fs::directory_iterator( + current_directory, fs::directory_options::follow_directory_symlink | + fs::directory_options::skip_permission_denied)) { + if (!dironly || entry.is_directory()) { + if (dirname.is_absolute()) { + result.push_back(entry.path()); + } else { + result.push_back(fs::relative(entry.path())); + } } + } + } catch (std::exception&) { + // not a directory + // do nothing } + } - return result; + return result; } // Recursively yields relative pathnames inside a literal directory. -static inline std::vector rlistdir( - const fs::path &dirname, bool dironly) -{ - std::vector result; - auto names = iter_directory(dirname, dironly); - for (auto &x : names) { - if (!is_hidden(x.string())) { - result.push_back(x); - for (auto &y : rlistdir(x, dironly)) { - result.push_back(y); - } - } +static inline +std::vector rlistdir(const fs::path &dirname, bool dironly) { + std::vector result; + auto names = iter_directory(dirname, dironly); + for (auto &x : names) { + if (!is_hidden(x.string())) { + result.push_back(x); + for (auto &y : rlistdir(x, dironly)) { + result.push_back(y); + } } - return result; + } + return result; } // This helper function recursively yields relative pathnames inside a literal // directory. -static inline std::vector glob2(const fs::path &dirname, - [[maybe_unused]] const std::string &pattern, bool dironly) -{ - // std::cout << "In glob2\n"; - std::vector result; - assert(is_recursive(pattern)); - for (auto &dir : rlistdir(dirname, dironly)) { - result.push_back(dir); - } - return result; +static inline +std::vector glob2(const fs::path &dirname, [[maybe_unused]] const std::string &pattern, + bool dironly) { + // std::cout << "In glob2\n"; + std::vector result; + assert(is_recursive(pattern)); + for (auto &dir : rlistdir(dirname, dironly)) { + result.push_back(dir); + } + return result; } // These 2 helper functions non-recursively glob inside a literal directory. // They return a list of basenames. _glob1 accepts a pattern while _glob0 // takes a literal basename (so it only has to check for its existence). -static inline std::vector glob1( - const fs::path &dirname, const std::string &pattern, bool dironly) -{ - // std::cout << "In glob1\n"; - auto names = iter_directory(dirname, dironly); - std::vector filtered_names; - for (auto &n : names) { - if (!is_hidden(n.string())) { - filtered_names.push_back(n.filename()); - // if (n.is_relative()) { - // // std::cout << "Filtered (Relative): " << n << "\n"; - // filtered_names.push_back(fs::relative(n)); - // } else { - // // std::cout << "Filtered (Absolute): " << n << "\n"; - // filtered_names.push_back(n.filename()); - // } - } +static inline +std::vector glob1(const fs::path &dirname, const std::string &pattern, + bool dironly) { + // std::cout << "In glob1\n"; + auto names = iter_directory(dirname, dironly); + std::vector filtered_names; + for (auto &n : names) { + if (!is_hidden(n.string())) { + filtered_names.push_back(n.filename()); + // if (n.is_relative()) { + // // std::cout << "Filtered (Relative): " << n << "\n"; + // filtered_names.push_back(fs::relative(n)); + // } else { + // // std::cout << "Filtered (Absolute): " << n << "\n"; + // filtered_names.push_back(n.filename()); + // } } - return filter(filtered_names, pattern); + } + return filter(filtered_names, pattern); } -static inline std::vector glob0( - const fs::path &dirname, const fs::path &basename, bool /*dironly*/) -{ - // std::cout << "In glob0\n"; - std::vector result; - if (basename.empty()) { - // 'q*x/' should match only directories. - if (fs::is_directory(dirname)) { - result = {basename}; - } +static inline +std::vector glob0(const fs::path &dirname, const fs::path &basename, + bool /*dironly*/) { + // std::cout << "In glob0\n"; + std::vector result; + if (basename.empty()) { + // 'q*x/' should match only directories. + if (fs::is_directory(dirname)) { + result = {basename}; } - else { - if (fs::exists(dirname / basename)) { - result = {basename}; - } + } else { + if (fs::exists(dirname / basename)) { + result = {basename}; } - return result; -} - -static inline std::vector glob(const std::string &pathname, - bool recursive = false, bool dironly = false, - std::filesystem::path root_directory = std::filesystem::current_path()) -{ - std::vector result; - - auto path = fs::path(pathname); - - if (pathname[0] == '~') { - // expand tilde - path = expand_tilde(path); - } - - auto dirname = path.parent_path(); - const auto basename = path.filename(); - - if (!has_magic(pathname)) { - assert(!dironly); - if (!basename.empty()) { - if (!root_directory.empty() && !path.is_absolute()) { - if (fs::exists(root_directory / path)) { - result.push_back(path); - } - } - else if (fs::exists(path)) { - result.push_back(path); - } - } - else { - // Patterns ending with a slash should match only directories - if (fs::is_directory(dirname)) { - result.push_back(path); - } - } - return result; - } - - if (dirname.empty()) { - if (recursive && is_recursive(basename.string())) { - return glob2(dirname, basename.string(), dironly); - } - else { - return glob1(dirname, basename.string(), dironly); - } - } - - std::vector dirs; - if (dirname != fs::path(pathname) && has_magic(dirname.string())) { - dirs = glob(dirname.string(), recursive, true); - } - else { - dirs = {dirname}; - } - - std::function( - const fs::path &, const std::string &, bool)> - glob_in_dir; - if (has_magic(basename.string())) { - if (recursive && is_recursive(basename.string())) { - glob_in_dir = glob2; - } - else { - glob_in_dir = glob1; - } - } - else { - glob_in_dir = glob0; - } - - for (auto &d : dirs) { - for (auto &name : glob_in_dir(root_directory / d, basename.string(), dironly)) { - fs::path subresult = name; - if (name.parent_path().empty()) { - subresult = d / name; - } - result.push_back(subresult); - } - } - - return result; + } + return result; } } // namespace end -static inline std::vector glob(const std::string &pathname) -{ - return glob(pathname, false); -} +static inline +std::vector glob(const std::string &pathname, bool recursive = false, + bool dironly = false) { + std::vector result; -static inline std::vector rglob(const std::string &pathname) -{ - return glob(pathname, true); -} + auto path = fs::path(pathname); -static inline std::vector glob( - const std::string &pathname, const std::filesystem::path root_directory) -{ - return glob(pathname, true, false, root_directory); -} + if (pathname[0] == '~') { + // expand tilde + path = expand_tilde(path); + } -static inline std::vector glob( - const std::vector &pathnames) -{ - std::vector result; - for (auto &pathname : pathnames) { - for (auto &match : glob(pathname, false)) { - result.push_back(std::move(match)); - } + auto dirname = path.parent_path(); + const auto basename = path.filename(); + + if (!has_magic(pathname)) { + assert(!dironly); + if (!basename.empty()) { + if (fs::exists(path)) { + result.push_back(path); + } + } else { + // Patterns ending with a slash should match only directories + if (fs::is_directory(dirname)) { + result.push_back(path); + } } return result; -} + } -static inline std::vector rglob( - const std::vector &pathnames) -{ - std::vector result; - for (auto &pathname : pathnames) { - for (auto &match : glob(pathname, true)) { - result.push_back(std::move(match)); - } + if (dirname.empty()) { + if (recursive && is_recursive(basename.string())) { + return glob2(dirname, basename.string(), dironly); + } else { + return glob1(dirname, basename.string(), dironly); } - return result; + } + + std::vector dirs; + if (dirname != fs::path(pathname) && has_magic(dirname.string())) { + dirs = glob(dirname.string(), recursive, true); + } else { + dirs = {dirname}; + } + + std::function(const fs::path &, const std::string &, bool)> + glob_in_dir; + if (has_magic(basename.string())) { + if (recursive && is_recursive(basename.string())) { + glob_in_dir = glob2; + } else { + glob_in_dir = glob1; + } + } else { + glob_in_dir = glob0; + } + + for (auto &d : dirs) { + for (auto &name : glob_in_dir(d, basename.string(), dironly)) { + fs::path subresult = name; + if (name.parent_path().empty()) { + subresult = d / name; + } + result.push_back(subresult); + } + } + + return result; } -static inline std::vector glob( - const std::initializer_list &pathnames) -{ - return glob(std::vector(pathnames)); + +static inline +std::vector glob(const std::string &pathname) { + return glob(pathname, false); } -static inline std::vector rglob( - const std::initializer_list &pathnames) -{ - return rglob(std::vector(pathnames)); +static inline +std::vector rglob(const std::string &pathname) { + return glob(pathname, true); +} + +static inline +std::vector glob(const std::vector &pathnames) { + std::vector result; + for (auto &pathname : pathnames) { + for (auto &match : glob(pathname, false)) { + result.push_back(std::move(match)); + } + } + return result; +} + +static inline +std::vector rglob(const std::vector &pathnames) { + std::vector result; + for (auto &pathname : pathnames) { + for (auto &match : glob(pathname, true)) { + result.push_back(std::move(match)); + } + } + return result; +} + +static inline +std::vector +glob(const std::initializer_list &pathnames) { + return glob(std::vector(pathnames)); +} + +static inline +std::vector +rglob(const std::initializer_list &pathnames) { + return rglob(std::vector(pathnames)); } } // namespace glob From 78cfa630e5d35d288e285d3a3a00a63e5bc58e7b Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sat, 21 Jan 2023 18:00:21 +0100 Subject: [PATCH 02/11] Fixed handling of relative paths in configuration files (#69) --- CHANGELOG.md | 2 ++ src/config/config.cc | 12 +++++---- src/config/config.h | 6 ++--- src/config/yaml_decoders.cc | 51 ++++++++++++++++++++++++++++++++++++- src/main.cc | 38 +++++++++++++++++---------- src/util/util.cc | 13 ++++++++++ src/util/util.h | 13 ++++++++++ tests/t00002/test_case.h | 3 +-- tests/t00003/test_case.h | 3 +-- tests/t00004/test_case.h | 3 +-- tests/t00005/test_case.h | 3 +-- tests/t00006/test_case.h | 3 +-- tests/t00007/test_case.h | 3 +-- tests/t00008/test_case.h | 3 +-- tests/t00009/test_case.h | 3 +-- tests/t00010/test_case.h | 3 +-- tests/t00011/test_case.h | 3 +-- tests/t00012/test_case.h | 3 +-- tests/t00013/test_case.h | 3 +-- tests/t00014/test_case.h | 3 +-- tests/t00015/test_case.h | 3 +-- tests/t00016/test_case.h | 3 +-- tests/t00017/test_case.h | 3 +-- tests/t00018/test_case.h | 3 +-- tests/t00019/test_case.h | 3 +-- tests/t00020/test_case.h | 3 +-- tests/t00021/test_case.h | 3 +-- tests/t00022/test_case.h | 3 +-- tests/t00023/test_case.h | 3 +-- tests/t00024/test_case.h | 3 +-- tests/t00025/test_case.h | 3 +-- tests/t00026/test_case.h | 3 +-- tests/t00027/test_case.h | 3 +-- tests/t00028/test_case.h | 3 +-- tests/t00029/test_case.h | 3 +-- tests/t00030/test_case.h | 3 +-- tests/t00031/test_case.h | 3 +-- tests/t00032/test_case.h | 3 +-- tests/t00033/test_case.h | 3 +-- tests/t00034/test_case.h | 3 +-- tests/t00035/test_case.h | 3 +-- tests/t00036/test_case.h | 3 +-- tests/t00037/test_case.h | 3 +-- tests/t00038/test_case.h | 3 +-- tests/t00039/test_case.h | 3 +-- tests/t00040/test_case.h | 3 +-- tests/t00041/test_case.h | 3 +-- tests/t00042/test_case.h | 3 +-- tests/t00043/test_case.h | 3 +-- tests/t00044/test_case.h | 3 +-- tests/t00045/test_case.h | 3 +-- tests/t00046/test_case.h | 4 +-- tests/t00047/test_case.h | 3 +-- tests/t00048/test_case.h | 3 +-- tests/t00049/test_case.h | 3 +-- tests/t00050/test_case.h | 3 +-- tests/t20001/test_case.h | 3 +-- tests/t20002/test_case.h | 3 +-- tests/t20003/test_case.h | 3 +-- tests/t20004/test_case.h | 3 +-- tests/t20005/test_case.h | 3 +-- tests/t20006/test_case.h | 3 +-- tests/t20007/test_case.h | 3 +-- tests/t20008/test_case.h | 3 +-- tests/t20009/test_case.h | 3 +-- tests/t20010/test_case.h | 3 +-- tests/t20011/test_case.h | 3 +-- tests/t20012/test_case.h | 3 +-- tests/t20013/test_case.h | 3 +-- tests/t20014/test_case.h | 3 +-- tests/t20015/test_case.h | 3 +-- tests/t20016/test_case.h | 3 +-- tests/t20017/test_case.h | 3 +-- tests/t20018/test_case.h | 3 +-- tests/t20019/test_case.h | 3 +-- tests/t20020/test_case.h | 3 +-- tests/t20021/test_case.h | 3 +-- tests/t20022/test_case.h | 3 +-- tests/t20023/test_case.h | 3 +-- tests/t20024/test_case.h | 3 +-- tests/t20025/test_case.h | 3 +-- tests/t20026/test_case.h | 3 +-- tests/t20027/test_case.h | 3 +-- tests/t20028/test_case.h | 3 +-- tests/t20029/test_case.h | 3 +-- tests/t30001/test_case.h | 3 +-- tests/t30002/test_case.h | 3 +-- tests/t30003/test_case.h | 3 +-- tests/t30004/test_case.h | 3 +-- tests/t30005/test_case.h | 3 +-- tests/t30006/test_case.h | 3 +-- tests/t30007/test_case.h | 3 +-- tests/t30008/test_case.h | 3 +-- tests/t40001/test_case.h | 3 +-- tests/t40002/test_case.h | 3 +-- tests/t40003/test_case.h | 3 +-- tests/t90000/test_case.h | 3 +-- tests/test_cases.cc | 10 ++++---- tests/test_util.cc | 12 +++++++++ 99 files changed, 221 insertions(+), 207 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb813fde..78ce17b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # CHANGELOG + * Fixed relative paths in config files to be relative to the parent of + the configuration file by default (#69) * Added command line option (--dump-config) to print effective config (#77) * Added support for building with Microsoft Visual Studio diff --git a/src/config/config.cc b/src/config/config.cc index 75297355..add25931 100644 --- a/src/config/config.cc +++ b/src/config/config.cc @@ -123,16 +123,18 @@ std::string inheritable_diagram_options::simplify_template_type( return full_name; } -std::vector diagram::get_translation_units( - const std::filesystem::path &root_directory) const +std::vector diagram::get_translation_units() const { std::vector translation_units{}; for (const auto &g : glob()) { - const auto matches = glob::glob(g, root_directory); + std::string glob_path = + fmt::format("{}/{}", relative_to().string(), g.c_str()); + + auto matches = glob::glob(glob_path, true, false); + for (const auto &match : matches) { - const auto path = - std::filesystem::canonical(root_directory / match); + const auto path = std::filesystem::canonical(relative_to() / match); translation_units.emplace_back(path.string()); } } diff --git a/src/config/config.h b/src/config/config.h index 9ed5c199..893f511c 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -170,8 +170,7 @@ struct diagram : public inheritable_diagram_options { virtual common::model::diagram_t type() const = 0; - std::vector get_translation_units( - const std::filesystem::path &root_directory) const; + std::vector get_translation_units() const; void initialize_type_aliases(); @@ -268,7 +267,8 @@ YAML::Emitter &operator<<(YAML::Emitter &out, const option &o) return out; } -config load(const std::string &config_file); +config load(const std::string &config_file, + std::optional paths_relative_to_pwd = {}); } // namespace config namespace common::model { diff --git a/src/config/yaml_decoders.cc b/src/config/yaml_decoders.cc index 27417b60..2abe0b3c 100644 --- a/src/config/yaml_decoders.cc +++ b/src/config/yaml_decoders.cc @@ -571,7 +571,30 @@ template <> struct convert { } // namespace YAML namespace clanguml::config { -config load(const std::string &config_file) + +namespace { +void resolve_option_path(YAML::Node &doc, const std::string &option) +{ + std::filesystem::path relative_to_path{ + doc["relative_to"].as()}; + + assert(relative_to_path.is_absolute()); + + std::filesystem::path option_path{doc[option].as()}; + + if (option_path.is_absolute()) + return; + + option_path = relative_to_path / option_path.string(); + option_path = option_path.lexically_normal(); + option_path.make_preferred(); + + doc[option] = option_path.string(); +} +} // namespace + +config load( + const std::string &config_file, std::optional paths_relative_to_pwd) { try { YAML::Node doc = YAML::LoadFile(config_file); @@ -583,6 +606,32 @@ config load(const std::string &config_file) doc.force_insert( "__parent_path", config_file_path.parent_path().string()); + // + // If no relative_to path is specified in the config, make all paths + // resolvable against the parent directory of the .clang-uml config + // file, or against the $PWD if it was specified so in the command + // line + // + if (!doc["relative_to"]) { + bool paths_relative_to_config_file = true; + if (doc["paths_relative_to_config_file"] && + !doc["paths_relative_to_config_file"].as()) + paths_relative_to_config_file = false; + if (paths_relative_to_pwd && *paths_relative_to_pwd) + paths_relative_to_config_file = false; + + if (paths_relative_to_config_file) + doc["relative_to"] = config_file_path.parent_path().string(); + else + doc["relative_to"] = std::filesystem::current_path().string(); + } + + // + // Resolve common path-like config options relative to `relative_to` + // + resolve_option_path(doc, "output_directory"); + resolve_option_path(doc, "compilation_database_dir"); + // If the current directory is also a git repository, // load some config values, which can be included in the // generated diagrams diff --git a/src/main.cc b/src/main.cc index a6fdbbdf..4fc101ce 100644 --- a/src/main.cc +++ b/src/main.cc @@ -158,9 +158,9 @@ int main(int argc, const char *argv[]) CLI::App app{"Clang-based PlantUML diagram generator for C++"}; std::string config_path{".clang-uml"}; - std::string compilation_database_dir{}; + std::optional compilation_database_dir{}; std::vector diagram_names{}; - std::optional output_directory; + std::optional output_directory{}; unsigned int thread_count{0}; bool show_version{false}; int verbose{0}; @@ -172,6 +172,7 @@ int main(int argc, const char *argv[]) std::optional add_package_diagram; std::optional add_include_diagram; bool dump_config{false}; + std::optional paths_relative_to_pwd{}; app.add_option( "-c,--config", config_path, "Location of configuration file"); @@ -200,6 +201,9 @@ int main(int argc, const char *argv[]) "Add include diagram config"); app.add_flag( "--dump-config", dump_config, "Print effective config to stdout"); + app.add_flag("--paths-relative-to-pwd", paths_relative_to_pwd, + "If true, all paths in configuration files are relative to the $PWD " + "instead of actual location of `.clang-uml` file."); CLI11_PARSE(app, argc, argv); @@ -241,7 +245,7 @@ int main(int argc, const char *argv[]) clanguml::config::config config; try { - config = clanguml::config::load(config_path); + config = clanguml::config::load(config_path, paths_relative_to_pwd); } catch (std::runtime_error &e) { LOG_ERROR(e.what()); @@ -253,15 +257,18 @@ int main(int argc, const char *argv[]) return 0; } - if (dump_config) { - print_config(config); - return 0; - } - LOG_INFO("Loaded clang-uml config from {}", config_path); - if (!compilation_database_dir.empty()) { - config.compilation_database_dir.set(compilation_database_dir); + // + // Override selected config options from command line + // + if (compilation_database_dir) { + config.compilation_database_dir.set( + util::ensure_path_is_absolute(compilation_database_dir.value())); + } + if (output_directory) { + config.output_directory.set( + util::ensure_path_is_absolute(output_directory.value())); } LOG_INFO("Loading compilation database from {} directory", @@ -271,6 +278,11 @@ int main(int argc, const char *argv[]) if (output_directory) od = output_directory.value(); + if (dump_config) { + print_config(config); + return 0; + } + if (!ensure_output_directory_exists(od)) return 1; @@ -433,8 +445,6 @@ void find_translation_units_for_diagrams( const std::vector &compilation_database_files, std::map> &translation_units_map) { - const auto current_directory = std::filesystem::current_path(); - for (const auto &[name, diagram] : config.diagrams) { // If there are any specific diagram names provided on the command line, // and this diagram is not in that list - skip it @@ -450,7 +460,7 @@ void find_translation_units_for_diagrams( // configuration else { const std::vector translation_units = - diagram->get_translation_units(current_directory); + diagram->get_translation_units(); std::vector valid_translation_units{}; std::copy_if(compilation_database_files.begin(), @@ -563,6 +573,8 @@ int create_config_file() int add_config_diagram(clanguml::common::model::diagram_t type, const std::string &config_file_path, const std::string &name) { + namespace fs = std::filesystem; + fs::path config_file{config_file_path}; if (!fs::exists(config_file)) { diff --git a/src/util/util.cc b/src/util/util.cc index ae243560..16a8b0cc 100644 --- a/src/util/util.cc +++ b/src/util/util.cc @@ -317,4 +317,17 @@ std::string path_to_url(const std::filesystem::path &p) return fmt::format("{}", fmt::join(path_tokens, "/")); } +std::filesystem::path ensure_path_is_absolute( + const std::filesystem::path &p, const std::filesystem::path &root) +{ + if (p.is_absolute()) + return p; + + auto result = root / p; + result = result.lexically_normal(); + result.make_preferred(); + + return result; +} + } // namespace clanguml::util diff --git a/src/util/util.h b/src/util/util.h index 90ca7775..96e39fbf 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -250,4 +250,17 @@ std::size_t hash_seed(std::size_t seed); */ std::string path_to_url(const std::filesystem::path &p); +/** + * @brief Ensure path is absolute. + * + * If path is absolute, return the p. If path is not absolute, make it + * absolute with respect to root directory. + * + * @param p Path to modify + * @param root Root against which the path should be made absolute + * @return Absolute path + */ +std::filesystem::path ensure_path_is_absolute(const std::filesystem::path &p, + const std::filesystem::path &root = std::filesystem::current_path()); + } // namespace clanguml::util \ No newline at end of file diff --git a/tests/t00002/test_case.h b/tests/t00002/test_case.h index 91849435..72f328cd 100644 --- a/tests/t00002/test_case.h +++ b/tests/t00002/test_case.h @@ -73,6 +73,5 @@ TEST_CASE("t00002", "[test-case][class]") clanguml::util::get_git_commit()), "This is class B")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00003/test_case.h b/tests/t00003/test_case.h index 4eb977d5..c499a033 100644 --- a/tests/t00003/test_case.h +++ b/tests/t00003/test_case.h @@ -65,6 +65,5 @@ TEST_CASE("t00003", "[test-case][class]") REQUIRE_THAT(puml, (IsField("b_", "int"))); REQUIRE_THAT(puml, (IsField("c_", "int"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00004/test_case.h b/tests/t00004/test_case.h index 5ee0019c..dedc8496 100644 --- a/tests/t00004/test_case.h +++ b/tests/t00004/test_case.h @@ -67,6 +67,5 @@ TEST_CASE("t00004", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("detail::D::DD"))); REQUIRE_THAT(puml, IsEnum(_A("detail::D::AA"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00005/test_case.h b/tests/t00005/test_case.h index 567e18a9..101e63ed 100644 --- a/tests/t00005/test_case.h +++ b/tests/t00005/test_case.h @@ -66,6 +66,5 @@ TEST_CASE("t00005", "[test-case][class]") REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("J"), "+j")); REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("K"), "+k")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00006/test_case.h b/tests/t00006/test_case.h index 46577533..ead4a773 100644 --- a/tests/t00006/test_case.h +++ b/tests/t00006/test_case.h @@ -76,6 +76,5 @@ TEST_CASE("t00006", "[test-case][class]") REQUIRE_THAT(puml, IsAggregation(_A("R"), _A("NN"), "+ns")); REQUIRE_THAT(puml, IsAggregation(_A("R"), _A("NNN"), "+ns")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00007/test_case.h b/tests/t00007/test_case.h index 6eccc517..54a71c2a 100644 --- a/tests/t00007/test_case.h +++ b/tests/t00007/test_case.h @@ -42,6 +42,5 @@ TEST_CASE("t00007", "[test-case][class]") REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("B"), "+b")); REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("C"), "+c")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00008/test_case.h b/tests/t00008/test_case.h index ede6a434..2f216a71 100644 --- a/tests/t00008/test_case.h +++ b/tests/t00008/test_case.h @@ -48,6 +48,5 @@ TEST_CASE("t00008", "[test-case][class]") // REQUIRE_THAT(puml, IsField(Public("bool (*)(int, int) comparator"))); REQUIRE_THAT(puml, (IsField("comparator", "CMP"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00009/test_case.h b/tests/t00009/test_case.h index 5ad171c3..d522749e 100644 --- a/tests/t00009/test_case.h +++ b/tests/t00009/test_case.h @@ -51,6 +51,5 @@ TEST_CASE("t00009", "[test-case][class]") REQUIRE_THAT(puml, IsAssociation(_A("B"), _A("A>"), "+avector")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00010/test_case.h b/tests/t00010/test_case.h index 245f622c..c64778a5 100644 --- a/tests/t00010/test_case.h +++ b/tests/t00010/test_case.h @@ -46,6 +46,5 @@ TEST_CASE("t00010", "[test-case][class]") puml, IsAggregation(_A("B"), _A("A"), "+astring")); REQUIRE_THAT(puml, IsAggregation(_A("C"), _A("B"), "+aintstring")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00011/test_case.h b/tests/t00011/test_case.h index f28cde67..9a717a8e 100644 --- a/tests/t00011/test_case.h +++ b/tests/t00011/test_case.h @@ -42,6 +42,5 @@ TEST_CASE("t00011", "[test-case][class]") REQUIRE_THAT(puml, IsFriend(_A("A"), _A("B"))); // REQUIRE_THAT(puml, IsFriend(_A("A"), _A("D"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00012/test_case.h b/tests/t00012/test_case.h index aa979ee7..9b2daeeb 100644 --- a/tests/t00012/test_case.h +++ b/tests/t00012/test_case.h @@ -43,6 +43,5 @@ TEST_CASE("t00012", "[test-case][class]") _A("C>>>,3,3,3>"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00013/test_case.h b/tests/t00013/test_case.h index 84da76fa..50cedf0d 100644 --- a/tests/t00013/test_case.h +++ b/tests/t00013/test_case.h @@ -62,6 +62,5 @@ TEST_CASE("t00013", "[test-case][class]") REQUIRE_THAT(puml, IsInstantiation(_A("G"), _A("G"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00014/test_case.h b/tests/t00014/test_case.h index 54e8ef2e..c20bedb8 100644 --- a/tests/t00014/test_case.h +++ b/tests/t00014/test_case.h @@ -114,6 +114,5 @@ TEST_CASE("t00014", "[test-case][class]") REQUIRE_THAT(puml, IsDependency(_A("R"), _A("A"))); REQUIRE_THAT(puml, IsDependency(_A("R"), _A("A"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00015/test_case.h b/tests/t00015/test_case.h index fd934a22..12ed0c5e 100644 --- a/tests/t00015/test_case.h +++ b/tests/t00015/test_case.h @@ -40,6 +40,5 @@ TEST_CASE("t00015", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("ns3::ns1::ns2::Anon"))); REQUIRE_THAT(puml, IsClass(_A("ns3::B"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00016/test_case.h b/tests/t00016/test_case.h index b3304a33..f2519687 100644 --- a/tests/t00016/test_case.h +++ b/tests/t00016/test_case.h @@ -49,6 +49,5 @@ TEST_CASE("t00016", "[test-case][class]") REQUIRE_THAT( puml, IsInstantiation(_A("is_numeric<>"), _A("is_numeric"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00017/test_case.h b/tests/t00017/test_case.h index 33f1c000..f5fae0ea 100644 --- a/tests/t00017/test_case.h +++ b/tests/t00017/test_case.h @@ -67,6 +67,5 @@ TEST_CASE("t00017", "[test-case][class]") REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("J"), "-j")); REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("K"), "-k")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00018/test_case.h b/tests/t00018/test_case.h index db47adc6..cea7544b 100644 --- a/tests/t00018/test_case.h +++ b/tests/t00018/test_case.h @@ -42,6 +42,5 @@ TEST_CASE("t00018", "[test-case][class]") REQUIRE_THAT(puml, IsDependency(_A("impl::widget"), _A("widget"))); REQUIRE_THAT(puml, !IsDependency(_A("widget"), _A("widget"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00019/test_case.h b/tests/t00019/test_case.h index db0e16a0..6165fd16 100644 --- a/tests/t00019/test_case.h +++ b/tests/t00019/test_case.h @@ -54,6 +54,5 @@ TEST_CASE("t00019", "[test-case][class]") REQUIRE_THAT(puml, !IsAggregation(_A("A"), _A("Base"), "+layers")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00020/test_case.h b/tests/t00020/test_case.h index 131c920a..17000f1e 100644 --- a/tests/t00020/test_case.h +++ b/tests/t00020/test_case.h @@ -44,6 +44,5 @@ TEST_CASE("t00020", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("Factory1"))); REQUIRE_THAT(puml, IsClass(_A("Factory2"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00021/test_case.h b/tests/t00021/test_case.h index bfd4e6eb..87eb192a 100644 --- a/tests/t00021/test_case.h +++ b/tests/t00021/test_case.h @@ -42,6 +42,5 @@ TEST_CASE("t00021", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("Visitor2"))); REQUIRE_THAT(puml, IsClass(_A("Visitor3"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00022/test_case.h b/tests/t00022/test_case.h index e16e979a..6078122e 100644 --- a/tests/t00022/test_case.h +++ b/tests/t00022/test_case.h @@ -38,6 +38,5 @@ TEST_CASE("t00022", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("A1"))); REQUIRE_THAT(puml, IsClass(_A("A2"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00023/test_case.h b/tests/t00023/test_case.h index 5dd70267..ff92588a 100644 --- a/tests/t00023/test_case.h +++ b/tests/t00023/test_case.h @@ -38,6 +38,5 @@ TEST_CASE("t00023", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("StrategyA"))); REQUIRE_THAT(puml, IsClass(_A("StrategyB"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00024/test_case.h b/tests/t00024/test_case.h index bf270004..ea7f5aa8 100644 --- a/tests/t00024/test_case.h +++ b/tests/t00024/test_case.h @@ -42,6 +42,5 @@ TEST_CASE("t00024", "[test-case][class]") REQUIRE_THAT(puml, IsBaseClass(_A("Target"), _A("Target2"))); REQUIRE_THAT(puml, IsBaseClass(_A("Target"), _A("Proxy"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00025/test_case.h b/tests/t00025/test_case.h index ac0dab92..b23ac6e2 100644 --- a/tests/t00025/test_case.h +++ b/tests/t00025/test_case.h @@ -50,6 +50,5 @@ TEST_CASE("t00025", "[test-case][class]") REQUIRE_THAT(puml, IsDependency(_A("Proxy"), _A("Target1"))); REQUIRE_THAT(puml, IsDependency(_A("Proxy"), _A("Target2"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00026/test_case.h b/tests/t00026/test_case.h index 8c92e05a..aabb247e 100644 --- a/tests/t00026/test_case.h +++ b/tests/t00026/test_case.h @@ -42,6 +42,5 @@ TEST_CASE("t00026", "[test-case][class]") REQUIRE_THAT(puml, IsInstantiation(_A("Caretaker"), _A("Caretaker"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00027/test_case.h b/tests/t00027/test_case.h index bdbb0221..ea3e5b7a 100644 --- a/tests/t00027/test_case.h +++ b/tests/t00027/test_case.h @@ -54,6 +54,5 @@ TEST_CASE("t00027", "[test-case][class]") REQUIRE_THAT( puml, IsAggregation(_A("Window"), _A("Text"), "+description")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00028/test_case.h b/tests/t00028/test_case.h index 9d09e6c5..1ec2fdcf 100644 --- a/tests/t00028/test_case.h +++ b/tests/t00028/test_case.h @@ -55,6 +55,5 @@ note.)"; REQUIRE_THAT(puml, !HasNote(_A("G"), "left", "G class note.")); REQUIRE_THAT(puml, HasNote(_A("R"), "right", "R class note.")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00029/test_case.h b/tests/t00029/test_case.h index b893e488..a44b9f09 100644 --- a/tests/t00029/test_case.h +++ b/tests/t00029/test_case.h @@ -53,6 +53,5 @@ TEST_CASE("t00029", "[test-case][class]") REQUIRE_THAT(puml, !IsAggregation(_A("R"), _A("G3"), "+g3")); REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("G4"), "+g4")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00030/test_case.h b/tests/t00030/test_case.h index 80949e45..6d79326b 100644 --- a/tests/t00030/test_case.h +++ b/tests/t00030/test_case.h @@ -46,6 +46,5 @@ TEST_CASE("t00030", "[test-case][class]") REQUIRE_THAT(puml, IsAssociation(_A("R"), _A("D"), "+ddd", "", "1")); REQUIRE_THAT(puml, IsAggregation(_A("R"), _A("E"), "+eee", "", "1")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00031/test_case.h b/tests/t00031/test_case.h index 5c18ec98..80aae040 100644 --- a/tests/t00031/test_case.h +++ b/tests/t00031/test_case.h @@ -53,6 +53,5 @@ TEST_CASE("t00031", "[test-case][class]") IsAssociationWithStyle( _A("R"), _A("D"), "+ddd", "#blue,plain,thickness=16")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00032/test_case.h b/tests/t00032/test_case.h index b5f0994e..1707d78b 100644 --- a/tests/t00032/test_case.h +++ b/tests/t00032/test_case.h @@ -51,6 +51,5 @@ TEST_CASE("t00032", "[test-case][class]") REQUIRE_THAT(puml, IsBaseClass(_A("B"), _A("Overload"))); REQUIRE_THAT(puml, IsBaseClass(_A("C"), _A("Overload"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00033/test_case.h b/tests/t00033/test_case.h index 92ab70eb..71d55275 100644 --- a/tests/t00033/test_case.h +++ b/tests/t00033/test_case.h @@ -54,6 +54,5 @@ TEST_CASE("t00033", "[test-case][class]") REQUIRE_THAT( puml, IsInstantiation(_A("A"), _A("A>>>"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00034/test_case.h b/tests/t00034/test_case.h index 26016195..7c27c778 100644 --- a/tests/t00034/test_case.h +++ b/tests/t00034/test_case.h @@ -46,6 +46,5 @@ TEST_CASE("t00034", "[test-case][class]") REQUIRE_THAT( puml, IsInstantiation(_A("drop_void"), _A("drop_void"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00035/test_case.h b/tests/t00035/test_case.h index 3b263cc6..19a10903 100644 --- a/tests/t00035/test_case.h +++ b/tests/t00035/test_case.h @@ -46,6 +46,5 @@ TEST_CASE("t00035", "[test-case][class]") REQUIRE_THAT(puml, IsLayoutHint(_A("Center"), "right", _A("Right"))); REQUIRE_THAT(puml, IsLayoutHint(_A("Center"), "down", _A("Bottom"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00036/test_case.h b/tests/t00036/test_case.h index 0e011476..4e52ada0 100644 --- a/tests/t00036/test_case.h +++ b/tests/t00036/test_case.h @@ -45,6 +45,5 @@ TEST_CASE("t00036", "[test-case][class]") REQUIRE_THAT(puml, IsAggregation(_A("B"), _A("A"), "+a_int")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00037/test_case.h b/tests/t00037/test_case.h index 320a1bbe..786930c2 100644 --- a/tests/t00037/test_case.h +++ b/tests/t00037/test_case.h @@ -43,6 +43,5 @@ TEST_CASE("t00037", "[test-case][class]") puml, IsAggregation(_A("ST"), _A("ST::(dimensions)"), "+dimensions")); REQUIRE_THAT(puml, IsAggregation(_A("ST"), _A("ST::(units)"), "-units")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00038/test_case.h b/tests/t00038/test_case.h index 6593ea2e..6e34c61b 100644 --- a/tests/t00038/test_case.h +++ b/tests/t00038/test_case.h @@ -91,6 +91,5 @@ TEST_CASE("t00038", "[test-case][class]") _A("map>"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00039/test_case.h b/tests/t00039/test_case.h index 3431c2bf..970dc920 100644 --- a/tests/t00039/test_case.h +++ b/tests/t00039/test_case.h @@ -63,6 +63,5 @@ TEST_CASE("t00039", "[test-case][class]") REQUIRE_THAT(puml, IsClassTemplate("ns3::FE", "T,M")); REQUIRE_THAT(puml, IsClassTemplate("ns3::FFF", "T,M,N")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00040/test_case.h b/tests/t00040/test_case.h index 1b91814b..122bbfbb 100644 --- a/tests/t00040/test_case.h +++ b/tests/t00040/test_case.h @@ -45,6 +45,5 @@ TEST_CASE("t00040", "[test-case][class]") REQUIRE_THAT(puml, !IsDependency(_A("R"), _A("A"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00041/test_case.h b/tests/t00041/test_case.h index 65f56ffa..465c255b 100644 --- a/tests/t00041/test_case.h +++ b/tests/t00041/test_case.h @@ -62,6 +62,5 @@ TEST_CASE("t00041", "[test-case][class]") REQUIRE_THAT(puml, IsBaseClass(_A("ns1::N"), _A("ns1::NN"))); REQUIRE_THAT(puml, IsBaseClass(_A("ns1::N"), _A("ns1::NM"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00042/test_case.h b/tests/t00042/test_case.h index ace2c9b7..6084ec70 100644 --- a/tests/t00042/test_case.h +++ b/tests/t00042/test_case.h @@ -39,6 +39,5 @@ TEST_CASE("t00042", "[test-case][class]") REQUIRE_THAT(puml, IsClassTemplate("B", "T,K")); REQUIRE_THAT(puml, !IsClassTemplate("C", "T")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00043/test_case.h b/tests/t00043/test_case.h index 131cef08..d9618427 100644 --- a/tests/t00043/test_case.h +++ b/tests/t00043/test_case.h @@ -62,6 +62,5 @@ TEST_CASE("t00043", "[test-case][class]") REQUIRE_THAT(puml, IsDependency(_A("I"), _A("H"))); REQUIRE_THAT(puml, IsDependency(_A("J"), _A("I"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00044/test_case.h b/tests/t00044/test_case.h index 8f98b0ba..e71fc749 100644 --- a/tests/t00044/test_case.h +++ b/tests/t00044/test_case.h @@ -39,6 +39,5 @@ TEST_CASE("t00044", "[test-case][class]") // Check dependants filter // REQUIRE_THAT(puml, IsClassTemplate("signal_handler", "Ret,Args...,A")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00045/test_case.h b/tests/t00045/test_case.h index d78e1b49..1099a5b8 100644 --- a/tests/t00045/test_case.h +++ b/tests/t00045/test_case.h @@ -64,6 +64,5 @@ TEST_CASE("t00045", "[test-case][class]") // TODO: // REQUIRE_THAT(puml, IsFriend(_A("ns1::ns2::R"), _A("AAAA"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00046/test_case.h b/tests/t00046/test_case.h index b6f7912a..a5d67acf 100644 --- a/tests/t00046/test_case.h +++ b/tests/t00046/test_case.h @@ -42,6 +42,6 @@ TEST_CASE("t00046", "[test-case][class]") REQUIRE_THAT(puml, IsClass(_A("R"))); REQUIRE_THAT(puml, IsField("i", "std::vector")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t00047/test_case.h b/tests/t00047/test_case.h index 66e75d88..374243d7 100644 --- a/tests/t00047/test_case.h +++ b/tests/t00047/test_case.h @@ -42,6 +42,5 @@ TEST_CASE("t00047", "[test-case][class]") REQUIRE_THAT(puml, IsClassTemplate("conditional_t", "std::false_type,Result,Tail...")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t00048/test_case.h b/tests/t00048/test_case.h index f652bad9..9bf75981 100644 --- a/tests/t00048/test_case.h +++ b/tests/t00048/test_case.h @@ -48,6 +48,5 @@ TEST_CASE("t00048", "[test-case][class]") REQUIRE_THAT(puml, IsBaseClass(_A("Base"), _A("A"))); REQUIRE_THAT(puml, IsBaseClass(_A("Base"), _A("B"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t00049/test_case.h b/tests/t00049/test_case.h index c4cfc515..f17aa8d5 100644 --- a/tests/t00049/test_case.h +++ b/tests/t00049/test_case.h @@ -56,6 +56,5 @@ TEST_CASE("t00049", "[test-case][class]") REQUIRE_THAT(puml, IsInstantiation(_A("A"), _A("A"))); REQUIRE_THAT(puml, IsInstantiation(_A("A"), _A("A"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t00050/test_case.h b/tests/t00050/test_case.h index b7fe4109..442682e0 100644 --- a/tests/t00050/test_case.h +++ b/tests/t00050/test_case.h @@ -53,6 +53,5 @@ TEST_CASE("t00050", "[test-case][class]") REQUIRE_THAT(puml, HasNote(_A("G"), "bottom")); REQUIRE_THAT(puml, HasNote(_A("G"), "right")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20001/test_case.h b/tests/t20001/test_case.h index 4799c97a..b14e887a 100644 --- a/tests/t20001/test_case.h +++ b/tests/t20001/test_case.h @@ -46,6 +46,5 @@ TEST_CASE("t20001", "[test-case][sequence]") REQUIRE_THAT(puml, HasComment("t20001 test diagram of type sequence")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t20002/test_case.h b/tests/t20002/test_case.h index 0967f912..39e7a1dd 100644 --- a/tests/t20002/test_case.h +++ b/tests/t20002/test_case.h @@ -38,6 +38,5 @@ TEST_CASE("t20002", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("m2()"), _A("m3()"), "")); REQUIRE_THAT(puml, HasCall(_A("m3()"), _A("m4()"), "")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t20003/test_case.h b/tests/t20003/test_case.h index 0d3ebb16..46e3d2db 100644 --- a/tests/t20003/test_case.h +++ b/tests/t20003/test_case.h @@ -38,6 +38,5 @@ TEST_CASE("t20003", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("m2(T)"), _A("m3(T)"), "")); REQUIRE_THAT(puml, HasCall(_A("m3(T)"), _A("m4(T)"), "")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t20004/test_case.h b/tests/t20004/test_case.h index f67bc340..de1ea0cd 100644 --- a/tests/t20004/test_case.h +++ b/tests/t20004/test_case.h @@ -56,6 +56,5 @@ TEST_CASE("t20004", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("m3(int)"), _A("m4(int)"), "")); REQUIRE_THAT(puml, EndsWith("@enduml\n")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20005/test_case.h b/tests/t20005/test_case.h index d22b0e2c..c5d65d87 100644 --- a/tests/t20005/test_case.h +++ b/tests/t20005/test_case.h @@ -39,6 +39,5 @@ TEST_CASE("t20005", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("C"), _A("B"), "b(T)")); REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a(T)")); REQUIRE_THAT(puml, HasExitpoint(_A("C"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20006/test_case.h b/tests/t20006/test_case.h index e7a25810..8280336f 100644 --- a/tests/t20006/test_case.h +++ b/tests/t20006/test_case.h @@ -69,6 +69,5 @@ TEST_CASE("t20006", "[test-case][sequence]") HasCall(_A("BB"), _A("BB"), "bb2(int,float)")); REQUIRE_THAT(puml, HasCall(_A("BB"), _A("AA"), "aa2(int)")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20007/test_case.h b/tests/t20007/test_case.h index de94d5b6..504000cd 100644 --- a/tests/t20007/test_case.h +++ b/tests/t20007/test_case.h @@ -44,6 +44,5 @@ TEST_CASE("t20007", "[test-case][sequence]") HasCall(_A("tmain()"), _A("Adder"), "add(std::string &&,std::string &&,std::string &&)")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20008/test_case.h b/tests/t20008/test_case.h index 9bda4062..663de6f7 100644 --- a/tests/t20008/test_case.h +++ b/tests/t20008/test_case.h @@ -51,6 +51,5 @@ TEST_CASE("t20008", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a3(std::string)")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20009/test_case.h b/tests/t20009/test_case.h index d67cb134..97dd7f83 100644 --- a/tests/t20009/test_case.h +++ b/tests/t20009/test_case.h @@ -45,6 +45,5 @@ TEST_CASE("t20009", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("B"), "b(float)")); REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a(float)")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20010/test_case.h b/tests/t20010/test_case.h index 7b928fbd..613cfd44 100644 --- a/tests/t20010/test_case.h +++ b/tests/t20010/test_case.h @@ -47,6 +47,5 @@ TEST_CASE("t20010", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("B"), "b4()")); REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a4()")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20011/test_case.h b/tests/t20011/test_case.h index 571f207b..0fd58f8c 100644 --- a/tests/t20011/test_case.h +++ b/tests/t20011/test_case.h @@ -43,6 +43,5 @@ TEST_CASE("t20011", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("A"), _A("A"), "d(int)")); REQUIRE_THAT(puml, HasCall(_A("A"), _A("A"), "b(int)")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20012/test_case.h b/tests/t20012/test_case.h index 71f1a1f1..b47b0954 100644 --- a/tests/t20012/test_case.h +++ b/tests/t20012/test_case.h @@ -76,6 +76,5 @@ TEST_CASE("t20012", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("D"), "add5(int)")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20013/test_case.h b/tests/t20013/test_case.h index ed2da262..f661971e 100644 --- a/tests/t20013/test_case.h +++ b/tests/t20013/test_case.h @@ -45,6 +45,5 @@ TEST_CASE("t20013", "[test-case][sequence]") puml, HasCall(_A("tmain(int,char **)"), _A("B"), "b(const char *)")); REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a3(const char *)")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20014/test_case.h b/tests/t20014/test_case.h index ab49e0f6..f7d7aeb9 100644 --- a/tests/t20014/test_case.h +++ b/tests/t20014/test_case.h @@ -44,6 +44,5 @@ TEST_CASE("t20014", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("C"), "c1(int,int)")); REQUIRE_THAT(puml, HasCall(_A("C"), _A("B"), "b1(int,int)")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20015/test_case.h b/tests/t20015/test_case.h index 4587898a..0794f8b4 100644 --- a/tests/t20015/test_case.h +++ b/tests/t20015/test_case.h @@ -46,6 +46,5 @@ TEST_CASE("t20015", "[test-case][sequence]") REQUIRE_THAT(puml, !HasCall(_A("B"), _A("B"), "set_y(int)")); REQUIRE_THAT(puml, !HasCall(_A("B"), _A("B"), "set_z(int)")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20016/test_case.h b/tests/t20016/test_case.h index 11e020a3..a2f2c3f5 100644 --- a/tests/t20016/test_case.h +++ b/tests/t20016/test_case.h @@ -41,6 +41,5 @@ TEST_CASE("t20016", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("B"), "b2(long)")); REQUIRE_THAT(puml, HasCall(_A("B"), _A("A"), "a2(const long &)")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20017/test_case.h b/tests/t20017/test_case.h index dd1278d9..b48821d2 100644 --- a/tests/t20017/test_case.h +++ b/tests/t20017/test_case.h @@ -48,6 +48,5 @@ TEST_CASE("t20017", "[test-case][sequence]") HasCall(_A("t20017.cc"), _A("include/t20017_b.h"), "b2(int,int)")); REQUIRE_THAT(puml, HasExitpoint(_A("t20017.cc"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20018/test_case.h b/tests/t20018/test_case.h index 985d4722..675441ef 100644 --- a/tests/t20018/test_case.h +++ b/tests/t20018/test_case.h @@ -51,6 +51,5 @@ TEST_CASE("t20018", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("Factorial<1>"), _A("Factorial<0>"), "__print(int)__")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20019/test_case.h b/tests/t20019/test_case.h index ebc0e759..73eb87a8 100644 --- a/tests/t20019/test_case.h +++ b/tests/t20019/test_case.h @@ -40,6 +40,5 @@ TEST_CASE("t20019", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("Base"), "name()")); REQUIRE_THAT(puml, HasCall(_A("Base"), _A("D2"), "impl()")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20020/test_case.h b/tests/t20020/test_case.h index 2855a2e1..21beae59 100644 --- a/tests/t20020/test_case.h +++ b/tests/t20020/test_case.h @@ -50,6 +50,5 @@ TEST_CASE("t20020", "[test-case][sequence]") REQUIRE_THAT( puml, HasCallInControlCondition(_A("tmain()"), _A("C"), "c3(int)")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20021/test_case.h b/tests/t20021/test_case.h index 24b01727..61e0c84f 100644 --- a/tests/t20021/test_case.h +++ b/tests/t20021/test_case.h @@ -57,6 +57,5 @@ TEST_CASE("t20021", "[test-case][sequence]") REQUIRE_THAT( puml, HasCallInControlCondition(_A("tmain()"), _A("C"), "contents()")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20022/test_case.h b/tests/t20022/test_case.h index 2f68ac04..6a12c019 100644 --- a/tests/t20022/test_case.h +++ b/tests/t20022/test_case.h @@ -38,6 +38,5 @@ TEST_CASE("t20022", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("A"), "a()")); REQUIRE_THAT(puml, HasCall(_A("A"), _A("B"), "b()")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20023/test_case.h b/tests/t20023/test_case.h index 82f50fd4..71e3b0bc 100644 --- a/tests/t20023/test_case.h +++ b/tests/t20023/test_case.h @@ -41,6 +41,5 @@ TEST_CASE("t20023", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("A"), _A("A"), "a3()")); REQUIRE_THAT(puml, HasCall(_A("A"), _A("A"), "a4()")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20024/test_case.h b/tests/t20024/test_case.h index acea65fc..5c432062 100644 --- a/tests/t20024/test_case.h +++ b/tests/t20024/test_case.h @@ -46,6 +46,5 @@ TEST_CASE("t20024", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("B"), _A("B"), "orange()")); REQUIRE_THAT(puml, HasCall(_A("B"), _A("B"), "green()")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20025/test_case.h b/tests/t20025/test_case.h index 1c097c82..3874cd53 100644 --- a/tests/t20025/test_case.h +++ b/tests/t20025/test_case.h @@ -41,6 +41,5 @@ TEST_CASE("t20025", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("add(int,int)"), "")); REQUIRE_THAT(puml, !HasCall(_A("tmain()"), _A("add2(int,int)"), "")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20026/test_case.h b/tests/t20026/test_case.h index 324a348a..934d8ad2 100644 --- a/tests/t20026/test_case.h +++ b/tests/t20026/test_case.h @@ -37,6 +37,5 @@ TEST_CASE("t20026", "[test-case][sequence]") // Check if all calls exist REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("A"), "a()")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20027/test_case.h b/tests/t20027/test_case.h index 48b359dd..c8d807a6 100644 --- a/tests/t20027/test_case.h +++ b/tests/t20027/test_case.h @@ -39,6 +39,5 @@ TEST_CASE("t20027", "[test-case][sequence]") REQUIRE_THAT(puml, !HasCall(_A("A"), _A("A"), "aa()")); REQUIRE_THAT(puml, !HasCall(_A("A"), _A("A"), "aaa()")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20028/test_case.h b/tests/t20028/test_case.h index 44c7677d..6d97fb09 100644 --- a/tests/t20028/test_case.h +++ b/tests/t20028/test_case.h @@ -41,6 +41,5 @@ TEST_CASE("t20028", "[test-case][sequence]") REQUIRE_THAT(puml, HasCall(_A("tmain()"), _A("A"), "d()")); REQUIRE_THAT(puml, !HasCall(_A("tmain()"), _A("B"), "e()")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t20029/test_case.h b/tests/t20029/test_case.h index bf0b820f..cc63df20 100644 --- a/tests/t20029/test_case.h +++ b/tests/t20029/test_case.h @@ -56,6 +56,5 @@ TEST_CASE("t20029", "[test-case][sequence]") REQUIRE_THAT(puml, !HasCall(_A("ConnectionPool"), _A("ConnectionPool"), "connect_impl()")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file diff --git a/tests/t30001/test_case.h b/tests/t30001/test_case.h index 553b0666..9fc5ca7d 100644 --- a/tests/t30001/test_case.h +++ b/tests/t30001/test_case.h @@ -64,6 +64,5 @@ TEST_CASE("t30001", "[test-case][package]") REQUIRE_THAT(puml, HasComment("t30001 test diagram of type package")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t30002/test_case.h b/tests/t30002/test_case.h index 9a58f79d..e4ef8c77 100644 --- a/tests/t30002/test_case.h +++ b/tests/t30002/test_case.h @@ -69,6 +69,5 @@ TEST_CASE("t30002", "[test-case][package]") REQUIRE_THAT(puml, IsDependency(_A("BBB"), _A("A16"))); REQUIRE_THAT(puml, IsDependency(_A("BBB"), _A("A17"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t30003/test_case.h b/tests/t30003/test_case.h index 5ea54ed4..c9026838 100644 --- a/tests/t30003/test_case.h +++ b/tests/t30003/test_case.h @@ -43,6 +43,5 @@ TEST_CASE("t30003", "[test-case][package]") REQUIRE_THAT(puml, IsDeprecated(_A("ns2_v0_9_0"))); REQUIRE_THAT(puml, IsDeprecated(_A("ns3"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t30004/test_case.h b/tests/t30004/test_case.h index 4dcd529e..6c471d87 100644 --- a/tests/t30004/test_case.h +++ b/tests/t30004/test_case.h @@ -40,6 +40,5 @@ TEST_CASE("t30004", "[test-case][package]") REQUIRE_THAT(puml, !IsPackage("DDD")); REQUIRE_THAT(puml, IsPackage("EEE")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t30005/test_case.h b/tests/t30005/test_case.h index 2d3fc166..3afa00ee 100644 --- a/tests/t30005/test_case.h +++ b/tests/t30005/test_case.h @@ -41,6 +41,5 @@ TEST_CASE("t30005", "[test-case][package]") REQUIRE_THAT(puml, IsDependency(_A("BBB"), _A("AAA"))); REQUIRE_THAT(puml, IsDependency(_A("CCC"), _A("AAA"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t30006/test_case.h b/tests/t30006/test_case.h index 7b711888..9d7808ef 100644 --- a/tests/t30006/test_case.h +++ b/tests/t30006/test_case.h @@ -41,6 +41,5 @@ TEST_CASE("t30006", "[test-case][package]") REQUIRE_THAT(puml, IsDependency(_A("A"), _A("B"))); REQUIRE_THAT(puml, IsDependency(_A("A"), _A("C"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t30007/test_case.h b/tests/t30007/test_case.h index 9d1dbbbd..1fbb7399 100644 --- a/tests/t30007/test_case.h +++ b/tests/t30007/test_case.h @@ -44,6 +44,5 @@ TEST_CASE("t30007", "[test-case][package]") REQUIRE_THAT(puml, IsLayoutHint(_A("C"), "up", _A("AA"))); REQUIRE_THAT(puml, IsLayoutHint(_A("C"), "left", _A("B"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t30008/test_case.h b/tests/t30008/test_case.h index 70bae7b8..c14d183f 100644 --- a/tests/t30008/test_case.h +++ b/tests/t30008/test_case.h @@ -50,6 +50,5 @@ TEST_CASE("t30008", "[test-case][package]") REQUIRE_THAT(puml, IsDependency(_A("E"), _A("D"))); REQUIRE_THAT(puml, IsDependency(_A("F"), _A("E"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t40001/test_case.h b/tests/t40001/test_case.h index a9c9352d..2ed7621f 100644 --- a/tests/t40001/test_case.h +++ b/tests/t40001/test_case.h @@ -50,6 +50,5 @@ TEST_CASE("t40001", "[test-case][include]") REQUIRE_THAT(puml, HasComment("t40001 test diagram of type include")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t40002/test_case.h b/tests/t40002/test_case.h index fa5357fc..0f6451b4 100644 --- a/tests/t40002/test_case.h +++ b/tests/t40002/test_case.h @@ -79,6 +79,5 @@ TEST_CASE("t40002", "[test-case][include]") clanguml::util::get_git_commit()), "lib2.h")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t40003/test_case.h b/tests/t40003/test_case.h index 8c240777..e45cbea9 100644 --- a/tests/t40003/test_case.h +++ b/tests/t40003/test_case.h @@ -46,6 +46,5 @@ TEST_CASE("t40003", "[test-case][include]") REQUIRE_THAT(puml, IsFile("t5.h")); REQUIRE_THAT(puml, !IsFile("t6.h")); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/t90000/test_case.h b/tests/t90000/test_case.h index 3f40682f..5074f76e 100644 --- a/tests/t90000/test_case.h +++ b/tests/t90000/test_case.h @@ -35,6 +35,5 @@ TEST_CASE("t90000", "[test-case][config]") REQUIRE_THAT(puml, IsClass(_A("Foo"))); REQUIRE_THAT(puml, IsClass(_A("Boo"))); - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } diff --git a/tests/test_cases.cc b/tests/test_cases.cc index 927ac6d2..c267fdbd 100644 --- a/tests/test_cases.cc +++ b/tests/test_cases.cc @@ -35,7 +35,7 @@ std::pair> load_config(const std::string &test_name) { - auto config = clanguml::config::load(test_name + "/.clang-uml"); + auto config = clanguml::config::load(test_name + "/.clang-uml", true); std::string err{}; auto compilation_database = @@ -62,7 +62,7 @@ generate_sequence_diagram(clang::tooling::CompilationDatabase &db, auto model = clanguml::common::generators::plantuml::generate(db, diagram->name, dynamic_cast(*diagram), - diagram->get_translation_units(std::filesystem::current_path())); + diagram->get_translation_units()); return model; } @@ -81,7 +81,7 @@ std::unique_ptr generate_class_diagram( auto model = clanguml::common::generators::plantuml::generate(db, diagram->name, dynamic_cast(*diagram), - diagram->get_translation_units(std::filesystem::current_path())); + diagram->get_translation_units()); return model; } @@ -100,7 +100,7 @@ generate_package_diagram(clang::tooling::CompilationDatabase &db, return clanguml::common::generators::plantuml::generate(db, diagram->name, dynamic_cast(*diagram), - diagram->get_translation_units(std::filesystem::current_path())); + diagram->get_translation_units()); } std::unique_ptr @@ -117,7 +117,7 @@ generate_include_diagram(clang::tooling::CompilationDatabase &db, return clanguml::common::generators::plantuml::generate(db, diagram->name, dynamic_cast(*diagram), - diagram->get_translation_units(std::filesystem::current_path())); + diagram->get_translation_units()); } std::string generate_sequence_puml( diff --git a/tests/test_util.cc b/tests/test_util.cc index 9c067fff..be4bb2cd 100644 --- a/tests/test_util.cc +++ b/tests/test_util.cc @@ -228,6 +228,18 @@ TEST_CASE("Test path_to_url", "[unit-test]") #endif } +TEST_CASE("Test ensure_path_is_absolute", "[unit-test]") +{ + using namespace clanguml::util; + + CHECK(ensure_path_is_absolute("a/b/c", "/tmp").string() == "/tmp/a/b/c"); + CHECK(ensure_path_is_absolute("/a/b/c", "/tmp").string() == "/a/b/c"); + CHECK(ensure_path_is_absolute("", "/tmp").string() == "/tmp/"); + CHECK(ensure_path_is_absolute(".", "/tmp").string() == "/tmp/"); + CHECK(ensure_path_is_absolute("..", "/tmp").string() == "/"); + CHECK(ensure_path_is_absolute("/", "/tmp").string() == "/"); +} + TEST_CASE("Test hash_seed", "[unit-test]") { using namespace clanguml::util; From 61dcf9ef043abb69a7e42f29baf71ef2adb53728 Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sat, 21 Jan 2023 20:30:14 +0100 Subject: [PATCH 03/11] Updated docs --- docs/configuration_file.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/configuration_file.md b/docs/configuration_file.md index 26397e64..136db40a 100644 --- a/docs/configuration_file.md +++ b/docs/configuration_file.md @@ -5,6 +5,7 @@ * [Top level options](#top-level-options) * [Diagram options](#diagram-options) * [Example complete config](#example-complete-config) +* [Paths](#paths) @@ -113,4 +114,20 @@ diagrams: # Add this line to the beginning of the resulting puml file before: - 'title clang-uml class diagram model' -``` \ No newline at end of file +``` + +## Paths +By default, all paths specified in the configuration file, including: + +* `glob` +* `output_directory` +* `compilation_database_dir` +* `paths` filter + +are relative to the parent directory of the configuration file. This can be +changed in the following ways: +* by specifying `relative_to` option in the configuration file +* by providing `--paths-relative-to-pwd` command line option, in which + case all paths will be relative to the directory where `clang-uml` is + executed (this only makes sense for automation where `clang-uml` is executed + from the same location relative to the project directory \ No newline at end of file From b5cf78ce82037c53f65864b6811c2771fc2c810d Mon Sep 17 00:00:00 2001 From: bram Date: Sun, 8 Jan 2023 20:58:59 +0100 Subject: [PATCH 04/11] Fix for segfault in path::pop_back --- src/common/model/path.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/model/path.h b/src/common/model/path.h index 9846f268..1790fc1c 100644 --- a/src/common/model/path.h +++ b/src/common/model/path.h @@ -128,7 +128,13 @@ public: } } - void pop_back() { path_.pop_back(); } + void pop_back() + { + if (!path_.empty()) + { + path_.pop_back(); + } + } std::optional parent() const { From 023a4a0cc082777a5336890be455baca023d25a6 Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sat, 21 Jan 2023 23:23:13 +0100 Subject: [PATCH 05/11] Fixed generation of lambda names in class diagrams (#78) --- .../visitor/translation_unit_visitor.cc | 46 +++++++++++--- .../visitor/translation_unit_visitor.h | 1 + src/util/util.h | 3 +- tests/t00051/.clang-uml | 12 ++++ tests/t00051/t00051.cc | 63 +++++++++++++++++++ tests/t00051/test_case.h | 57 +++++++++++++++++ tests/test_cases.cc | 1 + tests/test_cases.yaml | 3 + util/templates/test_cases/test_case.h | 3 +- 9 files changed, 176 insertions(+), 13 deletions(-) create mode 100644 tests/t00051/.clang-uml create mode 100644 tests/t00051/t00051.cc create mode 100644 tests/t00051/test_case.h diff --git a/src/class_diagram/visitor/translation_unit_visitor.cc b/src/class_diagram/visitor/translation_unit_visitor.cc index ea11207d..40ba3063 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.cc +++ b/src/class_diagram/visitor/translation_unit_visitor.cc @@ -828,9 +828,13 @@ void translation_unit_visitor::process_method( if (mf.isDefaulted() && !mf.isExplicitlyDefaulted()) return; + auto method_return_type = + common::to_string(mf.getReturnType(), mf.getASTContext()); + + ensure_lambda_type_is_relative(method_return_type); + class_method method{common::access_specifier_to_access_t(mf.getAccess()), - util::trim(mf.getNameAsString()), - common::to_string(mf.getReturnType(), mf.getASTContext())}; + util::trim(mf.getNameAsString()), std::move(method_return_type)}; method.is_pure_virtual(mf.isPure()); method.is_virtual(mf.isVirtual()); @@ -923,13 +927,6 @@ bool translation_unit_visitor::find_relationships(const clang::QualType &type, const auto *type_instantiation_decl = type->getAs(); - // if (type_instantiation_decl != nullptr) { - // if (type_instantiation_decl->isTypeAlias()) - // type_instantiation_decl = - // type_instantiation_decl->getAliasedType() - // ->getAs(); - // } - if (type_instantiation_decl != nullptr) { for (const auto &template_argument : *type_instantiation_decl) { const auto template_argument_kind = template_argument.getKind(); @@ -996,7 +993,12 @@ void translation_unit_visitor::process_function_parameter( if (parameter.skip()) return; - parameter.set_type(common::to_string(p.getType(), p.getASTContext())); + auto parameter_type = common::to_string(p.getType(), p.getASTContext()); + + // Is there no better way to determine that 'type' is a lambda? + ensure_lambda_type_is_relative(parameter_type); + + parameter.set_type(parameter_type); if (p.hasDefaultArg()) { const auto *default_arg = p.getDefaultArg(); @@ -1048,6 +1050,30 @@ void translation_unit_visitor::process_function_parameter( method.add_parameter(std::move(parameter)); } +void translation_unit_visitor::ensure_lambda_type_is_relative( + std::string ¶meter_type) const +{ + std::string lambda_prefix{"(lambda at /"}; + + while (parameter_type.find(lambda_prefix) != std::string::npos) { + auto lambda_begin = parameter_type.find(lambda_prefix); + + auto absolute_lambda_path_end = parameter_type.find(":", lambda_begin); + auto absolute_lambda_path = + parameter_type.substr(lambda_begin + lambda_prefix.size() - 1, + absolute_lambda_path_end - + (lambda_begin + lambda_prefix.size() - 1)); + + auto relative_lambda_path = std::filesystem::relative( + absolute_lambda_path, config().relative_to()) + .string(); + + parameter_type = fmt::format("{}(lambda at {}{}", + parameter_type.substr(0, lambda_begin), relative_lambda_path, + parameter_type.substr(absolute_lambda_path_end)); + } +} + void translation_unit_visitor:: process_function_parameter_find_relationships_in_template(class_ &c, const std::set & /*template_parameter_names*/, diff --git a/src/class_diagram/visitor/translation_unit_visitor.h b/src/class_diagram/visitor/translation_unit_visitor.h index 02778238..b7c4bde4 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.h +++ b/src/class_diagram/visitor/translation_unit_visitor.h @@ -254,5 +254,6 @@ private: std::tuple> anonymous_struct_relationships_; + void ensure_lambda_type_is_relative(std::string ¶meter_type) const; }; } // namespace clanguml::class_diagram::visitor diff --git a/src/util/util.h b/src/util/util.h index 96e39fbf..03c853f1 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -162,7 +162,8 @@ template <> bool starts_with( const std::filesystem::path &path, const std::filesystem::path &prefix); -template <> bool starts_with(const std::string &s, const std::string &prefix); +template <> +bool starts_with(const std::string &s, const std::string &prefix); template bool ends_with(const T &value, const T &suffix); diff --git a/tests/t00051/.clang-uml b/tests/t00051/.clang-uml new file mode 100644 index 00000000..4cb46059 --- /dev/null +++ b/tests/t00051/.clang-uml @@ -0,0 +1,12 @@ +compilation_database_dir: .. +output_directory: puml +diagrams: + t00051_class: + type: class + glob: + - ../../tests/t00051/t00051.cc + include: + namespaces: + - clanguml::t00051 + using_namespace: + - clanguml::t00051 \ No newline at end of file diff --git a/tests/t00051/t00051.cc b/tests/t00051/t00051.cc new file mode 100644 index 00000000..a9578fcb --- /dev/null +++ b/tests/t00051/t00051.cc @@ -0,0 +1,63 @@ +#include + +namespace clanguml { +namespace t00051 { + +template struct B : private std::thread { + B(F &&f, FF &&ff) + : f_{std::move(f)} + , ff_{std::move(ff)} + { + } + + void f() { f_(); } + void ff() { ff_(); } + + F f_; + FF ff_; +}; + +class A { +public: +private: + class custom_thread1 : private std::thread { + public: + template + explicit custom_thread1(Function &&f, Args &&...args) + : std::thread::thread( + std::forward(f), std::forward(args)...) + { + } + }; + + static custom_thread1 start_thread1(); + + class custom_thread2 : private std::thread { + using std::thread::thread; + }; + + static custom_thread2 start_thread2(); + + auto start_thread3() + { + return B{[]() {}, []() {}}; + } + + auto get_function() + { + return []() {}; + } +}; + +A::custom_thread1 A::start_thread1() +{ + return custom_thread1{[]() {}}; +} + +A::custom_thread2 A::start_thread2() +{ + return custom_thread2{[]() {}}; +} + +} +} diff --git a/tests/t00051/test_case.h b/tests/t00051/test_case.h new file mode 100644 index 00000000..54400afd --- /dev/null +++ b/tests/t00051/test_case.h @@ -0,0 +1,57 @@ +/** + * tests/t00051/test_case.h + * + * Copyright (c) 2021-2023 Bartek Kryza + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +TEST_CASE("t00051", "[test-case][class]") +{ + auto [config, db] = load_config("t00051"); + + auto diagram = config.diagrams["t00051_class"]; + + REQUIRE(diagram->name == "t00051_class"); + + auto model = generate_class_diagram(*db, diagram); + + REQUIRE(model->name() == "t00051_class"); + + auto puml = generate_class_puml(diagram, *model); + AliasMatcher _A(puml); + + REQUIRE_THAT(puml, StartsWith("@startuml")); + REQUIRE_THAT(puml, EndsWith("@enduml\n")); + + // Check if all classes exist + REQUIRE_THAT(puml, IsClass(_A("A"))); + REQUIRE_THAT(puml, IsInnerClass(_A("A"), _A("A::custom_thread1"))); + REQUIRE_THAT(puml, IsInnerClass(_A("A"), _A("A::custom_thread2"))); + + REQUIRE_THAT(puml, + (IsMethod( + "custom_thread1", "void", "Function && f, Args &&... args"))); + REQUIRE_THAT(puml, + (IsMethod("thread", "void", + "(lambda at ../../tests/t00051/t00051.cc:59:27) && "))); + REQUIRE_THAT(puml, + (IsMethod("start_thread3", + "B<(lambda at ../../tests/t00051/t00051.cc:43:18),(lambda at " + "../../tests/t00051/t00051.cc:43:27)>"))); + REQUIRE_THAT(puml, + (IsMethod( + "get_function", "(lambda at ../../tests/t00051/t00051.cc:48:16)"))); + + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); +} \ No newline at end of file diff --git a/tests/test_cases.cc b/tests/test_cases.cc index c267fdbd..3fd9bce1 100644 --- a/tests/test_cases.cc +++ b/tests/test_cases.cc @@ -244,6 +244,7 @@ using namespace clanguml::test::matchers; #include "t00048/test_case.h" #include "t00049/test_case.h" #include "t00050/test_case.h" +#include "t00051/test_case.h" /// /// Sequence diagram tests diff --git a/tests/test_cases.yaml b/tests/test_cases.yaml index 880825fd..105de191 100644 --- a/tests/test_cases.yaml +++ b/tests/test_cases.yaml @@ -147,6 +147,9 @@ test_cases: - name: t00050 title: Test case for generating notes from comments using jinja templates description: + - name: t00051 + title: Test case for relative paths in lambda names + description: Sequence diagrams: - name: t20001 title: Basic sequence diagram test case diff --git a/util/templates/test_cases/test_case.h b/util/templates/test_cases/test_case.h index 34a5811e..83ed5856 100644 --- a/util/templates/test_cases/test_case.h +++ b/util/templates/test_cases/test_case.h @@ -36,6 +36,5 @@ TEST_CASE("{{ name }}", "[test-case][{{ type }}]") {{ examples }} - save_puml( - "./" + config.output_directory() + "/" + diagram->name + ".puml", puml); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } From 3005ad7c374ad029826c71c4204bd4929bef2f83 Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sat, 21 Jan 2023 23:23:36 +0100 Subject: [PATCH 06/11] Fixed formatting --- src/common/model/path.h | 3 +-- src/util/util.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/common/model/path.h b/src/common/model/path.h index 1790fc1c..cda01bd5 100644 --- a/src/common/model/path.h +++ b/src/common/model/path.h @@ -130,8 +130,7 @@ public: void pop_back() { - if (!path_.empty()) - { + if (!path_.empty()) { path_.pop_back(); } } diff --git a/src/util/util.h b/src/util/util.h index 03c853f1..96e39fbf 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -162,8 +162,7 @@ template <> bool starts_with( const std::filesystem::path &path, const std::filesystem::path &prefix); -template <> -bool starts_with(const std::string &s, const std::string &prefix); +template <> bool starts_with(const std::string &s, const std::string &prefix); template bool ends_with(const T &value, const T &suffix); From 8deaf0246bfc19cb4de9c60cc17d9af444d479c1 Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sun, 22 Jan 2023 13:34:37 +0100 Subject: [PATCH 07/11] Fixed handling of lambda names in auto types in class diagrams (#78,#82) --- CHANGELOG.md | 6 +- .../visitor/translation_unit_visitor.cc | 117 ++++++++++++++++-- .../visitor/translation_unit_visitor.h | 6 +- tests/t00051/test_case.h | 19 +++ 4 files changed, 137 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78ce17b6..845bc1db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG - + + * Added relationship deduction from `auto` return types which are template + specializations (#82) + * Fixed lambda names in class diagrams to be based on relative paths + with respect to `relative_to` config option (#78) * Fixed relative paths in config files to be relative to the parent of the configuration file by default (#69) * Added command line option (--dump-config) to print effective config (#77) diff --git a/src/class_diagram/visitor/translation_unit_visitor.cc b/src/class_diagram/visitor/translation_unit_visitor.cc index 40ba3063..129cbd44 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.cc +++ b/src/class_diagram/visitor/translation_unit_visitor.cc @@ -834,7 +834,7 @@ void translation_unit_visitor::process_method( ensure_lambda_type_is_relative(method_return_type); class_method method{common::access_specifier_to_access_t(mf.getAccess()), - util::trim(mf.getNameAsString()), std::move(method_return_type)}; + util::trim(mf.getNameAsString()), method_return_type}; method.is_pure_virtual(mf.isPure()); method.is_virtual(mf.isVirtual()); @@ -852,11 +852,101 @@ void translation_unit_visitor::process_method( process_function_parameter(*param, method, c); } + // find relationship for return type + found_relationships_t relationships; + + find_relationships( + mf.getReturnType(), relationships, relationship_t::kDependency); + + for (const auto &[type_element_id, relationship_type] : relationships) { + if (type_element_id != c.id() && + (relationship_type != relationship_t::kNone)) { + relationship r{relationship_t::kDependency, type_element_id}; + + LOG_DBG("Adding method return type relationship from {}::{} to " + "{}: {}", + c.full_name(), mf.getNameAsString(), + clanguml::common::model::to_string(r.type()), r.label()); + + c.add_relationship(std::move(r)); + } + } + + // Also consider the container itself if it is a template + // instantiation it's arguments could count as reference to relevant + // types + auto underlying_type = mf.getReturnType(); + if (underlying_type->isReferenceType()) + underlying_type = underlying_type.getNonReferenceType(); + if (underlying_type->isPointerType()) + underlying_type = underlying_type->getPointeeType(); + + if (const auto *tsp = + underlying_type->getAs(); + tsp != nullptr) { + process_function_parameter_find_relationships_in_template(c, {}, *tsp); + } + else if (const auto *atsp = underlying_type->getAs(); + atsp != nullptr) { + process_function_parameter_find_relatinoships_in_autotype(c, atsp); + } + LOG_DBG("Adding method: {}", method.name()); c.add_method(std::move(method)); } +void translation_unit_visitor:: + process_function_parameter_find_relatinoships_in_autotype( + class_ &c, const clang::AutoType *atsp) +{ + auto desugared_atsp = atsp->getDeducedType(); + + if (atsp->isSugared()) { + const auto *deduced_type = + atsp->desugar()->getAs(); + + if (deduced_type != nullptr) + desugared_atsp = deduced_type->getDeducedType(); + } + + const auto *deduced_record_type = + desugared_atsp->getAs(); + + if (deduced_record_type != nullptr) { + if (auto *deduced_auto_decl = + llvm::dyn_cast_or_null( + deduced_record_type->getDecl()); + deduced_auto_decl != nullptr) { + + const auto diagram_class_count_before_visit = + diagram().classes().size(); + + VisitClassTemplateSpecializationDecl(deduced_auto_decl); + + const bool visitor_added_new_template_specialization = + (diagram().classes().size() - + diagram_class_count_before_visit) > 0; + + if (visitor_added_new_template_specialization) { + const auto &template_specialization_model = + diagram().classes().back(); + + const auto template_field_decl_name = + deduced_auto_decl->getQualifiedNameAsString(); + + if (diagram().should_include(template_field_decl_name)) { + + relationship r{relationship_t::kDependency, + template_specialization_model.get().id()}; + + c.add_relationship(std::move(r)); + } + } + } + } +} + void translation_unit_visitor::process_template_method( const clang::FunctionTemplateDecl &mf, class_ &c) { @@ -1058,7 +1148,7 @@ void translation_unit_visitor::ensure_lambda_type_is_relative( while (parameter_type.find(lambda_prefix) != std::string::npos) { auto lambda_begin = parameter_type.find(lambda_prefix); - auto absolute_lambda_path_end = parameter_type.find(":", lambda_begin); + auto absolute_lambda_path_end = parameter_type.find(':', lambda_begin); auto absolute_lambda_path = parameter_type.substr(lambda_begin + lambda_prefix.size() - 1, absolute_lambda_path_end - @@ -1290,6 +1380,7 @@ void translation_unit_visitor::process_template_specialization_argument( else { auto type_name = common::to_string(arg.getAsType(), cls->getASTContext()); + ensure_lambda_type_is_relative(type_name); if (type_name.find('<') != std::string::npos) { // Sometimes template instantiation is reported as // RecordType in the AST and getAs to @@ -1302,7 +1393,11 @@ void translation_unit_visitor::process_template_specialization_argument( type_name.size() - (type_name.find('<') + 2)), argument, template_instantiation); - argument.set_name(type_name.substr(0, type_name.find('<'))); + auto unexposed_type_name = + type_name.substr(0, type_name.find('<')); + ensure_lambda_type_is_relative(unexposed_type_name); + + argument.set_name(unexposed_type_name); } else if (type_name.find("type-parameter-") == 0) { auto declaration_text = common::get_source_text_raw( @@ -1329,8 +1424,9 @@ void translation_unit_visitor::process_template_specialization_argument( // whatever clang says argument.set_name(type_name); } - else + else { argument.set_name(type_name); + } } LOG_DBG("Adding template instantiation argument {}", @@ -1527,8 +1623,9 @@ std::unique_ptr translation_unit_visitor::build_template_instantiation( const auto *template_type_ptr = &template_type_decl; if (template_type_decl.isTypeAlias()) { - if (const auto *tsp = template_type_decl.getAliasedType() - ->getAs(); + if (const auto *tsp = + template_type_decl.getAliasedType() + ->template getAs(); tsp != nullptr) template_type_ptr = tsp; } @@ -2006,11 +2103,13 @@ void translation_unit_visitor::process_field( // The field name const auto field_name = field_declaration.getNameAsString(); + auto field_type_str = + common::to_string(field_type, field_declaration.getASTContext(), false); + ensure_lambda_type_is_relative(field_type_str); + class_member field{ common::access_specifier_to_access_t(field_declaration.getAccess()), - field_name, - common::to_string( - field_type, field_declaration.getASTContext(), false)}; + field_name, field_type_str}; // Parse the field comment process_comment(field_declaration, field); diff --git a/src/class_diagram/visitor/translation_unit_visitor.h b/src/class_diagram/visitor/translation_unit_visitor.h index b7c4bde4..0e7dcfe8 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.h +++ b/src/class_diagram/visitor/translation_unit_visitor.h @@ -208,6 +208,11 @@ private: const clang::TemplateArgument &arg, model::template_parameter &argument) const; + void ensure_lambda_type_is_relative(std::string ¶meter_type) const; + + void process_function_parameter_find_relatinoships_in_autotype( + model::class_ &c, const clang::AutoType *atsp); + void process_function_parameter_find_relationships_in_template( clanguml::class_diagram::model::class_ &c, const std::set &template_parameter_names, @@ -254,6 +259,5 @@ private: std::tuple> anonymous_struct_relationships_; - void ensure_lambda_type_is_relative(std::string ¶meter_type) const; }; } // namespace clanguml::class_diagram::visitor diff --git a/tests/t00051/test_case.h b/tests/t00051/test_case.h index 54400afd..edd2a731 100644 --- a/tests/t00051/test_case.h +++ b/tests/t00051/test_case.h @@ -53,5 +53,24 @@ TEST_CASE("t00051", "[test-case][class]") (IsMethod( "get_function", "(lambda at ../../tests/t00051/t00051.cc:48:16)"))); + REQUIRE_THAT(puml, IsClassTemplate("B", "F,FF")); + REQUIRE_THAT(puml, (IsMethod("f", "void"))); + REQUIRE_THAT(puml, (IsMethod("ff", "void"))); + + REQUIRE_THAT(puml, + IsClassTemplate("B", + "(lambda at ../../tests/t00051/t00051.cc:43:18),(lambda at " + "../../tests/t00051/t00051.cc:43:27)")); + + REQUIRE_THAT(puml, + IsInstantiation(_A("B"), + _A("B<(lambda at ../../tests/t00051/t00051.cc:43:18),(lambda at " + "../../tests/t00051/t00051.cc:43:27)>"))); + + REQUIRE_THAT(puml, + IsDependency(_A("A"), + _A("B<(lambda at ../../tests/t00051/t00051.cc:43:18),(lambda at " + "../../tests/t00051/t00051.cc:43:27)>"))); + save_puml(config.output_directory() + "/" + diagram->name + ".puml", puml); } \ No newline at end of file From e0a42be63adccd5295f3cc6998eb41a2faaf581c Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sun, 22 Jan 2023 13:59:08 +0100 Subject: [PATCH 08/11] Updated test cases documentation --- docs/test_cases.md | 12 +- docs/test_cases/t00002_class.svg | 36 ++--- docs/test_cases/t00003_class.svg | 46 +++--- docs/test_cases/t00004_class.svg | 76 ++++----- docs/test_cases/t00005_class.svg | 110 ++++++------- docs/test_cases/t00006_class.svg | 132 +++++++-------- docs/test_cases/t00007_class.svg | 30 ++-- docs/test_cases/t00008_class.svg | 56 +++---- docs/test_cases/t00009_class.svg | 32 ++-- docs/test_cases/t00010_class.svg | 34 ++-- docs/test_cases/t00011_class.svg | 22 +-- docs/test_cases/t00012_class.svg | 66 ++++---- docs/test_cases/t00013_class.svg | 82 +++++----- docs/test_cases/t00014_class.svg | 116 +++++++------- docs/test_cases/t00015_class.svg | 22 +-- docs/test_cases/t00016_class.svg | 30 ++-- docs/test_cases/t00017_class.svg | 66 ++++---- docs/test_cases/t00018_class.svg | 18 +-- docs/test_cases/t00019_class.svg | 40 ++--- docs/test_cases/t00020_class.svg | 238 +++++++++++++++------------- docs/test_cases/t00021_class.svg | 30 ++-- docs/test_cases/t00022_class.svg | 14 +- docs/test_cases/t00023_class.svg | 26 +-- docs/test_cases/t00024_class.svg | 22 +-- docs/test_cases/t00025_class.svg | 34 ++-- docs/test_cases/t00026_class.svg | 42 ++--- docs/test_cases/t00027_class.svg | 58 +++---- docs/test_cases/t00028_class.svg | 82 +++++----- docs/test_cases/t00029_class.svg | 50 +++--- docs/test_cases/t00030_class.svg | 46 +++--- docs/test_cases/t00031_class.svg | 50 +++--- docs/test_cases/t00032_class.svg | 40 ++--- docs/test_cases/t00033_class.svg | 48 +++--- docs/test_cases/t00034_class.svg | 46 +++--- docs/test_cases/t00035_class.svg | 22 +-- docs/test_cases/t00036_class.svg | 38 ++--- docs/test_cases/t00037_class.svg | 54 +++---- docs/test_cases/t00038_class.svg | 58 +++---- docs/test_cases/t00039_class.svg | 78 ++++----- docs/test_cases/t00040_class.svg | 26 +-- docs/test_cases/t00041_class.svg | 54 +++---- docs/test_cases/t00042_class.svg | 36 ++--- docs/test_cases/t00043_class.svg | 50 +++--- docs/test_cases/t00044_class.svg | 36 ++--- docs/test_cases/t00045_class.svg | 70 ++++---- docs/test_cases/t00046_class.svg | 64 ++++---- docs/test_cases/t00047_class.svg | 22 +-- docs/test_cases/t00048_class.svg | 50 +++--- docs/test_cases/t00049_class.svg | 32 ++-- docs/test_cases/t00050_class.svg | 72 ++++----- docs/test_cases/t00051.md | 86 ++++++++++ docs/test_cases/t00051_class.svg | 119 ++++++++++++++ docs/test_cases/t20001_sequence.svg | 62 ++++---- docs/test_cases/t20002_sequence.svg | 48 +++--- docs/test_cases/t20003_sequence.svg | 48 +++--- docs/test_cases/t20004_sequence.svg | 120 +++++++------- docs/test_cases/t20005_sequence.svg | 36 ++--- docs/test_cases/t20006_sequence.svg | 150 +++++++++--------- docs/test_cases/t20007_sequence.svg | 48 +++--- docs/test_cases/t20008_sequence.svg | 84 +++++----- docs/test_cases/t20009_sequence.svg | 84 +++++----- docs/test_cases/t20010_sequence.svg | 72 ++++----- docs/test_cases/t20011_sequence.svg | 72 ++++----- docs/test_cases/t20012_sequence.svg | 204 ++++++++++++------------ docs/test_cases/t20013_sequence.svg | 60 +++---- docs/test_cases/t20014_sequence.svg | 72 ++++----- docs/test_cases/t20015_sequence.svg | 24 +-- docs/test_cases/t20016_sequence.svg | 48 +++--- docs/test_cases/t20017_sequence.svg | 48 +++--- docs/test_cases/t20018_sequence.svg | 96 +++++------ docs/test_cases/t20019_sequence.svg | 84 +++++----- docs/test_cases/t20020_sequence.svg | 118 +++++++------- docs/test_cases/t20021_sequence.svg | 106 ++++++------- docs/test_cases/t20022_sequence.svg | 36 ++--- docs/test_cases/t20023_sequence.svg | 50 +++--- docs/test_cases/t20024_sequence.svg | 88 +++++----- docs/test_cases/t20025_sequence.svg | 42 ++--- docs/test_cases/t20026_sequence.svg | 24 +-- docs/test_cases/t20027_sequence.svg | 24 +-- docs/test_cases/t20028_sequence.svg | 44 ++--- docs/test_cases/t20029_sequence.svg | 80 +++++----- docs/test_cases/t30001_package.svg | 54 +++---- docs/test_cases/t30002_package.svg | 90 +++++------ docs/test_cases/t30003_package.svg | 26 +-- docs/test_cases/t30004_package.svg | 38 ++--- docs/test_cases/t30005_package.svg | 38 ++--- docs/test_cases/t30006_package.svg | 18 +-- docs/test_cases/t30007_package.svg | 22 +-- docs/test_cases/t30008_package.svg | 34 ++-- docs/test_cases/t40001_include.svg | 34 ++-- docs/test_cases/t40002_include.svg | 34 ++-- docs/test_cases/t40003_include.svg | 50 +++--- 92 files changed, 2768 insertions(+), 2561 deletions(-) create mode 100644 docs/test_cases/t00051.md create mode 100644 docs/test_cases/t00051_class.svg diff --git a/docs/test_cases.md b/docs/test_cases.md index a92d6d2e..3fcedb99 100644 --- a/docs/test_cases.md +++ b/docs/test_cases.md @@ -1,15 +1,4 @@ # Test cases index - - - -* [Class diagrams](#class-diagrams) -* [Sequence diagrams](#sequence-diagrams) -* [Package diagrams](#package-diagrams) -* [Include diagrams](#include-diagrams) -* [Configuration diagrams](#configuration-diagrams) - - - ## Class diagrams * [t00002](./test_cases/t00002.md) - Basic class inheritance * [t00003](./test_cases/t00003.md) - Class field and methods @@ -60,6 +49,7 @@ * [t00048](./test_cases/t00048.md) - Test case for unique entity id with multiple translation units * [t00049](./test_cases/t00049.md) - Test case configurable type aliases * [t00050](./test_cases/t00050.md) - Test case for generating notes from comments using jinja templates + * [t00051](./test_cases/t00051.md) - Test case for relative paths in lambda names ## Sequence diagrams * [t20001](./test_cases/t20001.md) - Basic sequence diagram test case * [t20002](./test_cases/t20002.md) - Free function sequence diagram test case diff --git a/docs/test_cases/t00002_class.svg b/docs/test_cases/t00002_class.svg index be9cd590..780b6acc 100644 --- a/docs/test_cases/t00002_class.svg +++ b/docs/test_cases/t00002_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -21,8 +21,8 @@ foo_c() = 0 : void - - + + B @@ -31,8 +31,8 @@ foo_a() : void - - + + C @@ -41,18 +41,18 @@ foo_c() : void - - + + D - + - + as : std::vector<A *> @@ -60,18 +60,18 @@ foo_a() : void foo_c() : void - - + + E - + - + as : std::vector<A *> @@ -79,13 +79,13 @@ foo_a() : void foo_c() : void - + This is class A - + This is class B - + This is class D diff --git a/docs/test_cases/t00003_class.svg b/docs/test_cases/t00003_class.svg index da38737c..5b58d568 100644 --- a/docs/test_cases/t00003_class.svg +++ b/docs/test_cases/t00003_class.svg @@ -1,6 +1,6 @@ - + @@ -9,74 +9,74 @@ - - + + A - + - + public_member : int - + - + protected_member : int - + - + private_member : int - + - + a_ : int - + - + b_ : int - + - + c_ : int - + - + static_int : int - + - + static_const_int : const int - + - + auto_member : const unsigned long @@ -112,11 +112,11 @@ protected_method() : void private_method() : void - + - + compare : std::function<bool (const int)> diff --git a/docs/test_cases/t00004_class.svg b/docs/test_cases/t00004_class.svg index 2804440b..549d2675 100644 --- a/docs/test_cases/t00004_class.svg +++ b/docs/test_cases/t00004_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + B - - + + B::AA @@ -28,8 +28,8 @@ AA_3 - - + + A @@ -40,16 +40,16 @@ foo2() const : void - - + + A::AA - - + + A::AA::Lights @@ -59,15 +59,15 @@ Red - - + + A::AA::AAA - + C::B @@ -75,8 +75,8 @@ int - - + + C @@ -84,39 +84,39 @@ T - + - + t : T - + - + b_int : B<int> - - + + C::AA - - + + C::AA::AAA - - + + C::AA::CCC @@ -125,8 +125,8 @@ CCC_2 - - + + C::B @@ -134,16 +134,16 @@ V - + - + b : V - - + + C::CC @@ -152,16 +152,16 @@ CC_2 - - + + detail::D - - + + detail::D::AA @@ -171,8 +171,8 @@ AA_3 - - + + detail::D::DD diff --git a/docs/test_cases/t00005_class.svg b/docs/test_cases/t00005_class.svg index 1fbe9653..ac6a4f18 100644 --- a/docs/test_cases/t00005_class.svg +++ b/docs/test_cases/t00005_class.svg @@ -1,6 +1,6 @@ - + @@ -9,204 +9,204 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + R - + - + some_int : int - + - + some_int_pointer : int * - + - + some_int_pointer_pointer : int ** - + - + some_int_reference : int & - + - + a : A - + - + b : B * - + - + c : C & - + - + d : const D * - + - + e : const E & - + - + f : F && - + - + g : G ** - + - + h : H *** - + - + i : I *& - + - + j : volatile J * - + - + k : K * diff --git a/docs/test_cases/t00006_class.svg b/docs/test_cases/t00006_class.svg index 95154f2e..3bcff342 100644 --- a/docs/test_cases/t00006_class.svg +++ b/docs/test_cases/t00006_class.svg @@ -1,6 +1,6 @@ - + @@ -9,136 +9,136 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + L - - + + M - - + + N - - + + NN - - + + NNN - - + + custom_container @@ -146,15 +146,15 @@ T - + - + data : std::vector<T> - + custom_container @@ -162,102 +162,102 @@ E - - + + R - + - + a : std::vector<A> - + - + b : std::vector<B *> - + - + c : std::map<int,C> - + - + d : std::map<int,D *> - + - + e : custom_container<E> - + - + f : std::vector<std::vector<F>> - + - + g : std::map<int,std::vector<G *>> - + - + h : std::array<H,10> - + - + i : std::array<I *,5> - + - + j : J[10] - + - + k : K *[20] - + - + lm : std::vector<std::pair<L,M>> - + - + ns : std::tuple<N,NN,NNN> diff --git a/docs/test_cases/t00007_class.svg b/docs/test_cases/t00007_class.svg index 893060c5..8d64e3c3 100644 --- a/docs/test_cases/t00007_class.svg +++ b/docs/test_cases/t00007_class.svg @@ -1,6 +1,6 @@ - + @@ -9,56 +9,56 @@ - - + + A - - + + B - - + + C - - + + R - + - + a : std::unique_ptr<A> - + - + b : std::shared_ptr<B> - + - + c : std::weak_ptr<C> diff --git a/docs/test_cases/t00008_class.svg b/docs/test_cases/t00008_class.svg index 3e4cb404..f10a444d 100644 --- a/docs/test_cases/t00008_class.svg +++ b/docs/test_cases/t00008_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,51 +18,51 @@ T,P,CMP,int N - + - + value : T - + - + pointer : T * - + - + reference : T & - + - + values : std::vector<P> - + - + ints : std::array<int,N> - + - + comparator : CMP - - + + Vector @@ -70,16 +70,16 @@ T - + - + values : std::vector<T> - - + + B @@ -87,15 +87,15 @@ T,C<> - + - + template_template : C<T> - + B @@ -103,18 +103,18 @@ int,Vector - - + + D - + - + ints : B<int,Vector> diff --git a/docs/test_cases/t00009_class.svg b/docs/test_cases/t00009_class.svg index e1820597..232951d8 100644 --- a/docs/test_cases/t00009_class.svg +++ b/docs/test_cases/t00009_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,15 +18,15 @@ T - + - + value : T - + A @@ -34,7 +34,7 @@ int - + A @@ -42,7 +42,7 @@ std::string - + A @@ -50,32 +50,32 @@ std::vector<std::string> - - + + B - + - + aint : A<int> - + - + astring : A<std::string> * - + - + avector : A<std::vector<std::string>> & diff --git a/docs/test_cases/t00010_class.svg b/docs/test_cases/t00010_class.svg index f8f577d7..36818cbc 100644 --- a/docs/test_cases/t00010_class.svg +++ b/docs/test_cases/t00010_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,22 +18,22 @@ T,P - + - + first : T - + - + second : P - + A @@ -41,8 +41,8 @@ T,std::string - - + + B @@ -50,15 +50,15 @@ T - + - + astring : A<T,std::string> - + B @@ -66,18 +66,18 @@ int - - + + C - + - + aintstring : B<int> diff --git a/docs/test_cases/t00011_class.svg b/docs/test_cases/t00011_class.svg index 95e7d50f..afdf308f 100644 --- a/docs/test_cases/t00011_class.svg +++ b/docs/test_cases/t00011_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + D @@ -18,16 +18,16 @@ T - + - + value : T - - + + A @@ -36,18 +36,18 @@ foo() : void - - + + B - + - + m_a : A * diff --git a/docs/test_cases/t00012_class.svg b/docs/test_cases/t00012_class.svg index dfb9a782..705171e8 100644 --- a/docs/test_cases/t00012_class.svg +++ b/docs/test_cases/t00012_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,23 +18,23 @@ T,Ts... - + - + value : T - + - + values : std::variant<Ts...> - - + + B @@ -43,15 +43,15 @@ - + - + ints : std::array<int,sizeof...(Is)> - - + + C @@ -60,14 +60,14 @@ - + - + ints : std::array<T,sizeof...(Is)> - + A @@ -75,7 +75,7 @@ int,std::string,float - + A @@ -83,7 +83,7 @@ int,std::string,bool - + B @@ -91,7 +91,7 @@ 3,2,1 - + B @@ -99,7 +99,7 @@ 1,1,1,1 - + C @@ -107,50 +107,50 @@ std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3 - - + + R - + - + a1 : A<int,std::string,float> - + - + a2 : A<int,std::string,bool> - + - + b1 : B<3,2,1> - + - + b2 : B<1,1,1,1> - + - + c1 : C<std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3> - + Long template annotation diff --git a/docs/test_cases/t00013_class.svg b/docs/test_cases/t00013_class.svg index 66a3fdcb..652b4fd0 100644 --- a/docs/test_cases/t00013_class.svg +++ b/docs/test_cases/t00013_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + ABCD::F @@ -18,15 +18,15 @@ T - + - + f : T - + ABCD::F @@ -34,70 +34,70 @@ int - - + + A - + - + a : int - - + + B - + - + b : int - - + + C - + - + c : int - - + + D - + - + d : int print(R * r) : void - - + + E @@ -105,16 +105,16 @@ T - + - + e : T - - + + G @@ -122,22 +122,22 @@ T,Args... - + - + g : T - + - + args : std::tuple<Args...> - + E @@ -145,7 +145,7 @@ int - + G @@ -153,7 +153,7 @@ int,float,std::string - + E @@ -161,25 +161,25 @@ std::string - - + + R - + - + gintstring : G<int,float,std::string> - + - + estring : E<std::string> diff --git a/docs/test_cases/t00014_class.svg b/docs/test_cases/t00014_class.svg index ae5eb1e6..d0712cfe 100644 --- a/docs/test_cases/t00014_class.svg +++ b/docs/test_cases/t00014_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,37 +18,37 @@ T,P - + - + t : T - + - + p : P - - + + B - + - + value : std::string - + A @@ -56,7 +56,7 @@ T,std::string - + A @@ -64,7 +64,7 @@ T,std::unique_ptr<std::string> - + A @@ -72,7 +72,7 @@ long,T - + A @@ -80,7 +80,7 @@ double,T - + A @@ -88,7 +88,7 @@ long,U - + A @@ -96,7 +96,7 @@ long,bool - + A @@ -104,7 +104,7 @@ double,bool - + A @@ -112,7 +112,7 @@ long,float - + A @@ -120,7 +120,7 @@ double,float - + A @@ -128,7 +128,7 @@ bool,std::string - + A @@ -136,7 +136,7 @@ float,std::unique_ptr<std::string> - + A @@ -144,7 +144,7 @@ int,std::string - + A @@ -152,7 +152,7 @@ std::string,std::string - + A @@ -160,7 +160,7 @@ char,std::string - + A @@ -168,116 +168,116 @@ wchar_t,std::string - - + + R - + - + bapair : PairPairBA<bool> - + - + abool : APtr<bool> - + - + aboolfloat : AAPtr<bool,float> - + - + afloat : ASharedPtr<float> - + - + boolstring : A<bool,std::string> - + - + floatstring : AStringPtr<float> - + - + intstring : AIntString - + - + stringstring : AStringString - + - + bstringstring : BStringString - + - + bs : BVector - + - + bs2 : BVector2 - + - + cb : SimpleCallback<ACharString> - + - + gcb : GenericCallback<R::AWCharString> - + - + vcb : VoidCallback - + - + vps : VectorPtr<B> diff --git a/docs/test_cases/t00015_class.svg b/docs/test_cases/t00015_class.svg index 87ce913d..dbae78aa 100644 --- a/docs/test_cases/t00015_class.svg +++ b/docs/test_cases/t00015_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + ns1::A - - + + ns1::ns2_v0_9_0::A - - + + ns1::Anon - - + + ns3::ns1::ns2::Anon - - + + ns3::B diff --git a/docs/test_cases/t00016_class.svg b/docs/test_cases/t00016_class.svg index 6b29d7b6..d83ad125 100644 --- a/docs/test_cases/t00016_class.svg +++ b/docs/test_cases/t00016_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + is_numeric<> @@ -19,8 +19,8 @@ value : enum - - + + is_numeric @@ -29,8 +29,8 @@ value : enum - - + + is_numeric @@ -41,8 +41,8 @@ value : enum - - + + is_numeric @@ -53,8 +53,8 @@ value : enum - - + + is_numeric @@ -65,8 +65,8 @@ value : enum - - + + is_numeric @@ -77,8 +77,8 @@ value : enum - - + + is_numeric diff --git a/docs/test_cases/t00017_class.svg b/docs/test_cases/t00017_class.svg index 0ed88f0f..b6dcb910 100644 --- a/docs/test_cases/t00017_class.svg +++ b/docs/test_cases/t00017_class.svg @@ -1,6 +1,6 @@ - + @@ -9,127 +9,127 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + R - + - + some_int : int - + - + some_int_pointer : int * - + - + some_int_pointer_pointer : int ** - + - + some_int_reference : int & diff --git a/docs/test_cases/t00018_class.svg b/docs/test_cases/t00018_class.svg index f060ee19..832d1cad 100644 --- a/docs/test_cases/t00018_class.svg +++ b/docs/test_cases/t00018_class.svg @@ -1,6 +1,6 @@ - + @@ -9,18 +9,18 @@ - - + + impl::widget - + - + n : int @@ -30,18 +30,18 @@ draw(const widget & w) : void widget(int n) : void - - + + widget - + - + pImpl : std::unique_ptr<impl::widget> diff --git a/docs/test_cases/t00019_class.svg b/docs/test_cases/t00019_class.svg index c8886a7c..4ee8a52d 100644 --- a/docs/test_cases/t00019_class.svg +++ b/docs/test_cases/t00019_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Base @@ -25,8 +25,8 @@ m2() : std::string - - + + Layer1 @@ -39,8 +39,8 @@ m2() : std::string - - + + Layer2 @@ -51,8 +51,8 @@ all_calls_count() const : int - - + + Layer3 @@ -60,18 +60,18 @@ LowerLayer - + - + m_m1_calls : int - + - + m_m2_calls : int @@ -83,7 +83,7 @@ m1_calls() const : int m2_calls() const : int - + Layer3 @@ -91,7 +91,7 @@ Base - + Layer2 @@ -99,7 +99,7 @@ Layer3<Base> - + Layer1 @@ -107,18 +107,18 @@ Layer2<Layer3<Base>> - - + + A - + - + layers : std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> diff --git a/docs/test_cases/t00020_class.svg b/docs/test_cases/t00020_class.svg index 9c455d38..01c77b71 100644 --- a/docs/test_cases/t00020_class.svg +++ b/docs/test_cases/t00020_class.svg @@ -1,6 +1,6 @@ - + - + @@ -9,125 +9,137 @@ - - - - - ProductA - - - - ~ProductA() = default : void - - sell(int price) const = 0 : bool + + + + + ProductA + + + + ~ProductA() = default : void + + sell(int price) const = 0 : bool - - - - - ProductA1 - - - - sell(int price) const : bool + + + + + ProductA1 + + + + sell(int price) const : bool - - - - - ProductA2 - - - - sell(int price) const : bool + + + + + ProductA2 + + + + sell(int price) const : bool - - - - - ProductB - - - - ~ProductB() = default : void - - buy(int price) const = 0 : bool + + + + + ProductB + + + + ~ProductB() = default : void + + buy(int price) const = 0 : bool - - - - - ProductB1 - - - - buy(int price) const : bool + + + + + ProductB1 + + + + buy(int price) const : bool - - - - - ProductB2 - - - - buy(int price) const : bool + + + + + ProductB2 + + + + buy(int price) const : bool - - - - - AbstractFactory - - - - make_a() const = 0 : std::unique_ptr<ProductA> - - make_b() const = 0 : std::unique_ptr<ProductB> + + + + + AbstractFactory + + + + make_a() const = 0 : std::unique_ptr<ProductA> + + make_b() const = 0 : std::unique_ptr<ProductB> - - - - - Factory1 - - - - make_a() const : std::unique_ptr<ProductA> - - make_b() const : std::unique_ptr<ProductB> + + + + + Factory1 + + + + make_a() const : std::unique_ptr<ProductA> + + make_b() const : std::unique_ptr<ProductB> - - - - - Factory2 - - - - make_a() const : std::unique_ptr<ProductA> - - make_b() const : std::unique_ptr<ProductB> + + + + + Factory2 + + + + make_a() const : std::unique_ptr<ProductA> + + make_b() const : std::unique_ptr<ProductB> - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t00021_class.svg b/docs/test_cases/t00021_class.svg index 1a63ef92..623b8745 100644 --- a/docs/test_cases/t00021_class.svg +++ b/docs/test_cases/t00021_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Visitor @@ -23,8 +23,8 @@ visit_B(const B & item) const = 0 : void - - + + Visitor1 @@ -35,8 +35,8 @@ visit_B(const B & item) const : void - - + + Visitor2 @@ -47,8 +47,8 @@ visit_B(const B & item) const : void - - + + Visitor3 @@ -59,8 +59,8 @@ visit_B(const B & item) const : void - - + + Item @@ -71,8 +71,8 @@ accept(const Visitor & visitor) const = 0 : void - - + + A @@ -81,8 +81,8 @@ accept(const Visitor & visitor) const : void - - + + B diff --git a/docs/test_cases/t00022_class.svg b/docs/test_cases/t00022_class.svg index babc0c0e..cc6ca49e 100644 --- a/docs/test_cases/t00022_class.svg +++ b/docs/test_cases/t00022_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -23,8 +23,8 @@ method2() = 0 : void - - + + A1 @@ -35,8 +35,8 @@ method2() : void - - + + A2 diff --git a/docs/test_cases/t00023_class.svg b/docs/test_cases/t00023_class.svg index 14cf1461..e84d99a3 100644 --- a/docs/test_cases/t00023_class.svg +++ b/docs/test_cases/t00023_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Strategy @@ -21,8 +21,8 @@ algorithm() = 0 : void - - + + StrategyA @@ -31,8 +31,8 @@ algorithm() : void - - + + StrategyB @@ -41,8 +41,8 @@ algorithm() : void - - + + StrategyC @@ -51,18 +51,18 @@ algorithm() : void - - + + Context - + - + m_strategy : std::unique_ptr<Strategy> diff --git a/docs/test_cases/t00024_class.svg b/docs/test_cases/t00024_class.svg index b70eb1bd..9b835b4b 100644 --- a/docs/test_cases/t00024_class.svg +++ b/docs/test_cases/t00024_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Target @@ -23,8 +23,8 @@ m2() = 0 : void - - + + Target1 @@ -35,8 +35,8 @@ m2() : void - - + + Target2 @@ -47,18 +47,18 @@ m2() : void - - + + Proxy - + - + m_target : std::shared_ptr<Target> diff --git a/docs/test_cases/t00025_class.svg b/docs/test_cases/t00025_class.svg index 98c698ef..dc83dc96 100644 --- a/docs/test_cases/t00025_class.svg +++ b/docs/test_cases/t00025_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Target1 @@ -21,8 +21,8 @@ m2() : void - - + + Target2 @@ -33,8 +33,8 @@ m2() : void - - + + Proxy @@ -42,11 +42,11 @@ T - + - + m_target : std::shared_ptr<T> @@ -56,7 +56,7 @@ m1() : void m2() : void - + Proxy @@ -64,7 +64,7 @@ Target1 - + Proxy @@ -72,25 +72,25 @@ Target2 - - + + ProxyHolder - + - + proxy1 : Proxy<Target1> - + - + proxy2 : Proxy<Target2> diff --git a/docs/test_cases/t00026_class.svg b/docs/test_cases/t00026_class.svg index 759624f2..8c6f2ba8 100644 --- a/docs/test_cases/t00026_class.svg +++ b/docs/test_cases/t00026_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Memento @@ -18,11 +18,11 @@ T - + - + m_value : T @@ -30,8 +30,8 @@ Memento<T>(T && v) : void value() const : T - - + + Originator @@ -39,11 +39,11 @@ T - + - + m_value : T @@ -57,8 +57,8 @@ print() const : void set(T && v) : void - - + + Caretaker @@ -66,11 +66,11 @@ T - + - + m_mementos : std::unordered_map<std::string,Memento<T>> @@ -78,7 +78,7 @@ state(const std::string & n) : Memento<T> & set_state(const std::string & s, Memento<T> && m) : void - + Caretaker @@ -86,7 +86,7 @@ std::string - + Originator @@ -94,25 +94,25 @@ std::string - - + + StringMemento - + - + caretaker : Caretaker<std::string> - + - + originator : Originator<std::string> diff --git a/docs/test_cases/t00027_class.svg b/docs/test_cases/t00027_class.svg index d191d1ef..a2e8792b 100644 --- a/docs/test_cases/t00027_class.svg +++ b/docs/test_cases/t00027_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Shape @@ -21,14 +21,14 @@ ~Shape() = default : void - + Line - - + + Line @@ -39,14 +39,14 @@ display() : void - + Text - - + + Text @@ -57,8 +57,8 @@ display() : void - - + + ShapeDecorator @@ -67,8 +67,8 @@ display() = 0 : void - - + + Color @@ -79,8 +79,8 @@ display() : void - - + + Weight @@ -91,7 +91,7 @@ display() : void - + Line @@ -99,7 +99,7 @@ Color,Weight - + Line @@ -107,7 +107,7 @@ Color - + Text @@ -115,7 +115,7 @@ Color,Weight - + Text @@ -123,39 +123,39 @@ Color - - + + Window - + - + border : Line<Color,Weight> - + - + divider : Line<Color> - + - + title : Text<Color,Weight> - + - + description : Text<Color> diff --git a/docs/test_cases/t00028_class.svg b/docs/test_cases/t00028_class.svg index f363a267..cd71efac 100644 --- a/docs/test_cases/t00028_class.svg +++ b/docs/test_cases/t00028_class.svg @@ -1,6 +1,6 @@ - + @@ -9,54 +9,54 @@ - - + + A - + A class note. - - + + B - + B class note. - - + + C - + C class note. - - + + D - + D class note. - - + + E @@ -64,27 +64,27 @@ T - + - + param : T - + E template class note. - - + + G - - + + F @@ -94,10 +94,10 @@ three - + F enum note. - + E @@ -105,63 +105,63 @@ int - - + + R - + - + aaa : A - + - + bbb : B * - + - + ccc : C & - + - + ddd : std::vector<std::shared_ptr<D>> - + - + eee : E<int> - + - + ggg : G ** R(C & c) : void - + R class note. - - + + diff --git a/docs/test_cases/t00029_class.svg b/docs/test_cases/t00029_class.svg index 9684db4d..3b9e52bf 100644 --- a/docs/test_cases/t00029_class.svg +++ b/docs/test_cases/t00029_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + A - - + + C @@ -26,16 +26,16 @@ T - + - + param : T - - + + E @@ -45,64 +45,64 @@ three - - + + G1 - - + + G2 - - + + G3 - - + + G4 - - + + R - + - + g1 : G1 - + - + g3 : G3 & - + - + g4 : std::shared_ptr<G4> diff --git a/docs/test_cases/t00030_class.svg b/docs/test_cases/t00030_class.svg index 5d1019a7..21b0b058 100644 --- a/docs/test_cases/t00030_class.svg +++ b/docs/test_cases/t00030_class.svg @@ -1,6 +1,6 @@ - + @@ -9,86 +9,86 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + R - + - + aaa : A - + - + bbb : std::vector<B> - + - + ccc : std::vector<C> - + - + ddd : D - + - + eee : E * diff --git a/docs/test_cases/t00031_class.svg b/docs/test_cases/t00031_class.svg index 25ae7c98..01af0758 100644 --- a/docs/test_cases/t00031_class.svg +++ b/docs/test_cases/t00031_class.svg @@ -1,33 +1,33 @@ - + - + - + - - - + + + A - - + + B @@ -37,8 +37,8 @@ three - - + + @@ -47,23 +47,23 @@ T - + - + ttt : T - - + + D - + C @@ -71,39 +71,39 @@ int - - + + R - + - + aaa : A * - + - + bbb : std::vector<B> - + - + ccc : C<int> - + - + ddd : D * diff --git a/docs/test_cases/t00032_class.svg b/docs/test_cases/t00032_class.svg index 42f5d3b2..275f148e 100644 --- a/docs/test_cases/t00032_class.svg +++ b/docs/test_cases/t00032_class.svg @@ -1,6 +1,6 @@ - + @@ -9,24 +9,24 @@ - - + + Base - - + + TBase - - + + A @@ -35,8 +35,8 @@ operator()() : void - - + + B @@ -45,8 +45,8 @@ operator()() : void - - + + C @@ -55,8 +55,8 @@ operator()() : void - - + + Overload @@ -64,15 +64,15 @@ T,L,Ts... - + - + counter : L - + Overload @@ -80,18 +80,18 @@ TBase,int,A,B,C - - + + R - + - + overload : Overload<TBase,int,A,B,C> diff --git a/docs/test_cases/t00033_class.svg b/docs/test_cases/t00033_class.svg index 5f919407..2e76310c 100644 --- a/docs/test_cases/t00033_class.svg +++ b/docs/test_cases/t00033_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,16 +18,16 @@ T - + - + aaa : T - - + + B @@ -35,16 +35,16 @@ T - + - + bbb : T - - + + C @@ -52,30 +52,30 @@ T - + - + ccc : T - - + + D - + - + ddd : int - + C @@ -83,7 +83,7 @@ D - + B @@ -91,7 +91,7 @@ std::unique_ptr<C<D>> - + A @@ -99,18 +99,18 @@ B<std::unique_ptr<C<D>>> - - + + R - + - + abc : A<B<std::unique_ptr<C<D>>>> diff --git a/docs/test_cases/t00034_class.svg b/docs/test_cases/t00034_class.svg index 0dc989bf..c391f4b1 100644 --- a/docs/test_cases/t00034_class.svg +++ b/docs/test_cases/t00034_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Void @@ -21,8 +21,8 @@ operator!=(const Void & ) const : bool - - + + lift_void @@ -31,16 +31,16 @@ - - + + lift_void - - + + lift_void @@ -49,8 +49,8 @@ - - + + drop_void @@ -59,16 +59,16 @@ - - + + drop_void - - + + drop_void @@ -77,33 +77,33 @@ - - + + A - - + + R - + - + la : lift_void_t<A> * - + - + lv : lift_void_t<void> * diff --git a/docs/test_cases/t00035_class.svg b/docs/test_cases/t00035_class.svg index acfef8ff..42e093c2 100644 --- a/docs/test_cases/t00035_class.svg +++ b/docs/test_cases/t00035_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + Top - - + + Left - - + + Center - - + + Bottom - - + + Right diff --git a/docs/test_cases/t00036_class.svg b/docs/test_cases/t00036_class.svg index 84809a20..6ddf571f 100644 --- a/docs/test_cases/t00036_class.svg +++ b/docs/test_cases/t00036_class.svg @@ -1,6 +1,6 @@ - + @@ -9,23 +9,23 @@ - + ns1 - + ns11 - + ns111 - + ns2 - + ns22 - - + + E @@ -34,8 +34,8 @@ yellow - - + + A @@ -43,15 +43,15 @@ T - + - + a : T - + A @@ -59,23 +59,23 @@ int - - + + B - + - + a_int : A<int> - - + + C diff --git a/docs/test_cases/t00037_class.svg b/docs/test_cases/t00037_class.svg index 28aa373a..f60051fd 100644 --- a/docs/test_cases/t00037_class.svg +++ b/docs/test_cases/t00037_class.svg @@ -1,6 +1,6 @@ - + @@ -9,98 +9,98 @@ - - + + ST - + - + dimensions : ST::(anonymous_620) - + - + units : ST::(anonymous_739) - - + + ST::(dimensions) - + - + t : double - + - + x : double - + - + y : double - + - + z : double - - + + ST::(units) - + - + c : double - + - + h : double - - + + A - + - + st : ST diff --git a/docs/test_cases/t00038_class.svg b/docs/test_cases/t00038_class.svg index fcd6eb12..3d0a5f09 100644 --- a/docs/test_cases/t00038_class.svg +++ b/docs/test_cases/t00038_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + thirdparty::ns1::color_t @@ -20,16 +20,16 @@ blue - - + + thirdparty::ns1::E - - + + property_t @@ -39,47 +39,47 @@ property_c - - + + A - - + + B - - + + C - - + + key_t - + - + key : std::string - - + + map @@ -88,16 +88,16 @@ - - + + map - - + + map @@ -106,8 +106,8 @@ - - + + map @@ -116,8 +116,8 @@ - - + + map @@ -126,8 +126,8 @@ - - + + map diff --git a/docs/test_cases/t00039_class.svg b/docs/test_cases/t00039_class.svg index 8c0376a4..b72cee90 100644 --- a/docs/test_cases/t00039_class.svg +++ b/docs/test_cases/t00039_class.svg @@ -1,6 +1,6 @@ - + @@ -9,95 +9,95 @@ - - + + C - - + + D - - + + E - - + + CD - - + + DE - - + + CDE - - + + A - - + + AA - - + + AAA - + - + b : B * - - + + ns2::AAAA - - + + ns3::F @@ -105,16 +105,16 @@ T - + - + t : T * - - + + ns3::FF @@ -122,16 +122,16 @@ T,M - + - + m : M * - - + + ns3::FE @@ -139,16 +139,16 @@ T,M - + - + m : M * - - + + ns3::FFF @@ -156,11 +156,11 @@ T,M,N - + - + n : N * diff --git a/docs/test_cases/t00040_class.svg b/docs/test_cases/t00040_class.svg index 3ea186c5..a12fdaf4 100644 --- a/docs/test_cases/t00040_class.svg +++ b/docs/test_cases/t00040_class.svg @@ -1,6 +1,6 @@ - + @@ -9,50 +9,50 @@ - - + + A - + - + ii_ : int get_a() : int - - + + AA - - + + AAA - + - + b : B * get_aaa() : int - - + + R diff --git a/docs/test_cases/t00041_class.svg b/docs/test_cases/t00041_class.svg index be2734ad..0782831e 100644 --- a/docs/test_cases/t00041_class.svg +++ b/docs/test_cases/t00041_class.svg @@ -1,6 +1,6 @@ - + @@ -9,100 +9,100 @@ - - + + R - - + + D - + - + rr : RR * - - + + E - - + + F - - + + RR - + - + e : E * - + - + f : F * - + - + g : detail::G * - - + + RRR - - + + ns1::N - - + + ns1::NN - - + + ns1::NM diff --git a/docs/test_cases/t00042_class.svg b/docs/test_cases/t00042_class.svg index b6677597..dfdb501a 100644 --- a/docs/test_cases/t00042_class.svg +++ b/docs/test_cases/t00042_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,16 +18,16 @@ T - + - + a : T - - + + A @@ -35,16 +35,16 @@ void - + - + a : void * - - + + B @@ -52,22 +52,22 @@ T,K - + - + b : T - + - + bb : K - + A @@ -75,7 +75,7 @@ double - + A @@ -83,7 +83,7 @@ std::string - + B diff --git a/docs/test_cases/t00043_class.svg b/docs/test_cases/t00043_class.svg index 62826002..7d93b5d0 100644 --- a/docs/test_cases/t00043_class.svg +++ b/docs/test_cases/t00043_class.svg @@ -1,6 +1,6 @@ - + @@ -9,22 +9,22 @@ - + dependants - + dependencies - - + + A - - + + B @@ -33,8 +33,8 @@ b(dependants::A * a) : void - - + + BB @@ -43,8 +43,8 @@ bb(dependants::A * a) : void - - + + C @@ -53,8 +53,8 @@ c(dependants::B * b) : void - - + + D @@ -65,8 +65,8 @@ dd(dependants::BB * bb) : void - - + + E @@ -75,24 +75,24 @@ e(dependants::D * d) : void - - + + G - - + + GG - - + + H @@ -103,8 +103,8 @@ hh(dependencies::GG * gg) : void - - + + I @@ -113,8 +113,8 @@ i(dependencies::H * h) : void - - + + J diff --git a/docs/test_cases/t00044_class.svg b/docs/test_cases/t00044_class.svg index ea95c52f..94d5d9c0 100644 --- a/docs/test_cases/t00044_class.svg +++ b/docs/test_cases/t00044_class.svg @@ -1,6 +1,6 @@ - + @@ -9,7 +9,7 @@ - + signal_handler @@ -17,8 +17,8 @@ ,A - - + + sink @@ -27,15 +27,15 @@ sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...), type-parameter-0-2> >(sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...),type-parameter-0-2>>::signal_t & sh) : void - + - + signal : sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...),type-parameter-0-2>>::signal_t * - - + + sink @@ -46,23 +46,23 @@ sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...), type-parameter-0-2> >(sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...),type-parameter-0-2>>::signal_t & sh) : void - + - + signal : sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...),type-parameter-0-2>>::signal_t * - - + + signal_handler - - + + signal_handler @@ -71,8 +71,8 @@ - - + + signal_handler @@ -81,8 +81,8 @@ - - + + sink diff --git a/docs/test_cases/t00045_class.svg b/docs/test_cases/t00045_class.svg index c047593e..89f15c3d 100644 --- a/docs/test_cases/t00045_class.svg +++ b/docs/test_cases/t00045_class.svg @@ -1,6 +1,6 @@ - + @@ -9,32 +9,32 @@ - - + + A - - + + AA - - + + AAA - - + + AAAA @@ -42,103 +42,103 @@ T - + - + t : T - - + + ns1::A - - + + ns1::ns2::A - - + + ns1::ns2::B - - + + ns1::ns2::C - - + + ns1::ns2::D - - + + ns1::ns2::E - - + + ns1::ns2::AAA - - + + ns1::ns2::R - + - + a : ns1::ns2::A * - + - + ns1_a : ns1::A * - + - + ns1_ns2_a : ns1::ns2::A * - + - + root_a : ::A * diff --git a/docs/test_cases/t00046_class.svg b/docs/test_cases/t00046_class.svg index 91d5ee80..f3548188 100644 --- a/docs/test_cases/t00046_class.svg +++ b/docs/test_cases/t00046_class.svg @@ -1,6 +1,6 @@ - + @@ -9,118 +9,118 @@ - + ns1 - + ns2 - + __gnu_cxx - - + + A - - + + A - - + + B - - + + C - - + + D - - + + E - - + + R - + - + a : ns1::ns2::A * - + - + ns1_a : ns1::A * - + - + ns1_ns2_a : ns1::ns2::A * - + - + root_a : ::A * - + - + i : std::vector<std::uint8_t> foo(AA & aa) : void - - + + A - - + + AA diff --git a/docs/test_cases/t00047_class.svg b/docs/test_cases/t00047_class.svg index 26a0f5a0..ee9de4c0 100644 --- a/docs/test_cases/t00047_class.svg +++ b/docs/test_cases/t00047_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + conditional_t - - + + conditional_t @@ -27,8 +27,8 @@ - - + + conditional_t @@ -37,8 +37,8 @@ - - + + conditional_t @@ -47,8 +47,8 @@ - - + + conditional_t diff --git a/docs/test_cases/t00048_class.svg b/docs/test_cases/t00048_class.svg index 869471b0..cd9f6346 100644 --- a/docs/test_cases/t00048_class.svg +++ b/docs/test_cases/t00048_class.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + Base - + - + base : int foo() = 0 : void - - + + BaseTemplate @@ -35,35 +35,35 @@ T - + - + base : T foo() = 0 : void - - + + B - + - + b : int foo() : void - - + + BTemplate @@ -71,35 +71,35 @@ T - + - + b : T foo() : void - - + + A - + - + a : int foo() : void - - + + ATemplate @@ -107,11 +107,11 @@ T - + - + a : T diff --git a/docs/test_cases/t00049_class.svg b/docs/test_cases/t00049_class.svg index d265452e..632fa443 100644 --- a/docs/test_cases/t00049_class.svg +++ b/docs/test_cases/t00049_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,17 +18,17 @@ T - + - + a : T get_a() : T & - + A @@ -36,7 +36,7 @@ intmap - + A @@ -44,7 +44,7 @@ thestring - + A @@ -52,32 +52,32 @@ string_vector - - + + R - + - + a_string : A<thestring> - + - + a_vector_string : A<string_vector> - + - + a_int_map : A<intmap> diff --git a/docs/test_cases/t00050_class.svg b/docs/test_cases/t00050_class.svg index c3ca998b..9b32c192 100644 --- a/docs/test_cases/t00050_class.svg +++ b/docs/test_cases/t00050_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + A - - + + B - - + + C - - + + utils::D - - + + E @@ -52,8 +52,8 @@ E3 - - + + F @@ -61,44 +61,44 @@ T,V,int N - + - + t : T[N] - + - + v : V - - + + G - - + + NoComment - + Lorem ipsum dolor sit - + Lorem ipsum dolor sit - + Lorem ipsum dolor sit amet consectetur adipiscing elit, urna consequat felis vehicula class ultricies mollis dictumst, aenean non a in donec nulla. @@ -125,50 +125,50 @@ imperdiet praesent magnis ridiculus congue gravida curabitur dictum sagittis, enim et magna sit inceptos sodales parturient pharetra mollis, aenean vel nostra tellus commodo pretium sapien sociosqu. - + This is a short description of class G. - + This is an intermediate description of class G. - + This is a long description of class G. - + Lorem ipsum - + TODO 1. Write meaningful comment - + TODO 2. Write tests - + TODO 3. Implement - + Long comment example - + TODO Implement... - + Simple array wrapper. - + Template parameters @@ -181,6 +181,6 @@ N Size of T array. - + diff --git a/docs/test_cases/t00051.md b/docs/test_cases/t00051.md new file mode 100644 index 00000000..cb6b1e66 --- /dev/null +++ b/docs/test_cases/t00051.md @@ -0,0 +1,86 @@ +# t00051 - Test case for relative paths in lambda names +## Config +```yaml +compilation_database_dir: .. +output_directory: puml +diagrams: + t00051_class: + type: class + glob: + - ../../tests/t00051/t00051.cc + include: + namespaces: + - clanguml::t00051 + using_namespace: + - clanguml::t00051 +``` +## Source code +File t00051.cc +```cpp +#include + +namespace clanguml { +namespace t00051 { + +template struct B : private std::thread { + B(F &&f, FF &&ff) + : f_{std::move(f)} + , ff_{std::move(ff)} + { + } + + void f() { f_(); } + void ff() { ff_(); } + + F f_; + FF ff_; +}; + +class A { +public: +private: + class custom_thread1 : private std::thread { + public: + template + explicit custom_thread1(Function &&f, Args &&...args) + : std::thread::thread( + std::forward(f), std::forward(args)...) + { + } + }; + + static custom_thread1 start_thread1(); + + class custom_thread2 : private std::thread { + using std::thread::thread; + }; + + static custom_thread2 start_thread2(); + + auto start_thread3() + { + return B{[]() {}, []() {}}; + } + + auto get_function() + { + return []() {}; + } +}; + +A::custom_thread1 A::start_thread1() +{ + return custom_thread1{[]() {}}; +} + +A::custom_thread2 A::start_thread2() +{ + return custom_thread2{[]() {}}; +} + +} +} + +``` +## Generated UML diagrams +![t00051_class](./t00051_class.svg "Test case for relative paths in lambda names") diff --git a/docs/test_cases/t00051_class.svg b/docs/test_cases/t00051_class.svg new file mode 100644 index 00000000..79de51fe --- /dev/null +++ b/docs/test_cases/t00051_class.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + B + + F,FF + + + + + + + + f_ : F + + + + + + + ff_ : FF + + + + B<F, FF>(F && f, FF && ff) : void + + f() : void + + ff() : void + + + + + B<(lambda at ../../tests/t00051/t00051.cc:43:18),(lambda at ../../tests/t00051/t00051.cc:43:27)> + + + + B((lambda at ../../tests/t00051/t00051.cc:43:18) && f, (lambda at ../../tests/t00051/t00051.cc:43:27) && ff) : void + + f() : void + + ff() : void + + + + + + + f_ : (lambda at ../../tests/t00051/t00051.cc:43:18) + + + + + + + ff_ : (lambda at ../../tests/t00051/t00051.cc:43:27) + + + + + + A + + + + start_thread1() : A::custom_thread1 + + start_thread2() : A::custom_thread2 + + start_thread3() : B<(lambda at ../../tests/t00051/t00051.cc:43:18),(lambda at ../../tests/t00051/t00051.cc:43:27)> + + get_function() : (lambda at ../../tests/t00051/t00051.cc:48:16) + + + + + + A::custom_thread1 + + + + custom_thread1(Function && f, Args &&... args) : void + + + + + + A::custom_thread2 + + + + thread((lambda at ../../tests/t00051/t00051.cc:59:27) && ) : void + + + + + + + + + + + + + + + diff --git a/docs/test_cases/t20001_sequence.svg b/docs/test_cases/t20001_sequence.svg index 84d1f756..5f20df98 100644 --- a/docs/test_cases/t20001_sequence.svg +++ b/docs/test_cases/t20001_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,59 +9,59 @@ - - - - - - - + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - - - - - + + + + + + + + add(int,int) - + wrap_add3(int,int,int) - + add3(int,int,int) - + @@ -72,7 +72,7 @@ - + @@ -81,14 +81,14 @@ - + log_result(int) - + Main test function diff --git a/docs/test_cases/t20002_sequence.svg b/docs/test_cases/t20002_sequence.svg index 95486344..2738aa27 100644 --- a/docs/test_cases/t20002_sequence.svg +++ b/docs/test_cases/t20002_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,51 +9,51 @@ - - - - + + + + - - + + m1() - + m1() - - + + m2() - + m2() - - + + m3() - + m3() - - + + m4() - + m4() - - - - - + + + + + - + - + diff --git a/docs/test_cases/t20003_sequence.svg b/docs/test_cases/t20003_sequence.svg index 69c310b1..cd4241ad 100644 --- a/docs/test_cases/t20003_sequence.svg +++ b/docs/test_cases/t20003_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,51 +9,51 @@ - - - - + + + + - - + + m1<T>(T) - + m1<T>(T) - - + + m2<T>(T) - + m2<T>(T) - - + + m3<T>(T) - + m3<T>(T) - - + + m4<T>(T) - + m4<T>(T) - - - - - + + + + + - + - + diff --git a/docs/test_cases/t20004_sequence.svg b/docs/test_cases/t20004_sequence.svg index 9c464770..0d7f6cfa 100644 --- a/docs/test_cases/t20004_sequence.svg +++ b/docs/test_cases/t20004_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -29,87 +29,87 @@ - - + + main() - + main() - - + + m1<float>(float) - + m1<float>(float) - - + + m1<unsigned long>(unsigned long) - + m1<unsigned long>(unsigned long) - - + + m4<unsigned long>(unsigned long) - + m4<unsigned long>(unsigned long) - - + + m1<std::string>(std::string) - + m1<std::string>(std::string) - - + + m2<std::string>(std::string) - + m2<std::string>(std::string) - - + + m1<int>(int) - + m1<int>(int) - - + + m2<int>(int) - + m2<int>(int) - - + + m3<int>(int) - + m3<int>(int) - - + + m4<int>(int) - + m4<int>(int) - - - - - - - - - - - + + + + + + + + + + + - + - + @@ -117,11 +117,11 @@ - + - + @@ -129,19 +129,19 @@ - + - + - + - + diff --git a/docs/test_cases/t20005_sequence.svg b/docs/test_cases/t20005_sequence.svg index 7ac19404..c7b39f4a 100644 --- a/docs/test_cases/t20005_sequence.svg +++ b/docs/test_cases/t20005_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,42 +9,42 @@ - - - + + + - - + + C<T> - + C<T> - - + + B<T> - + B<T> - - + + A<T> - + A<T> - - - + + + c(T) - + b(T) - + a(T) diff --git a/docs/test_cases/t20006_sequence.svg b/docs/test_cases/t20006_sequence.svg index b5fbbea9..0abb88c5 100644 --- a/docs/test_cases/t20006_sequence.svg +++ b/docs/test_cases/t20006_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,22 +9,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -34,82 +34,82 @@ - - + + tmain() - + tmain() - - + + B<int> - + B<int> - - + + A<int> - + A<int> - - + + B<std::string> - + B<std::string> - - + + A<std::string> - + A<std::string> - - + + BB<int,int> - + BB<int,int> - - + + AA<int> - + AA<int> - - + + BB<int,std::string> - + BB<int,std::string> - - + + BB<int,float> - + BB<int,float> - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + b(int) - + a1(int) @@ -118,12 +118,12 @@ - + b(std::string) - + a2(std::string) @@ -132,59 +132,59 @@ - + bb1(int,int) - + aa1(int) - + bb2(int,int) - + aa2(int) - + bb1(int,std::string) - + aa2(int) - + bb2(int,std::string) - + aa1(int) - + bb1(int,float) - + bb2(int,float) - + aa2(int) diff --git a/docs/test_cases/t20007_sequence.svg b/docs/test_cases/t20007_sequence.svg index 2641241b..0bec7169 100644 --- a/docs/test_cases/t20007_sequence.svg +++ b/docs/test_cases/t20007_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,57 +9,57 @@ - - - - + + + + - - + + tmain() - + tmain() - - + + Adder<int,int> - + Adder<int,int> - - + + Adder<int,float,double> - + Adder<int,float,double> - - + + Adder<std::string,std::string,std::string> - + Adder<std::string,std::string,std::string> - - - - - + + + + + add(int &&,int &&) - + add(int &&,float &&,double &&) - + add(std::string &&,std::string &&,std::string &&) diff --git a/docs/test_cases/t20008_sequence.svg b/docs/test_cases/t20008_sequence.svg index 63f912f9..778e912a 100644 --- a/docs/test_cases/t20008_sequence.svg +++ b/docs/test_cases/t20008_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,13 +9,13 @@ - - - - - - - + + + + + + + @@ -23,81 +23,81 @@ - - + + tmain() - + tmain() - - + + B<int> - + B<int> - - + + A<int> - + A<int> - - + + B<const char *> - + B<const char *> - - + + A<const char *> - + A<const char *> - - + + B<std::string> - + B<std::string> - - + + A<std::string> - + A<std::string> - - - - - - - - + + + + + + + + b(int) - + a1(int) - + b(const char *) - + a2(const char *) - + b(std::string) - + a3(std::string) diff --git a/docs/test_cases/t20009_sequence.svg b/docs/test_cases/t20009_sequence.svg index 7c9cf24c..751d78bb 100644 --- a/docs/test_cases/t20009_sequence.svg +++ b/docs/test_cases/t20009_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,13 +9,13 @@ - - - - - - - + + + + + + + @@ -23,81 +23,81 @@ - - + + tmain() - + tmain() - - + + B<std::string> - + B<std::string> - - + + A<std::string> - + A<std::string> - - + + B<int> - + B<int> - - + + A<int> - + A<int> - - + + B<float> - + B<float> - - + + A<float> - + A<float> - - - - - - - - + + + + + + + + b(std::string) - + a(std::string) - + b(int) - + a(int) - + b(float) - + a(float) diff --git a/docs/test_cases/t20010_sequence.svg b/docs/test_cases/t20010_sequence.svg index 51c8a205..89a3d2d5 100644 --- a/docs/test_cases/t20010_sequence.svg +++ b/docs/test_cases/t20010_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,81 +9,81 @@ - - - - - - - - - + + + + + + + + + - - + + tmain() - + tmain() - - + + B<int> - + B<int> - - + + A - + A - - - - - - - - - - + + + + + + + + + + b1() - + a1() - + b2() - + a2() - + b3() - + a3() - + b4() - + a4() diff --git a/docs/test_cases/t20011_sequence.svg b/docs/test_cases/t20011_sequence.svg index a0d140df..a1febec8 100644 --- a/docs/test_cases/t20011_sequence.svg +++ b/docs/test_cases/t20011_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,42 +9,42 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - - - - - - + + + + + + + + + + a(int) @@ -52,26 +52,26 @@ alt - + a(int) - + b(int) - + c(int) - + @@ -81,14 +81,14 @@ alt - + b(int) - + @@ -98,7 +98,7 @@ alt - + diff --git a/docs/test_cases/t20012_sequence.svg b/docs/test_cases/t20012_sequence.svg index 429825fb..4c90e47f 100644 --- a/docs/test_cases/t20012_sequence.svg +++ b/docs/test_cases/t20012_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,31 +9,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -43,122 +43,122 @@ - - + + tmain() - + tmain() - - + + tmain()::(lambda ../../tests/t20012/t20012.cc:66:20) - + tmain()::(lambda ../../tests/t20012/t20012.cc:66:20) - - + + A - + A - - + + B - + B - - + + tmain()::(lambda ../../tests/t20012/t20012.cc:79:20) - + tmain()::(lambda ../../tests/t20012/t20012.cc:79:20) - - + + C - + C - - + + R<R::(lambda ../../tests/t20012/t20012.cc:85:9)> - + R<R::(lambda ../../tests/t20012/t20012.cc:85:9)> - - + + tmain()::(lambda ../../tests/t20012/t20012.cc:85:9) - + tmain()::(lambda ../../tests/t20012/t20012.cc:85:9) - - + + D - + D - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + operator()() - + a() - + aa() - + aaa() - + b() - + bb() - + @@ -167,67 +167,67 @@ - + operator()() - + c() - + cc() - + ccc() - + operator()() - + a() - + aa() - + aaa() - + b() - + bb() - + @@ -238,29 +238,29 @@ - + r() - + operator()() - + c() - + cc() - + @@ -269,7 +269,7 @@ - + add5(int) diff --git a/docs/test_cases/t20013_sequence.svg b/docs/test_cases/t20013_sequence.svg index 9c22897d..5ee90a2d 100644 --- a/docs/test_cases/t20013_sequence.svg +++ b/docs/test_cases/t20013_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,47 +9,47 @@ - - - - - - - + + + + + + + - - + + tmain(int,char **) - + tmain(int,char **) - - + + B - + B - - + + A - + A - - - - - - - - + + + + + + + + b(int) - + a1(int) @@ -58,12 +58,12 @@ - + b(double) - + a2(double) @@ -72,12 +72,12 @@ - + b(const char *) - + a3(const char *) diff --git a/docs/test_cases/t20014_sequence.svg b/docs/test_cases/t20014_sequence.svg index 36f59381..f27cc46b 100644 --- a/docs/test_cases/t20014_sequence.svg +++ b/docs/test_cases/t20014_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,56 +9,56 @@ - - - - - - - - + + + + + + + + - - + + tmain() - + tmain() - - + + B - + B - - + + A - + A - - + + C<B,int> - + C<B,int> - - - - - - - - - + + + + + + + + + b1(int,int) - + a1(int,int) @@ -67,12 +67,12 @@ - + b2(int,int) - + a2(int,int) @@ -81,17 +81,17 @@ - + c1(int,int) - + b1(int,int) - + a1(int,int) diff --git a/docs/test_cases/t20015_sequence.svg b/docs/test_cases/t20015_sequence.svg index 3b1772c9..b6544984 100644 --- a/docs/test_cases/t20015_sequence.svg +++ b/docs/test_cases/t20015_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + - - + + tmain() - + tmain() - - + + B - + B - - - + + + setup_a(std::shared_ptr<detail::A> &) diff --git a/docs/test_cases/t20016_sequence.svg b/docs/test_cases/t20016_sequence.svg index 24e963c4..d79a46c1 100644 --- a/docs/test_cases/t20016_sequence.svg +++ b/docs/test_cases/t20016_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,53 +9,53 @@ - - - - - + + + + + - - + + tmain() - + tmain() - - + + B<long> - + B<long> - - + + A - + A - - - - - - + + + + + + b1(long) - + a1(int) - + b2(long) - + a2(const long &) diff --git a/docs/test_cases/t20017_sequence.svg b/docs/test_cases/t20017_sequence.svg index bd81c135..02f796e2 100644 --- a/docs/test_cases/t20017_sequence.svg +++ b/docs/test_cases/t20017_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,65 +9,65 @@ - - - - - - + + + + + + - + t20017.cc - + t20017.cc - + include/t20017_a.h - + include/t20017_a.h - + include/t20017_b.h - + include/t20017_b.h - - - - - - + + + + + + tmain() - + a3(int,int) - + b1(int,int) - + a2(int,int) - + a1(int,int) - + b2<int>(int,int) diff --git a/docs/test_cases/t20018_sequence.svg b/docs/test_cases/t20018_sequence.svg index e59d423f..3d56f2e0 100644 --- a/docs/test_cases/t20018_sequence.svg +++ b/docs/test_cases/t20018_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,14 +9,14 @@ - - - - - - - - + + + + + + + + @@ -25,93 +25,93 @@ - - + + tmain() - + tmain() - - + + Answer<Factorial<5>,120> - + Answer<Factorial<5>,120> - - + + Factorial<5> - + Factorial<5> - - + + Factorial<4> - + Factorial<4> - - + + Factorial<3> - + Factorial<3> - - + + Factorial<2> - + Factorial<2> - - + + Factorial<1> - + Factorial<1> - - + + Factorial<0> - + Factorial<0> - - - - - - - - - + + + + + + + + + print() - + print(int) - + print(int) - + print(int) - + print(int) - + print(int) - + print(int) diff --git a/docs/test_cases/t20019_sequence.svg b/docs/test_cases/t20019_sequence.svg index b4c781f5..bd9ca548 100644 --- a/docs/test_cases/t20019_sequence.svg +++ b/docs/test_cases/t20019_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,95 +9,95 @@ - - - - - - - - - + + + + + + + + + - - + + tmain() - + tmain() - - + + Base<D1> - + Base<D1> - - + + D1 - + D1 - - + + Base<D2> - + Base<D2> - - + + D2 - + D2 - - - - - - - - - - + + + + + + + + + + name() - + impl() - + name() - + impl() - + name() - + impl() - + name() - + impl() diff --git a/docs/test_cases/t20020_sequence.svg b/docs/test_cases/t20020_sequence.svg index e91f5fd8..bbde7194 100644 --- a/docs/test_cases/t20020_sequence.svg +++ b/docs/test_cases/t20020_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,78 +9,78 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - + + + - - + + tmain() - + tmain() - - + + A - + A - - + + C - + C - - + + B - + B - - + + D<int> - + D<int> - - - - - - - - - - - - - + + + + + + + + + + + + + alt - + a1() @@ -91,7 +91,7 @@ alt - + [ @@ -100,7 +100,7 @@ - + [ @@ -109,7 +109,7 @@ - + b1() @@ -117,7 +117,7 @@ - + [ @@ -126,21 +126,21 @@ - + b2() - + a4() - + log() @@ -148,7 +148,7 @@ alt - + c1() @@ -156,7 +156,7 @@ alt - + @@ -169,7 +169,7 @@ - + @@ -179,7 +179,7 @@ alt - + d1(int,int) diff --git a/docs/test_cases/t20021_sequence.svg b/docs/test_cases/t20021_sequence.svg index 1e086395..a1af68ff 100644 --- a/docs/test_cases/t20021_sequence.svg +++ b/docs/test_cases/t20021_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,74 +9,74 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + tmain() - + tmain() - - + + C - + C - - + + A - + A - - + + B - + B - - - - - - - - - - - - + + + + + + + + + + + + loop - + [ c4() ] - + @@ -89,7 +89,7 @@ - + a3() @@ -102,7 +102,7 @@ loop - + [ @@ -111,7 +111,7 @@ - + [ @@ -120,7 +120,7 @@ - + [ @@ -129,14 +129,14 @@ - + a1() - + [ @@ -148,7 +148,7 @@ loop - + b2() @@ -158,7 +158,7 @@ loop - + [ @@ -167,7 +167,7 @@ - + b2() diff --git a/docs/test_cases/t20022_sequence.svg b/docs/test_cases/t20022_sequence.svg index 5387f115..957b4cc0 100644 --- a/docs/test_cases/t20022_sequence.svg +++ b/docs/test_cases/t20022_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,39 +9,39 @@ - - - + + + - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - + + + + a() - + b() diff --git a/docs/test_cases/t20023_sequence.svg b/docs/test_cases/t20023_sequence.svg index 99bad8fd..40d52f1b 100644 --- a/docs/test_cases/t20023_sequence.svg +++ b/docs/test_cases/t20023_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,37 +9,37 @@ - - - - - - - + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - - - + + + + + + + a() @@ -47,7 +47,7 @@ try - + @@ -60,7 +60,7 @@ [std::runtime_error &] - + @@ -73,7 +73,7 @@ [std::logic_error &] - + @@ -86,7 +86,7 @@ [...] - + diff --git a/docs/test_cases/t20024_sequence.svg b/docs/test_cases/t20024_sequence.svg index 0d9f2212..c7d346fc 100644 --- a/docs/test_cases/t20024_sequence.svg +++ b/docs/test_cases/t20024_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,23 +9,23 @@ - - - - - - - - - - - - + + + + + + + + + + + + - + @@ -33,36 +33,36 @@ - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - - - - - - - - - + + + + + + + + + + + + select(enum_a) @@ -72,7 +72,7 @@ switch [zero] - + @@ -85,7 +85,7 @@ [one] - + @@ -98,7 +98,7 @@ [two] - + @@ -111,7 +111,7 @@ [default] - + @@ -124,7 +124,7 @@ - + select(colors) @@ -134,7 +134,7 @@ switch [enum colors::red] - + @@ -143,7 +143,7 @@ [enum colors::orange] - + @@ -152,7 +152,7 @@ [enum colors::green] - + @@ -161,7 +161,7 @@ [default] - + diff --git a/docs/test_cases/t20025_sequence.svg b/docs/test_cases/t20025_sequence.svg index acf4b295..2b3a9220 100644 --- a/docs/test_cases/t20025_sequence.svg +++ b/docs/test_cases/t20025_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,41 +9,41 @@ - - - - + + + + - - + + tmain() - + tmain() - - + + A - + A - - + + add(int,int) - + add(int,int) - - - - - + + + + + a() - + @@ -52,7 +52,7 @@ - + diff --git a/docs/test_cases/t20026_sequence.svg b/docs/test_cases/t20026_sequence.svg index 1b23bc38..d7ef3896 100644 --- a/docs/test_cases/t20026_sequence.svg +++ b/docs/test_cases/t20026_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + - - + + tmain() - + tmain() - - + + A - + A - - - + + + a() diff --git a/docs/test_cases/t20027_sequence.svg b/docs/test_cases/t20027_sequence.svg index d5ac2918..1771888c 100644 --- a/docs/test_cases/t20027_sequence.svg +++ b/docs/test_cases/t20027_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + - - + + tmain() - + tmain() - - + + A - + A - - - + + + a() diff --git a/docs/test_cases/t20028_sequence.svg b/docs/test_cases/t20028_sequence.svg index 0cf5cd0a..1dc328ef 100644 --- a/docs/test_cases/t20028_sequence.svg +++ b/docs/test_cases/t20028_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,50 +9,50 @@ - - - - - - + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - + + + + + alt - + a() - + b() - + c() @@ -60,7 +60,7 @@ - + d() diff --git a/docs/test_cases/t20029_sequence.svg b/docs/test_cases/t20029_sequence.svg index 681bf2b5..e2110411 100644 --- a/docs/test_cases/t20029_sequence.svg +++ b/docs/test_cases/t20029_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,60 +9,60 @@ - - - - - - - - - - - + + + + + + + + + + + - - + + tmain() - + tmain() - - + + Encoder<Retrier<ConnectionPool>> - + Encoder<Retrier<ConnectionPool>> - - + + Retrier<ConnectionPool> - + Retrier<ConnectionPool> - - + + ConnectionPool - + ConnectionPool - - + + encode_b64(std::string &&) - + encode_b64(std::string &&) - - - - - - - - + + + + + + + + connect() @@ -73,21 +73,21 @@ alt - + [ send(std::string &&) ] - + encode(std::string &&) - + @@ -97,7 +97,7 @@ - + send(std::string &&) @@ -108,7 +108,7 @@ alt - + [ diff --git a/docs/test_cases/t30001_package.svg b/docs/test_cases/t30001_package.svg index 2cd622ca..4f9e5bd8 100644 --- a/docs/test_cases/t30001_package.svg +++ b/docs/test_cases/t30001_package.svg @@ -1,6 +1,6 @@ - + @@ -9,67 +9,67 @@ - - + + A - - + + AA - - + + B - - + + AA - - + + AAA - - + + BBB - - + + BB - - + + AAA - - + + BBB - - + + BB - + A AAA note... - + This is namespace AA in namespace A - + This is namespace AA in namespace B - - - + + + diff --git a/docs/test_cases/t30002_package.svg b/docs/test_cases/t30002_package.svg index 0b654526..cee5be09 100644 --- a/docs/test_cases/t30002_package.svg +++ b/docs/test_cases/t30002_package.svg @@ -1,6 +1,6 @@ - + @@ -9,113 +9,113 @@ - - + + A - - + + AA - - + + B - - + + BB - - + + A1 - - + + A2 - - + + A3 - - + + A4 - - + + A5 - - + + A6 - - + + A7 - - + + A8 - - + + A9 - - + + A10 - - + + A11 - - + + A12 - - + + A13 - - + + A14 - - + + A15 - - + + A16 - - + + A17 - - + + BBB diff --git a/docs/test_cases/t30003_package.svg b/docs/test_cases/t30003_package.svg index 4c6d0868..cf51a6ac 100644 --- a/docs/test_cases/t30003_package.svg +++ b/docs/test_cases/t30003_package.svg @@ -1,6 +1,6 @@ - + @@ -9,35 +9,35 @@ - - + + ns1 - - + + ns3 «deprecated» - - + + ns1 - - + + ns2_v1_0_0 - - + + ns2_v0_9_0 «deprecated» - - + + ns2 diff --git a/docs/test_cases/t30004_package.svg b/docs/test_cases/t30004_package.svg index 4369a7e6..04e57506 100644 --- a/docs/test_cases/t30004_package.svg +++ b/docs/test_cases/t30004_package.svg @@ -1,6 +1,6 @@ - + @@ -9,46 +9,46 @@ - - + + A - + Package AAA. - + Package BBB. - + CCCC package note. - + We skipped DDD. - - + + AAA - - + + BBB - - + + CCC - - + + EEE - - - - + + + + diff --git a/docs/test_cases/t30005_package.svg b/docs/test_cases/t30005_package.svg index 448b790e..d8093ab3 100644 --- a/docs/test_cases/t30005_package.svg +++ b/docs/test_cases/t30005_package.svg @@ -1,6 +1,6 @@ - + @@ -9,48 +9,48 @@ - - + + A - - + + AA - - + + B - - + + BB - - + + C - - + + CC - - + + AAA - - + + BBB - - + + CCC diff --git a/docs/test_cases/t30006_package.svg b/docs/test_cases/t30006_package.svg index 701c54e4..6aee8ee9 100644 --- a/docs/test_cases/t30006_package.svg +++ b/docs/test_cases/t30006_package.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + B - - + + A - - + + C - + Top A note. - + diff --git a/docs/test_cases/t30007_package.svg b/docs/test_cases/t30007_package.svg index eedf878a..638284d5 100644 --- a/docs/test_cases/t30007_package.svg +++ b/docs/test_cases/t30007_package.svg @@ -1,6 +1,6 @@ - + @@ -9,30 +9,30 @@ - - + + A - - + + B - - + + AA - - + + C - + Compare layout with t30006. - + diff --git a/docs/test_cases/t30008_package.svg b/docs/test_cases/t30008_package.svg index 2c9a4446..2110d401 100644 --- a/docs/test_cases/t30008_package.svg +++ b/docs/test_cases/t30008_package.svg @@ -1,6 +1,6 @@ - + @@ -9,43 +9,43 @@ - - + + dependants - - + + dependencies - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F diff --git a/docs/test_cases/t40001_include.svg b/docs/test_cases/t40001_include.svg index de931f54..30988840 100644 --- a/docs/test_cases/t40001_include.svg +++ b/docs/test_cases/t40001_include.svg @@ -1,6 +1,6 @@ - + @@ -9,43 +9,43 @@ - + src - + include - + lib1 - - + + t40001.cc - - + + t40001_include1.h - - + + lib1.h - + string - + vector - + yaml-cpp/yaml.h - + This is a lib1 include dir - + This is a t40001_include1.h include file @@ -60,7 +60,7 @@ - - + + diff --git a/docs/test_cases/t40002_include.svg b/docs/test_cases/t40002_include.svg index ef9dd273..f0e6921c 100644 --- a/docs/test_cases/t40002_include.svg +++ b/docs/test_cases/t40002_include.svg @@ -1,6 +1,6 @@ - + @@ -9,46 +9,46 @@ - + src - + lib1 - + lib2 - + include - + lib1 - + lib2 - - + + t40002.cc - - + + lib1.cc - - + + lib2.cc - - + + lib1.h - - + + lib2.h diff --git a/docs/test_cases/t40003_include.svg b/docs/test_cases/t40003_include.svg index 5c22d8d3..0fa9fc42 100644 --- a/docs/test_cases/t40003_include.svg +++ b/docs/test_cases/t40003_include.svg @@ -1,6 +1,6 @@ - + @@ -9,66 +9,66 @@ - + src - + dependants - + dependencies - + include - + dependants - + dependencies - - + + t1.cc - - + + t2.cc - - + + t3.h - - + + t2.h - - + + t1.h - - + + t3.h - - + + t2.h - - + + t1.h - - + + t5.h From b802eaee3d578dd1012d4c76d03ee75beec715ee Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sun, 22 Jan 2023 15:49:12 +0100 Subject: [PATCH 09/11] Fixed relative lambda names in MSVC --- .../visitor/translation_unit_visitor.cc | 15 ++++++++++---- src/config/config.h | 12 ++++++++++- src/config/yaml_emitters.cc | 18 +++++++++++++++++ src/decorators/decorators.cc | 2 +- src/main.cc | 5 +++-- tests/test_util.cc | 20 +++++++++++++------ 6 files changed, 58 insertions(+), 14 deletions(-) diff --git a/src/class_diagram/visitor/translation_unit_visitor.cc b/src/class_diagram/visitor/translation_unit_visitor.cc index 129cbd44..0fb23d60 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.cc +++ b/src/class_diagram/visitor/translation_unit_visitor.cc @@ -1143,20 +1143,27 @@ void translation_unit_visitor::process_function_parameter( void translation_unit_visitor::ensure_lambda_type_is_relative( std::string ¶meter_type) const { - std::string lambda_prefix{"(lambda at /"}; +#ifdef _MSC_VER + auto root_name = fmt::format( + "{}\\", std::filesystem::current_path().root_name().string()); +#else + auto root_name = "/"; +#endif + std::string lambda_prefix{fmt::format("(lambda at {}", root_name)}; while (parameter_type.find(lambda_prefix) != std::string::npos) { auto lambda_begin = parameter_type.find(lambda_prefix); - auto absolute_lambda_path_end = parameter_type.find(':', lambda_begin); + auto absolute_lambda_path_end = + parameter_type.find(':', lambda_begin + lambda_prefix.size()); auto absolute_lambda_path = parameter_type.substr(lambda_begin + lambda_prefix.size() - 1, absolute_lambda_path_end - (lambda_begin + lambda_prefix.size() - 1)); - auto relative_lambda_path = std::filesystem::relative( + auto relative_lambda_path = util::path_to_url(std::filesystem::relative( absolute_lambda_path, config().relative_to()) - .string(); + .string()); parameter_type = fmt::format("{}(lambda at {}{}", parameter_type.substr(0, lambda_begin), relative_lambda_path, diff --git a/src/config/config.h b/src/config/config.h index 893f511c..79868b2e 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -255,6 +255,13 @@ YAML::Emitter &operator<<(YAML::Emitter &out, const package_diagram &c); YAML::Emitter &operator<<(YAML::Emitter &out, const layout_hint &c); +#ifdef _MSC_VER +YAML::Emitter &operator<<(YAML::Emitter &out, const std::filesystem::path &p); + +YAML::Emitter &operator<<( + YAML::Emitter &out, const std::vector &p); +#endif + YAML::Emitter &operator<<(YAML::Emitter &out, const source_location &sc); template @@ -262,7 +269,10 @@ YAML::Emitter &operator<<(YAML::Emitter &out, const option &o) { if (o.has_value) { out << YAML::Key << o.name; - out << YAML::Value << o.value; + if constexpr (std::is_same_v) + out << YAML::Value << o.value.string(); + else + out << YAML::Value << o.value; } return out; } diff --git a/src/config/yaml_emitters.cc b/src/config/yaml_emitters.cc index 8737a6ee..e1147bc7 100644 --- a/src/config/yaml_emitters.cc +++ b/src/config/yaml_emitters.cc @@ -138,6 +138,24 @@ YAML::Emitter &operator<<(YAML::Emitter &out, const comment_parser_t &cp) return out; } +#ifdef _MSC_VER +YAML::Emitter &operator<<(YAML::Emitter &out, const std::filesystem::path &p) +{ + out << p.string(); + return out; +} + +YAML::Emitter &operator<<( + YAML::Emitter &out, const std::vector &paths) +{ + out << YAML::BeginSeq; + for (const auto &p : paths) + out << p; + out << YAML::EndSeq; + return out; +} +#endif + YAML::Emitter &operator<<(YAML::Emitter &out, const layout_hint &c) { out << YAML::BeginMap; diff --git a/src/decorators/decorators.cc b/src/decorators/decorators.cc index 8e062353..d113b67e 100644 --- a/src/decorators/decorators.cc +++ b/src/decorators/decorators.cc @@ -62,7 +62,7 @@ decorator_toks decorator::tokenize(const std::string &label, std::string_view c) decorator_toks res; res.label = label; size_t pos{}; - const auto *it = c.begin(); + std::string_view::const_iterator it = c.begin(); std::advance(it, label.size()); if (*it == ':') { diff --git a/src/main.cc b/src/main.cc index 4fc101ce..a8e130be 100644 --- a/src/main.cc +++ b/src/main.cc @@ -264,11 +264,12 @@ int main(int argc, const char *argv[]) // if (compilation_database_dir) { config.compilation_database_dir.set( - util::ensure_path_is_absolute(compilation_database_dir.value())); + util::ensure_path_is_absolute(compilation_database_dir.value()) + .string()); } if (output_directory) { config.output_directory.set( - util::ensure_path_is_absolute(output_directory.value())); + util::ensure_path_is_absolute(output_directory.value()).string()); } LOG_INFO("Loading compilation database from {} directory", diff --git a/tests/test_util.cc b/tests/test_util.cc index be4bb2cd..b4860c9f 100644 --- a/tests/test_util.cc +++ b/tests/test_util.cc @@ -232,12 +232,20 @@ TEST_CASE("Test ensure_path_is_absolute", "[unit-test]") { using namespace clanguml::util; - CHECK(ensure_path_is_absolute("a/b/c", "/tmp").string() == "/tmp/a/b/c"); - CHECK(ensure_path_is_absolute("/a/b/c", "/tmp").string() == "/a/b/c"); - CHECK(ensure_path_is_absolute("", "/tmp").string() == "/tmp/"); - CHECK(ensure_path_is_absolute(".", "/tmp").string() == "/tmp/"); - CHECK(ensure_path_is_absolute("..", "/tmp").string() == "/"); - CHECK(ensure_path_is_absolute("/", "/tmp").string() == "/"); + using std::filesystem::path; + + CHECK(ensure_path_is_absolute("a/b/c", "/tmp").string() == + path{"/tmp/a/b/c"}.make_preferred()); + CHECK(ensure_path_is_absolute("/a/b/c", "/tmp").string() == + path{"/a/b/c"}.make_preferred()); + CHECK(ensure_path_is_absolute("", "/tmp").string() == + path{"/tmp/"}.make_preferred()); + CHECK(ensure_path_is_absolute(".", "/tmp").string() == + path{"/tmp/"}.make_preferred()); + CHECK(ensure_path_is_absolute("..", "/tmp").string() == + path{"/"}.make_preferred()); + CHECK(ensure_path_is_absolute("/", "/tmp").string() == + path{"/"}.make_preferred()); } TEST_CASE("Test hash_seed", "[unit-test]") From 2136ebefb3024486be934c91128367c5836f5008 Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sun, 22 Jan 2023 16:02:53 +0100 Subject: [PATCH 10/11] Fixed clang-tidy warnings --- src/class_diagram/visitor/translation_unit_visitor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class_diagram/visitor/translation_unit_visitor.cc b/src/class_diagram/visitor/translation_unit_visitor.cc index 0fb23d60..c3ecdfcd 100644 --- a/src/class_diagram/visitor/translation_unit_visitor.cc +++ b/src/class_diagram/visitor/translation_unit_visitor.cc @@ -1147,7 +1147,7 @@ void translation_unit_visitor::ensure_lambda_type_is_relative( auto root_name = fmt::format( "{}\\", std::filesystem::current_path().root_name().string()); #else - auto root_name = "/"; + auto root_name = std::string{"/"}; #endif std::string lambda_prefix{fmt::format("(lambda at {}", root_name)}; From da30adc6c8ceff5207522942a375e8c7466bc37f Mon Sep 17 00:00:00 2001 From: Bartek Kryza Date: Sun, 22 Jan 2023 16:04:57 +0100 Subject: [PATCH 11/11] Updated test cases documentation --- docs/test_cases/t00002_class.svg | 36 ++--- docs/test_cases/t00003_class.svg | 46 +++---- docs/test_cases/t00004_class.svg | 76 +++++------ docs/test_cases/t00005_class.svg | 110 +++++++-------- docs/test_cases/t00006_class.svg | 132 +++++++++--------- docs/test_cases/t00007_class.svg | 30 ++-- docs/test_cases/t00008_class.svg | 56 ++++---- docs/test_cases/t00009_class.svg | 32 ++--- docs/test_cases/t00010_class.svg | 34 ++--- docs/test_cases/t00011_class.svg | 22 +-- docs/test_cases/t00012_class.svg | 66 ++++----- docs/test_cases/t00013_class.svg | 82 +++++------ docs/test_cases/t00014_class.svg | 116 ++++++++-------- docs/test_cases/t00015_class.svg | 22 +-- docs/test_cases/t00016_class.svg | 30 ++-- docs/test_cases/t00017_class.svg | 66 ++++----- docs/test_cases/t00018_class.svg | 18 +-- docs/test_cases/t00019_class.svg | 40 +++--- docs/test_cases/t00020_class.svg | 38 +++--- docs/test_cases/t00021_class.svg | 30 ++-- docs/test_cases/t00022_class.svg | 14 +- docs/test_cases/t00023_class.svg | 26 ++-- docs/test_cases/t00024_class.svg | 22 +-- docs/test_cases/t00025_class.svg | 34 ++--- docs/test_cases/t00026_class.svg | 42 +++--- docs/test_cases/t00027_class.svg | 58 ++++---- docs/test_cases/t00028_class.svg | 78 +++++------ docs/test_cases/t00029_class.svg | 50 +++---- docs/test_cases/t00030_class.svg | 46 +++---- docs/test_cases/t00031_class.svg | 50 +++---- docs/test_cases/t00032_class.svg | 40 +++--- docs/test_cases/t00033_class.svg | 48 +++---- docs/test_cases/t00034_class.svg | 46 +++---- docs/test_cases/t00035_class.svg | 22 +-- docs/test_cases/t00036_class.svg | 38 +++--- docs/test_cases/t00037_class.svg | 54 ++++---- docs/test_cases/t00038_class.svg | 58 ++++---- docs/test_cases/t00039_class.svg | 78 +++++------ docs/test_cases/t00040_class.svg | 26 ++-- docs/test_cases/t00041_class.svg | 54 ++++---- docs/test_cases/t00042_class.svg | 36 ++--- docs/test_cases/t00043_class.svg | 50 +++---- docs/test_cases/t00044_class.svg | 36 ++--- docs/test_cases/t00045_class.svg | 70 +++++----- docs/test_cases/t00046_class.svg | 64 ++++----- docs/test_cases/t00047_class.svg | 22 +-- docs/test_cases/t00048_class.svg | 50 +++---- docs/test_cases/t00049_class.svg | 32 ++--- docs/test_cases/t00050_class.svg | 70 +++++----- docs/test_cases/t00051_class.svg | 38 +++--- docs/test_cases/t20001_sequence.svg | 62 ++++----- docs/test_cases/t20002_sequence.svg | 48 +++---- docs/test_cases/t20003_sequence.svg | 48 +++---- docs/test_cases/t20004_sequence.svg | 120 ++++++++-------- docs/test_cases/t20005_sequence.svg | 36 ++--- docs/test_cases/t20006_sequence.svg | 150 ++++++++++---------- docs/test_cases/t20007_sequence.svg | 48 +++---- docs/test_cases/t20008_sequence.svg | 84 ++++++------ docs/test_cases/t20009_sequence.svg | 84 ++++++------ docs/test_cases/t20010_sequence.svg | 72 +++++----- docs/test_cases/t20011_sequence.svg | 72 +++++----- docs/test_cases/t20012_sequence.svg | 204 ++++++++++++++-------------- docs/test_cases/t20013_sequence.svg | 60 ++++---- docs/test_cases/t20014_sequence.svg | 72 +++++----- docs/test_cases/t20015_sequence.svg | 24 ++-- docs/test_cases/t20016_sequence.svg | 48 +++---- docs/test_cases/t20017_sequence.svg | 48 +++---- docs/test_cases/t20018_sequence.svg | 96 ++++++------- docs/test_cases/t20019_sequence.svg | 84 ++++++------ docs/test_cases/t20020_sequence.svg | 118 ++++++++-------- docs/test_cases/t20021_sequence.svg | 106 +++++++-------- docs/test_cases/t20022_sequence.svg | 36 ++--- docs/test_cases/t20023_sequence.svg | 50 +++---- docs/test_cases/t20024_sequence.svg | 88 ++++++------ docs/test_cases/t20025_sequence.svg | 42 +++--- docs/test_cases/t20026_sequence.svg | 24 ++-- docs/test_cases/t20027_sequence.svg | 24 ++-- docs/test_cases/t20028_sequence.svg | 44 +++--- docs/test_cases/t20029_sequence.svg | 80 +++++------ docs/test_cases/t30001_package.svg | 48 +++---- docs/test_cases/t30002_package.svg | 90 ++++++------ docs/test_cases/t30003_package.svg | 26 ++-- docs/test_cases/t30004_package.svg | 30 ++-- docs/test_cases/t30005_package.svg | 38 +++--- docs/test_cases/t30006_package.svg | 16 +-- docs/test_cases/t30007_package.svg | 20 +-- docs/test_cases/t30008_package.svg | 34 ++--- docs/test_cases/t40001_include.svg | 30 ++-- docs/test_cases/t40002_include.svg | 34 ++--- docs/test_cases/t40003_include.svg | 50 +++---- 90 files changed, 2461 insertions(+), 2461 deletions(-) diff --git a/docs/test_cases/t00002_class.svg b/docs/test_cases/t00002_class.svg index 780b6acc..e36403c7 100644 --- a/docs/test_cases/t00002_class.svg +++ b/docs/test_cases/t00002_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -21,8 +21,8 @@ foo_c() = 0 : void - - + + B @@ -31,8 +31,8 @@ foo_a() : void - - + + C @@ -41,18 +41,18 @@ foo_c() : void - - + + D - + - + as : std::vector<A *> @@ -60,18 +60,18 @@ foo_a() : void foo_c() : void - - + + E - + - + as : std::vector<A *> @@ -79,13 +79,13 @@ foo_a() : void foo_c() : void - + This is class A - + This is class B - + This is class D diff --git a/docs/test_cases/t00003_class.svg b/docs/test_cases/t00003_class.svg index 5b58d568..eec47254 100644 --- a/docs/test_cases/t00003_class.svg +++ b/docs/test_cases/t00003_class.svg @@ -1,6 +1,6 @@ - + @@ -9,74 +9,74 @@ - - + + A - + - + public_member : int - + - + protected_member : int - + - + private_member : int - + - + a_ : int - + - + b_ : int - + - + c_ : int - + - + static_int : int - + - + static_const_int : const int - + - + auto_member : const unsigned long @@ -112,11 +112,11 @@ protected_method() : void private_method() : void - + - + compare : std::function<bool (const int)> diff --git a/docs/test_cases/t00004_class.svg b/docs/test_cases/t00004_class.svg index 549d2675..5534f62c 100644 --- a/docs/test_cases/t00004_class.svg +++ b/docs/test_cases/t00004_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + B - - + + B::AA @@ -28,8 +28,8 @@ AA_3 - - + + A @@ -40,16 +40,16 @@ foo2() const : void - - + + A::AA - - + + A::AA::Lights @@ -59,15 +59,15 @@ Red - - + + A::AA::AAA - + C::B @@ -75,8 +75,8 @@ int - - + + C @@ -84,39 +84,39 @@ T - + - + t : T - + - + b_int : B<int> - - + + C::AA - - + + C::AA::AAA - - + + C::AA::CCC @@ -125,8 +125,8 @@ CCC_2 - - + + C::B @@ -134,16 +134,16 @@ V - + - + b : V - - + + C::CC @@ -152,16 +152,16 @@ CC_2 - - + + detail::D - - + + detail::D::AA @@ -171,8 +171,8 @@ AA_3 - - + + detail::D::DD diff --git a/docs/test_cases/t00005_class.svg b/docs/test_cases/t00005_class.svg index ac6a4f18..691ca799 100644 --- a/docs/test_cases/t00005_class.svg +++ b/docs/test_cases/t00005_class.svg @@ -1,6 +1,6 @@ - + @@ -9,204 +9,204 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + R - + - + some_int : int - + - + some_int_pointer : int * - + - + some_int_pointer_pointer : int ** - + - + some_int_reference : int & - + - + a : A - + - + b : B * - + - + c : C & - + - + d : const D * - + - + e : const E & - + - + f : F && - + - + g : G ** - + - + h : H *** - + - + i : I *& - + - + j : volatile J * - + - + k : K * diff --git a/docs/test_cases/t00006_class.svg b/docs/test_cases/t00006_class.svg index 3bcff342..4ee4a473 100644 --- a/docs/test_cases/t00006_class.svg +++ b/docs/test_cases/t00006_class.svg @@ -1,6 +1,6 @@ - + @@ -9,136 +9,136 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + L - - + + M - - + + N - - + + NN - - + + NNN - - + + custom_container @@ -146,15 +146,15 @@ T - + - + data : std::vector<T> - + custom_container @@ -162,102 +162,102 @@ E - - + + R - + - + a : std::vector<A> - + - + b : std::vector<B *> - + - + c : std::map<int,C> - + - + d : std::map<int,D *> - + - + e : custom_container<E> - + - + f : std::vector<std::vector<F>> - + - + g : std::map<int,std::vector<G *>> - + - + h : std::array<H,10> - + - + i : std::array<I *,5> - + - + j : J[10] - + - + k : K *[20] - + - + lm : std::vector<std::pair<L,M>> - + - + ns : std::tuple<N,NN,NNN> diff --git a/docs/test_cases/t00007_class.svg b/docs/test_cases/t00007_class.svg index 8d64e3c3..86102710 100644 --- a/docs/test_cases/t00007_class.svg +++ b/docs/test_cases/t00007_class.svg @@ -1,6 +1,6 @@ - + @@ -9,56 +9,56 @@ - - + + A - - + + B - - + + C - - + + R - + - + a : std::unique_ptr<A> - + - + b : std::shared_ptr<B> - + - + c : std::weak_ptr<C> diff --git a/docs/test_cases/t00008_class.svg b/docs/test_cases/t00008_class.svg index f10a444d..ffb49f40 100644 --- a/docs/test_cases/t00008_class.svg +++ b/docs/test_cases/t00008_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,51 +18,51 @@ T,P,CMP,int N - + - + value : T - + - + pointer : T * - + - + reference : T & - + - + values : std::vector<P> - + - + ints : std::array<int,N> - + - + comparator : CMP - - + + Vector @@ -70,16 +70,16 @@ T - + - + values : std::vector<T> - - + + B @@ -87,15 +87,15 @@ T,C<> - + - + template_template : C<T> - + B @@ -103,18 +103,18 @@ int,Vector - - + + D - + - + ints : B<int,Vector> diff --git a/docs/test_cases/t00009_class.svg b/docs/test_cases/t00009_class.svg index 232951d8..c20988fe 100644 --- a/docs/test_cases/t00009_class.svg +++ b/docs/test_cases/t00009_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,15 +18,15 @@ T - + - + value : T - + A @@ -34,7 +34,7 @@ int - + A @@ -42,7 +42,7 @@ std::string - + A @@ -50,32 +50,32 @@ std::vector<std::string> - - + + B - + - + aint : A<int> - + - + astring : A<std::string> * - + - + avector : A<std::vector<std::string>> & diff --git a/docs/test_cases/t00010_class.svg b/docs/test_cases/t00010_class.svg index 36818cbc..045fbf49 100644 --- a/docs/test_cases/t00010_class.svg +++ b/docs/test_cases/t00010_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,22 +18,22 @@ T,P - + - + first : T - + - + second : P - + A @@ -41,8 +41,8 @@ T,std::string - - + + B @@ -50,15 +50,15 @@ T - + - + astring : A<T,std::string> - + B @@ -66,18 +66,18 @@ int - - + + C - + - + aintstring : B<int> diff --git a/docs/test_cases/t00011_class.svg b/docs/test_cases/t00011_class.svg index afdf308f..ab268807 100644 --- a/docs/test_cases/t00011_class.svg +++ b/docs/test_cases/t00011_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + D @@ -18,16 +18,16 @@ T - + - + value : T - - + + A @@ -36,18 +36,18 @@ foo() : void - - + + B - + - + m_a : A * diff --git a/docs/test_cases/t00012_class.svg b/docs/test_cases/t00012_class.svg index 705171e8..4860b918 100644 --- a/docs/test_cases/t00012_class.svg +++ b/docs/test_cases/t00012_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,23 +18,23 @@ T,Ts... - + - + value : T - + - + values : std::variant<Ts...> - - + + B @@ -43,15 +43,15 @@ - + - + ints : std::array<int,sizeof...(Is)> - - + + C @@ -60,14 +60,14 @@ - + - + ints : std::array<T,sizeof...(Is)> - + A @@ -75,7 +75,7 @@ int,std::string,float - + A @@ -83,7 +83,7 @@ int,std::string,bool - + B @@ -91,7 +91,7 @@ 3,2,1 - + B @@ -99,7 +99,7 @@ 1,1,1,1 - + C @@ -107,50 +107,50 @@ std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3 - - + + R - + - + a1 : A<int,std::string,float> - + - + a2 : A<int,std::string,bool> - + - + b1 : B<3,2,1> - + - + b2 : B<1,1,1,1> - + - + c1 : C<std::map<int,std::vector<std::vector<std::vector<std::string>>>>,3,3,3> - + Long template annotation diff --git a/docs/test_cases/t00013_class.svg b/docs/test_cases/t00013_class.svg index 652b4fd0..36ab2e21 100644 --- a/docs/test_cases/t00013_class.svg +++ b/docs/test_cases/t00013_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + ABCD::F @@ -18,15 +18,15 @@ T - + - + f : T - + ABCD::F @@ -34,70 +34,70 @@ int - - + + A - + - + a : int - - + + B - + - + b : int - - + + C - + - + c : int - - + + D - + - + d : int print(R * r) : void - - + + E @@ -105,16 +105,16 @@ T - + - + e : T - - + + G @@ -122,22 +122,22 @@ T,Args... - + - + g : T - + - + args : std::tuple<Args...> - + E @@ -145,7 +145,7 @@ int - + G @@ -153,7 +153,7 @@ int,float,std::string - + E @@ -161,25 +161,25 @@ std::string - - + + R - + - + gintstring : G<int,float,std::string> - + - + estring : E<std::string> diff --git a/docs/test_cases/t00014_class.svg b/docs/test_cases/t00014_class.svg index d0712cfe..66a671ef 100644 --- a/docs/test_cases/t00014_class.svg +++ b/docs/test_cases/t00014_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,37 +18,37 @@ T,P - + - + t : T - + - + p : P - - + + B - + - + value : std::string - + A @@ -56,7 +56,7 @@ T,std::string - + A @@ -64,7 +64,7 @@ T,std::unique_ptr<std::string> - + A @@ -72,7 +72,7 @@ long,T - + A @@ -80,7 +80,7 @@ double,T - + A @@ -88,7 +88,7 @@ long,U - + A @@ -96,7 +96,7 @@ long,bool - + A @@ -104,7 +104,7 @@ double,bool - + A @@ -112,7 +112,7 @@ long,float - + A @@ -120,7 +120,7 @@ double,float - + A @@ -128,7 +128,7 @@ bool,std::string - + A @@ -136,7 +136,7 @@ float,std::unique_ptr<std::string> - + A @@ -144,7 +144,7 @@ int,std::string - + A @@ -152,7 +152,7 @@ std::string,std::string - + A @@ -160,7 +160,7 @@ char,std::string - + A @@ -168,116 +168,116 @@ wchar_t,std::string - - + + R - + - + bapair : PairPairBA<bool> - + - + abool : APtr<bool> - + - + aboolfloat : AAPtr<bool,float> - + - + afloat : ASharedPtr<float> - + - + boolstring : A<bool,std::string> - + - + floatstring : AStringPtr<float> - + - + intstring : AIntString - + - + stringstring : AStringString - + - + bstringstring : BStringString - + - + bs : BVector - + - + bs2 : BVector2 - + - + cb : SimpleCallback<ACharString> - + - + gcb : GenericCallback<R::AWCharString> - + - + vcb : VoidCallback - + - + vps : VectorPtr<B> diff --git a/docs/test_cases/t00015_class.svg b/docs/test_cases/t00015_class.svg index dbae78aa..3e6c38ab 100644 --- a/docs/test_cases/t00015_class.svg +++ b/docs/test_cases/t00015_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + ns1::A - - + + ns1::ns2_v0_9_0::A - - + + ns1::Anon - - + + ns3::ns1::ns2::Anon - - + + ns3::B diff --git a/docs/test_cases/t00016_class.svg b/docs/test_cases/t00016_class.svg index d83ad125..6ebd42e9 100644 --- a/docs/test_cases/t00016_class.svg +++ b/docs/test_cases/t00016_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + is_numeric<> @@ -19,8 +19,8 @@ value : enum - - + + is_numeric @@ -29,8 +29,8 @@ value : enum - - + + is_numeric @@ -41,8 +41,8 @@ value : enum - - + + is_numeric @@ -53,8 +53,8 @@ value : enum - - + + is_numeric @@ -65,8 +65,8 @@ value : enum - - + + is_numeric @@ -77,8 +77,8 @@ value : enum - - + + is_numeric diff --git a/docs/test_cases/t00017_class.svg b/docs/test_cases/t00017_class.svg index b6dcb910..029f4658 100644 --- a/docs/test_cases/t00017_class.svg +++ b/docs/test_cases/t00017_class.svg @@ -1,6 +1,6 @@ - + @@ -9,127 +9,127 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F - - + + G - - + + H - - + + I - - + + J - - + + K - - + + R - + - + some_int : int - + - + some_int_pointer : int * - + - + some_int_pointer_pointer : int ** - + - + some_int_reference : int & diff --git a/docs/test_cases/t00018_class.svg b/docs/test_cases/t00018_class.svg index 832d1cad..540bf03b 100644 --- a/docs/test_cases/t00018_class.svg +++ b/docs/test_cases/t00018_class.svg @@ -1,6 +1,6 @@ - + @@ -9,18 +9,18 @@ - - + + impl::widget - + - + n : int @@ -30,18 +30,18 @@ draw(const widget & w) : void widget(int n) : void - - + + widget - + - + pImpl : std::unique_ptr<impl::widget> diff --git a/docs/test_cases/t00019_class.svg b/docs/test_cases/t00019_class.svg index 4ee8a52d..8a4273b2 100644 --- a/docs/test_cases/t00019_class.svg +++ b/docs/test_cases/t00019_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Base @@ -25,8 +25,8 @@ m2() : std::string - - + + Layer1 @@ -39,8 +39,8 @@ m2() : std::string - - + + Layer2 @@ -51,8 +51,8 @@ all_calls_count() const : int - - + + Layer3 @@ -60,18 +60,18 @@ LowerLayer - + - + m_m1_calls : int - + - + m_m2_calls : int @@ -83,7 +83,7 @@ m1_calls() const : int m2_calls() const : int - + Layer3 @@ -91,7 +91,7 @@ Base - + Layer2 @@ -99,7 +99,7 @@ Layer3<Base> - + Layer1 @@ -107,18 +107,18 @@ Layer2<Layer3<Base>> - - + + A - + - + layers : std::unique_ptr<Layer1<Layer2<Layer3<Base>>>> diff --git a/docs/test_cases/t00020_class.svg b/docs/test_cases/t00020_class.svg index 01c77b71..b04412e3 100644 --- a/docs/test_cases/t00020_class.svg +++ b/docs/test_cases/t00020_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + ProductA @@ -21,8 +21,8 @@ sell(int price) const = 0 : bool - - + + ProductA1 @@ -31,8 +31,8 @@ sell(int price) const : bool - - + + ProductA2 @@ -41,8 +41,8 @@ sell(int price) const : bool - - + + ProductB @@ -53,8 +53,8 @@ buy(int price) const = 0 : bool - - + + ProductB1 @@ -63,8 +63,8 @@ buy(int price) const : bool - - + + ProductB2 @@ -73,8 +73,8 @@ buy(int price) const : bool - - + + AbstractFactory @@ -85,8 +85,8 @@ make_b() const = 0 : std::unique_ptr<ProductB> - - + + Factory1 @@ -97,8 +97,8 @@ make_b() const : std::unique_ptr<ProductB> - - + + Factory2 diff --git a/docs/test_cases/t00021_class.svg b/docs/test_cases/t00021_class.svg index 623b8745..3b2841eb 100644 --- a/docs/test_cases/t00021_class.svg +++ b/docs/test_cases/t00021_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Visitor @@ -23,8 +23,8 @@ visit_B(const B & item) const = 0 : void - - + + Visitor1 @@ -35,8 +35,8 @@ visit_B(const B & item) const : void - - + + Visitor2 @@ -47,8 +47,8 @@ visit_B(const B & item) const : void - - + + Visitor3 @@ -59,8 +59,8 @@ visit_B(const B & item) const : void - - + + Item @@ -71,8 +71,8 @@ accept(const Visitor & visitor) const = 0 : void - - + + A @@ -81,8 +81,8 @@ accept(const Visitor & visitor) const : void - - + + B diff --git a/docs/test_cases/t00022_class.svg b/docs/test_cases/t00022_class.svg index cc6ca49e..9a4059cd 100644 --- a/docs/test_cases/t00022_class.svg +++ b/docs/test_cases/t00022_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -23,8 +23,8 @@ method2() = 0 : void - - + + A1 @@ -35,8 +35,8 @@ method2() : void - - + + A2 diff --git a/docs/test_cases/t00023_class.svg b/docs/test_cases/t00023_class.svg index e84d99a3..29abdd7a 100644 --- a/docs/test_cases/t00023_class.svg +++ b/docs/test_cases/t00023_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Strategy @@ -21,8 +21,8 @@ algorithm() = 0 : void - - + + StrategyA @@ -31,8 +31,8 @@ algorithm() : void - - + + StrategyB @@ -41,8 +41,8 @@ algorithm() : void - - + + StrategyC @@ -51,18 +51,18 @@ algorithm() : void - - + + Context - + - + m_strategy : std::unique_ptr<Strategy> diff --git a/docs/test_cases/t00024_class.svg b/docs/test_cases/t00024_class.svg index 9b835b4b..7f4680ca 100644 --- a/docs/test_cases/t00024_class.svg +++ b/docs/test_cases/t00024_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Target @@ -23,8 +23,8 @@ m2() = 0 : void - - + + Target1 @@ -35,8 +35,8 @@ m2() : void - - + + Target2 @@ -47,18 +47,18 @@ m2() : void - - + + Proxy - + - + m_target : std::shared_ptr<Target> diff --git a/docs/test_cases/t00025_class.svg b/docs/test_cases/t00025_class.svg index dc83dc96..2e0b08d2 100644 --- a/docs/test_cases/t00025_class.svg +++ b/docs/test_cases/t00025_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Target1 @@ -21,8 +21,8 @@ m2() : void - - + + Target2 @@ -33,8 +33,8 @@ m2() : void - - + + Proxy @@ -42,11 +42,11 @@ T - + - + m_target : std::shared_ptr<T> @@ -56,7 +56,7 @@ m1() : void m2() : void - + Proxy @@ -64,7 +64,7 @@ Target1 - + Proxy @@ -72,25 +72,25 @@ Target2 - - + + ProxyHolder - + - + proxy1 : Proxy<Target1> - + - + proxy2 : Proxy<Target2> diff --git a/docs/test_cases/t00026_class.svg b/docs/test_cases/t00026_class.svg index 8c6f2ba8..a76bda37 100644 --- a/docs/test_cases/t00026_class.svg +++ b/docs/test_cases/t00026_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Memento @@ -18,11 +18,11 @@ T - + - + m_value : T @@ -30,8 +30,8 @@ Memento<T>(T && v) : void value() const : T - - + + Originator @@ -39,11 +39,11 @@ T - + - + m_value : T @@ -57,8 +57,8 @@ print() const : void set(T && v) : void - - + + Caretaker @@ -66,11 +66,11 @@ T - + - + m_mementos : std::unordered_map<std::string,Memento<T>> @@ -78,7 +78,7 @@ state(const std::string & n) : Memento<T> & set_state(const std::string & s, Memento<T> && m) : void - + Caretaker @@ -86,7 +86,7 @@ std::string - + Originator @@ -94,25 +94,25 @@ std::string - - + + StringMemento - + - + caretaker : Caretaker<std::string> - + - + originator : Originator<std::string> diff --git a/docs/test_cases/t00027_class.svg b/docs/test_cases/t00027_class.svg index a2e8792b..d4c492fb 100644 --- a/docs/test_cases/t00027_class.svg +++ b/docs/test_cases/t00027_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Shape @@ -21,14 +21,14 @@ ~Shape() = default : void - + Line - - + + Line @@ -39,14 +39,14 @@ display() : void - + Text - - + + Text @@ -57,8 +57,8 @@ display() : void - - + + ShapeDecorator @@ -67,8 +67,8 @@ display() = 0 : void - - + + Color @@ -79,8 +79,8 @@ display() : void - - + + Weight @@ -91,7 +91,7 @@ display() : void - + Line @@ -99,7 +99,7 @@ Color,Weight - + Line @@ -107,7 +107,7 @@ Color - + Text @@ -115,7 +115,7 @@ Color,Weight - + Text @@ -123,39 +123,39 @@ Color - - + + Window - + - + border : Line<Color,Weight> - + - + divider : Line<Color> - + - + title : Text<Color,Weight> - + - + description : Text<Color> diff --git a/docs/test_cases/t00028_class.svg b/docs/test_cases/t00028_class.svg index cd71efac..f154b0d2 100644 --- a/docs/test_cases/t00028_class.svg +++ b/docs/test_cases/t00028_class.svg @@ -1,6 +1,6 @@ - + @@ -9,54 +9,54 @@ - - + + A - + A class note. - - + + B - + B class note. - - + + C - + C class note. - - + + D - + D class note. - - + + E @@ -64,27 +64,27 @@ T - + - + param : T - + E template class note. - - + + G - - + + F @@ -94,10 +94,10 @@ three - + F enum note. - + E @@ -105,59 +105,59 @@ int - - + + R - + - + aaa : A - + - + bbb : B * - + - + ccc : C & - + - + ddd : std::vector<std::shared_ptr<D>> - + - + eee : E<int> - + - + ggg : G ** R(C & c) : void - + R class note. diff --git a/docs/test_cases/t00029_class.svg b/docs/test_cases/t00029_class.svg index 3b9e52bf..babc1db6 100644 --- a/docs/test_cases/t00029_class.svg +++ b/docs/test_cases/t00029_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + A - - + + C @@ -26,16 +26,16 @@ T - + - + param : T - - + + E @@ -45,64 +45,64 @@ three - - + + G1 - - + + G2 - - + + G3 - - + + G4 - - + + R - + - + g1 : G1 - + - + g3 : G3 & - + - + g4 : std::shared_ptr<G4> diff --git a/docs/test_cases/t00030_class.svg b/docs/test_cases/t00030_class.svg index 21b0b058..2d56d837 100644 --- a/docs/test_cases/t00030_class.svg +++ b/docs/test_cases/t00030_class.svg @@ -1,6 +1,6 @@ - + @@ -9,86 +9,86 @@ - - + + A - - + + B - - + + C - - + + D - - + + E - - + + R - + - + aaa : A - + - + bbb : std::vector<B> - + - + ccc : std::vector<C> - + - + ddd : D - + - + eee : E * diff --git a/docs/test_cases/t00031_class.svg b/docs/test_cases/t00031_class.svg index 01af0758..deff87fc 100644 --- a/docs/test_cases/t00031_class.svg +++ b/docs/test_cases/t00031_class.svg @@ -1,33 +1,33 @@ - + - + - + - - - + + + A - - + + B @@ -37,8 +37,8 @@ three - - + + @@ -47,23 +47,23 @@ T - + - + ttt : T - - + + D - + C @@ -71,39 +71,39 @@ int - - + + R - + - + aaa : A * - + - + bbb : std::vector<B> - + - + ccc : C<int> - + - + ddd : D * diff --git a/docs/test_cases/t00032_class.svg b/docs/test_cases/t00032_class.svg index 275f148e..f49027e5 100644 --- a/docs/test_cases/t00032_class.svg +++ b/docs/test_cases/t00032_class.svg @@ -1,6 +1,6 @@ - + @@ -9,24 +9,24 @@ - - + + Base - - + + TBase - - + + A @@ -35,8 +35,8 @@ operator()() : void - - + + B @@ -45,8 +45,8 @@ operator()() : void - - + + C @@ -55,8 +55,8 @@ operator()() : void - - + + Overload @@ -64,15 +64,15 @@ T,L,Ts... - + - + counter : L - + Overload @@ -80,18 +80,18 @@ TBase,int,A,B,C - - + + R - + - + overload : Overload<TBase,int,A,B,C> diff --git a/docs/test_cases/t00033_class.svg b/docs/test_cases/t00033_class.svg index 2e76310c..0d36288b 100644 --- a/docs/test_cases/t00033_class.svg +++ b/docs/test_cases/t00033_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,16 +18,16 @@ T - + - + aaa : T - - + + B @@ -35,16 +35,16 @@ T - + - + bbb : T - - + + C @@ -52,30 +52,30 @@ T - + - + ccc : T - - + + D - + - + ddd : int - + C @@ -83,7 +83,7 @@ D - + B @@ -91,7 +91,7 @@ std::unique_ptr<C<D>> - + A @@ -99,18 +99,18 @@ B<std::unique_ptr<C<D>>> - - + + R - + - + abc : A<B<std::unique_ptr<C<D>>>> diff --git a/docs/test_cases/t00034_class.svg b/docs/test_cases/t00034_class.svg index c391f4b1..43eeb81c 100644 --- a/docs/test_cases/t00034_class.svg +++ b/docs/test_cases/t00034_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + Void @@ -21,8 +21,8 @@ operator!=(const Void & ) const : bool - - + + lift_void @@ -31,16 +31,16 @@ - - + + lift_void - - + + lift_void @@ -49,8 +49,8 @@ - - + + drop_void @@ -59,16 +59,16 @@ - - + + drop_void - - + + drop_void @@ -77,33 +77,33 @@ - - + + A - - + + R - + - + la : lift_void_t<A> * - + - + lv : lift_void_t<void> * diff --git a/docs/test_cases/t00035_class.svg b/docs/test_cases/t00035_class.svg index 42e093c2..2b91e175 100644 --- a/docs/test_cases/t00035_class.svg +++ b/docs/test_cases/t00035_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + Top - - + + Left - - + + Center - - + + Bottom - - + + Right diff --git a/docs/test_cases/t00036_class.svg b/docs/test_cases/t00036_class.svg index 6ddf571f..3c65383a 100644 --- a/docs/test_cases/t00036_class.svg +++ b/docs/test_cases/t00036_class.svg @@ -1,6 +1,6 @@ - + @@ -9,23 +9,23 @@ - + ns1 - + ns11 - + ns111 - + ns2 - + ns22 - - + + E @@ -34,8 +34,8 @@ yellow - - + + A @@ -43,15 +43,15 @@ T - + - + a : T - + A @@ -59,23 +59,23 @@ int - - + + B - + - + a_int : A<int> - - + + C diff --git a/docs/test_cases/t00037_class.svg b/docs/test_cases/t00037_class.svg index f60051fd..386bc2bc 100644 --- a/docs/test_cases/t00037_class.svg +++ b/docs/test_cases/t00037_class.svg @@ -1,6 +1,6 @@ - + @@ -9,98 +9,98 @@ - - + + ST - + - + dimensions : ST::(anonymous_620) - + - + units : ST::(anonymous_739) - - + + ST::(dimensions) - + - + t : double - + - + x : double - + - + y : double - + - + z : double - - + + ST::(units) - + - + c : double - + - + h : double - - + + A - + - + st : ST diff --git a/docs/test_cases/t00038_class.svg b/docs/test_cases/t00038_class.svg index 3d0a5f09..f8c46d96 100644 --- a/docs/test_cases/t00038_class.svg +++ b/docs/test_cases/t00038_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + thirdparty::ns1::color_t @@ -20,16 +20,16 @@ blue - - + + thirdparty::ns1::E - - + + property_t @@ -39,47 +39,47 @@ property_c - - + + A - - + + B - - + + C - - + + key_t - + - + key : std::string - - + + map @@ -88,16 +88,16 @@ - - + + map - - + + map @@ -106,8 +106,8 @@ - - + + map @@ -116,8 +116,8 @@ - - + + map @@ -126,8 +126,8 @@ - - + + map diff --git a/docs/test_cases/t00039_class.svg b/docs/test_cases/t00039_class.svg index b72cee90..7015851b 100644 --- a/docs/test_cases/t00039_class.svg +++ b/docs/test_cases/t00039_class.svg @@ -1,6 +1,6 @@ - + @@ -9,95 +9,95 @@ - - + + C - - + + D - - + + E - - + + CD - - + + DE - - + + CDE - - + + A - - + + AA - - + + AAA - + - + b : B * - - + + ns2::AAAA - - + + ns3::F @@ -105,16 +105,16 @@ T - + - + t : T * - - + + ns3::FF @@ -122,16 +122,16 @@ T,M - + - + m : M * - - + + ns3::FE @@ -139,16 +139,16 @@ T,M - + - + m : M * - - + + ns3::FFF @@ -156,11 +156,11 @@ T,M,N - + - + n : N * diff --git a/docs/test_cases/t00040_class.svg b/docs/test_cases/t00040_class.svg index a12fdaf4..e4930743 100644 --- a/docs/test_cases/t00040_class.svg +++ b/docs/test_cases/t00040_class.svg @@ -1,6 +1,6 @@ - + @@ -9,50 +9,50 @@ - - + + A - + - + ii_ : int get_a() : int - - + + AA - - + + AAA - + - + b : B * get_aaa() : int - - + + R diff --git a/docs/test_cases/t00041_class.svg b/docs/test_cases/t00041_class.svg index 0782831e..d2547a5d 100644 --- a/docs/test_cases/t00041_class.svg +++ b/docs/test_cases/t00041_class.svg @@ -1,6 +1,6 @@ - + @@ -9,100 +9,100 @@ - - + + R - - + + D - + - + rr : RR * - - + + E - - + + F - - + + RR - + - + e : E * - + - + f : F * - + - + g : detail::G * - - + + RRR - - + + ns1::N - - + + ns1::NN - - + + ns1::NM diff --git a/docs/test_cases/t00042_class.svg b/docs/test_cases/t00042_class.svg index dfdb501a..48be1c8c 100644 --- a/docs/test_cases/t00042_class.svg +++ b/docs/test_cases/t00042_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,16 +18,16 @@ T - + - + a : T - - + + A @@ -35,16 +35,16 @@ void - + - + a : void * - - + + B @@ -52,22 +52,22 @@ T,K - + - + b : T - + - + bb : K - + A @@ -75,7 +75,7 @@ double - + A @@ -83,7 +83,7 @@ std::string - + B diff --git a/docs/test_cases/t00043_class.svg b/docs/test_cases/t00043_class.svg index 7d93b5d0..b928493e 100644 --- a/docs/test_cases/t00043_class.svg +++ b/docs/test_cases/t00043_class.svg @@ -1,6 +1,6 @@ - + @@ -9,22 +9,22 @@ - + dependants - + dependencies - - + + A - - + + B @@ -33,8 +33,8 @@ b(dependants::A * a) : void - - + + BB @@ -43,8 +43,8 @@ bb(dependants::A * a) : void - - + + C @@ -53,8 +53,8 @@ c(dependants::B * b) : void - - + + D @@ -65,8 +65,8 @@ dd(dependants::BB * bb) : void - - + + E @@ -75,24 +75,24 @@ e(dependants::D * d) : void - - + + G - - + + GG - - + + H @@ -103,8 +103,8 @@ hh(dependencies::GG * gg) : void - - + + I @@ -113,8 +113,8 @@ i(dependencies::H * h) : void - - + + J diff --git a/docs/test_cases/t00044_class.svg b/docs/test_cases/t00044_class.svg index 94d5d9c0..a17b1c48 100644 --- a/docs/test_cases/t00044_class.svg +++ b/docs/test_cases/t00044_class.svg @@ -1,6 +1,6 @@ - + @@ -9,7 +9,7 @@ - + signal_handler @@ -17,8 +17,8 @@ ,A - - + + sink @@ -27,15 +27,15 @@ sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...), type-parameter-0-2> >(sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...),type-parameter-0-2>>::signal_t & sh) : void - + - + signal : sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...),type-parameter-0-2>>::signal_t * - - + + sink @@ -46,23 +46,23 @@ sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...), type-parameter-0-2> >(sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...),type-parameter-0-2>>::signal_t & sh) : void - + - + signal : sink<signal_handler<type-parameter-0-0 (type-parameter-0-1...),type-parameter-0-2>>::signal_t * - - + + signal_handler - - + + signal_handler @@ -71,8 +71,8 @@ - - + + signal_handler @@ -81,8 +81,8 @@ - - + + sink diff --git a/docs/test_cases/t00045_class.svg b/docs/test_cases/t00045_class.svg index 89f15c3d..911fd97f 100644 --- a/docs/test_cases/t00045_class.svg +++ b/docs/test_cases/t00045_class.svg @@ -1,6 +1,6 @@ - + @@ -9,32 +9,32 @@ - - + + A - - + + AA - - + + AAA - - + + AAAA @@ -42,103 +42,103 @@ T - + - + t : T - - + + ns1::A - - + + ns1::ns2::A - - + + ns1::ns2::B - - + + ns1::ns2::C - - + + ns1::ns2::D - - + + ns1::ns2::E - - + + ns1::ns2::AAA - - + + ns1::ns2::R - + - + a : ns1::ns2::A * - + - + ns1_a : ns1::A * - + - + ns1_ns2_a : ns1::ns2::A * - + - + root_a : ::A * diff --git a/docs/test_cases/t00046_class.svg b/docs/test_cases/t00046_class.svg index f3548188..4c511f62 100644 --- a/docs/test_cases/t00046_class.svg +++ b/docs/test_cases/t00046_class.svg @@ -1,6 +1,6 @@ - + @@ -9,118 +9,118 @@ - + ns1 - + ns2 - + __gnu_cxx - - + + A - - + + A - - + + B - - + + C - - + + D - - + + E - - + + R - + - + a : ns1::ns2::A * - + - + ns1_a : ns1::A * - + - + ns1_ns2_a : ns1::ns2::A * - + - + root_a : ::A * - + - + i : std::vector<std::uint8_t> foo(AA & aa) : void - - + + A - - + + AA diff --git a/docs/test_cases/t00047_class.svg b/docs/test_cases/t00047_class.svg index ee9de4c0..5460afe9 100644 --- a/docs/test_cases/t00047_class.svg +++ b/docs/test_cases/t00047_class.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - + + conditional_t - - + + conditional_t @@ -27,8 +27,8 @@ - - + + conditional_t @@ -37,8 +37,8 @@ - - + + conditional_t @@ -47,8 +47,8 @@ - - + + conditional_t diff --git a/docs/test_cases/t00048_class.svg b/docs/test_cases/t00048_class.svg index cd9f6346..6d23e980 100644 --- a/docs/test_cases/t00048_class.svg +++ b/docs/test_cases/t00048_class.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + Base - + - + base : int foo() = 0 : void - - + + BaseTemplate @@ -35,35 +35,35 @@ T - + - + base : T foo() = 0 : void - - + + B - + - + b : int foo() : void - - + + BTemplate @@ -71,35 +71,35 @@ T - + - + b : T foo() : void - - + + A - + - + a : int foo() : void - - + + ATemplate @@ -107,11 +107,11 @@ T - + - + a : T diff --git a/docs/test_cases/t00049_class.svg b/docs/test_cases/t00049_class.svg index 632fa443..3c4bfbbf 100644 --- a/docs/test_cases/t00049_class.svg +++ b/docs/test_cases/t00049_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + A @@ -18,17 +18,17 @@ T - + - + a : T get_a() : T & - + A @@ -36,7 +36,7 @@ intmap - + A @@ -44,7 +44,7 @@ thestring - + A @@ -52,32 +52,32 @@ string_vector - - + + R - + - + a_string : A<thestring> - + - + a_vector_string : A<string_vector> - + - + a_int_map : A<intmap> diff --git a/docs/test_cases/t00050_class.svg b/docs/test_cases/t00050_class.svg index 9b32c192..478bfc0a 100644 --- a/docs/test_cases/t00050_class.svg +++ b/docs/test_cases/t00050_class.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + A - - + + B - - + + C - - + + utils::D - - + + E @@ -52,8 +52,8 @@ E3 - - + + F @@ -61,44 +61,44 @@ T,V,int N - + - + t : T[N] - + - + v : V - - + + G - - + + NoComment - + Lorem ipsum dolor sit - + Lorem ipsum dolor sit - + Lorem ipsum dolor sit amet consectetur adipiscing elit, urna consequat felis vehicula class ultricies mollis dictumst, aenean non a in donec nulla. @@ -125,50 +125,50 @@ imperdiet praesent magnis ridiculus congue gravida curabitur dictum sagittis, enim et magna sit inceptos sodales parturient pharetra mollis, aenean vel nostra tellus commodo pretium sapien sociosqu. - + This is a short description of class G. - + This is an intermediate description of class G. - + This is a long description of class G. - + Lorem ipsum - + TODO 1. Write meaningful comment - + TODO 2. Write tests - + TODO 3. Implement - + Long comment example - + TODO Implement... - + Simple array wrapper. - + Template parameters diff --git a/docs/test_cases/t00051_class.svg b/docs/test_cases/t00051_class.svg index 79de51fe..7962fbb2 100644 --- a/docs/test_cases/t00051_class.svg +++ b/docs/test_cases/t00051_class.svg @@ -1,6 +1,6 @@ - + @@ -9,8 +9,8 @@ - - + + B @@ -18,18 +18,18 @@ F,FF - + - + f_ : F - + - + ff_ : FF @@ -39,8 +39,8 @@ f() : void ff() : void - - + + B<(lambda at ../../tests/t00051/t00051.cc:43:18),(lambda at ../../tests/t00051/t00051.cc:43:27)> @@ -53,22 +53,22 @@ ff() : void - + - + f_ : (lambda at ../../tests/t00051/t00051.cc:43:18) - + - + ff_ : (lambda at ../../tests/t00051/t00051.cc:43:27) - - + + A @@ -83,8 +83,8 @@ get_function() : (lambda at ../../tests/t00051/t00051.cc:48:16) - - + + A::custom_thread1 @@ -93,8 +93,8 @@ custom_thread1(Function && f, Args &&... args) : void - - + + A::custom_thread2 diff --git a/docs/test_cases/t20001_sequence.svg b/docs/test_cases/t20001_sequence.svg index 5f20df98..9261ef6a 100644 --- a/docs/test_cases/t20001_sequence.svg +++ b/docs/test_cases/t20001_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,59 +9,59 @@ - - - - - - - + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - - - - - + + + + + + + + add(int,int) - + wrap_add3(int,int,int) - + add3(int,int,int) - + @@ -72,7 +72,7 @@ - + @@ -81,14 +81,14 @@ - + log_result(int) - + Main test function diff --git a/docs/test_cases/t20002_sequence.svg b/docs/test_cases/t20002_sequence.svg index 2738aa27..f0d87f24 100644 --- a/docs/test_cases/t20002_sequence.svg +++ b/docs/test_cases/t20002_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,51 +9,51 @@ - - - - + + + + - - + + m1() - + m1() - - + + m2() - + m2() - - + + m3() - + m3() - - + + m4() - + m4() - - - - - + + + + + - + - + diff --git a/docs/test_cases/t20003_sequence.svg b/docs/test_cases/t20003_sequence.svg index cd4241ad..54aefa87 100644 --- a/docs/test_cases/t20003_sequence.svg +++ b/docs/test_cases/t20003_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,51 +9,51 @@ - - - - + + + + - - + + m1<T>(T) - + m1<T>(T) - - + + m2<T>(T) - + m2<T>(T) - - + + m3<T>(T) - + m3<T>(T) - - + + m4<T>(T) - + m4<T>(T) - - - - - + + + + + - + - + diff --git a/docs/test_cases/t20004_sequence.svg b/docs/test_cases/t20004_sequence.svg index 0d7f6cfa..92ce3a8b 100644 --- a/docs/test_cases/t20004_sequence.svg +++ b/docs/test_cases/t20004_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,16 +9,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -29,87 +29,87 @@ - - + + main() - + main() - - + + m1<float>(float) - + m1<float>(float) - - + + m1<unsigned long>(unsigned long) - + m1<unsigned long>(unsigned long) - - + + m4<unsigned long>(unsigned long) - + m4<unsigned long>(unsigned long) - - + + m1<std::string>(std::string) - + m1<std::string>(std::string) - - + + m2<std::string>(std::string) - + m2<std::string>(std::string) - - + + m1<int>(int) - + m1<int>(int) - - + + m2<int>(int) - + m2<int>(int) - - + + m3<int>(int) - + m3<int>(int) - - + + m4<int>(int) - + m4<int>(int) - - - - - - - - - - - + + + + + + + + + + + - + - + @@ -117,11 +117,11 @@ - + - + @@ -129,19 +129,19 @@ - + - + - + - + diff --git a/docs/test_cases/t20005_sequence.svg b/docs/test_cases/t20005_sequence.svg index c7b39f4a..78f7c400 100644 --- a/docs/test_cases/t20005_sequence.svg +++ b/docs/test_cases/t20005_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,42 +9,42 @@ - - - + + + - - + + C<T> - + C<T> - - + + B<T> - + B<T> - - + + A<T> - + A<T> - - - + + + c(T) - + b(T) - + a(T) diff --git a/docs/test_cases/t20006_sequence.svg b/docs/test_cases/t20006_sequence.svg index 0abb88c5..4c5fcb7d 100644 --- a/docs/test_cases/t20006_sequence.svg +++ b/docs/test_cases/t20006_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,22 +9,22 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -34,82 +34,82 @@ - - + + tmain() - + tmain() - - + + B<int> - + B<int> - - + + A<int> - + A<int> - - + + B<std::string> - + B<std::string> - - + + A<std::string> - + A<std::string> - - + + BB<int,int> - + BB<int,int> - - + + AA<int> - + AA<int> - - + + BB<int,std::string> - + BB<int,std::string> - - + + BB<int,float> - + BB<int,float> - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + b(int) - + a1(int) @@ -118,12 +118,12 @@ - + b(std::string) - + a2(std::string) @@ -132,59 +132,59 @@ - + bb1(int,int) - + aa1(int) - + bb2(int,int) - + aa2(int) - + bb1(int,std::string) - + aa2(int) - + bb2(int,std::string) - + aa1(int) - + bb1(int,float) - + bb2(int,float) - + aa2(int) diff --git a/docs/test_cases/t20007_sequence.svg b/docs/test_cases/t20007_sequence.svg index 0bec7169..de5b2d02 100644 --- a/docs/test_cases/t20007_sequence.svg +++ b/docs/test_cases/t20007_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,57 +9,57 @@ - - - - + + + + - - + + tmain() - + tmain() - - + + Adder<int,int> - + Adder<int,int> - - + + Adder<int,float,double> - + Adder<int,float,double> - - + + Adder<std::string,std::string,std::string> - + Adder<std::string,std::string,std::string> - - - - - + + + + + add(int &&,int &&) - + add(int &&,float &&,double &&) - + add(std::string &&,std::string &&,std::string &&) diff --git a/docs/test_cases/t20008_sequence.svg b/docs/test_cases/t20008_sequence.svg index 778e912a..7c6b8f1e 100644 --- a/docs/test_cases/t20008_sequence.svg +++ b/docs/test_cases/t20008_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,13 +9,13 @@ - - - - - - - + + + + + + + @@ -23,81 +23,81 @@ - - + + tmain() - + tmain() - - + + B<int> - + B<int> - - + + A<int> - + A<int> - - + + B<const char *> - + B<const char *> - - + + A<const char *> - + A<const char *> - - + + B<std::string> - + B<std::string> - - + + A<std::string> - + A<std::string> - - - - - - - - + + + + + + + + b(int) - + a1(int) - + b(const char *) - + a2(const char *) - + b(std::string) - + a3(std::string) diff --git a/docs/test_cases/t20009_sequence.svg b/docs/test_cases/t20009_sequence.svg index 751d78bb..173c91ac 100644 --- a/docs/test_cases/t20009_sequence.svg +++ b/docs/test_cases/t20009_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,13 +9,13 @@ - - - - - - - + + + + + + + @@ -23,81 +23,81 @@ - - + + tmain() - + tmain() - - + + B<std::string> - + B<std::string> - - + + A<std::string> - + A<std::string> - - + + B<int> - + B<int> - - + + A<int> - + A<int> - - + + B<float> - + B<float> - - + + A<float> - + A<float> - - - - - - - - + + + + + + + + b(std::string) - + a(std::string) - + b(int) - + a(int) - + b(float) - + a(float) diff --git a/docs/test_cases/t20010_sequence.svg b/docs/test_cases/t20010_sequence.svg index 89a3d2d5..6c3e2a69 100644 --- a/docs/test_cases/t20010_sequence.svg +++ b/docs/test_cases/t20010_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,81 +9,81 @@ - - - - - - - - - + + + + + + + + + - - + + tmain() - + tmain() - - + + B<int> - + B<int> - - + + A - + A - - - - - - - - - - + + + + + + + + + + b1() - + a1() - + b2() - + a2() - + b3() - + a3() - + b4() - + a4() diff --git a/docs/test_cases/t20011_sequence.svg b/docs/test_cases/t20011_sequence.svg index a1febec8..3da953c4 100644 --- a/docs/test_cases/t20011_sequence.svg +++ b/docs/test_cases/t20011_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,42 +9,42 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - - - - - - + + + + + + + + + + a(int) @@ -52,26 +52,26 @@ alt - + a(int) - + b(int) - + c(int) - + @@ -81,14 +81,14 @@ alt - + b(int) - + @@ -98,7 +98,7 @@ alt - + diff --git a/docs/test_cases/t20012_sequence.svg b/docs/test_cases/t20012_sequence.svg index 4c90e47f..623a3274 100644 --- a/docs/test_cases/t20012_sequence.svg +++ b/docs/test_cases/t20012_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,31 +9,31 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -43,122 +43,122 @@ - - + + tmain() - + tmain() - - + + tmain()::(lambda ../../tests/t20012/t20012.cc:66:20) - + tmain()::(lambda ../../tests/t20012/t20012.cc:66:20) - - + + A - + A - - + + B - + B - - + + tmain()::(lambda ../../tests/t20012/t20012.cc:79:20) - + tmain()::(lambda ../../tests/t20012/t20012.cc:79:20) - - + + C - + C - - + + R<R::(lambda ../../tests/t20012/t20012.cc:85:9)> - + R<R::(lambda ../../tests/t20012/t20012.cc:85:9)> - - + + tmain()::(lambda ../../tests/t20012/t20012.cc:85:9) - + tmain()::(lambda ../../tests/t20012/t20012.cc:85:9) - - + + D - + D - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + operator()() - + a() - + aa() - + aaa() - + b() - + bb() - + @@ -167,67 +167,67 @@ - + operator()() - + c() - + cc() - + ccc() - + operator()() - + a() - + aa() - + aaa() - + b() - + bb() - + @@ -238,29 +238,29 @@ - + r() - + operator()() - + c() - + cc() - + @@ -269,7 +269,7 @@ - + add5(int) diff --git a/docs/test_cases/t20013_sequence.svg b/docs/test_cases/t20013_sequence.svg index 5ee90a2d..5c6b9b3d 100644 --- a/docs/test_cases/t20013_sequence.svg +++ b/docs/test_cases/t20013_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,47 +9,47 @@ - - - - - - - + + + + + + + - - + + tmain(int,char **) - + tmain(int,char **) - - + + B - + B - - + + A - + A - - - - - - - - + + + + + + + + b(int) - + a1(int) @@ -58,12 +58,12 @@ - + b(double) - + a2(double) @@ -72,12 +72,12 @@ - + b(const char *) - + a3(const char *) diff --git a/docs/test_cases/t20014_sequence.svg b/docs/test_cases/t20014_sequence.svg index f27cc46b..4724e20a 100644 --- a/docs/test_cases/t20014_sequence.svg +++ b/docs/test_cases/t20014_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,56 +9,56 @@ - - - - - - - - + + + + + + + + - - + + tmain() - + tmain() - - + + B - + B - - + + A - + A - - + + C<B,int> - + C<B,int> - - - - - - - - - + + + + + + + + + b1(int,int) - + a1(int,int) @@ -67,12 +67,12 @@ - + b2(int,int) - + a2(int,int) @@ -81,17 +81,17 @@ - + c1(int,int) - + b1(int,int) - + a1(int,int) diff --git a/docs/test_cases/t20015_sequence.svg b/docs/test_cases/t20015_sequence.svg index b6544984..c139cf56 100644 --- a/docs/test_cases/t20015_sequence.svg +++ b/docs/test_cases/t20015_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + - - + + tmain() - + tmain() - - + + B - + B - - - + + + setup_a(std::shared_ptr<detail::A> &) diff --git a/docs/test_cases/t20016_sequence.svg b/docs/test_cases/t20016_sequence.svg index d79a46c1..731ef4eb 100644 --- a/docs/test_cases/t20016_sequence.svg +++ b/docs/test_cases/t20016_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,53 +9,53 @@ - - - - - + + + + + - - + + tmain() - + tmain() - - + + B<long> - + B<long> - - + + A - + A - - - - - - + + + + + + b1(long) - + a1(int) - + b2(long) - + a2(const long &) diff --git a/docs/test_cases/t20017_sequence.svg b/docs/test_cases/t20017_sequence.svg index 02f796e2..df1f4b9f 100644 --- a/docs/test_cases/t20017_sequence.svg +++ b/docs/test_cases/t20017_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,65 +9,65 @@ - - - - - - + + + + + + - + t20017.cc - + t20017.cc - + include/t20017_a.h - + include/t20017_a.h - + include/t20017_b.h - + include/t20017_b.h - - - - - - + + + + + + tmain() - + a3(int,int) - + b1(int,int) - + a2(int,int) - + a1(int,int) - + b2<int>(int,int) diff --git a/docs/test_cases/t20018_sequence.svg b/docs/test_cases/t20018_sequence.svg index 3d56f2e0..61a5f3b4 100644 --- a/docs/test_cases/t20018_sequence.svg +++ b/docs/test_cases/t20018_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,14 +9,14 @@ - - - - - - - - + + + + + + + + @@ -25,93 +25,93 @@ - - + + tmain() - + tmain() - - + + Answer<Factorial<5>,120> - + Answer<Factorial<5>,120> - - + + Factorial<5> - + Factorial<5> - - + + Factorial<4> - + Factorial<4> - - + + Factorial<3> - + Factorial<3> - - + + Factorial<2> - + Factorial<2> - - + + Factorial<1> - + Factorial<1> - - + + Factorial<0> - + Factorial<0> - - - - - - - - - + + + + + + + + + print() - + print(int) - + print(int) - + print(int) - + print(int) - + print(int) - + print(int) diff --git a/docs/test_cases/t20019_sequence.svg b/docs/test_cases/t20019_sequence.svg index bd9ca548..8fcdcbb1 100644 --- a/docs/test_cases/t20019_sequence.svg +++ b/docs/test_cases/t20019_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,95 +9,95 @@ - - - - - - - - - + + + + + + + + + - - + + tmain() - + tmain() - - + + Base<D1> - + Base<D1> - - + + D1 - + D1 - - + + Base<D2> - + Base<D2> - - + + D2 - + D2 - - - - - - - - - - + + + + + + + + + + name() - + impl() - + name() - + impl() - + name() - + impl() - + name() - + impl() diff --git a/docs/test_cases/t20020_sequence.svg b/docs/test_cases/t20020_sequence.svg index bbde7194..4540d720 100644 --- a/docs/test_cases/t20020_sequence.svg +++ b/docs/test_cases/t20020_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,78 +9,78 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - + + + - - + + tmain() - + tmain() - - + + A - + A - - + + C - + C - - + + B - + B - - + + D<int> - + D<int> - - - - - - - - - - - - - + + + + + + + + + + + + + alt - + a1() @@ -91,7 +91,7 @@ alt - + [ @@ -100,7 +100,7 @@ - + [ @@ -109,7 +109,7 @@ - + b1() @@ -117,7 +117,7 @@ - + [ @@ -126,21 +126,21 @@ - + b2() - + a4() - + log() @@ -148,7 +148,7 @@ alt - + c1() @@ -156,7 +156,7 @@ alt - + @@ -169,7 +169,7 @@ - + @@ -179,7 +179,7 @@ alt - + d1(int,int) diff --git a/docs/test_cases/t20021_sequence.svg b/docs/test_cases/t20021_sequence.svg index a1af68ff..a2cd9e19 100644 --- a/docs/test_cases/t20021_sequence.svg +++ b/docs/test_cases/t20021_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,74 +9,74 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - + + tmain() - + tmain() - - + + C - + C - - + + A - + A - - + + B - + B - - - - - - - - - - - - + + + + + + + + + + + + loop - + [ c4() ] - + @@ -89,7 +89,7 @@ - + a3() @@ -102,7 +102,7 @@ loop - + [ @@ -111,7 +111,7 @@ - + [ @@ -120,7 +120,7 @@ - + [ @@ -129,14 +129,14 @@ - + a1() - + [ @@ -148,7 +148,7 @@ loop - + b2() @@ -158,7 +158,7 @@ loop - + [ @@ -167,7 +167,7 @@ - + b2() diff --git a/docs/test_cases/t20022_sequence.svg b/docs/test_cases/t20022_sequence.svg index 957b4cc0..076b3951 100644 --- a/docs/test_cases/t20022_sequence.svg +++ b/docs/test_cases/t20022_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,39 +9,39 @@ - - - + + + - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - + + + + a() - + b() diff --git a/docs/test_cases/t20023_sequence.svg b/docs/test_cases/t20023_sequence.svg index 40d52f1b..7535f21f 100644 --- a/docs/test_cases/t20023_sequence.svg +++ b/docs/test_cases/t20023_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,37 +9,37 @@ - - - - - - - + + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - - - + + + + + + + a() @@ -47,7 +47,7 @@ try - + @@ -60,7 +60,7 @@ [std::runtime_error &] - + @@ -73,7 +73,7 @@ [std::logic_error &] - + @@ -86,7 +86,7 @@ [...] - + diff --git a/docs/test_cases/t20024_sequence.svg b/docs/test_cases/t20024_sequence.svg index c7d346fc..dc4e5ec2 100644 --- a/docs/test_cases/t20024_sequence.svg +++ b/docs/test_cases/t20024_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,23 +9,23 @@ - - - - - - - - - - - - + + + + + + + + + + + + - + @@ -33,36 +33,36 @@ - - + + tmain() - + tmain() - - + + A - + A - - + + B - + B - - - - - - - - - - - - + + + + + + + + + + + + select(enum_a) @@ -72,7 +72,7 @@ switch [zero] - + @@ -85,7 +85,7 @@ [one] - + @@ -98,7 +98,7 @@ [two] - + @@ -111,7 +111,7 @@ [default] - + @@ -124,7 +124,7 @@ - + select(colors) @@ -134,7 +134,7 @@ switch [enum colors::red] - + @@ -143,7 +143,7 @@ [enum colors::orange] - + @@ -152,7 +152,7 @@ [enum colors::green] - + @@ -161,7 +161,7 @@ [default] - + diff --git a/docs/test_cases/t20025_sequence.svg b/docs/test_cases/t20025_sequence.svg index 2b3a9220..8b681a83 100644 --- a/docs/test_cases/t20025_sequence.svg +++ b/docs/test_cases/t20025_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,41 +9,41 @@ - - - - + + + + - - + + tmain() - + tmain() - - + + A - + A - - + + add(int,int) - + add(int,int) - - - - - + + + + + a() - + @@ -52,7 +52,7 @@ - + diff --git a/docs/test_cases/t20026_sequence.svg b/docs/test_cases/t20026_sequence.svg index d7ef3896..aa655ac1 100644 --- a/docs/test_cases/t20026_sequence.svg +++ b/docs/test_cases/t20026_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + - - + + tmain() - + tmain() - - + + A - + A - - - + + + a() diff --git a/docs/test_cases/t20027_sequence.svg b/docs/test_cases/t20027_sequence.svg index 1771888c..e8de8f54 100644 --- a/docs/test_cases/t20027_sequence.svg +++ b/docs/test_cases/t20027_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,25 +9,25 @@ - - + + - - + + tmain() - + tmain() - - + + A - + A - - - + + + a() diff --git a/docs/test_cases/t20028_sequence.svg b/docs/test_cases/t20028_sequence.svg index 1dc328ef..31abf4e6 100644 --- a/docs/test_cases/t20028_sequence.svg +++ b/docs/test_cases/t20028_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,50 +9,50 @@ - - - - - - + + + + + + - - + + tmain() - + tmain() - - + + A - + A - - - - - + + + + + alt - + a() - + b() - + c() @@ -60,7 +60,7 @@ - + d() diff --git a/docs/test_cases/t20029_sequence.svg b/docs/test_cases/t20029_sequence.svg index e2110411..a7a9c258 100644 --- a/docs/test_cases/t20029_sequence.svg +++ b/docs/test_cases/t20029_sequence.svg @@ -1,6 +1,6 @@ - + @@ -9,60 +9,60 @@ - - - - - - - - - - - + + + + + + + + + + + - - + + tmain() - + tmain() - - + + Encoder<Retrier<ConnectionPool>> - + Encoder<Retrier<ConnectionPool>> - - + + Retrier<ConnectionPool> - + Retrier<ConnectionPool> - - + + ConnectionPool - + ConnectionPool - - + + encode_b64(std::string &&) - + encode_b64(std::string &&) - - - - - - - - + + + + + + + + connect() @@ -73,21 +73,21 @@ alt - + [ send(std::string &&) ] - + encode(std::string &&) - + @@ -97,7 +97,7 @@ - + send(std::string &&) @@ -108,7 +108,7 @@ alt - + [ diff --git a/docs/test_cases/t30001_package.svg b/docs/test_cases/t30001_package.svg index 4f9e5bd8..6c5ff943 100644 --- a/docs/test_cases/t30001_package.svg +++ b/docs/test_cases/t30001_package.svg @@ -1,6 +1,6 @@ - + @@ -9,63 +9,63 @@ - - + + A - - + + AA - - + + B - - + + AA - - + + AAA - - + + BBB - - + + BB - - + + AAA - - + + BBB - - + + BB - + A AAA note... - + This is namespace AA in namespace A - + This is namespace AA in namespace B diff --git a/docs/test_cases/t30002_package.svg b/docs/test_cases/t30002_package.svg index cee5be09..d5a270ac 100644 --- a/docs/test_cases/t30002_package.svg +++ b/docs/test_cases/t30002_package.svg @@ -1,6 +1,6 @@ - + @@ -9,113 +9,113 @@ - - + + A - - + + AA - - + + B - - + + BB - - + + A1 - - + + A2 - - + + A3 - - + + A4 - - + + A5 - - + + A6 - - + + A7 - - + + A8 - - + + A9 - - + + A10 - - + + A11 - - + + A12 - - + + A13 - - + + A14 - - + + A15 - - + + A16 - - + + A17 - - + + BBB diff --git a/docs/test_cases/t30003_package.svg b/docs/test_cases/t30003_package.svg index cf51a6ac..0aa0afeb 100644 --- a/docs/test_cases/t30003_package.svg +++ b/docs/test_cases/t30003_package.svg @@ -1,6 +1,6 @@ - + @@ -9,35 +9,35 @@ - - + + ns1 - - + + ns3 «deprecated» - - + + ns1 - - + + ns2_v1_0_0 - - + + ns2_v0_9_0 «deprecated» - - + + ns2 diff --git a/docs/test_cases/t30004_package.svg b/docs/test_cases/t30004_package.svg index 04e57506..fb8d365e 100644 --- a/docs/test_cases/t30004_package.svg +++ b/docs/test_cases/t30004_package.svg @@ -1,6 +1,6 @@ - + @@ -9,40 +9,40 @@ - - + + A - + Package AAA. - + Package BBB. - + CCCC package note. - + We skipped DDD. - - + + AAA - - + + BBB - - + + CCC - - + + EEE diff --git a/docs/test_cases/t30005_package.svg b/docs/test_cases/t30005_package.svg index d8093ab3..d18a8636 100644 --- a/docs/test_cases/t30005_package.svg +++ b/docs/test_cases/t30005_package.svg @@ -1,6 +1,6 @@ - + @@ -9,48 +9,48 @@ - - + + A - - + + AA - - + + B - - + + BB - - + + C - - + + CC - - + + AAA - - + + BBB - - + + CCC diff --git a/docs/test_cases/t30006_package.svg b/docs/test_cases/t30006_package.svg index 6aee8ee9..09d071cc 100644 --- a/docs/test_cases/t30006_package.svg +++ b/docs/test_cases/t30006_package.svg @@ -1,6 +1,6 @@ - + @@ -9,22 +9,22 @@ - - + + B - - + + A - - + + C - + Top A note. diff --git a/docs/test_cases/t30007_package.svg b/docs/test_cases/t30007_package.svg index 638284d5..2b90a795 100644 --- a/docs/test_cases/t30007_package.svg +++ b/docs/test_cases/t30007_package.svg @@ -1,6 +1,6 @@ - + @@ -9,27 +9,27 @@ - - + + A - - + + B - - + + AA - - + + C - + Compare layout with t30006. diff --git a/docs/test_cases/t30008_package.svg b/docs/test_cases/t30008_package.svg index 2110d401..b0638b65 100644 --- a/docs/test_cases/t30008_package.svg +++ b/docs/test_cases/t30008_package.svg @@ -1,6 +1,6 @@ - + @@ -9,43 +9,43 @@ - - + + dependants - - + + dependencies - - + + A - - + + B - - + + C - - + + D - - + + E - - + + F diff --git a/docs/test_cases/t40001_include.svg b/docs/test_cases/t40001_include.svg index 30988840..881ecdfb 100644 --- a/docs/test_cases/t40001_include.svg +++ b/docs/test_cases/t40001_include.svg @@ -1,6 +1,6 @@ - + @@ -9,43 +9,43 @@ - + src - + include - + lib1 - - + + t40001.cc - - + + t40001_include1.h - - + + lib1.h - + string - + vector - + yaml-cpp/yaml.h - + This is a lib1 include dir - + This is a t40001_include1.h include file diff --git a/docs/test_cases/t40002_include.svg b/docs/test_cases/t40002_include.svg index f0e6921c..090258c7 100644 --- a/docs/test_cases/t40002_include.svg +++ b/docs/test_cases/t40002_include.svg @@ -1,6 +1,6 @@ - + @@ -9,46 +9,46 @@ - + src - + lib1 - + lib2 - + include - + lib1 - + lib2 - - + + t40002.cc - - + + lib1.cc - - + + lib2.cc - - + + lib1.h - - + + lib2.h diff --git a/docs/test_cases/t40003_include.svg b/docs/test_cases/t40003_include.svg index 0fa9fc42..f893732f 100644 --- a/docs/test_cases/t40003_include.svg +++ b/docs/test_cases/t40003_include.svg @@ -1,6 +1,6 @@ - + @@ -9,66 +9,66 @@ - + src - + dependants - + dependencies - + include - + dependants - + dependencies - - + + t1.cc - - + + t2.cc - - + + t3.h - - + + t2.h - - + + t1.h - - + + t3.h - - + + t2.h - - + + t1.h - - + + t5.h