Skip to content

Commit

Permalink
Move Core/XML into clanXML. See XMLResourceFactory to enable XML reso…
Browse files Browse the repository at this point in the history
…urce management for clanSound and clanDisplay
  • Loading branch information
rombust committed Sep 29, 2015
1 parent fc3963e commit 4a0274a
Show file tree
Hide file tree
Showing 114 changed files with 489 additions and 307 deletions.
1 change: 1 addition & 0 deletions Examples/Display_Text/Language/Sources/precomp.h
Expand Up @@ -5,4 +5,5 @@
#include <ClanLib/display.h>
#include <ClanLib/d3d.h>
#include <ClanLib/gl.h>
#include <ClanLib/xml.h>
#include <cmath>
15 changes: 15 additions & 0 deletions Setup/Unix/pkgconfig/clanXML.pc.in
@@ -0,0 +1,15 @@
# pkg-config Metadata for clanXML

prefix=@prefix@
exec_prefix=${prefix}
libdir=@libdir@
includedir=${prefix}/include/ClanLib-@LT_RELEASE@

Name: clanUI
Description: XML support for ClanLib
Version: @VERSION@
Requires: clanCore-@LT_RELEASE@ = @VERSION@
Libs: -L${libdir} -lclan@CLANLIB_RELEASE@XML @extra_LIBS_clanXML@
Cflags: -I${includedir} @extra_CFLAGS_clanXML@

# EOF #
9 changes: 9 additions & 0 deletions Setup/VisualStudio/Win32/wizard.cpp
Expand Up @@ -320,6 +320,14 @@ Workspace Wizard::create_workspace(bool target_android)
libs_list_release,
libs_list_debug, ignore_list);

Project clanXML(
"XML",
"clanXML",
"xml.h",
libs_list_shared,
libs_list_release,
libs_list_debug, ignore_list);


// Add projects to workspace:
workspace.projects.push_back(clanCore);
Expand All @@ -329,6 +337,7 @@ Workspace Wizard::create_workspace(bool target_android)
workspace.projects.push_back(clanSound);
workspace.projects.push_back(clanGL);
workspace.projects.push_back(clanUI);
workspace.projects.push_back(clanXML);

if (!target_android)
{
Expand Down
54 changes: 29 additions & 25 deletions Sources/API/Makefile.am
Expand Up @@ -69,31 +69,6 @@ clanCore_includes = \
Core/System/userdata.h \
Core/System/work_queue.h \
Core/System/comptr.h \
Core/XML/xml_tokenizer.h \
Core/XML/dom_named_node_map.h \
Core/XML/dom_node_list.h \
Core/XML/dom_attr.h \
Core/XML/dom_notation.h \
Core/XML/dom_comment.h \
Core/XML/dom_string.h \
Core/XML/dom_character_data.h \
Core/XML/xpath_evaluator.h \
Core/XML/xpath_exception.h \
Core/XML/dom_entity_reference.h \
Core/XML/xml_token.h \
Core/XML/dom_processing_instruction.h \
Core/XML/dom_document_fragment.h \
Core/XML/xml_writer.h \
Core/XML/dom_document_type.h \
Core/XML/dom_element.h \
Core/XML/dom_entity.h \
Core/XML/dom_exception.h \
Core/XML/xpath_object.h \
Core/XML/dom_cdata_section.h \
Core/XML/dom_node.h \
Core/XML/dom_text.h \
Core/XML/dom_implementation.h \
Core/XML/dom_document.h \
Core/Zip/zip_reader.h \
Core/Zip/zlib_compression.h \
Core/Zip/zip_archive.h \
Expand Down Expand Up @@ -192,6 +167,35 @@ clanCore_includes = \
Core/Crypto/sha224.h \
Core/Crypto/sha512.h

clanXML_includes = \
xml.h \
XML/xml_tokenizer.h \
XML/dom_named_node_map.h \
XML/dom_node_list.h \
XML/dom_attr.h \
XML/dom_notation.h \
XML/dom_comment.h \
XML/dom_string.h \
XML/dom_character_data.h \
XML/xpath_evaluator.h \
XML/xpath_exception.h \
XML/dom_entity_reference.h \
XML/xml_token.h \
XML/dom_processing_instruction.h \
XML/dom_document_fragment.h \
XML/xml_writer.h \
XML/dom_document_type.h \
XML/dom_element.h \
XML/dom_entity.h \
XML/dom_exception.h \
XML/xpath_object.h \
XML/dom_cdata_section.h \
XML/dom_node.h \
XML/dom_text.h \
XML/dom_implementation.h \
XML/dom_document.h \
XML/resource_factory.h

clanDisplay_includes = \
display.h \
d3d.h \
Expand Down
Expand Up @@ -29,7 +29,7 @@
#pragma once

#include "../Resources/xml_resource_node.h"
#include "../IOData/file_system.h"
#include "../../Core/IOData/file_system.h"
#include <vector>
#include <memory>

Expand Down
Expand Up @@ -29,7 +29,7 @@
#pragma once

#include "../Resources/xml_resource_document.h"
#include "../IOData/file_system.h"
#include "../../Core/IOData/file_system.h"
#include <memory>

namespace clan
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -29,7 +29,7 @@

#pragma once

#include "../System/exception.h"
#include "../Core/System/exception.h"

namespace clan
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 0 additions & 27 deletions Sources/API/core.h
Expand Up @@ -80,36 +80,9 @@
#include "Core/Resources/resource_container.h"
#include "Core/Resources/resource_object.h"
#include "Core/Resources/resource_manager.h"
#include "Core/Resources/xml_resource_node.h"
#include "Core/Resources/xml_resource_document.h"
#include "Core/Resources/xml_resource_manager.h"
#include "Core/Resources/file_resource_document.h"
#include "Core/Resources/file_resource_manager.h"
#include "Core/JSON/json_value.h"
#include "Core/XML/dom_processing_instruction.h"
#include "Core/XML/dom_entity_reference.h"
#include "Core/XML/dom_notation.h"
#include "Core/XML/dom_exception.h"
#include "Core/XML/dom_cdata_section.h"
#include "Core/XML/dom_document_fragment.h"
#include "Core/XML/dom_comment.h"
#include "Core/XML/dom_attr.h"
#include "Core/XML/dom_entity.h"
#include "Core/XML/dom_document_type.h"
#include "Core/XML/dom_document.h"
#include "Core/XML/dom_implementation.h"
#include "Core/XML/dom_node_list.h"
#include "Core/XML/dom_text.h"
#include "Core/XML/dom_node.h"
#include "Core/XML/dom_character_data.h"
#include "Core/XML/dom_named_node_map.h"
#include "Core/XML/dom_element.h"
#include "Core/XML/dom_string.h"
#include "Core/XML/xml_tokenizer.h"
#include "Core/XML/xml_writer.h"
#include "Core/XML/xml_token.h"
#include "Core/XML/xpath_evaluator.h"
#include "Core/XML/xpath_object.h"
#include "Core/IOData/file.h"
#include "Core/IOData/file_help.h"
#include "Core/IOData/path_help.h"
Expand Down
96 changes: 96 additions & 0 deletions Sources/API/xml.h
@@ -0,0 +1,96 @@
/*
** ClanLib SDK
** Copyright (c) 1997-2015 The ClanLib Team
**
** This software is provided 'as-is', without any express or implied
** warranty. In no event will the authors be held liable for any damages
** arising from the use of this software.
**
** Permission is granted to anyone to use this software for any purpose,
** including commercial applications, and to alter it and redistribute it
** freely, subject to the following restrictions:
**
** 1. The origin of this software must not be misrepresented; you must not
** claim that you wrote the original software. If you use this software
** in a product, an acknowledgment in the product documentation would be
** appreciated but is not required.
** 2. Altered source versions must be plainly marked as such, and must not be
** misrepresented as being the original software.
** 3. This notice may not be removed or altered from any source distribution.
**
** Note: Some of the libraries ClanLib may link to may have additional
** requirements or restrictions.
**
** File Author(s):
**
** Magnus Norddahl
*/

/// \brief <p>XML Put Text Here</p>
//! Global=XML

#pragma once

#ifdef WIN32
#pragma warning( disable : 4786)
#endif

#ifdef __cplusplus_cli
#pragma managed(push, off)
#endif

#include "XML/dom_processing_instruction.h"
#include "XML/dom_entity_reference.h"
#include "XML/dom_notation.h"
#include "XML/dom_exception.h"
#include "XML/dom_cdata_section.h"
#include "XML/dom_document_fragment.h"
#include "XML/dom_comment.h"
#include "XML/dom_attr.h"
#include "XML/dom_entity.h"
#include "XML/dom_document_type.h"
#include "XML/dom_document.h"
#include "XML/dom_implementation.h"
#include "XML/dom_node_list.h"
#include "XML/dom_text.h"
#include "XML/dom_node.h"
#include "XML/dom_character_data.h"
#include "XML/dom_named_node_map.h"
#include "XML/dom_element.h"
#include "XML/dom_string.h"
#include "XML/xml_tokenizer.h"
#include "XML/xml_writer.h"
#include "XML/xml_token.h"
#include "XML/xpath_evaluator.h"
#include "XML/xpath_object.h"
#include "XML/Resources/resource_factory.h"
#include "XML/Resources/xml_resource_node.h"
#include "XML/Resources/xml_resource_document.h"
#include "XML/Resources/xml_resource_manager.h"

#ifdef __cplusplus_cli
#pragma managed(pop)
#endif

#if defined(_MSC_VER)
#if !defined(_MT)
#error Your application is set to link with the single-threaded version of the run-time library. Go to project settings, in the C++ section, and change it to multi-threaded.
#endif
#if !defined(_DEBUG)
#if defined(DLL)
#pragma comment(lib, "clanXML-dll.lib")
#elif defined(_DLL)
#pragma comment(lib, "clanXML-static-mtdll.lib")
#else
#pragma comment(lib, "clanXML-static-mt.lib")
#endif
#else
#if defined(DLL)
#pragma comment(lib, "clanXML-dll-debug.lib")
#elif defined(_DLL)
#pragma comment(lib, "clanXML-static-mtdll-debug.lib")
#else
#pragma comment(lib, "clanXML-static-mt-debug.lib")
#endif
#endif
#endif
27 changes: 0 additions & 27 deletions Sources/Core/Makefile.am
Expand Up @@ -20,31 +20,6 @@ System/detect_cpu_ext.cpp \
System/disposable_object.cpp \
System/service.cpp \
System/thread_local_storage_impl.cpp \
XML/xml_writer.cpp \
XML/dom_exception.cpp \
XML/dom_entity.cpp \
XML/xpath_evaluator.cpp \
XML/dom_document.cpp \
XML/dom_cdata_section.cpp \
XML/dom_text.cpp \
XML/dom_comment.cpp \
XML/dom_document_type.cpp \
XML/dom_notation.cpp \
XML/dom_document_generic.cpp \
XML/dom_processing_instruction.cpp \
XML/dom_named_node_map.cpp \
XML/dom_entity_reference.cpp \
XML/dom_element.cpp \
XML/xpath_object.cpp \
XML/dom_node.cpp \
XML/xpath_exception.cpp \
XML/dom_character_data.cpp \
XML/dom_attr.cpp \
XML/dom_implementation.cpp \
XML/xml_tokenizer.cpp \
XML/dom_node_list.cpp \
XML/dom_document_fragment.cpp \
XML/xpath_evaluator_impl.cpp \
Zip/zip_iodevice_fileentry.cpp \
Zip/zip_64_end_of_central_directory_locator.cpp \
Zip/zip_file_header.cpp \
Expand Down Expand Up @@ -125,8 +100,6 @@ IOData/iodevice_provider_file.cpp \
IOData/file_system.cpp \
Resources/xml_resource_node.cpp \
Resources/file_resource_manager.cpp \
Resources/xml_resource_manager.cpp \
Resources/xml_resource_document.cpp \
Resources/resource_manager.cpp \
Resources/file_resource_document.cpp \
Crypto/sha384.cpp \
Expand Down
2 changes: 0 additions & 2 deletions Sources/Display/2D/image.cpp
Expand Up @@ -35,10 +35,8 @@
#include "API/Display/Render/graphic_context.h"
#include "API/Display/Render/texture_2d.h"
#include "API/Display/Resources/display_cache.h"
#include "API/Core/XML/dom_element.h"
#include "API/Core/Text/string_help.h"
#include "API/Core/Math/quad.h"
#include "API/Core/Resources/xml_resource_document.h"
#include "render_batch_triangle.h"
#include "../Render/graphic_context_impl.h"
#include "canvas_impl.h"
Expand Down
2 changes: 0 additions & 2 deletions Sources/Display/2D/sprite.cpp
Expand Up @@ -31,8 +31,6 @@
#include "Display/precomp.h"
#include "API/Core/IOData/file_system.h"
#include "API/Core/IOData/path_help.h"
#include "API/Core/Resources/xml_resource_node.h"
#include "API/Core/XML/dom_element.h"
#include "API/Core/Text/string_help.h"
#include "API/Core/Text/string_format.h"
#include "API/Display/2D/sprite.h"
Expand Down
1 change: 0 additions & 1 deletion Sources/Display/2D/sprite_impl.cpp
Expand Up @@ -34,7 +34,6 @@
#include "API/Core/Math/cl_math.h"
#include "API/Core/Text/string_help.h"
#include "API/Core/Text/string_format.h"
#include "API/Core/XML/dom_element.h"
#include "API/Core/System/system.h"
#include "Display/Render/graphic_context_impl.h"
#include <list>
Expand Down
1 change: 0 additions & 1 deletion Sources/Display/Font/FontDraw/font_draw_flat.cpp
Expand Up @@ -34,7 +34,6 @@
#include "API/Core/Text/string_help.h"
#include "API/Core/Text/string_format.h"
#include "API/Core/Text/utf8_reader.h"
#include "API/Core/XML/dom_element.h"
#include "API/Display/2D/canvas.h"
#include "API/Display/2D/path.h"
#include "API/Display/Resources/display_cache.h"
Expand Down
1 change: 0 additions & 1 deletion Sources/Display/Font/FontDraw/font_draw_path.cpp
Expand Up @@ -34,7 +34,6 @@
#include "API/Core/Text/string_help.h"
#include "API/Core/Text/string_format.h"
#include "API/Core/Text/utf8_reader.h"
#include "API/Core/XML/dom_element.h"
#include "API/Display/2D/canvas.h"
#include "API/Display/2D/path.h"
#include "API/Display/Resources/display_cache.h"
Expand Down
1 change: 0 additions & 1 deletion Sources/Display/Font/FontDraw/font_draw_scaled.cpp
Expand Up @@ -34,7 +34,6 @@
#include "API/Core/Text/string_help.h"
#include "API/Core/Text/string_format.h"
#include "API/Core/Text/utf8_reader.h"
#include "API/Core/XML/dom_element.h"
#include "API/Display/2D/canvas.h"
#include "API/Display/2D/path.h"
#include "API/Display/Resources/display_cache.h"
Expand Down
1 change: 0 additions & 1 deletion Sources/Display/Font/FontDraw/font_draw_subpixel.cpp
Expand Up @@ -34,7 +34,6 @@
#include "API/Core/Text/string_help.h"
#include "API/Core/Text/string_format.h"
#include "API/Core/Text/utf8_reader.h"
#include "API/Core/XML/dom_element.h"
#include "API/Display/2D/canvas.h"
#include "API/Display/2D/path.h"
#include "API/Display/Resources/display_cache.h"
Expand Down
1 change: 0 additions & 1 deletion Sources/Display/Font/font.cpp
Expand Up @@ -35,7 +35,6 @@
#include "API/Core/Text/string_help.h"
#include "API/Core/Text/string_format.h"
#include "API/Core/Text/utf8_reader.h"
#include "API/Core/XML/dom_element.h"
#include "API/Display/2D/canvas.h"
#include "API/Display/Resources/display_cache.h"
#include "font_impl.h"
Expand Down
1 change: 0 additions & 1 deletion Sources/Display/Font/font_family.cpp
Expand Up @@ -35,7 +35,6 @@
#include "API/Core/Text/string_help.h"
#include "API/Core/Text/string_format.h"
#include "API/Core/Text/utf8_reader.h"
#include "API/Core/XML/dom_element.h"
#include "API/Display/2D/canvas.h"
#include "API/Display/Resources/display_cache.h"
#include "font_family_impl.h"
Expand Down
1 change: 0 additions & 1 deletion Sources/Display/Font/font_family_impl.cpp
Expand Up @@ -37,7 +37,6 @@
#include "API/Core/Text/string_help.h"
#include "API/Core/Text/string_format.h"
#include "API/Core/Text/utf8_reader.h"
#include "API/Core/XML/dom_element.h"
#include "API/Display/2D/canvas.h"
#include "API/Display/2D/path.h"
#include "API/Display/Resources/display_cache.h"
Expand Down

0 comments on commit 4a0274a

Please sign in to comment.