8#ifndef SEN_LIBS_GEN_TEST_PLANTUML_FIXTURE_TEST_H
9#define SEN_LIBS_GEN_TEST_PLANTUML_FIXTURE_TEST_H
21#include <gtest/gtest.h>
38 statements_ = parser.
parse();
43 if (resolver.
resolve({}) ==
nullptr)
52 void generateFom(
const std::vector<std::filesystem::path>& paths,
60 [[nodiscard]] std::size_t
find(
const std::string& phrase, std::size_t from = 0)
const
62 return content_.find(phrase, from);
65 [[nodiscard]] std::string
content()
const {
return content_; }
70 std::vector<sen::lang::StlStatement> statements_;
Definition plantuml_fixture_test.h:30
std::filesystem::path dataDirectoryPath() const
Definition plantuml_fixture_test.h:67
std::size_t find(const std::string &phrase, std::size_t from=0) const
Definition plantuml_fixture_test.h:60
bool generateStl(const std::string &stl, sen::gen::PlantUMLGenerationMode generationMode=sen::gen::PlantUMLGenerationMode::all, sen::gen::PlantUMLEnumMode enumMode=sen::gen::PlantUMLEnumMode::all)
Definition plantuml_fixture_test.h:32
void generateFom(const std::vector< std::filesystem::path > &paths, sen::gen::PlantUMLGenerationMode generationMode=sen::gen::PlantUMLGenerationMode::all, sen::gen::PlantUMLEnumMode enumMode=sen::gen::PlantUMLEnumMode::all)
Definition plantuml_fixture_test.h:52
std::string content() const
Definition plantuml_fixture_test.h:65
Renders PlantUML class diagrams out of sen type sets. Stateful (caches the loaded inja templates),...
Definition plantuml.h:38
std::string generate(const sen::lang::TypeSetContext &typeSets, PlantUMLGenerationMode generationMode, PlantUMLEnumMode enumMode)
Renders one PlantUML document covering every type set in the supplied context. The two mode parameter...
Parses STL types and queries out of a list of tokens.
Definition stl_parser.h:30
std::vector< StlStatement > parse()
Parse the tokens given in the constructor into a set of statements.
Resolves a list of statements into a set of types.
Definition stl_resolver.h:102
const TypeSet * resolve(const TypeSettings &settings)
Do the resolution based on the inputs passed on the constructor.
Converts a string into a list of tokens.
Definition stl_scanner.h:31
const StlTokenList & scanTokens()
Scans the string. Throws in case of error.
The set of types used during resolution.
Definition stl_resolver.h:51
PlantUMLEnumMode
Controls whether enum types contribute their enumerators to the rendered diagram.
Definition plantuml.h:30
PlantUMLGenerationMode
Selects which subset of the type set ends up in the rendered diagram.
Definition plantuml.h:22
@ all
Definition plantuml.h:31
@ all
Definition plantuml.h:23
TypeSetContext parseFomDocuments(const std::vector< std::filesystem::path > &paths, const std::vector< std::filesystem::path > &mappings, const TypeSettings &settings)
Definition fom_parser.h:52
The environment where a resolution takes place.
Definition stl_resolver.h:43
Definition stl_resolver.h:95