Move xml tools to uptr, start adding test setup.
This commit is contained in:
parent
8771b721d1
commit
e0eccba62f
14 changed files with 44 additions and 9 deletions
|
@ -9,3 +9,4 @@ link_libraries(stdc++fs)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(apps)
|
add_subdirectory(apps)
|
||||||
|
add_subdirectory(test)
|
|
@ -1,9 +1,10 @@
|
||||||
list(APPEND web_LIB_INCLUDES
|
list(APPEND web_LIB_INCLUDES
|
||||||
xml/XmlParser.cpp
|
xml/XmlParser.cpp
|
||||||
xml/XmlDocument.cpp
|
xml/XmlDocument.cpp
|
||||||
xml/XmlElement.cpp
|
xml/XmlWriter.cpp
|
||||||
xml/XmlAttribute.cpp
|
xml/xml-elements/XmlElement.cpp
|
||||||
xml/XmlProlog.cpp
|
xml/xml-elements/XmlAttribute.cpp
|
||||||
|
xml/xml-elements/XmlProlog.cpp
|
||||||
markdown/MarkdownParser.cpp
|
markdown/MarkdownParser.cpp
|
||||||
html/HtmlWriter.cpp
|
html/HtmlWriter.cpp
|
||||||
html/HtmlDocument.cpp
|
html/HtmlDocument.cpp
|
||||||
|
@ -18,6 +19,7 @@ target_include_directories(web PUBLIC
|
||||||
"${PROJECT_SOURCE_DIR}/src/core/file_utilities"
|
"${PROJECT_SOURCE_DIR}/src/core/file_utilities"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/xml"
|
"${CMAKE_CURRENT_SOURCE_DIR}/xml"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/xml/xml-elements"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/html"
|
"${CMAKE_CURRENT_SOURCE_DIR}/html"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/markdown"
|
"${CMAKE_CURRENT_SOURCE_DIR}/markdown"
|
||||||
)
|
)
|
|
@ -1,6 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "XmlElement.h"
|
|
||||||
|
#include "../xml/xml-elements/XmlElement.h"
|
||||||
|
|
||||||
class HtmlElement : public XmlElement
|
class HtmlElement : public XmlElement
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "XmlElement.h"
|
|
||||||
#include "XmlProlog.h"
|
#include "xml-elements/XmlElement.h"
|
||||||
|
#include "xml-elements/XmlProlog.h"
|
||||||
|
|
||||||
class XmlDocument
|
class XmlDocument
|
||||||
{
|
{
|
||||||
|
|
6
src/web/xml/XmlWriter.cpp
Normal file
6
src/web/xml/XmlWriter.cpp
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
#include "XmlWriter.h"
|
||||||
|
|
||||||
|
void XmlWriter::Write(File* file, XmlDocument* document)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
12
src/web/xml/XmlWriter.h
Normal file
12
src/web/xml/XmlWriter.h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "File.h"
|
||||||
|
#include "XmlDocument.h"
|
||||||
|
|
||||||
|
class XmlWriter
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
XmlWriter() = default;
|
||||||
|
|
||||||
|
void Write(File* file, XmlDocument* document);
|
||||||
|
};
|
|
@ -2,7 +2,8 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "XmlAttribute.h"
|
|
||||||
|
#include "xml-elements/XmlAttribute.h"
|
||||||
|
|
||||||
class XmlElement
|
class XmlElement
|
||||||
{
|
{
|
|
@ -1,7 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "XmlElement.h"
|
|
||||||
|
#include "xml-elements/XmlElement.h"
|
||||||
|
|
||||||
class XmlProlog : public XmlElement
|
class XmlProlog : public XmlElement
|
||||||
{
|
{
|
6
test/CMakeLists.txt
Normal file
6
test/CMakeLists.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
add_executable(test_runner test_runner.cpp)
|
||||||
|
target_include_directories(test_runner PUBLIC
|
||||||
|
"${PROJECT_SOURCE_DIR}/test/"
|
||||||
|
)
|
||||||
|
target_link_libraries(test_runner PUBLIC core
|
||||||
|
network database geometry audio graphics web)
|
4
test/test_runner.cpp
Normal file
4
test/test_runner.cpp
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in a new issue