Compare commits
2 commits
a0b221f103
...
f15db30fb9
Author | SHA1 | Date | |
---|---|---|---|
f15db30fb9 | |||
410ee18a5c |
5 changed files with 12 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
||||||
if(NOT TARGET pugixml-static)
|
if(NOT TARGET pugixml::static)
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
|
|
|
@ -12,7 +12,7 @@ target_link_libraries(Kanimaji
|
||||||
KVGToolsCommon
|
KVGToolsCommon
|
||||||
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
pugixml-static
|
pugixml::static
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(Kanimaji
|
target_include_directories(Kanimaji
|
||||||
|
|
|
@ -17,7 +17,7 @@ target_link_libraries(Tablegen
|
||||||
KVGToolsCommon
|
KVGToolsCommon
|
||||||
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
pugixml-static
|
pugixml::static
|
||||||
)
|
)
|
||||||
|
|
||||||
target_sources(Tablegen
|
target_sources(Tablegen
|
||||||
|
|
|
@ -12,17 +12,18 @@
|
||||||
|
|
||||||
namespace Tablegen
|
namespace Tablegen
|
||||||
{
|
{
|
||||||
std::string GeneratePage(std::vector<CharacterInfo> characters,
|
std::string GeneratePage(const std::vector<CharacterInfo>& characters,
|
||||||
const Settings& settings = Settings::Default());
|
const Settings& settings = Settings::Default());
|
||||||
|
|
||||||
void GeneratePage(const std::string& path, std::vector<CharacterInfo> characters,
|
void GeneratePage(const std::string& path, const std::vector<CharacterInfo>& characters,
|
||||||
const Settings& settings = Settings::Default());
|
const Settings& settings = Settings::Default());
|
||||||
|
|
||||||
# ifdef TABLEGEN_EXPOSE_XML
|
# ifdef TABLEGEN_EXPOSE_XML
|
||||||
void GenerateAsChild(pugi::xml_node& node, std::vector<CharacterInfo> characters,
|
void GenerateAsChild(pugi::xml_node& node, const std::vector<CharacterInfo>& characters,
|
||||||
const Settings& settings = Settings::Default());
|
const Settings& settings = Settings::Default());
|
||||||
|
|
||||||
pugi::xml_document GenerateDocument(std::vector<CharacterInfo> characters, const Settings& settings = Settings::Default());
|
pugi::xml_document GenerateDocument(const std::vector<CharacterInfo>& characters,
|
||||||
|
const Settings& settings = Settings::Default());
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ namespace Tablegen
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GeneratePage(std::vector<CharacterInfo> characters, const Settings& settings)
|
std::string GeneratePage(const std::vector<CharacterInfo>& characters, const Settings& settings)
|
||||||
{
|
{
|
||||||
pugi::xml_document doc = GenerateDocument(characters, settings);
|
pugi::xml_document doc = GenerateDocument(characters, settings);
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ namespace Tablegen
|
||||||
return str.str();
|
return str.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneratePage(const std::string& path, std::vector<CharacterInfo> characters,
|
void GeneratePage(const std::string& path, const std::vector<CharacterInfo>& characters,
|
||||||
const Settings& settings)
|
const Settings& settings)
|
||||||
{
|
{
|
||||||
pugi::xml_document doc = GenerateDocument(characters, settings);
|
pugi::xml_document doc = GenerateDocument(characters, settings);
|
||||||
|
@ -116,7 +116,7 @@ namespace Tablegen
|
||||||
doc.save_file("test.html", " ", formatOptions);
|
doc.save_file("test.html", " ", formatOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenerateAsChild(pugi::xml_node& node, std::vector<CharacterInfo> characters,
|
void GenerateAsChild(pugi::xml_node& node, const std::vector<CharacterInfo>& characters,
|
||||||
const Settings& settings)
|
const Settings& settings)
|
||||||
{
|
{
|
||||||
pugi::xml_node tableRoot = node;
|
pugi::xml_node tableRoot = node;
|
||||||
|
@ -203,7 +203,7 @@ namespace Tablegen
|
||||||
script.append_child(pugi::node_pcdata).set_value(Script(indent, tagIndent, buttons));
|
script.append_child(pugi::node_pcdata).set_value(Script(indent, tagIndent, buttons));
|
||||||
}
|
}
|
||||||
|
|
||||||
pugi::xml_document GenerateDocument(std::vector<CharacterInfo> characters,
|
pugi::xml_document GenerateDocument(const std::vector<CharacterInfo>& characters,
|
||||||
const Settings& settings)
|
const Settings& settings)
|
||||||
{
|
{
|
||||||
pugi::xml_document doc;
|
pugi::xml_document doc;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue