Add PDF writer.
This commit is contained in:
parent
c05b7b6315
commit
9c116b1efd
72 changed files with 1819 additions and 114 deletions
|
@ -25,15 +25,6 @@ target_include_directories(sample_console PUBLIC
|
|||
)
|
||||
target_link_libraries(sample_console PUBLIC console core network
|
||||
database geometry audio web)
|
||||
|
||||
# Xml practice
|
||||
add_executable(xml_practice xml-practice.cpp)
|
||||
target_include_directories(xml_practice PUBLIC
|
||||
"${PROJECT_SOURCE_DIR}/src/core"
|
||||
"${PROJECT_SOURCE_DIR}/src/web/xml"
|
||||
)
|
||||
target_link_libraries(xml_practice PUBLIC core web)
|
||||
|
||||
set_property(TARGET sample_console PROPERTY FOLDER apps)
|
||||
set_property(TARGET sample_gui PROPERTY FOLDER apps)
|
||||
set_property(TARGET xml_practice PROPERTY FOLDER apps)
|
||||
set_property(TARGET sample_gui PROPERTY FOLDER apps)
|
|
@ -1,38 +0,0 @@
|
|||
#include <filesystem>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include "CommandLineArgs.h"
|
||||
#include "XmlParser.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
CommandLineArgs command_line_args;
|
||||
command_line_args.Process(argc, argv);
|
||||
|
||||
if(command_line_args.GetNumberOfArgs() < 2)
|
||||
{
|
||||
std::cerr << "Expected a filepath argument" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
XmlParser parser;
|
||||
const auto filepath = command_line_args.GetArg(1);
|
||||
|
||||
if(!std::filesystem::exists(filepath))
|
||||
{
|
||||
std::cerr << "Couldn't find file: " << filepath << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::ifstream xml_file;
|
||||
xml_file.open(filepath, std::ifstream::in);
|
||||
while(xml_file.good())
|
||||
{
|
||||
std::string line;
|
||||
std::getline(xml_file, line);
|
||||
parser.ProcessLine(line);
|
||||
}
|
||||
xml_file.close();
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue