mirror of
https://github.com/holub/mame
synced 2025-04-09 18:17:44 +03:00
-Switch to building MAME as C++17.
* Updated sol2 to 3.2.2 * Updated pugixml to 1.10 * Increased minimum clang version to 6 * Cleaned up some stuff that can use new features
This commit is contained in:
parent
4db7f0439c
commit
55b8ca317a
2
3rdparty/pugixml/.codecov.yml
vendored
2
3rdparty/pugixml/.codecov.yml
vendored
@ -1,2 +0,0 @@
|
||||
comment: false
|
||||
|
2
3rdparty/pugixml/.gitignore
vendored
2
3rdparty/pugixml/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
build/
|
||||
.vscode/
|
16
3rdparty/pugixml/.travis.yml
vendored
16
3rdparty/pugixml/.travis.yml
vendored
@ -1,16 +0,0 @@
|
||||
language: cpp
|
||||
sudo: required
|
||||
dist: trusty
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
env:
|
||||
- DEFINES=standard
|
||||
- DEFINES=PUGIXML_WCHAR_MODE
|
||||
- DEFINES=PUGIXML_COMPACT
|
||||
script:
|
||||
- make test cxxstd=c++11 defines=$DEFINES config=coverage -j2
|
||||
- make test cxxstd=c++11 defines=$DEFINES config=release -j2
|
||||
- make test cxxstd=c++98 defines=$DEFINES config=debug -j2
|
||||
|
||||
after_success: bash <(curl -s https://codecov.io/bash) -f pugixml.cpp.gcov
|
84
3rdparty/pugixml/CMakeLists.txt
vendored
84
3rdparty/pugixml/CMakeLists.txt
vendored
@ -1,10 +1,12 @@
|
||||
project(pugixml)
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
project(pugixml VERSION 1.10)
|
||||
|
||||
option(BUILD_SHARED_AND_STATIC_LIBS "Build both shared and static libraries" OFF)
|
||||
option(BUILD_SHARED_LIBS "Build shared instead of static library" OFF)
|
||||
option(BUILD_TESTS "Build tests" OFF)
|
||||
option(BUILD_PKGCONFIG "Build in PKGCONFIG mode" OFF)
|
||||
option(USE_VERSIONED_LIBDIR "Use a private subdirectory to install the headers and libs" OFF)
|
||||
option(USE_POSTFIX "Use separate postfix for each configuration to make sure you can install multiple build outputs" OFF)
|
||||
|
||||
set(BUILD_DEFINES "" CACHE STRING "Build defines")
|
||||
|
||||
@ -28,7 +30,7 @@ include(GNUInstallDirs)
|
||||
mark_as_advanced(CLEAR CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR)
|
||||
|
||||
set(HEADERS src/pugixml.hpp src/pugiconfig.hpp)
|
||||
set(SOURCES ${HEADERS} src/pugixml.cpp)
|
||||
set(SOURCES src/pugixml.cpp)
|
||||
|
||||
if(DEFINED BUILD_DEFINES)
|
||||
foreach(DEFINE ${BUILD_DEFINES})
|
||||
@ -36,36 +38,64 @@ if(DEFINED BUILD_DEFINES)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
add_library(pugixml SHARED ${SOURCES})
|
||||
if(BUILD_SHARED_AND_STATIC_LIBS)
|
||||
set(LIBRARY pugixml-static pugixml-shared)
|
||||
else()
|
||||
add_library(pugixml STATIC ${SOURCES})
|
||||
set(LIBRARY pugixml)
|
||||
endif()
|
||||
|
||||
# Enable C++11 long long for compilers that are capable of it
|
||||
if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1 AND ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_long_long_type;")
|
||||
target_compile_features(pugixml PUBLIC cxx_long_long_type)
|
||||
if(BUILD_SHARED_AND_STATIC_LIBS)
|
||||
add_library(pugixml-static STATIC ${HEADERS} ${SOURCES})
|
||||
add_library(pugixml-shared SHARED ${HEADERS} ${SOURCES})
|
||||
else()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
add_library(pugixml SHARED ${HEADERS} ${SOURCES})
|
||||
else()
|
||||
add_library(pugixml STATIC ${HEADERS} ${SOURCES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_target_properties(pugixml PROPERTIES VERSION 1.7 SOVERSION 1)
|
||||
get_target_property(PUGIXML_VERSION_STRING pugixml VERSION)
|
||||
# Export symbols for shared library builds
|
||||
if(BUILD_SHARED_AND_STATIC_LIBS AND MSVC)
|
||||
target_compile_definitions(pugixml-shared PRIVATE "PUGIXML_API=__declspec(dllexport)")
|
||||
endif()
|
||||
|
||||
if(BUILD_PKGCONFIG)
|
||||
if(BUILD_SHARED_LIBS AND MSVC)
|
||||
target_compile_definitions(pugixml PRIVATE "PUGIXML_API=__declspec(dllexport)")
|
||||
endif()
|
||||
|
||||
if(USE_VERSIONED_LIBDIR)
|
||||
# Install library into its own directory under LIBDIR
|
||||
set(INSTALL_SUFFIX /pugixml-${PUGIXML_VERSION_STRING})
|
||||
set(INSTALL_SUFFIX /pugixml-${pugixml_VERSION})
|
||||
endif()
|
||||
|
||||
install(TARGETS pugixml EXPORT pugixml-config
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
foreach(TARGET ${LIBRARY})
|
||||
# Enable C++11 long long for compilers that are capable of it
|
||||
if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1 AND ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_long_long_type;")
|
||||
target_compile_features(${TARGET} PUBLIC cxx_long_long_type)
|
||||
endif()
|
||||
|
||||
set_target_properties(${TARGET} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
|
||||
|
||||
target_include_directories(${TARGET} PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX}>)
|
||||
|
||||
if(USE_POSTFIX)
|
||||
set_target_properties(${TARGET} PROPERTIES DEBUG_POSTFIX "_d" MINSIZEREL_POSTFIX "_m" RELWITHDEBINFO_POSTFIX "_r")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
install(TARGETS ${LIBRARY} EXPORT pugixml-config
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${INSTALL_SUFFIX}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
install(FILES ${HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${INSTALL_SUFFIX})
|
||||
install(EXPORT pugixml-config DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml)
|
||||
|
||||
if(BUILD_PKGCONFIG)
|
||||
configure_file(scripts/pugixml.pc.in ${PROJECT_BINARY_DIR}/pugixml.pc @ONLY)
|
||||
install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig)
|
||||
endif()
|
||||
configure_file(scripts/pugixml.pc.in ${PROJECT_BINARY_DIR}/pugixml.pc @ONLY)
|
||||
install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig)
|
||||
|
||||
if(BUILD_TESTS)
|
||||
file(GLOB TEST_SOURCES tests/*.cpp)
|
||||
@ -73,6 +103,10 @@ if(BUILD_TESTS)
|
||||
list(REMOVE_ITEM TEST_SOURCES ${FUZZ_SOURCES})
|
||||
|
||||
add_executable(check ${TEST_SOURCES})
|
||||
target_link_libraries(check pugixml)
|
||||
add_custom_command(TARGET check POST_BUILD COMMAND check WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||
endif()
|
||||
if(BUILD_SHARED_AND_STATIC_LIBS)
|
||||
target_link_libraries(check pugixml-static)
|
||||
else()
|
||||
target_link_libraries(check pugixml)
|
||||
endif()
|
||||
add_custom_command(TARGET check POST_BUILD COMMAND check WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif()
|
||||
|
100
3rdparty/pugixml/Makefile
vendored
100
3rdparty/pugixml/Makefile
vendored
@ -1,100 +0,0 @@
|
||||
.SUFFIXES:
|
||||
MAKEFLAGS+=-r
|
||||
|
||||
config=debug
|
||||
defines=standard
|
||||
cxxstd=c++11
|
||||
# set cxxstd=any to disable use of -std=...
|
||||
|
||||
BUILD=build/make-$(CXX)-$(config)-$(defines)-$(cxxstd)
|
||||
|
||||
SOURCES=src/pugixml.cpp $(filter-out tests/fuzz_%,$(wildcard tests/*.cpp))
|
||||
EXECUTABLE=$(BUILD)/test
|
||||
|
||||
VERSION=$(shell sed -n 's/.*version \(.*\).*/\1/p' src/pugiconfig.hpp)
|
||||
RELEASE=$(shell git ls-files src docs/*.html docs/*.css docs/samples docs/images scripts contrib CMakeLists.txt readme.txt)
|
||||
|
||||
CXXFLAGS=-g -Wall -Wextra -Werror -pedantic -Wundef -Wshadow -Wcast-align -Wcast-qual -Wold-style-cast
|
||||
LDFLAGS=
|
||||
|
||||
ifeq ($(config),release)
|
||||
CXXFLAGS+=-O3 -DNDEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(config),coverage)
|
||||
CXXFLAGS+=-coverage
|
||||
LDFLAGS+=-coverage
|
||||
endif
|
||||
|
||||
ifeq ($(config),sanitize)
|
||||
CXXFLAGS+=-fsanitize=address
|
||||
LDFLAGS+=-fsanitize=address
|
||||
|
||||
ifneq ($(shell uname),Darwin)
|
||||
CXXFLAGS+=-fsanitize=undefined
|
||||
LDFLAGS+=-fsanitize=undefined
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(config),analyze)
|
||||
CXXFLAGS+=--analyze
|
||||
endif
|
||||
|
||||
ifneq ($(defines),standard)
|
||||
COMMA=,
|
||||
CXXFLAGS+=-D $(subst $(COMMA), -D ,$(defines))
|
||||
endif
|
||||
|
||||
ifneq ($(findstring PUGIXML_NO_EXCEPTIONS,$(defines)),)
|
||||
CXXFLAGS+=-fno-exceptions
|
||||
endif
|
||||
|
||||
ifneq ($(cxxstd),any)
|
||||
CXXFLAGS+=-std=$(cxxstd)
|
||||
endif
|
||||
|
||||
OBJECTS=$(SOURCES:%=$(BUILD)/%.o)
|
||||
|
||||
all: $(EXECUTABLE)
|
||||
|
||||
ifeq ($(config),coverage)
|
||||
test: $(EXECUTABLE)
|
||||
-@find $(BUILD) -name '*.gcda' -exec rm {} +
|
||||
./$(EXECUTABLE)
|
||||
@gcov -o $(BUILD)/src/ pugixml.cpp.gcda | sed -e '/./{H;$!d;}' -e 'x;/pugixml.cpp/!d;'
|
||||
@find . -name '*.gcov' -and -not -name 'pugixml.cpp.gcov' -exec rm {} +
|
||||
else
|
||||
test: $(EXECUTABLE)
|
||||
./$(EXECUTABLE)
|
||||
endif
|
||||
|
||||
fuzz:
|
||||
@mkdir -p $(BUILD)
|
||||
$(AFL)/afl-clang++ tests/fuzz_parse.cpp tests/allocator.cpp src/pugixml.cpp $(CXXFLAGS) -o $(BUILD)/fuzz_parse
|
||||
$(AFL)/afl-fuzz -i tests/data_fuzz_parse -o $(BUILD)/fuzz_parse_out -x $(AFL)/testcases/_extras/xml/ -- $(BUILD)/fuzz_parse @@
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILD)
|
||||
|
||||
release: build/pugixml-$(VERSION).tar.gz build/pugixml-$(VERSION).zip
|
||||
|
||||
docs: docs/quickstart.html docs/manual.html
|
||||
|
||||
build/pugixml-%: .FORCE | $(RELEASE)
|
||||
@mkdir -p $(BUILD)
|
||||
perl tests/archive.pl $@ $|
|
||||
|
||||
$(EXECUTABLE): $(OBJECTS)
|
||||
$(CXX) $(OBJECTS) $(LDFLAGS) -o $@
|
||||
|
||||
$(BUILD)/%.o: %
|
||||
@mkdir -p $(dir $@)
|
||||
$(CXX) $< $(CXXFLAGS) -c -MMD -MP -o $@
|
||||
|
||||
-include $(OBJECTS:.o=.d)
|
||||
|
||||
.SECONDEXPANSION:
|
||||
docs/%.html: docs/%.adoc $$(shell sed -n 's/include\:\:\(.*\)\[.*/docs\/\1/p' docs/%.adoc)
|
||||
asciidoctor -b html5 -a version=$(VERSION) $< -o $@
|
||||
|
||||
.PHONY: all test clean release .FORCE
|
44
3rdparty/pugixml/README.md
vendored
44
3rdparty/pugixml/README.md
vendored
@ -1,44 +0,0 @@
|
||||
pugixml [](https://travis-ci.org/zeux/pugixml) [](https://ci.appveyor.com/project/zeux/pugixml) [](http://codecov.io/github/zeux/pugixml?branch=master)
|
||||
=======
|
||||
|
||||
pugixml is a C++ XML processing library, which consists of a DOM-like interface with rich traversal/modification
|
||||
capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0
|
||||
implementation for complex data-driven tree queries. Full Unicode support is also available, with Unicode interface
|
||||
variants and conversions between different Unicode encodings (which happen automatically during parsing/saving).
|
||||
|
||||
pugixml is used by a lot of projects, both open-source and proprietary, for performance and easy-to-use interface.
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation for the current release of pugixml is available on-line as two separate documents:
|
||||
|
||||
* [Quick-start guide](http://pugixml.org/docs/quickstart.html), that aims to provide enough information to start using the library;
|
||||
* [Complete reference manual](http://pugixml.org/docs/manual.html), that describes all features of the library in detail.
|
||||
|
||||
You’re advised to start with the quick-start guide; however, many important library features are either not described in it at all or only mentioned briefly; if you require more information you should read the complete manual.
|
||||
|
||||
## License
|
||||
This library is available to anybody free of charge, under the terms of MIT License:
|
||||
|
||||
Copyright (c) 2006-2016 Arseny Kapoulkine
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
16
3rdparty/pugixml/appveyor.yml
vendored
16
3rdparty/pugixml/appveyor.yml
vendored
@ -1,16 +0,0 @@
|
||||
version: "{branch}-{build}"
|
||||
|
||||
install:
|
||||
- ps: (new-object net.webclient).DownloadFile('http://coapp.org/files/CoApp.Tools.Powershell.msi', 'C:\CoApp.Tools.Powershell.msi')
|
||||
- ps: Start-Process -FilePath msiexec -ArgumentList /i, 'C:\CoApp.Tools.Powershell.msi', /quiet -Wait
|
||||
- ps: $env:PSModulePath = $env:PSModulePath + ';C:\Program Files (x86)\Outercurve Foundation\Modules'
|
||||
- ps: Import-Module CoApp
|
||||
|
||||
build_script:
|
||||
- ps: .\scripts\nuget_build.bat
|
||||
|
||||
test_script:
|
||||
- ps: .\tests\autotest-appveyor.ps1
|
||||
|
||||
artifacts:
|
||||
- path: .\scripts\*.nupkg
|
63
3rdparty/pugixml/contrib/foreach.hpp
vendored
63
3rdparty/pugixml/contrib/foreach.hpp
vendored
@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Boost.Foreach support for pugixml classes.
|
||||
* This file is provided to the public domain.
|
||||
* Written by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
*/
|
||||
|
||||
#ifndef HEADER_PUGIXML_FOREACH_HPP
|
||||
#define HEADER_PUGIXML_FOREACH_HPP
|
||||
|
||||
#include <boost/range/iterator.hpp>
|
||||
|
||||
#include "pugixml.hpp"
|
||||
|
||||
/*
|
||||
* These types add support for BOOST_FOREACH macro to xml_node and xml_document classes (child iteration only).
|
||||
* Example usage:
|
||||
* BOOST_FOREACH(xml_node n, doc) {}
|
||||
*/
|
||||
|
||||
namespace boost
|
||||
{
|
||||
template<> struct range_mutable_iterator<pugi::xml_node>
|
||||
{
|
||||
typedef pugi::xml_node::iterator type;
|
||||
};
|
||||
|
||||
template<> struct range_const_iterator<pugi::xml_node>
|
||||
{
|
||||
typedef pugi::xml_node::iterator type;
|
||||
};
|
||||
|
||||
template<> struct range_mutable_iterator<pugi::xml_document>
|
||||
{
|
||||
typedef pugi::xml_document::iterator type;
|
||||
};
|
||||
|
||||
template<> struct range_const_iterator<pugi::xml_document>
|
||||
{
|
||||
typedef pugi::xml_document::iterator type;
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* These types add support for BOOST_FOREACH macro to xml_node and xml_document classes (child/attribute iteration).
|
||||
* Example usage:
|
||||
* BOOST_FOREACH(xml_node n, children(doc)) {}
|
||||
* BOOST_FOREACH(xml_node n, attributes(doc)) {}
|
||||
*/
|
||||
|
||||
namespace pugi
|
||||
{
|
||||
inline xml_object_range<xml_node_iterator> children(const pugi::xml_node& node)
|
||||
{
|
||||
return node.children();
|
||||
}
|
||||
|
||||
inline xml_object_range<xml_attribute_iterator> attributes(const pugi::xml_node& node)
|
||||
{
|
||||
return node.attributes();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
7
3rdparty/pugixml/docs/config.adoc
vendored
7
3rdparty/pugixml/docs/config.adoc
vendored
@ -1,7 +0,0 @@
|
||||
website <http://pugixml.org>; repository <http://github.com/zeux/pugixml>
|
||||
:toc: right
|
||||
:source-highlighter: pygments
|
||||
:source-language: c++
|
||||
:sectanchors:
|
||||
:sectlinks:
|
||||
:imagesdir: images
|
BIN
3rdparty/pugixml/docs/images/dom_tree.png
vendored
BIN
3rdparty/pugixml/docs/images/dom_tree.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 24 KiB |
2993
3rdparty/pugixml/docs/manual.adoc
vendored
2993
3rdparty/pugixml/docs/manual.adoc
vendored
File diff suppressed because it is too large
Load Diff
1330
3rdparty/pugixml/docs/manual.html
vendored
1330
3rdparty/pugixml/docs/manual.html
vendored
File diff suppressed because it is too large
Load Diff
287
3rdparty/pugixml/docs/quickstart.adoc
vendored
287
3rdparty/pugixml/docs/quickstart.adoc
vendored
@ -1,287 +0,0 @@
|
||||
= pugixml {version} quick start guide
|
||||
include::config.adoc[]
|
||||
|
||||
[[introduction]]
|
||||
== Introduction
|
||||
|
||||
http://pugixml.org/[pugixml] is a light-weight C{plus}{plus} XML processing library. It consists of a DOM-like interface with rich traversal/modification capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 implementation for complex data-driven tree queries. Full Unicode support is also available, with two Unicode interface variants and conversions between different Unicode encodings (which happen automatically during parsing/saving). The library is extremely portable and easy to integrate and use. pugixml is developed and maintained since 2006 and has many users. All code is distributed under the <<license,MIT license>>, making it completely free to use in both open-source and proprietary applications.
|
||||
|
||||
pugixml enables very fast, convenient and memory-efficient XML document processing. However, since pugixml has a DOM parser, it can't process XML documents that do not fit in memory; also the parser is a non-validating one, so if you need DTD/Schema validation, the library is not for you.
|
||||
|
||||
This is the quick start guide for pugixml, which purpose is to enable you to start using the library quickly. Many important library features are either not described at all or only mentioned briefly; for more complete information you link:manual.html[should read the complete manual].
|
||||
|
||||
NOTE: No documentation is perfect; neither is this one. If you find errors or omissions, please don’t hesitate to https://github.com/zeux/pugixml/issues/new[submit an issue or open a pull request] with a fix.
|
||||
|
||||
[[install]]
|
||||
== Installation
|
||||
|
||||
You can download the latest source distribution as an archive:
|
||||
|
||||
https://github.com/zeux/pugixml/releases/download/v{version}/pugixml-{version}.zip[pugixml-{version}.zip] (Windows line endings)
|
||||
/
|
||||
https://github.com/zeux/pugixml/releases/download/v{version}/pugixml-{version}.tar.gz[pugixml-{version}.tar.gz] (Unix line endings)
|
||||
|
||||
The distribution contains library source, documentation (the guide you're reading now and the manual) and some code examples. After downloading the distribution, install pugixml by extracting all files from the compressed archive.
|
||||
|
||||
The complete pugixml source consists of three files - one source file, `pugixml.cpp`, and two header files, `pugixml.hpp` and `pugiconfig.hpp`. `pugixml.hpp` is the primary header which you need to include in order to use pugixml classes/functions. The rest of this guide assumes that `pugixml.hpp` is either in the current directory or in one of include directories of your projects, so that `#include "pugixml.hpp"` can find the header; however you can also use relative path (i.e. `#include "../libs/pugixml/src/pugixml.hpp"`) or include directory-relative path (i.e. `#include <xml/thirdparty/pugixml/src/pugixml.hpp>`).
|
||||
|
||||
The easiest way to build pugixml is to compile the source file, `pugixml.cpp`, along with the existing library/executable. This process depends on the method of building your application; for example, if you're using Microsoft Visual Studio footnote:[All trademarks used are properties of their respective owners.], Apple Xcode, Code::Blocks or any other IDE, just add `pugixml.cpp` to one of your projects. There are other building methods available, including building pugixml as a standalone static/shared library; link:manual.html#install.building[read the manual] for further information.
|
||||
|
||||
[[dom]]
|
||||
== Document object model
|
||||
|
||||
pugixml stores XML data in DOM-like way: the entire XML document (both document structure and element data) is stored in memory as a tree. The tree can be loaded from character stream (file, string, C{plus}{plus} I/O stream), then traversed via special API or XPath expressions. The whole tree is mutable: both node structure and node/attribute data can be changed at any time. Finally, the result of document transformations can be saved to a character stream (file, C{plus}{plus} I/O stream or custom transport).
|
||||
|
||||
The root of the tree is the document itself, which corresponds to C{plus}{plus} type `xml_document`. Document has one or more child nodes, which correspond to C{plus}{plus} type `xml_node`. Nodes have different types; depending on a type, a node can have a collection of child nodes, a collection of attributes, which correspond to C{plus}{plus} type `xml_attribute`, and some additional data (i.e. name).
|
||||
|
||||
The most common node types are:
|
||||
|
||||
* Document node (`node_document`) - this is the root of the tree, which consists of several child nodes. This node corresponds to `xml_document` class; note that `xml_document` is a sub-class of `xml_node`, so the entire node interface is also available.
|
||||
|
||||
* Element/tag node (`node_element`) - this is the most common type of node, which represents XML elements. Element nodes have a name, a collection of attributes and a collection of child nodes (both of which may be empty). The attribute is a simple name/value pair.
|
||||
|
||||
* Plain character data nodes (`node_pcdata`) represent plain text in XML. PCDATA nodes have a value, but do not have name or children/attributes. Note that *plain character data is not a part of the element node but instead has its own node*; for example, an element node can have several child PCDATA nodes.
|
||||
|
||||
Despite the fact that there are several node types, there are only three C{plus}{plus} types representing the tree (`xml_document`, `xml_node`, `xml_attribute`); some operations on `xml_node` are only valid for certain node types. They are described below.
|
||||
|
||||
NOTE: All pugixml classes and functions are located in `pugi` namespace; you have to either use explicit name qualification (i.e. `pugi::xml_node`), or to gain access to relevant symbols via `using` directive (i.e. `using pugi::xml_node;` or `using namespace pugi;`).
|
||||
|
||||
`xml_document` is the owner of the entire document structure; destroying the document destroys the whole tree. The interface of `xml_document` consists of loading functions, saving functions and the entire interface of `xml_node`, which allows for document inspection and/or modification. Note that while `xml_document` is a sub-class of `xml_node`, `xml_node` is not a polymorphic type; the inheritance is present only to simplify usage.
|
||||
|
||||
`xml_node` is the handle to document node; it can point to any node in the document, including document itself. There is a common interface for nodes of all types. Note that `xml_node` is only a handle to the actual node, not the node itself - you can have several `xml_node` handles pointing to the same underlying object. Destroying `xml_node` handle does not destroy the node and does not remove it from the tree.
|
||||
|
||||
There is a special value of `xml_node` type, known as null node or empty node. It does not correspond to any node in any document, and thus resembles null pointer. However, all operations are defined on empty nodes; generally the operations don't do anything and return empty nodes/attributes or empty strings as their result. This is useful for chaining calls; i.e. you can get the grandparent of a node like so: `node.parent().parent()`; if a node is a null node or it does not have a parent, the first `parent()` call returns null node; the second `parent()` call then also returns null node, so you don't have to check for errors twice. You can test if a handle is null via implicit boolean cast: `if (node) { ... }` or `if (!node) { ... }`.
|
||||
|
||||
`xml_attribute` is the handle to an XML attribute; it has the same semantics as `xml_node`, i.e. there can be several `xml_attribute` handles pointing to the same underlying object and there is a special null attribute value, which propagates to function results.
|
||||
|
||||
There are two choices of interface and internal representation when configuring pugixml: you can either choose the UTF-8 (also called char) interface or UTF-16/32 (also called wchar_t) one. The choice is controlled via `PUGIXML_WCHAR_MODE` define; you can set it via `pugiconfig.hpp` or via preprocessor options. All tree functions that work with strings work with either C-style null terminated strings or STL strings of the selected character type. link:manual/dom.html#dom.unicode[Read the manual] for additional information on Unicode interface.
|
||||
|
||||
[[loading]]
|
||||
== Loading document
|
||||
|
||||
pugixml provides several functions for loading XML data from various places - files, C{plus}{plus} iostreams, memory buffers. All functions use an extremely fast non-validating parser. This parser is not fully W3C conformant - it can load any valid XML document, but does not perform some well-formedness checks. While considerable effort is made to reject invalid XML documents, some validation is not performed because of performance reasons. XML data is always converted to internal character format before parsing. pugixml supports all popular Unicode encodings (UTF-8, UTF-16 (big and little endian), UTF-32 (big and little endian); UCS-2 is naturally supported since it's a strict subset of UTF-16) and handles all encoding conversions automatically.
|
||||
|
||||
The most common source of XML data is files; pugixml provides a separate function for loading XML document from file. This function accepts file path as its first argument, and also two optional arguments, which specify parsing options and input data encoding, which are described in the manual.
|
||||
|
||||
This is an example of loading XML document from file (link:samples/load_file.cpp[]):
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/load_file.cpp[tags=code]
|
||||
----
|
||||
|
||||
`load_file`, as well as other loading functions, destroys the existing document tree and then tries to load the new tree from the specified file. The result of the operation is returned in an `xml_parse_result` object; this object contains the operation status, and the related information (i.e. last successfully parsed position in the input file, if parsing fails).
|
||||
|
||||
Parsing result object can be implicitly converted to `bool`; if you do not want to handle parsing errors thoroughly, you can just check the return value of load functions as if it was a `bool`: `if (doc.load_file("file.xml")) { ... } else { ... }`. Otherwise you can use the `status` member to get parsing status, or the `description()` member function to get the status in a string form.
|
||||
|
||||
This is an example of handling loading errors (link:samples/load_error_handling.cpp[]):
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/load_error_handling.cpp[tags=code]
|
||||
----
|
||||
|
||||
Sometimes XML data should be loaded from some other source than file, i.e. HTTP URL; also you may want to load XML data from file using non-standard functions, i.e. to use your virtual file system facilities or to load XML from gzip-compressed files. These scenarios either require loading document from memory, in which case you should prepare a contiguous memory block with all XML data and to pass it to one of buffer loading functions, or loading document from C{plus}{plus} IOstream, in which case you should provide an object which implements `std::istream` or `std::wistream` interface.
|
||||
|
||||
There are different functions for loading document from memory; they treat the passed buffer as either an immutable one (`load_buffer`), a mutable buffer which is owned by the caller (`load_buffer_inplace`), or a mutable buffer which ownership belongs to pugixml (`load_buffer_inplace_own`). There is also a simple helper function, `xml_document::load`, for cases when you want to load the XML document from null-terminated character string.
|
||||
|
||||
This is an example of loading XML document from memory using one of these functions (link:samples/load_memory.cpp[]); read the sample code for more examples:
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/load_memory.cpp[tags=decl]
|
||||
----
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/load_memory.cpp[tags=load_buffer_inplace_begin]
|
||||
|
||||
include::samples/load_memory.cpp[tags=load_buffer_inplace_end]
|
||||
----
|
||||
|
||||
This is a simple example of loading XML document from file using streams (link:samples/load_stream.cpp[]); read the sample code for more complex examples involving wide streams and locales:
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/load_stream.cpp[tags=code]
|
||||
----
|
||||
|
||||
[[access]]
|
||||
== Accessing document data
|
||||
|
||||
pugixml features an extensive interface for getting various types of data from the document and for traversing the document. You can use various accessors to get node/attribute data, you can traverse the child node/attribute lists via accessors or iterators, you can do depth-first traversals with `xml_tree_walker` objects, and you can use XPath for complex data-driven queries.
|
||||
|
||||
You can get node or attribute name via `name()` accessor, and value via `value()` accessor. Note that both functions never return null pointers - they either return a string with the relevant content, or an empty string if name/value is absent or if the handle is null. Also there are two notable things for reading values:
|
||||
|
||||
* It is common to store data as text contents of some node - i.e. `<node><description>This is a node</description></node>`. In this case, `<description>` node does not have a value, but instead has a child of type `node_pcdata` with value `"This is a node"`. pugixml provides `child_value()` and `text()` helper functions to parse such data.
|
||||
|
||||
* In many cases attribute values have types that are not strings - i.e. an attribute may always contain values that should be treated as integers, despite the fact that they are represented as strings in XML. pugixml provides several accessors that convert attribute value to some other type.
|
||||
|
||||
This is an example of using these functions (link:samples/traverse_base.cpp[]):
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/traverse_base.cpp[tags=data]
|
||||
----
|
||||
|
||||
Since a lot of document traversal consists of finding the node/attribute with the correct name, there are special functions for that purpose. For example, `child("Tool")` returns the first node which has the name `"Tool"`, or null handle if there is no such node. This is an example of using such functions (link:samples/traverse_base.cpp[]):
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/traverse_base.cpp[tags=contents]
|
||||
----
|
||||
|
||||
Child node lists and attribute lists are simply double-linked lists; while you can use `previous_sibling`/`next_sibling` and other such functions for iteration, pugixml additionally provides node and attribute iterators, so that you can treat nodes as containers of other nodes or attributes. All iterators are bidirectional and support all usual iterator operations. The iterators are invalidated if the node/attribute objects they're pointing to are removed from the tree; adding nodes/attributes does not invalidate any iterators.
|
||||
|
||||
Here is an example of using iterators for document traversal (link:samples/traverse_iter.cpp[]):
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/traverse_iter.cpp[tags=code]
|
||||
----
|
||||
|
||||
If your C{plus}{plus} compiler supports range-based for-loop (this is a C{plus}{plus}11 feature, at the time of writing it's supported by Microsoft Visual Studio 11 Beta, GCC 4.6 and Clang 3.0), you can use it to enumerate nodes/attributes. Additional helpers are provided to support this; note that they are also compatible with http://www.boost.org/libs/foreach/[Boost Foreach], and possibly other pre-C{plus}{plus}11 foreach facilities.
|
||||
|
||||
Here is an example of using C{plus}{plus}11 range-based for loop for document traversal (link:samples/traverse_rangefor.cpp[]):
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/traverse_rangefor.cpp[tags=code]
|
||||
----
|
||||
|
||||
The methods described above allow traversal of immediate children of some node; if you want to do a deep tree traversal, you'll have to do it via a recursive function or some equivalent method. However, pugixml provides a helper for depth-first traversal of a subtree. In order to use it, you have to implement `xml_tree_walker` interface and to call `traverse` function.
|
||||
|
||||
This is an example of traversing tree hierarchy with xml_tree_walker (link:samples/traverse_walker.cpp[]):
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/traverse_walker.cpp[tags=impl]
|
||||
----
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/traverse_walker.cpp[tags=traverse]
|
||||
----
|
||||
|
||||
Finally, for complex queries often a higher-level DSL is needed. pugixml provides an implementation of XPath 1.0 language for such queries. The complete description of XPath usage can be found in the manual, but here are some examples:
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/xpath_select.cpp[tags=code]
|
||||
----
|
||||
|
||||
CAUTION: XPath functions throw `xpath_exception` objects on error; the sample above does not catch these exceptions.
|
||||
|
||||
[[modify]]
|
||||
== Modifying document data
|
||||
|
||||
The document in pugixml is fully mutable: you can completely change the document structure and modify the data of nodes/attributes. All functions take care of memory management and structural integrity themselves, so they always result in structurally valid tree - however, it is possible to create an invalid XML tree (for example, by adding two attributes with the same name or by setting attribute/node name to empty/invalid string). Tree modification is optimized for performance and for memory consumption, so if you have enough memory you can create documents from scratch with pugixml and later save them to file/stream instead of relying on error-prone manual text writing and without too much overhead.
|
||||
|
||||
All member functions that change node/attribute data or structure are non-constant and thus can not be called on constant handles. However, you can easily convert constant handle to non-constant one by simple assignment: `void foo(const pugi::xml_node& n) { pugi::xml_node nc = n; }`, so const-correctness here mainly provides additional documentation.
|
||||
|
||||
As discussed before, nodes can have name and value, both of which are strings. Depending on node type, name or value may be absent. You can use `set_name` and `set_value` member functions to set them. Similar functions are available for attributes; however, the `set_value` function is overloaded for some other types except strings, like floating-point numbers. Also, attribute value can be set using an assignment operator. This is an example of setting node/attribute name and value (link:samples/modify_base.cpp[]):
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/modify_base.cpp[tags=node]
|
||||
----
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/modify_base.cpp[tags=attr]
|
||||
----
|
||||
|
||||
Nodes and attributes do not exist without a document tree, so you can't create them without adding them to some document. A node or attribute can be created at the end of node/attribute list or before/after some other node. All insertion functions return the handle to newly created object on success, and null handle on failure. Even if the operation fails (for example, if you're trying to add a child node to PCDATA node), the document remains in consistent state, but the requested node/attribute is not added.
|
||||
|
||||
CAUTION: `attribute()` and `child()` functions do not add attributes or nodes to the tree, so code like `node.attribute("id") = 123;` will not do anything if `node` does not have an attribute with name `"id"`. Make sure you're operating with existing attributes/nodes by adding them if necessary.
|
||||
|
||||
This is an example of adding new attributes/nodes to the document (link:samples/modify_add.cpp[]):
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/modify_add.cpp[tags=code]
|
||||
----
|
||||
|
||||
If you do not want your document to contain some node or attribute, you can remove it with `remove_attribute` and `remove_child` functions. Removing the attribute or node invalidates all handles to the same underlying object, and also invalidates all iterators pointing to the same object. Removing node also invalidates all past-the-end iterators to its attribute or child node list. Be careful to ensure that all such handles and iterators either do not exist or are not used after the attribute/node is removed.
|
||||
|
||||
This is an example of removing attributes/nodes from the document (link:samples/modify_remove.cpp[]):
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/modify_remove.cpp[tags=code]
|
||||
----
|
||||
|
||||
[[saving]]
|
||||
== Saving document
|
||||
|
||||
Often after creating a new document or loading the existing one and processing it, it is necessary to save the result back to file. Also it is occasionally useful to output the whole document or a subtree to some stream; use cases include debug printing, serialization via network or other text-oriented medium, etc. pugixml provides several functions to output any subtree of the document to a file, stream or another generic transport interface; these functions allow to customize the output format, and also perform necessary encoding conversions.
|
||||
|
||||
Before writing to the destination the node/attribute data is properly formatted according to the node type; all special XML symbols, such as < and &, are properly escaped. In order to guard against forgotten node/attribute names, empty node/attribute names are printed as `":anonymous"`. For well-formed output, make sure all node and attribute names are set to meaningful values.
|
||||
|
||||
If you want to save the whole document to a file, you can use the `save_file` function, which returns `true` on success. This is a simple example of saving XML document to file (link:samples/save_file.cpp[]):
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/save_file.cpp[tags=code]
|
||||
----
|
||||
|
||||
To enhance interoperability pugixml provides functions for saving document to any object which implements C{plus}{plus} `std::ostream` interface. This allows you to save documents to any standard C{plus}{plus} stream (i.e. file stream) or any third-party compliant implementation (i.e. Boost Iostreams). Most notably, this allows for easy debug output, since you can use `std::cout` stream as saving target. There are two functions, one works with narrow character streams, another handles wide character ones.
|
||||
|
||||
This is a simple example of saving XML document to standard output (link:samples/save_stream.cpp[]):
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/save_stream.cpp[tags=code]
|
||||
----
|
||||
|
||||
All of the above saving functions are implemented in terms of writer interface. This is a simple interface with a single function, which is called several times during output process with chunks of document data as input. In order to output the document via some custom transport, for example sockets, you should create an object which implements `xml_writer_file` interface and pass it to `xml_document::save` function.
|
||||
|
||||
This is a simple example of custom writer for saving document data to STL string (link:samples/save_custom_writer.cpp[]); read the sample code for more complex examples:
|
||||
|
||||
[source,indent=0]
|
||||
----
|
||||
include::samples/save_custom_writer.cpp[tags=code]
|
||||
----
|
||||
|
||||
While the previously described functions save the whole document to the destination, it is easy to save a single subtree. Instead of calling `xml_document::save`, just call `xml_node::print` function on the target node. You can save node contents to C{plus}{plus} IOstream object or custom writer in this way. Saving a subtree slightly differs from saving the whole document; link:manual/saving.html#saving.subtree[read the manual] for more information.
|
||||
|
||||
[[feedback]]
|
||||
== Feedback
|
||||
|
||||
If you believe you've found a bug in pugixml, please file an issue via https://github.com/zeux/pugixml/issues/new[issue submission form]. Be sure to include the relevant information so that the bug can be reproduced: the version of pugixml, compiler version and target architecture, the code that uses pugixml and exhibits the bug, etc. Feature requests and contributions can be filed as issues, too.
|
||||
|
||||
If filing an issue is not possible due to privacy or other concerns, you can contact pugixml author by e-mail directly: arseny.kapoulkine@gmail.com.
|
||||
|
||||
[[license]]
|
||||
== License
|
||||
|
||||
The pugixml library is distributed under the MIT license:
|
||||
|
||||
....
|
||||
Copyright (c) 2006-2016 Arseny Kapoulkine
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
....
|
||||
|
||||
This means that you can freely use pugixml in your applications, both open-source and proprietary. If you use pugixml in a product, it is sufficient to add an acknowledgment like this to the product distribution:
|
||||
|
||||
....
|
||||
This software is based on pugixml library (http://pugixml.org).
|
||||
pugixml is Copyright (C) 2006-2016 Arseny Kapoulkine.
|
||||
....
|
371
3rdparty/pugixml/docs/quickstart.html
vendored
371
3rdparty/pugixml/docs/quickstart.html
vendored
@ -4,21 +4,19 @@
|
||||
<meta charset="UTF-8">
|
||||
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="generator" content="Asciidoctor 1.5.2">
|
||||
<meta name="generator" content="Asciidoctor 1.5.8">
|
||||
<meta name="author" content="website, repository">
|
||||
<title>pugixml 1.7 quick start guide</title>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400">
|
||||
<title>pugixml 1.10 quick start guide</title>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
|
||||
<style>
|
||||
/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */
|
||||
/* Remove the comments around the @import statement below when using this as a custom stylesheet */
|
||||
/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400";*/
|
||||
/* Uncomment @import statement below to use as custom stylesheet */
|
||||
/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
|
||||
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}
|
||||
audio,canvas,video{display:inline-block}
|
||||
audio:not([controls]){display:none;height:0}
|
||||
[hidden],template{display:none}
|
||||
script{display:none!important}
|
||||
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
|
||||
body{margin:0}
|
||||
a{background:transparent}
|
||||
a:focus{outline:thin dotted}
|
||||
a:active,a:hover{outline:0}
|
||||
@ -46,19 +44,16 @@ button,select{text-transform:none}
|
||||
button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
|
||||
button[disabled],html input[disabled]{cursor:default}
|
||||
input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
|
||||
input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}
|
||||
input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}
|
||||
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
|
||||
textarea{overflow:auto;vertical-align:top}
|
||||
table{border-collapse:collapse;border-spacing:0}
|
||||
*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
|
||||
*,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
|
||||
html,body{font-size:100%}
|
||||
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto}
|
||||
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
|
||||
a:hover{cursor:pointer}
|
||||
img,object,embed{max-width:100%;height:auto}
|
||||
object,embed{height:100%}
|
||||
img{-ms-interpolation-mode:bicubic}
|
||||
#map_canvas img,#map_canvas embed,#map_canvas object,.map_canvas img,.map_canvas embed,.map_canvas object{max-width:none!important}
|
||||
.left{float:left!important}
|
||||
.right{float:right!important}
|
||||
.text-left{text-align:left!important}
|
||||
@ -66,11 +61,11 @@ img{-ms-interpolation-mode:bicubic}
|
||||
.text-center{text-align:center!important}
|
||||
.text-justify{text-align:justify!important}
|
||||
.hide{display:none}
|
||||
.antialiased,body{-webkit-font-smoothing:antialiased}
|
||||
img{display:inline-block;vertical-align:middle}
|
||||
img,object,svg{display:inline-block;vertical-align:middle}
|
||||
textarea{height:auto;min-height:50px}
|
||||
select{width:100%}
|
||||
p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6}
|
||||
.center{margin-left:auto;margin-right:auto}
|
||||
.stretch{width:100%}
|
||||
.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
|
||||
div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr}
|
||||
a{color:#2156a5;text-decoration:underline;line-height:inherit}
|
||||
@ -85,19 +80,18 @@ h2{font-size:1.6875em}
|
||||
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
|
||||
h4,h5{font-size:1.125em}
|
||||
h6{font-size:1em}
|
||||
hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}
|
||||
hr{border:solid #dddddf;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}
|
||||
em,i{font-style:italic;line-height:inherit}
|
||||
strong,b{font-weight:bold;line-height:inherit}
|
||||
small{font-size:60%;line-height:inherit}
|
||||
code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
|
||||
ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
|
||||
ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em}
|
||||
ul,ol{margin-left:1.5em}
|
||||
ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}
|
||||
ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}
|
||||
ul.square{list-style-type:square}
|
||||
ul.circle{list-style-type:circle}
|
||||
ul.disc{list-style-type:disc}
|
||||
ul.no-bullet{list-style:none}
|
||||
ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
|
||||
dl dt{margin-bottom:.3125em;font-weight:bold}
|
||||
dl dd{margin-bottom:1.25em}
|
||||
@ -105,95 +99,111 @@ abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-
|
||||
abbr{text-transform:none}
|
||||
blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
|
||||
blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)}
|
||||
blockquote cite:before{content:"\2014 \0020"}
|
||||
blockquote cite::before{content:"\2014 \0020"}
|
||||
blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)}
|
||||
blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
|
||||
@media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
|
||||
@media screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
|
||||
h1{font-size:2.75em}
|
||||
h2{font-size:2.3125em}
|
||||
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
|
||||
h4{font-size:1.4375em}}table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede}
|
||||
table thead,table tfoot{background:#f7f8f7;font-weight:bold}
|
||||
h4{font-size:1.4375em}}
|
||||
table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede}
|
||||
table thead,table tfoot{background:#f7f8f7}
|
||||
table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
|
||||
table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
|
||||
table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7}
|
||||
table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}
|
||||
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
|
||||
h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
|
||||
.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table}
|
||||
.clearfix:after,.float-group:after{clear:both}
|
||||
*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
|
||||
.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
|
||||
.clearfix::after,.float-group::after{clear:both}
|
||||
*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed;word-wrap:break-word}
|
||||
*:not(pre)>code.nobreak{word-wrap:normal}
|
||||
*:not(pre)>code.nowrap{white-space:nowrap}
|
||||
pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed}
|
||||
em em{font-style:normal}
|
||||
strong strong{font-weight:400}
|
||||
.keyseq{color:rgba(51,51,51,.8)}
|
||||
kbd{display:inline-block;color:rgba(0,0,0,.8);font-size:.75em;line-height:1.4;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:-.15em .15em 0 .15em;padding:.2em .6em .2em .5em;vertical-align:middle;white-space:nowrap}
|
||||
kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
|
||||
.keyseq kbd:first-child{margin-left:0}
|
||||
.keyseq kbd:last-child{margin-right:0}
|
||||
.menuseq,.menu{color:rgba(0,0,0,.8)}
|
||||
b.button:before,b.button:after{position:relative;top:-1px;font-weight:400}
|
||||
b.button:before{content:"[";padding:0 3px 0 2px}
|
||||
b.button:after{content:"]";padding:0 2px 0 3px}
|
||||
.menuseq,.menuref{color:#000}
|
||||
.menuseq b:not(.caret),.menuref{font-weight:inherit}
|
||||
.menuseq{word-spacing:-.02em}
|
||||
.menuseq b.caret{font-size:1.25em;line-height:.8}
|
||||
.menuseq i.caret{font-weight:bold;text-align:center;width:.45em}
|
||||
b.button::before,b.button::after{position:relative;top:-1px;font-weight:400}
|
||||
b.button::before{content:"[";padding:0 3px 0 2px}
|
||||
b.button::after{content:"]";padding:0 2px 0 3px}
|
||||
p a>code:hover{color:rgba(0,0,0,.9)}
|
||||
#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
|
||||
#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table}
|
||||
#header:after,#content:after,#footnotes:after,#footer:after{clear:both}
|
||||
#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:" ";display:table}
|
||||
#header::after,#content::after,#footnotes::after,#footer::after{clear:both}
|
||||
#content{margin-top:1.25em}
|
||||
#content:before{content:none}
|
||||
#content::before{content:none}
|
||||
#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
|
||||
#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8}
|
||||
#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px}
|
||||
#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}
|
||||
#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
|
||||
#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
|
||||
#header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}
|
||||
#header .details span:first-child{margin-left:-.125em}
|
||||
#header .details span.email a{color:rgba(0,0,0,.85)}
|
||||
#header .details br{display:none}
|
||||
#header .details br+span:before{content:"\00a0\2013\00a0"}
|
||||
#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
|
||||
#header .details br+span#revremark:before{content:"\00a0|\00a0"}
|
||||
#header .details br+span::before{content:"\00a0\2013\00a0"}
|
||||
#header .details br+span.author::before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
|
||||
#header .details br+span#revremark::before{content:"\00a0|\00a0"}
|
||||
#header #revnumber{text-transform:capitalize}
|
||||
#header #revnumber:after{content:"\00a0"}
|
||||
#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
|
||||
#toc{border-bottom:1px solid #efefed;padding-bottom:.5em}
|
||||
#header #revnumber::after{content:"\00a0"}
|
||||
#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #dddddf;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
|
||||
#toc{border-bottom:1px solid #e7e7e9;padding-bottom:.5em}
|
||||
#toc>ul{margin-left:.125em}
|
||||
#toc ul.sectlevel0>li>a{font-style:italic}
|
||||
#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
|
||||
#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
|
||||
#toc li{line-height:1.3334;margin-top:.3334em}
|
||||
#toc a{text-decoration:none}
|
||||
#toc a:active{text-decoration:underline}
|
||||
#toctitle{color:#7a2518;font-size:1.2em}
|
||||
@media only screen and (min-width:768px){#toctitle{font-size:1.375em}
|
||||
@media screen and (min-width:768px){#toctitle{font-size:1.375em}
|
||||
body.toc2{padding-left:15em;padding-right:0}
|
||||
#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
|
||||
#toc.toc2 #toctitle{margin-top:0;font-size:1.2em}
|
||||
#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
|
||||
#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
|
||||
#toc.toc2>ul{font-size:.9em;margin-bottom:0}
|
||||
#toc.toc2 ul ul{margin-left:0;padding-left:1em}
|
||||
#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
|
||||
body.toc2.toc-right{padding-left:0;padding-right:15em}
|
||||
body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
|
||||
body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #e7e7e9;left:auto;right:0}}
|
||||
@media screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
|
||||
#toc.toc2{width:20em}
|
||||
#toc.toc2 #toctitle{font-size:1.375em}
|
||||
#toc.toc2>ul{font-size:.95em}
|
||||
#toc.toc2 ul ul{padding-left:1.25em}
|
||||
body.toc2.toc-right{padding-left:0;padding-right:20em}}#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
|
||||
body.toc2.toc-right{padding-left:0;padding-right:20em}}
|
||||
#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
|
||||
#content #toc>:first-child{margin-top:0}
|
||||
#content #toc>:last-child{margin-bottom:0}
|
||||
#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em}
|
||||
#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
|
||||
#content{margin-bottom:.625em}
|
||||
.sect1{padding-bottom:.625em}
|
||||
@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}.sect1+.sect1{border-top:1px solid #efefed}
|
||||
@media screen and (min-width:768px){#content{margin-bottom:1.25em}
|
||||
.sect1{padding-bottom:1.25em}}
|
||||
.sect1:last-child{padding-bottom:0}
|
||||
.sect1+.sect1{border-top:1px solid #e7e7e9}
|
||||
#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
|
||||
#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
|
||||
#content h1>a.anchor::before,h2>a.anchor::before,h3>a.anchor::before,#toctitle>a.anchor::before,.sidebarblock>.content>.title>a.anchor::before,h4>a.anchor::before,h5>a.anchor::before,h6>a.anchor::before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
|
||||
#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
|
||||
#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
|
||||
#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
|
||||
.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
|
||||
.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
|
||||
table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0}
|
||||
.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)}
|
||||
table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit}
|
||||
table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
|
||||
.paragraph.lead>p,#preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:1.21875em;line-height:1.6;color:rgba(0,0,0,.85)}
|
||||
table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font-size:inherit}
|
||||
.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
|
||||
.admonitionblock>table td.icon{text-align:center;width:80px}
|
||||
.admonitionblock>table td.icon img{max-width:none}
|
||||
.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
|
||||
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)}
|
||||
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6)}
|
||||
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
|
||||
.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px}
|
||||
.exampleblock>.content>:first-child{margin-top:0}
|
||||
@ -205,57 +215,62 @@ table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inh
|
||||
.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
|
||||
.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8}
|
||||
.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1}
|
||||
.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em}
|
||||
.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal}
|
||||
@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)}
|
||||
.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;overflow-x:auto;padding:1em;font-size:.8125em}
|
||||
@media screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}
|
||||
@media screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}
|
||||
.literalblock pre.nowrap,.literalblock pre.nowrap pre,.listingblock pre.nowrap,.listingblock pre.nowrap pre{white-space:pre;word-wrap:normal}
|
||||
.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)}
|
||||
.listingblock pre.highlightjs{padding:0}
|
||||
.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
|
||||
.listingblock pre.prettyprint{border-width:0}
|
||||
.listingblock>.content{position:relative}
|
||||
.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999}
|
||||
.listingblock:hover code[data-lang]:before{display:block}
|
||||
.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999}
|
||||
.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"}
|
||||
.listingblock code[data-lang]::before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999}
|
||||
.listingblock:hover code[data-lang]::before{display:block}
|
||||
.listingblock.terminal pre .command::before{content:attr(data-prompt);padding-right:.5em;color:#999}
|
||||
.listingblock.terminal pre .command:not([data-prompt])::before{content:"$"}
|
||||
table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none}
|
||||
table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0}
|
||||
table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0;line-height:1.45}
|
||||
table.pyhltable td.code{padding-left:.75em;padding-right:0}
|
||||
pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8}
|
||||
pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #dddddf}
|
||||
pre.pygments .lineno{display:inline-block;margin-right:.25em}
|
||||
table.pyhltable .linenodiv{background:none!important;padding-right:0!important}
|
||||
.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
|
||||
.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em}
|
||||
.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
|
||||
.quoteblock blockquote,.quoteblock p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
|
||||
.quoteblock blockquote{margin:0;padding:0;border:0}
|
||||
.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
|
||||
.quoteblock blockquote::before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
|
||||
.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
|
||||
.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right}
|
||||
.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)}
|
||||
.quoteblock .quoteblock blockquote{padding:0 0 0 .75em}
|
||||
.quoteblock .quoteblock blockquote:before{display:none}
|
||||
.verseblock{margin:0 1em 1.25em 1em}
|
||||
.quoteblock .attribution{margin-top:.75em;margin-right:.5ex;text-align:right}
|
||||
.verseblock{margin:0 1em 1.25em}
|
||||
.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
|
||||
.verseblock pre strong{font-weight:400}
|
||||
.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
|
||||
.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
|
||||
.quoteblock .attribution br,.verseblock .attribution br{display:none}
|
||||
.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.05em;color:rgba(0,0,0,.6)}
|
||||
.quoteblock.abstract{margin:0 0 1.25em 0;display:block}
|
||||
.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0}
|
||||
.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none}
|
||||
.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
|
||||
.quoteblock.abstract blockquote::before,.quoteblock.excerpt blockquote::before,.quoteblock .quoteblock blockquote::before{display:none}
|
||||
.quoteblock.abstract blockquote,.quoteblock.abstract p,.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{line-height:1.6;word-spacing:0}
|
||||
.quoteblock.abstract{margin:0 1em 1.25em;display:block}
|
||||
.quoteblock.abstract>.title{margin:0 0 .375em;font-size:1.15em;text-align:center}
|
||||
.quoteblock.excerpt,.quoteblock .quoteblock{margin:0 0 1.25em;padding:0 0 .25em 1em;border-left:.25em solid #dddddf}
|
||||
.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
|
||||
.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;text-align:left;margin-right:0}
|
||||
table.tableblock{max-width:100%;border-collapse:separate}
|
||||
table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0}
|
||||
table.spread{width:100%}
|
||||
p.tableblock:last-child{margin-bottom:0}
|
||||
td.tableblock>.content{margin-bottom:-1.25em}
|
||||
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
|
||||
table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0}
|
||||
table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0}
|
||||
table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0}
|
||||
table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0}
|
||||
table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0}
|
||||
table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0}
|
||||
table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0}
|
||||
table.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0}
|
||||
table.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0}
|
||||
table.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0}
|
||||
table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px}
|
||||
table.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0}
|
||||
table.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0}
|
||||
table.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0}
|
||||
table.frame-all{border-width:1px}
|
||||
table.frame-sides{border-width:0 1px}
|
||||
table.frame-topbot{border-width:1px 0}
|
||||
table.frame-topbot,table.frame-ends{border-width:1px 0}
|
||||
table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd){background:#f8f8f7}
|
||||
table.stripes-none tr,table.stripes-odd tr:nth-of-type(even){background:none}
|
||||
th.halign-left,td.halign-left{text-align:left}
|
||||
th.halign-right,td.halign-right{text-align:right}
|
||||
th.halign-center,td.halign-center{text-align:center}
|
||||
@ -273,13 +288,14 @@ ul li ol{margin-left:1.5em}
|
||||
dl dd{margin-left:1.125em}
|
||||
dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
|
||||
ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
|
||||
ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none}
|
||||
ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em}
|
||||
ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1em;font-size:.85em}
|
||||
ul.checklist li>p:first-child>input[type="checkbox"]:first-child{width:1em;position:relative;top:1px}
|
||||
ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden}
|
||||
ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block}
|
||||
ul.inline>li>*{display:block}
|
||||
ul.checklist,ul.none,ol.none,ul.no-bullet,ol.no-bullet,ol.unnumbered,ul.unstyled,ol.unstyled{list-style-type:none}
|
||||
ul.no-bullet,ol.no-bullet,ol.unnumbered{margin-left:.625em}
|
||||
ul.unstyled,ol.unstyled{margin-left:0}
|
||||
ul.checklist{margin-left:.625em}
|
||||
ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1.25em;font-size:.8em;position:relative;bottom:.125em}
|
||||
ul.checklist li>p:first-child>input[type="checkbox"]:first-child{margin-right:.25em}
|
||||
ul.inline{display:-ms-flexbox;display:-webkit-box;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap;list-style:none;margin:0 0 .625em -1.25em}
|
||||
ul.inline>li{margin-left:1.25em}
|
||||
.unstyled dl dt{font-weight:400;font-style:normal}
|
||||
ol.arabic{list-style-type:decimal}
|
||||
ol.decimal{list-style-type:decimal-leading-zero}
|
||||
@ -290,28 +306,30 @@ ol.upperroman{list-style-type:upper-roman}
|
||||
ol.lowergreek{list-style-type:lower-greek}
|
||||
.hdlist>table,.colist>table{border:0;background:none}
|
||||
.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
|
||||
td.hdlist1{padding-right:.75em;font-weight:bold}
|
||||
td.hdlist1,td.hdlist2{vertical-align:top}
|
||||
td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
|
||||
td.hdlist1{font-weight:bold;padding-bottom:1.25em}
|
||||
.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
|
||||
.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1}
|
||||
.colist>table tr>td:last-of-type{padding:.25em 0}
|
||||
.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}
|
||||
.colist td:not([class]):first-child img{max-width:none}
|
||||
.colist td:not([class]):last-child{padding:.25em 0}
|
||||
.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}
|
||||
.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0}
|
||||
.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em}
|
||||
.imageblock.left{margin:.25em .625em 1.25em 0}
|
||||
.imageblock.right{margin:.25em 0 1.25em .625em}
|
||||
.imageblock>.title{margin-bottom:0}
|
||||
.imageblock.thumb,.imageblock.th{border-width:6px}
|
||||
.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
|
||||
.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
|
||||
.image.left{margin-right:.625em}
|
||||
.image.right{margin-left:.625em}
|
||||
a.image{text-decoration:none}
|
||||
span.footnote,span.footnoteref{vertical-align:super;font-size:.875em}
|
||||
span.footnote a,span.footnoteref a{text-decoration:none}
|
||||
span.footnote a:active,span.footnoteref a:active{text-decoration:underline}
|
||||
a.image{text-decoration:none;display:inline-block}
|
||||
a.image object{pointer-events:none}
|
||||
sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
|
||||
sup.footnote a,sup.footnoteref a{text-decoration:none}
|
||||
sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
|
||||
#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
|
||||
#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0}
|
||||
#footnotes .footnote{padding:0 .375em;line-height:1.3;font-size:.875em;margin-left:1.2em;text-indent:-1.2em;margin-bottom:.2em}
|
||||
#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none}
|
||||
#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
|
||||
#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
|
||||
#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none;margin-left:-1.05em}
|
||||
#footnotes .footnote:last-of-type{margin-bottom:0}
|
||||
#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
|
||||
.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}
|
||||
@ -355,69 +373,74 @@ div.unbreakable{page-break-inside:avoid}
|
||||
.yellow{color:#bfbf00}
|
||||
.yellow-background{background-color:#fafa00}
|
||||
span.icon>.fa{cursor:default}
|
||||
a span.icon>.fa{cursor:inherit}
|
||||
.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
|
||||
.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c}
|
||||
.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
|
||||
.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900}
|
||||
.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400}
|
||||
.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000}
|
||||
.admonitionblock td.icon .icon-note::before{content:"\f05a";color:#19407c}
|
||||
.admonitionblock td.icon .icon-tip::before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
|
||||
.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
|
||||
.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
|
||||
.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
|
||||
.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
|
||||
.conum[data-value] *{color:#fff!important}
|
||||
.conum[data-value]+b{display:none}
|
||||
.conum[data-value]:after{content:attr(data-value)}
|
||||
.conum[data-value]::after{content:attr(data-value)}
|
||||
pre .conum[data-value]{position:relative;top:-.125em}
|
||||
b.conum *{color:inherit!important}
|
||||
.conum:not([data-value]):empty{display:none}
|
||||
h1,h2{letter-spacing:-.01em}
|
||||
dt,th.tableblock,td.content{text-rendering:optimizeLegibility}
|
||||
p,td.content{letter-spacing:-.01em}
|
||||
p strong,td.content strong{letter-spacing:-.005em}
|
||||
p,blockquote,dt,td.content{font-size:1.0625rem}
|
||||
dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
|
||||
h1,h2,p,td.content,span.alt{letter-spacing:-.01em}
|
||||
p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
|
||||
p,blockquote,dt,td.content,span.alt{font-size:1.0625rem}
|
||||
p{margin-bottom:1.25rem}
|
||||
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
|
||||
.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
|
||||
.print-only{display:none!important}
|
||||
@media print{@page{margin:1.25cm .75cm}
|
||||
*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
|
||||
@page{margin:1.25cm .75cm}
|
||||
@media print{*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
|
||||
html{font-size:80%}
|
||||
a{color:inherit!important;text-decoration:underline!important}
|
||||
a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
|
||||
a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
|
||||
abbr[title]:after{content:" (" attr(title) ")"}
|
||||
pre,blockquote,tr,img{page-break-inside:avoid}
|
||||
a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
|
||||
abbr[title]::after{content:" (" attr(title) ")"}
|
||||
pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
|
||||
thead{display:table-header-group}
|
||||
img{max-width:100%!important}
|
||||
svg{max-width:100%}
|
||||
p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
|
||||
h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
|
||||
#toc,.sidebarblock,.exampleblock>.content{background:none!important}
|
||||
#toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important}
|
||||
.sect1{padding-bottom:0!important}
|
||||
.sect1+.sect1{border:0!important}
|
||||
#header>h1:first-child{margin-top:1.25rem}
|
||||
#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
|
||||
body.book #header{text-align:center}
|
||||
body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0}
|
||||
body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em}
|
||||
body.book #header .details{border:0!important;display:block;padding:0!important}
|
||||
body.book #header .details span:first-child{margin-left:0!important}
|
||||
body.book #header .details br{display:block}
|
||||
body.book #header .details br+span:before{content:none!important}
|
||||
body.book #header .details br+span::before{content:none!important}
|
||||
body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
|
||||
body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
|
||||
.listingblock code[data-lang]:before{display:block}
|
||||
#footer{background:none!important;padding:0 .9375em}
|
||||
#footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em}
|
||||
.listingblock code[data-lang]::before{display:block}
|
||||
#footer{padding:0 .9375em}
|
||||
.hide-on-print{display:none!important}
|
||||
.print-only{display:block!important}
|
||||
.hide-for-print{display:none!important}
|
||||
.show-for-print{display:inherit!important}}
|
||||
@media print,amzn-kf8{#header>h1:first-child{margin-top:1.25rem}
|
||||
.sect1{padding:0!important}
|
||||
.sect1+.sect1{border:0}
|
||||
#footer{background:none}
|
||||
#footer-text{color:rgba(0,0,0,.6);font-size:.9em}}
|
||||
@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}}
|
||||
</style>
|
||||
<style>
|
||||
.listingblock .pygments .hll { background-color: #ffffcc }
|
||||
.listingblock .pygments { background: #f8f8f8; }
|
||||
.listingblock .pygments, .listingblock .pygments code { background: #f8f8f8; }
|
||||
.listingblock .pygments .tok-c { color: #408080; font-style: italic } /* Comment */
|
||||
.listingblock .pygments .tok-err { border: 1px solid #FF0000 } /* Error */
|
||||
.listingblock .pygments .tok-k { color: #008000; font-weight: bold } /* Keyword */
|
||||
.listingblock .pygments .tok-o { color: #666666 } /* Operator */
|
||||
.listingblock .pygments .tok-ch { color: #408080; font-style: italic } /* Comment.Hashbang */
|
||||
.listingblock .pygments .tok-cm { color: #408080; font-style: italic } /* Comment.Multiline */
|
||||
.listingblock .pygments .tok-cp { color: #BC7A00 } /* Comment.Preproc */
|
||||
.listingblock .pygments .tok-cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
|
||||
.listingblock .pygments .tok-c1 { color: #408080; font-style: italic } /* Comment.Single */
|
||||
.listingblock .pygments .tok-cs { color: #408080; font-style: italic } /* Comment.Special */
|
||||
.listingblock .pygments .tok-gd { color: #A00000 } /* Generic.Deleted */
|
||||
@ -457,8 +480,10 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
||||
.listingblock .pygments .tok-mh { color: #666666 } /* Literal.Number.Hex */
|
||||
.listingblock .pygments .tok-mi { color: #666666 } /* Literal.Number.Integer */
|
||||
.listingblock .pygments .tok-mo { color: #666666 } /* Literal.Number.Oct */
|
||||
.listingblock .pygments .tok-sa { color: #BA2121 } /* Literal.String.Affix */
|
||||
.listingblock .pygments .tok-sb { color: #BA2121 } /* Literal.String.Backtick */
|
||||
.listingblock .pygments .tok-sc { color: #BA2121 } /* Literal.String.Char */
|
||||
.listingblock .pygments .tok-dl { color: #BA2121 } /* Literal.String.Delimiter */
|
||||
.listingblock .pygments .tok-sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
|
||||
.listingblock .pygments .tok-s2 { color: #BA2121 } /* Literal.String.Double */
|
||||
.listingblock .pygments .tok-se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
|
||||
@ -469,20 +494,22 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
||||
.listingblock .pygments .tok-s1 { color: #BA2121 } /* Literal.String.Single */
|
||||
.listingblock .pygments .tok-ss { color: #19177C } /* Literal.String.Symbol */
|
||||
.listingblock .pygments .tok-bp { color: #008000 } /* Name.Builtin.Pseudo */
|
||||
.listingblock .pygments .tok-fm { color: #0000FF } /* Name.Function.Magic */
|
||||
.listingblock .pygments .tok-vc { color: #19177C } /* Name.Variable.Class */
|
||||
.listingblock .pygments .tok-vg { color: #19177C } /* Name.Variable.Global */
|
||||
.listingblock .pygments .tok-vi { color: #19177C } /* Name.Variable.Instance */
|
||||
.listingblock .pygments .tok-vm { color: #19177C } /* Name.Variable.Magic */
|
||||
.listingblock .pygments .tok-il { color: #666666 } /* Literal.Number.Integer.Long */
|
||||
</style>
|
||||
</head>
|
||||
<body class="article toc2 toc-right">
|
||||
<div id="header">
|
||||
<h1>pugixml 1.7 quick start guide</h1>
|
||||
<h1>pugixml 1.10 quick start guide</h1>
|
||||
<div class="details">
|
||||
<span id="author" class="author">website</span><br>
|
||||
<span id="email" class="email"><a href="http://pugixml.org" class="bare">http://pugixml.org</a></span><br>
|
||||
<span id="email" class="email"><a href="https://pugixml.org" class="bare">https://pugixml.org</a></span><br>
|
||||
<span id="author2" class="author">repository</span><br>
|
||||
<span id="email2" class="email"><a href="http://github.com/zeux/pugixml" class="bare">http://github.com/zeux/pugixml</a></span><br>
|
||||
<span id="email2" class="email"><a href="https://github.com/zeux/pugixml" class="bare">https://github.com/zeux/pugixml</a></span><br>
|
||||
</div>
|
||||
<div id="toc" class="toc2">
|
||||
<div id="toctitle">Table of Contents</div>
|
||||
@ -501,10 +528,10 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
||||
</div>
|
||||
<div id="content">
|
||||
<div class="sect1">
|
||||
<h2 id="introduction"><a class="anchor" href="#introduction"></a>Introduction</h2>
|
||||
<h2 id="introduction"><a class="anchor" href="#introduction"></a><a class="link" href="#introduction">Introduction</a></h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p><a href="http://pugixml.org/">pugixml</a> is a light-weight C++ XML processing library. It consists of a DOM-like interface with rich traversal/modification capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 implementation for complex data-driven tree queries. Full Unicode support is also available, with two Unicode interface variants and conversions between different Unicode encodings (which happen automatically during parsing/saving). The library is extremely portable and easy to integrate and use. pugixml is developed and maintained since 2006 and has many users. All code is distributed under the <a href="#license">MIT license</a>, making it completely free to use in both open-source and proprietary applications.</p>
|
||||
<p><a href="https://pugixml.org/">pugixml</a> is a light-weight C++ XML processing library. It consists of a DOM-like interface with rich traversal/modification capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 implementation for complex data-driven tree queries. Full Unicode support is also available, with two Unicode interface variants and conversions between different Unicode encodings (which happen automatically during parsing/saving). The library is extremely portable and easy to integrate and use. pugixml is developed and maintained since 2006 and has many users. All code is distributed under the <a href="#license">MIT license</a>, making it completely free to use in both open-source and proprietary applications.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>pugixml enables very fast, convenient and memory-efficient XML document processing. However, since pugixml has a DOM parser, it can’t process XML documents that do not fit in memory; also the parser is a non-validating one, so if you need DTD/Schema validation, the library is not for you.</p>
|
||||
@ -527,15 +554,15 @@ No documentation is perfect; neither is this one. If you find errors or omission
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="install"><a class="anchor" href="#install"></a>Installation</h2>
|
||||
<h2 id="install"><a class="anchor" href="#install"></a><a class="link" href="#install">Installation</a></h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>You can download the latest source distribution as an archive:</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p><a href="https://github.com/zeux/pugixml/releases/download/v1.7/pugixml-1.7.zip">pugixml-1.7.zip</a> (Windows line endings)
|
||||
<p><a href="https://github.com/zeux/pugixml/releases/download/v1.10/pugixml-1.10.zip">pugixml-1.10.zip</a> (Windows line endings)
|
||||
/
|
||||
<a href="https://github.com/zeux/pugixml/releases/download/v1.7/pugixml-1.7.tar.gz">pugixml-1.7.tar.gz</a> (Unix line endings)</p>
|
||||
<a href="https://github.com/zeux/pugixml/releases/download/v1.10/pugixml-1.10.tar.gz">pugixml-1.10.tar.gz</a> (Unix line endings)</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The distribution contains library source, documentation (the guide you’re reading now and the manual) and some code examples. After downloading the distribution, install pugixml by extracting all files from the compressed archive.</p>
|
||||
@ -544,12 +571,12 @@ No documentation is perfect; neither is this one. If you find errors or omission
|
||||
<p>The complete pugixml source consists of three files - one source file, <code>pugixml.cpp</code>, and two header files, <code>pugixml.hpp</code> and <code>pugiconfig.hpp</code>. <code>pugixml.hpp</code> is the primary header which you need to include in order to use pugixml classes/functions. The rest of this guide assumes that <code>pugixml.hpp</code> is either in the current directory or in one of include directories of your projects, so that <code>#include "pugixml.hpp"</code> can find the header; however you can also use relative path (i.e. <code>#include "../libs/pugixml/src/pugixml.hpp"</code>) or include directory-relative path (i.e. <code>#include <xml/thirdparty/pugixml/src/pugixml.hpp></code>).</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>The easiest way to build pugixml is to compile the source file, <code>pugixml.cpp</code>, along with the existing library/executable. This process depends on the method of building your application; for example, if you’re using Microsoft Visual Studio <span class="footnote">[<a id="_footnoteref_1" class="footnote" href="#_footnote_1" title="View footnote.">1</a>]</span>, Apple Xcode, Code::Blocks or any other IDE, just add <code>pugixml.cpp</code> to one of your projects. There are other building methods available, including building pugixml as a standalone static/shared library; <a href="manual/install.html#install.building">read the manual</a> for further information.</p>
|
||||
<p>The easiest way to build pugixml is to compile the source file, <code>pugixml.cpp</code>, along with the existing library/executable. This process depends on the method of building your application; for example, if you’re using Microsoft Visual Studio <sup class="footnote">[<a id="_footnoteref_1" class="footnote" href="#_footnotedef_1" title="View footnote.">1</a>]</sup>, Apple Xcode, Code::Blocks or any other IDE, just <strong>add <code>pugixml.cpp</code> to one of your projects</strong>. There are other building methods available, including building pugixml as a standalone static/shared library; <a href="manual.html#install.building">read the manual</a> for further information.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="dom"><a class="anchor" href="#dom"></a>Document object model</h2>
|
||||
<h2 id="dom"><a class="anchor" href="#dom"></a><a class="link" href="#dom">Document object model</a></h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>pugixml stores XML data in DOM-like way: the entire XML document (both document structure and element data) is stored in memory as a tree. The tree can be loaded from character stream (file, string, C++ I/O stream), then traversed via special API or XPath expressions. The whole tree is mutable: both node structure and node/attribute data can be changed at any time. Finally, the result of document transformations can be saved to a character stream (file, C++ I/O stream or custom transport).</p>
|
||||
@ -601,12 +628,12 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
|
||||
<p><code>xml_attribute</code> is the handle to an XML attribute; it has the same semantics as <code>xml_node</code>, i.e. there can be several <code>xml_attribute</code> handles pointing to the same underlying object and there is a special null attribute value, which propagates to function results.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>There are two choices of interface and internal representation when configuring pugixml: you can either choose the UTF-8 (also called char) interface or UTF-16/32 (also called wchar_t) one. The choice is controlled via <code>PUGIXML_WCHAR_MODE</code> define; you can set it via <code>pugiconfig.hpp</code> or via preprocessor options. All tree functions that work with strings work with either C-style null terminated strings or STL strings of the selected character type. <a href="manual/dom.html#dom.unicode">Read the manual</a> for additional information on Unicode interface.</p>
|
||||
<p>There are two choices of interface and internal representation when configuring pugixml: you can either choose the UTF-8 (also called char) interface or UTF-16/32 (also called wchar_t) one. The choice is controlled via <code>PUGIXML_WCHAR_MODE</code> define; you can set it via <code>pugiconfig.hpp</code> or via preprocessor options. All tree functions that work with strings work with either C-style null terminated strings or STL strings of the selected character type. <a href="manual.html#dom.unicode">Read the manual</a> for additional information on Unicode interface.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="loading"><a class="anchor" href="#loading"></a>Loading document</h2>
|
||||
<h2 id="loading"><a class="anchor" href="#loading"></a><a class="link" href="#loading">Loading document</a></h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>pugixml provides several functions for loading XML data from various places - files, C++ iostreams, memory buffers. All functions use an extremely fast non-validating parser. This parser is not fully W3C conformant - it can load any valid XML document, but does not perform some well-formedness checks. While considerable effort is made to reject invalid XML documents, some validation is not performed because of performance reasons. XML data is always converted to internal character format before parsing. pugixml supports all popular Unicode encodings (UTF-8, UTF-16 (big and little endian), UTF-32 (big and little endian); UCS-2 is naturally supported since it’s a strict subset of UTF-16) and handles all encoding conversions automatically.</p>
|
||||
@ -619,7 +646,7 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_document</span> <span class="tok-n">doc</span><span class="tok-p">;</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_document</span> <span class="tok-n">doc</span><span class="tok-p">;</span>
|
||||
|
||||
<span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_parse_result</span> <span class="tok-n">result</span> <span class="tok-o">=</span> <span class="tok-n">doc</span><span class="tok-p">.</span><span class="tok-n">load_file</span><span class="tok-p">(</span><span class="tok-s">"tree.xml"</span><span class="tok-p">);</span>
|
||||
|
||||
@ -637,7 +664,7 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_document</span> <span class="tok-n">doc</span><span class="tok-p">;</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_document</span> <span class="tok-n">doc</span><span class="tok-p">;</span>
|
||||
<span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_parse_result</span> <span class="tok-n">result</span> <span class="tok-o">=</span> <span class="tok-n">doc</span><span class="tok-p">.</span><span class="tok-n">load_string</span><span class="tok-p">(</span><span class="tok-n">source</span><span class="tok-p">);</span>
|
||||
|
||||
<span class="tok-k">if</span> <span class="tok-p">(</span><span class="tok-n">result</span><span class="tok-p">)</span>
|
||||
@ -663,13 +690,13 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-k">const</span> <span class="tok-kt">char</span> <span class="tok-n">source</span><span class="tok-p">[]</span> <span class="tok-o">=</span> <span class="tok-s">"<mesh name='sphere'><bounds>0 0 1 1</bounds></mesh>"</span><span class="tok-p">;</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-k">const</span> <span class="tok-kt">char</span> <span class="tok-n">source</span><span class="tok-p">[]</span> <span class="tok-o">=</span> <span class="tok-s">"<mesh name='sphere'><bounds>0 0 1 1</bounds></mesh>"</span><span class="tok-p">;</span>
|
||||
<span class="tok-kt">size_t</span> <span class="tok-n">size</span> <span class="tok-o">=</span> <span class="tok-k">sizeof</span><span class="tok-p">(</span><span class="tok-n">source</span><span class="tok-p">);</span></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-c1">// You can use load_buffer_inplace to load document from mutable memory block; the block's lifetime must exceed that of document</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-c1">// You can use load_buffer_inplace to load document from mutable memory block; the block's lifetime must exceed that of document</span>
|
||||
<span class="tok-kt">char</span><span class="tok-o">*</span> <span class="tok-n">buffer</span> <span class="tok-o">=</span> <span class="tok-k">new</span> <span class="tok-kt">char</span><span class="tok-p">[</span><span class="tok-n">size</span><span class="tok-p">];</span>
|
||||
<span class="tok-n">memcpy</span><span class="tok-p">(</span><span class="tok-n">buffer</span><span class="tok-p">,</span> <span class="tok-n">source</span><span class="tok-p">,</span> <span class="tok-n">size</span><span class="tok-p">);</span>
|
||||
|
||||
@ -685,14 +712,14 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">ifstream</span> <span class="tok-n">stream</span><span class="tok-p">(</span><span class="tok-s">"weekly-utf-8.xml"</span><span class="tok-p">);</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">ifstream</span> <span class="tok-n">stream</span><span class="tok-p">(</span><span class="tok-s">"weekly-utf-8.xml"</span><span class="tok-p">);</span>
|
||||
<span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_parse_result</span> <span class="tok-n">result</span> <span class="tok-o">=</span> <span class="tok-n">doc</span><span class="tok-p">.</span><span class="tok-n">load</span><span class="tok-p">(</span><span class="tok-n">stream</span><span class="tok-p">);</span></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="access"><a class="anchor" href="#access"></a>Accessing document data</h2>
|
||||
<h2 id="access"><a class="anchor" href="#access"></a><a class="link" href="#access">Accessing document data</a></h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>pugixml features an extensive interface for getting various types of data from the document and for traversing the document. You can use various accessors to get node/attribute data, you can traverse the child node/attribute lists via accessors or iterators, you can do depth-first traversals with <code>xml_tree_walker</code> objects, and you can use XPath for complex data-driven queries.</p>
|
||||
@ -715,7 +742,7 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-k">for</span> <span class="tok-p">(</span><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_node</span> <span class="tok-n">tool</span> <span class="tok-o">=</span> <span class="tok-n">tools</span><span class="tok-p">.</span><span class="tok-n">child</span><span class="tok-p">(</span><span class="tok-s">"Tool"</span><span class="tok-p">);</span> <span class="tok-n">tool</span><span class="tok-p">;</span> <span class="tok-n">tool</span> <span class="tok-o">=</span> <span class="tok-n">tool</span><span class="tok-p">.</span><span class="tok-n">next_sibling</span><span class="tok-p">(</span><span class="tok-s">"Tool"</span><span class="tok-p">))</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-k">for</span> <span class="tok-p">(</span><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_node</span> <span class="tok-n">tool</span> <span class="tok-o">=</span> <span class="tok-n">tools</span><span class="tok-p">.</span><span class="tok-n">child</span><span class="tok-p">(</span><span class="tok-s">"Tool"</span><span class="tok-p">);</span> <span class="tok-n">tool</span><span class="tok-p">;</span> <span class="tok-n">tool</span> <span class="tok-o">=</span> <span class="tok-n">tool</span><span class="tok-p">.</span><span class="tok-n">next_sibling</span><span class="tok-p">(</span><span class="tok-s">"Tool"</span><span class="tok-p">))</span>
|
||||
<span class="tok-p">{</span>
|
||||
<span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">cout</span> <span class="tok-o"><<</span> <span class="tok-s">"Tool "</span> <span class="tok-o"><<</span> <span class="tok-n">tool</span><span class="tok-p">.</span><span class="tok-n">attribute</span><span class="tok-p">(</span><span class="tok-s">"Filename"</span><span class="tok-p">).</span><span class="tok-n">value</span><span class="tok-p">();</span>
|
||||
<span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">cout</span> <span class="tok-o"><<</span> <span class="tok-s">": AllowRemote "</span> <span class="tok-o"><<</span> <span class="tok-n">tool</span><span class="tok-p">.</span><span class="tok-n">attribute</span><span class="tok-p">(</span><span class="tok-s">"AllowRemote"</span><span class="tok-p">).</span><span class="tok-n">as_bool</span><span class="tok-p">();</span>
|
||||
@ -729,7 +756,7 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">cout</span> <span class="tok-o"><<</span> <span class="tok-s">"Tool for *.dae generation: "</span> <span class="tok-o"><<</span> <span class="tok-n">tools</span><span class="tok-p">.</span><span class="tok-n">find_child_by_attribute</span><span class="tok-p">(</span><span class="tok-s">"Tool"</span><span class="tok-p">,</span> <span class="tok-s">"OutputFileMasks"</span><span class="tok-p">,</span> <span class="tok-s">"*.dae"</span><span class="tok-p">).</span><span class="tok-n">attribute</span><span class="tok-p">(</span><span class="tok-s">"Filename"</span><span class="tok-p">).</span><span class="tok-n">value</span><span class="tok-p">()</span> <span class="tok-o"><<</span> <span class="tok-s">"</span><span class="tok-se">\n</span><span class="tok-s">"</span><span class="tok-p">;</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">cout</span> <span class="tok-o"><<</span> <span class="tok-s">"Tool for *.dae generation: "</span> <span class="tok-o"><<</span> <span class="tok-n">tools</span><span class="tok-p">.</span><span class="tok-n">find_child_by_attribute</span><span class="tok-p">(</span><span class="tok-s">"Tool"</span><span class="tok-p">,</span> <span class="tok-s">"OutputFileMasks"</span><span class="tok-p">,</span> <span class="tok-s">"*.dae"</span><span class="tok-p">).</span><span class="tok-n">attribute</span><span class="tok-p">(</span><span class="tok-s">"Filename"</span><span class="tok-p">).</span><span class="tok-n">value</span><span class="tok-p">()</span> <span class="tok-o"><<</span> <span class="tok-s">"</span><span class="tok-se">\n</span><span class="tok-s">"</span><span class="tok-p">;</span>
|
||||
|
||||
<span class="tok-k">for</span> <span class="tok-p">(</span><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_node</span> <span class="tok-n">tool</span> <span class="tok-o">=</span> <span class="tok-n">tools</span><span class="tok-p">.</span><span class="tok-n">child</span><span class="tok-p">(</span><span class="tok-s">"Tool"</span><span class="tok-p">);</span> <span class="tok-n">tool</span><span class="tok-p">;</span> <span class="tok-n">tool</span> <span class="tok-o">=</span> <span class="tok-n">tool</span><span class="tok-p">.</span><span class="tok-n">next_sibling</span><span class="tok-p">(</span><span class="tok-s">"Tool"</span><span class="tok-p">))</span>
|
||||
<span class="tok-p">{</span>
|
||||
@ -745,7 +772,7 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-k">for</span> <span class="tok-p">(</span><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_node_iterator</span> <span class="tok-n">it</span> <span class="tok-o">=</span> <span class="tok-n">tools</span><span class="tok-p">.</span><span class="tok-n">begin</span><span class="tok-p">();</span> <span class="tok-n">it</span> <span class="tok-o">!=</span> <span class="tok-n">tools</span><span class="tok-p">.</span><span class="tok-n">end</span><span class="tok-p">();</span> <span class="tok-o">++</span><span class="tok-n">it</span><span class="tok-p">)</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-k">for</span> <span class="tok-p">(</span><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_node_iterator</span> <span class="tok-n">it</span> <span class="tok-o">=</span> <span class="tok-n">tools</span><span class="tok-p">.</span><span class="tok-n">begin</span><span class="tok-p">();</span> <span class="tok-n">it</span> <span class="tok-o">!=</span> <span class="tok-n">tools</span><span class="tok-p">.</span><span class="tok-n">end</span><span class="tok-p">();</span> <span class="tok-o">++</span><span class="tok-n">it</span><span class="tok-p">)</span>
|
||||
<span class="tok-p">{</span>
|
||||
<span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">cout</span> <span class="tok-o"><<</span> <span class="tok-s">"Tool:"</span><span class="tok-p">;</span>
|
||||
|
||||
@ -766,7 +793,7 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-k">for</span> <span class="tok-p">(</span><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_node</span> <span class="tok-nl">tool</span><span class="tok-p">:</span> <span class="tok-n">tools</span><span class="tok-p">.</span><span class="tok-n">children</span><span class="tok-p">(</span><span class="tok-s">"Tool"</span><span class="tok-p">))</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-k">for</span> <span class="tok-p">(</span><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_node</span> <span class="tok-nl">tool</span><span class="tok-p">:</span> <span class="tok-n">tools</span><span class="tok-p">.</span><span class="tok-n">children</span><span class="tok-p">(</span><span class="tok-s">"Tool"</span><span class="tok-p">))</span>
|
||||
<span class="tok-p">{</span>
|
||||
<span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">cout</span> <span class="tok-o"><<</span> <span class="tok-s">"Tool:"</span><span class="tok-p">;</span>
|
||||
|
||||
@ -792,7 +819,7 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-k">struct</span> <span class="tok-nl">simple_walker</span><span class="tok-p">:</span> <span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_tree_walker</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-k">struct</span> <span class="tok-nl">simple_walker</span><span class="tok-p">:</span> <span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_tree_walker</span>
|
||||
<span class="tok-p">{</span>
|
||||
<span class="tok-k">virtual</span> <span class="tok-kt">bool</span> <span class="tok-n">for_each</span><span class="tok-p">(</span><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_node</span><span class="tok-o">&</span> <span class="tok-n">node</span><span class="tok-p">)</span>
|
||||
<span class="tok-p">{</span>
|
||||
@ -807,7 +834,7 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-n">simple_walker</span> <span class="tok-n">walker</span><span class="tok-p">;</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-n">simple_walker</span> <span class="tok-n">walker</span><span class="tok-p">;</span>
|
||||
<span class="tok-n">doc</span><span class="tok-p">.</span><span class="tok-n">traverse</span><span class="tok-p">(</span><span class="tok-n">walker</span><span class="tok-p">);</span></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
@ -816,7 +843,7 @@ All pugixml classes and functions are located in <code>pugi</code> namespace; yo
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xpath_node_set</span> <span class="tok-n">tools</span> <span class="tok-o">=</span> <span class="tok-n">doc</span><span class="tok-p">.</span><span class="tok-n">select_nodes</span><span class="tok-p">(</span><span class="tok-s">"/Profile/Tools/Tool[@AllowRemote='true' and @DeriveCaptionFrom='lastparam']"</span><span class="tok-p">);</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xpath_node_set</span> <span class="tok-n">tools</span> <span class="tok-o">=</span> <span class="tok-n">doc</span><span class="tok-p">.</span><span class="tok-n">select_nodes</span><span class="tok-p">(</span><span class="tok-s">"/Profile/Tools/Tool[@AllowRemote='true' and @DeriveCaptionFrom='lastparam']"</span><span class="tok-p">);</span>
|
||||
|
||||
<span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">cout</span> <span class="tok-o"><<</span> <span class="tok-s">"Tools:</span><span class="tok-se">\n</span><span class="tok-s">"</span><span class="tok-p">;</span>
|
||||
|
||||
@ -847,7 +874,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="modify"><a class="anchor" href="#modify"></a>Modifying document data</h2>
|
||||
<h2 id="modify"><a class="anchor" href="#modify"></a><a class="link" href="#modify">Modifying document data</a></h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>The document in pugixml is fully mutable: you can completely change the document structure and modify the data of nodes/attributes. All functions take care of memory management and structural integrity themselves, so they always result in structurally valid tree - however, it is possible to create an invalid XML tree (for example, by adding two attributes with the same name or by setting attribute/node name to empty/invalid string). Tree modification is optimized for performance and for memory consumption, so if you have enough memory you can create documents from scratch with pugixml and later save them to file/stream instead of relying on error-prone manual text writing and without too much overhead.</p>
|
||||
@ -860,7 +887,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_node</span> <span class="tok-n">node</span> <span class="tok-o">=</span> <span class="tok-n">doc</span><span class="tok-p">.</span><span class="tok-n">child</span><span class="tok-p">(</span><span class="tok-s">"node"</span><span class="tok-p">);</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_node</span> <span class="tok-n">node</span> <span class="tok-o">=</span> <span class="tok-n">doc</span><span class="tok-p">.</span><span class="tok-n">child</span><span class="tok-p">(</span><span class="tok-s">"node"</span><span class="tok-p">);</span>
|
||||
|
||||
<span class="tok-c1">// change node name</span>
|
||||
<span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">cout</span> <span class="tok-o"><<</span> <span class="tok-n">node</span><span class="tok-p">.</span><span class="tok-n">set_name</span><span class="tok-p">(</span><span class="tok-s">"notnode"</span><span class="tok-p">);</span>
|
||||
@ -876,7 +903,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_attribute</span> <span class="tok-n">attr</span> <span class="tok-o">=</span> <span class="tok-n">node</span><span class="tok-p">.</span><span class="tok-n">attribute</span><span class="tok-p">(</span><span class="tok-s">"id"</span><span class="tok-p">);</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_attribute</span> <span class="tok-n">attr</span> <span class="tok-o">=</span> <span class="tok-n">node</span><span class="tok-p">.</span><span class="tok-n">attribute</span><span class="tok-p">(</span><span class="tok-s">"id"</span><span class="tok-p">);</span>
|
||||
|
||||
<span class="tok-c1">// change attribute name/value</span>
|
||||
<span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">cout</span> <span class="tok-o"><<</span> <span class="tok-n">attr</span><span class="tok-p">.</span><span class="tok-n">set_name</span><span class="tok-p">(</span><span class="tok-s">"key"</span><span class="tok-p">)</span> <span class="tok-o"><<</span> <span class="tok-s">", "</span> <span class="tok-o"><<</span> <span class="tok-n">attr</span><span class="tok-p">.</span><span class="tok-n">set_value</span><span class="tok-p">(</span><span class="tok-s">"345"</span><span class="tok-p">);</span>
|
||||
@ -911,7 +938,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-c1">// add node with some name</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-c1">// add node with some name</span>
|
||||
<span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_node</span> <span class="tok-n">node</span> <span class="tok-o">=</span> <span class="tok-n">doc</span><span class="tok-p">.</span><span class="tok-n">append_child</span><span class="tok-p">(</span><span class="tok-s">"node"</span><span class="tok-p">);</span>
|
||||
|
||||
<span class="tok-c1">// add description node with text child</span>
|
||||
@ -935,7 +962,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-c1">// remove description node with the whole subtree</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-c1">// remove description node with the whole subtree</span>
|
||||
<span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_node</span> <span class="tok-n">node</span> <span class="tok-o">=</span> <span class="tok-n">doc</span><span class="tok-p">.</span><span class="tok-n">child</span><span class="tok-p">(</span><span class="tok-s">"node"</span><span class="tok-p">);</span>
|
||||
<span class="tok-n">node</span><span class="tok-p">.</span><span class="tok-n">remove_child</span><span class="tok-p">(</span><span class="tok-s">"description"</span><span class="tok-p">);</span>
|
||||
|
||||
@ -951,7 +978,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="saving"><a class="anchor" href="#saving"></a>Saving document</h2>
|
||||
<h2 id="saving"><a class="anchor" href="#saving"></a><a class="link" href="#saving">Saving document</a></h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>Often after creating a new document or loading the existing one and processing it, it is necessary to save the result back to file. Also it is occasionally useful to output the whole document or a subtree to some stream; use cases include debug printing, serialization via network or other text-oriented medium, etc. pugixml provides several functions to output any subtree of the document to a file, stream or another generic transport interface; these functions allow to customize the output format, and also perform necessary encoding conversions.</p>
|
||||
@ -964,7 +991,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-c1">// save document to file</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-c1">// save document to file</span>
|
||||
<span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">cout</span> <span class="tok-o"><<</span> <span class="tok-s">"Saving result: "</span> <span class="tok-o"><<</span> <span class="tok-n">doc</span><span class="tok-p">.</span><span class="tok-n">save_file</span><span class="tok-p">(</span><span class="tok-s">"save_file_output.xml"</span><span class="tok-p">)</span> <span class="tok-o"><<</span> <span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">endl</span><span class="tok-p">;</span></code></pre>
|
||||
</div>
|
||||
</div>
|
||||
@ -976,7 +1003,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-c1">// save document to standard output</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-c1">// save document to standard output</span>
|
||||
<span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">cout</span> <span class="tok-o"><<</span> <span class="tok-s">"Document:</span><span class="tok-se">\n</span><span class="tok-s">"</span><span class="tok-p">;</span>
|
||||
<span class="tok-n">doc</span><span class="tok-p">.</span><span class="tok-n">save</span><span class="tok-p">(</span><span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">cout</span><span class="tok-p">);</span></code></pre>
|
||||
</div>
|
||||
@ -989,7 +1016,7 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
|
||||
</div>
|
||||
<div class="listingblock">
|
||||
<div class="content">
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span class="tok-k">struct</span> <span class="tok-nl">xml_string_writer</span><span class="tok-p">:</span> <span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_writer</span>
|
||||
<pre class="pygments highlight"><code data-lang="c++"><span></span><span class="tok-k">struct</span> <span class="tok-nl">xml_string_writer</span><span class="tok-p">:</span> <span class="tok-n">pugi</span><span class="tok-o">::</span><span class="tok-n">xml_writer</span>
|
||||
<span class="tok-p">{</span>
|
||||
<span class="tok-n">std</span><span class="tok-o">::</span><span class="tok-n">string</span> <span class="tok-n">result</span><span class="tok-p">;</span>
|
||||
|
||||
@ -1001,12 +1028,12 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
|
||||
</div>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p>While the previously described functions save the whole document to the destination, it is easy to save a single subtree. Instead of calling <code>xml_document::save</code>, just call <code>xml_node::print</code> function on the target node. You can save node contents to C++ IOstream object or custom writer in this way. Saving a subtree slightly differs from saving the whole document; <a href="manual/saving.html#saving.subtree">read the manual</a> for more information.</p>
|
||||
<p>While the previously described functions save the whole document to the destination, it is easy to save a single subtree. Instead of calling <code>xml_document::save</code>, just call <code>xml_node::print</code> function on the target node. You can save node contents to C++ IOstream object or custom writer in this way. Saving a subtree slightly differs from saving the whole document; <a href="manual.html#saving.subtree">read the manual</a> for more information.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="feedback"><a class="anchor" href="#feedback"></a>Feedback</h2>
|
||||
<h2 id="feedback"><a class="anchor" href="#feedback"></a><a class="link" href="#feedback">Feedback</a></h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>If you believe you’ve found a bug in pugixml, please file an issue via <a href="https://github.com/zeux/pugixml/issues/new">issue submission form</a>. Be sure to include the relevant information so that the bug can be reproduced: the version of pugixml, compiler version and target architecture, the code that uses pugixml and exhibits the bug, etc. Feature requests and contributions can be filed as issues, too.</p>
|
||||
@ -1017,14 +1044,14 @@ XPath functions throw <code>xpath_exception</code> objects on error; the sample
|
||||
</div>
|
||||
</div>
|
||||
<div class="sect1">
|
||||
<h2 id="license"><a class="anchor" href="#license"></a>License</h2>
|
||||
<h2 id="license"><a class="anchor" href="#license"></a><a class="link" href="#license">License</a></h2>
|
||||
<div class="sectionbody">
|
||||
<div class="paragraph">
|
||||
<p>The pugixml library is distributed under the MIT license:</p>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>Copyright (c) 2006-2016 Arseny Kapoulkine
|
||||
<pre>Copyright (c) 2006-2019 Arseny Kapoulkine
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
@ -1053,8 +1080,8 @@ OTHER DEALINGS IN THE SOFTWARE.</pre>
|
||||
</div>
|
||||
<div class="literalblock">
|
||||
<div class="content">
|
||||
<pre>This software is based on pugixml library (http://pugixml.org).
|
||||
pugixml is Copyright (C) 2006-2016 Arseny Kapoulkine.</pre>
|
||||
<pre>This software is based on pugixml library (https://pugixml.org).
|
||||
pugixml is Copyright (C) 2006-2019 Arseny Kapoulkine.</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1062,13 +1089,13 @@ pugixml is Copyright (C) 2006-2016 Arseny Kapoulkine.</pre>
|
||||
</div>
|
||||
<div id="footnotes">
|
||||
<hr>
|
||||
<div class="footnote" id="_footnote_1">
|
||||
<div class="footnote" id="_footnotedef_1">
|
||||
<a href="#_footnoteref_1">1</a>. All trademarks used are properties of their respective owners.
|
||||
</div>
|
||||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2015-12-31 17:19:05 MSK
|
||||
Last updated 2019-09-11 21:50:46 -0700
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
10
3rdparty/pugixml/readme.txt
vendored
10
3rdparty/pugixml/readme.txt
vendored
@ -1,7 +1,7 @@
|
||||
pugixml 1.7 - an XML processing library
|
||||
pugixml 1.10 - an XML processing library
|
||||
|
||||
Copyright (C) 2006-2016, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
Report bugs and download new versions at http://pugixml.org/
|
||||
Copyright (C) 2006-2019, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
Report bugs and download new versions at https://pugixml.org/
|
||||
|
||||
This is the distribution of pugixml, which is a C++ XML processing library,
|
||||
which consists of a DOM-like interface with rich traversal/modification
|
||||
@ -13,8 +13,6 @@ automatically during parsing/saving).
|
||||
|
||||
The distribution contains the following folders:
|
||||
|
||||
contrib/ - various contributions to pugixml
|
||||
|
||||
docs/ - documentation
|
||||
docs/samples - pugixml usage examples
|
||||
docs/quickstart.html - quick start guide
|
||||
@ -28,7 +26,7 @@ The distribution contains the following folders:
|
||||
|
||||
This library is distributed under the MIT License:
|
||||
|
||||
Copyright (c) 2006-2016 Arseny Kapoulkine
|
||||
Copyright (c) 2006-2019 Arseny Kapoulkine
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
|
77
3rdparty/pugixml/scripts/natvis/pugixml.natvis
vendored
Normal file
77
3rdparty/pugixml/scripts/natvis/pugixml.natvis
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<Type Name="pugi::xml_node">
|
||||
<DisplayString Condition="_root">{_root}</DisplayString>
|
||||
<DisplayString Condition="!_root">none</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem Condition="_root">_root</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="pugi::xml_node_struct">
|
||||
<DisplayString Condition="name && value">{(pugi::xml_node_type)(header & 0xf),en} name={name,na} value={value,na}</DisplayString>
|
||||
<DisplayString Condition="name">{(pugi::xml_node_type)(header & 0xf),en} name={name,na}</DisplayString>
|
||||
<DisplayString Condition="value">{(pugi::xml_node_type)(header & 0xf),en} value={value,na}</DisplayString>
|
||||
<DisplayString>{(pugi::xml_node_type)(header & 0xf),en}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="value" Condition="value">value,na</Item>
|
||||
<Synthetic Name="attributes" Condition="first_attribute">
|
||||
<Expand>
|
||||
<CustomListItems>
|
||||
<Variable Name="curr" InitialValue="first_attribute" />
|
||||
|
||||
<Loop Condition="curr">
|
||||
<Item Name="{curr->name,na}">curr,view(child)na</Item>
|
||||
<Exec>curr = curr->next_attribute</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Synthetic>
|
||||
<LinkedListItems>
|
||||
<HeadPointer>first_child</HeadPointer>
|
||||
<NextPointer>next_sibling</NextPointer>
|
||||
<ValueNode>this,na</ValueNode>
|
||||
</LinkedListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="pugi::xml_attribute">
|
||||
<DisplayString Condition="_attr">{_attr}</DisplayString>
|
||||
<DisplayString Condition="!_attr">none</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem Condition="_attr">_attr</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="pugi::xml_attribute_struct">
|
||||
<DisplayString ExcludeView="child">{name,na} = {value,na}</DisplayString>
|
||||
<DisplayString>{value,na}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="name">name,na</Item>
|
||||
<Item Name="value">value,na</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="pugi::xpath_node">
|
||||
<DisplayString Condition="_node._root && _attribute._attr">{_node,na} "{_attribute._attr->name,na}"="{_attribute._attr->value,na}"</DisplayString>
|
||||
<DisplayString Condition="_node._root">{_node,na}</DisplayString>
|
||||
<DisplayString Condition="_attribute._attr">{_attribute}</DisplayString>
|
||||
<DisplayString>empty</DisplayString>
|
||||
<Expand HideRawView="1">
|
||||
<ExpandedItem Condition="_node._root && !_attribute._attr">_node</ExpandedItem>
|
||||
<ExpandedItem Condition="!_node._root && _attribute._attr">_attribute</ExpandedItem>
|
||||
<Item Name="node" Condition="_node._root && _attribute._attr">_node,na</Item>
|
||||
<Item Name="attribute" Condition="_node._root && _attribute._attr">_attribute,na</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="pugi::xpath_node_set">
|
||||
<Expand>
|
||||
<Item Name="type">_type</Item>
|
||||
<ArrayItems>
|
||||
<Size>_end - _begin</Size>
|
||||
<ValuePointer>_begin</ValuePointer>
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
</AutoVisualizer>
|
506
3rdparty/pugixml/scripts/natvis/pugixml_compact.natvis
vendored
Normal file
506
3rdparty/pugixml/scripts/natvis/pugixml_compact.natvis
vendored
Normal file
@ -0,0 +1,506 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<Type Name="pugi::xml_node">
|
||||
<DisplayString Condition="_root">{_root}</DisplayString>
|
||||
<DisplayString Condition="!_root">none</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem Condition="_root">_root</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="pugi::xml_attribute">
|
||||
<DisplayString Condition="_attr">{_attr}</DisplayString>
|
||||
<DisplayString Condition="!_attr">none</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem Condition="_attr">_attr</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="pugi::xml_node_struct">
|
||||
<Expand>
|
||||
<Item Name="type">(pugi::xml_node_type)(header._flags & 15)</Item>
|
||||
<Item Name="name" Condition="name._data">name,na</Item>
|
||||
<Item Name="value" Condition="value._data">value,na</Item>
|
||||
|
||||
<Synthetic Name="attributes" Condition="first_attribute._data">
|
||||
<DisplayString>...</DisplayString>
|
||||
<Expand>
|
||||
<CustomListItems>
|
||||
<Variable Name="attribute_this" InitialValue="(size_t)&first_attribute" />
|
||||
<Variable Name="attribute_data" InitialValue="first_attribute._data" />
|
||||
<Variable Name="attribute_data_copy" InitialValue="attribute_data" />
|
||||
|
||||
<!-- first_attribute struct template arguments -->
|
||||
<Variable Name="attribute_T1" InitialValue="11" />
|
||||
<Variable Name="attribute_T2" InitialValue="0" />
|
||||
|
||||
<Variable Name="compact_alignment_log2" InitialValue="2" />
|
||||
<Variable Name="compact_alignment" InitialValue="1 << compact_alignment_log2" />
|
||||
|
||||
<!-- compact_get_page() -->
|
||||
<Variable Name="_page" InitialValue="*(char*)(attribute_this - attribute_T1)" />
|
||||
<Variable Name="page" InitialValue="((attribute_this - attribute_T1 - (_page << compact_alignment_log2)) - *(unsigned*)(attribute_this - attribute_T1 - (_page << compact_alignment_log2)))" />
|
||||
|
||||
<!-- page->allocator->_hash -->
|
||||
<Variable Name="allocator" InitialValue="*(size_t*)page" />
|
||||
<Variable Name="_hash" InitialValue="*(size_t*)(allocator + 2 * sizeof(size_t))" /><!--2 pointer offsetof(allocator, _hash)-->
|
||||
<Variable Name="_items" InitialValue="*(size_t*)_hash" />
|
||||
<Variable Name="_capacity" InitialValue="*((size_t*)_hash + 1)" /><!--1 pointer offsetof(_hash, _capacity)-->
|
||||
<Variable Name="_count" InitialValue="*((size_t*)_hash + 2)" /><!--2 pointer offsetof(_hash, _count)-->
|
||||
|
||||
<!-- find() prolog -->
|
||||
<Variable Name="hashmod" InitialValue="_capacity - 1" />
|
||||
|
||||
<Variable Name="h" InitialValue="(unsigned)attribute_this" />
|
||||
<Variable Name="bucket" InitialValue="0" />
|
||||
|
||||
<Variable Name="probe" InitialValue="0" />
|
||||
<Variable Name="probe_item" InitialValue="(size_t*)0" />
|
||||
|
||||
<Variable Name="attribute_real" InitialValue="(pugi::xml_attribute_struct*)0" />
|
||||
|
||||
<!-- if _data < 255 -->
|
||||
<Variable Name="attribute_short" InitialValue="(pugi::xml_attribute_struct*)(((size_t)attribute_this & ~(compact_alignment - 1)) + (attribute_data - 1 + attribute_T2) * compact_alignment)" />
|
||||
|
||||
<Variable Name="number" InitialValue="0" />
|
||||
|
||||
<!-- Loop over all attributes -->
|
||||
<Loop Condition="attribute_this && attribute_data">
|
||||
<!-- find() hash -->
|
||||
<Exec>h = h ^ (h >> 16)</Exec>
|
||||
<Exec>h = h * (0x85ebca6bu)</Exec>
|
||||
<Exec>h = h ^ (h >> 13)</Exec>
|
||||
<Exec>h = h * (0xc2b2ae35u)</Exec>
|
||||
<Exec>h = h ^ (h >> 16)</Exec>
|
||||
|
||||
<Exec>bucket = h & hashmod</Exec>
|
||||
|
||||
<!-- find() loop -->
|
||||
<Loop Condition="probe <= hashmod &&_capacity">
|
||||
<Exec>probe_item = (size_t*)_items + bucket * 2</Exec><!--2 pointer sizeof(item_t)-->
|
||||
|
||||
<If Condition="*probe_item == attribute_this || *probe_item == 0">
|
||||
<Exec>attribute_real = *(pugi::xml_attribute_struct**)(probe_item + 1)</Exec><!--1 pointer offsetof(item_t, value)-->
|
||||
<Break/>
|
||||
</If>
|
||||
|
||||
<Exec>bucket = (bucket + probe + 1) & hashmod</Exec>
|
||||
<Exec>probe++</Exec>
|
||||
</Loop>
|
||||
|
||||
<Exec>attribute_data_copy = attribute_data</Exec>
|
||||
|
||||
<If Condition="attribute_data_copy >= 255 && attribute_real">
|
||||
<Item Name="[{number}]">*attribute_real,view(child)</Item>
|
||||
<Exec>attribute_this = (size_t)&(*attribute_real).next_attribute</Exec>
|
||||
<Exec>attribute_data = (*attribute_real).next_attribute._data</Exec>
|
||||
</If>
|
||||
<If Condition="attribute_data_copy < 255 && attribute_short">
|
||||
<Item Name="[{number}]">*attribute_short,view(child)</Item>
|
||||
<Exec>attribute_this = (size_t)&(*attribute_short).next_attribute</Exec>
|
||||
<Exec>attribute_data = (*attribute_short).next_attribute._data</Exec>
|
||||
</If>
|
||||
|
||||
<!-- next_attribute struct template arguments -->
|
||||
<Exec>attribute_T1 = 7</Exec>
|
||||
<Exec>attribute_T2 = 0</Exec>
|
||||
|
||||
<!-- find() prolog again -->
|
||||
<Exec>h = (unsigned)attribute_this</Exec>
|
||||
<Exec>bucket = 0</Exec>
|
||||
|
||||
<Exec>probe = 0</Exec>
|
||||
<Exec>probe_item = (size_t*)0</Exec>
|
||||
|
||||
<Exec>attribute_real = (pugi::xml_attribute_struct*)0</Exec>
|
||||
<Exec>attribute_short = (pugi::xml_attribute_struct*)(((size_t)attribute_this & ~(compact_alignment - 1)) + (attribute_data - 1 + attribute_T2) * compact_alignment)</Exec>
|
||||
|
||||
<Exec>number++</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Synthetic>
|
||||
|
||||
<CustomListItems>
|
||||
<Variable Name="child_this" InitialValue="&first_child" />
|
||||
<Variable Name="child_data" InitialValue="first_child._data" />
|
||||
<Variable Name="child_data_copy" InitialValue="child_data" />
|
||||
|
||||
<!-- first_child struct template arguments -->
|
||||
<Variable Name="child_T1" InitialValue="8" />
|
||||
<Variable Name="child_T2" InitialValue="0" />
|
||||
|
||||
<Variable Name="compact_alignment_log2" InitialValue="2" />
|
||||
<Variable Name="compact_alignment" InitialValue="1 << compact_alignment_log2" />
|
||||
|
||||
<!-- compact_get_page() -->
|
||||
<Variable Name="_page" InitialValue="*(char*)(child_this - child_T1)" />
|
||||
<Variable Name="page" InitialValue="((child_this - child_T1 - (_page << compact_alignment_log2)) - *(unsigned*)(child_this - child_T1 - (_page << compact_alignment_log2)))" />
|
||||
|
||||
<!-- page->allocator->_hash -->
|
||||
<Variable Name="allocator" InitialValue="*(size_t*)page" />
|
||||
<Variable Name="_hash" InitialValue="*(size_t*)(allocator + 2 * sizeof(size_t))" /><!--2 pointer offsetof(allocator, _hash)-->
|
||||
<Variable Name="_items" InitialValue="*(size_t*)_hash" />
|
||||
<Variable Name="_capacity" InitialValue="*((size_t*)_hash + 1)" /><!--1 pointer offsetof(_hash, _capacity)-->
|
||||
<Variable Name="_count" InitialValue="*((size_t*)_hash + 2)" /><!--2 pointer offsetof(_hash, _count)-->
|
||||
|
||||
<!-- find() prolog -->
|
||||
<Variable Name="hashmod" InitialValue="_capacity - 1" />
|
||||
|
||||
<Variable Name="h" InitialValue="(unsigned)child_this" />
|
||||
<Variable Name="bucket" InitialValue="0" />
|
||||
|
||||
<Variable Name="probe" InitialValue="0" />
|
||||
<Variable Name="probe_item" InitialValue="(size_t*)0" />
|
||||
|
||||
<Variable Name="child_real" InitialValue="(pugi::xml_node_struct*)0" />
|
||||
|
||||
<!-- if _data < 255 -->
|
||||
<Variable Name="child_short" InitialValue="(pugi::xml_node_struct*)(((size_t)child_this & ~(compact_alignment - 1)) + (child_data - 1 + child_T2) * compact_alignment)" />
|
||||
|
||||
<Variable Name="number" InitialValue="0" />
|
||||
|
||||
<Loop Condition="child_this && child_data">
|
||||
<!-- find() hash -->
|
||||
<Exec>h = h ^ (h >> 16)</Exec>
|
||||
<Exec>h = h * (0x85ebca6bu)</Exec>
|
||||
<Exec>h = h ^ (h >> 13)</Exec>
|
||||
<Exec>h = h * (0xc2b2ae35u)</Exec>
|
||||
<Exec>h = h ^ (h >> 16)</Exec>
|
||||
|
||||
<Exec>bucket = h & hashmod</Exec>
|
||||
|
||||
<!-- find() loop -->
|
||||
<Loop Condition="probe <= hashmod &&_capacity">
|
||||
<Exec>probe_item = (size_t*)_items + bucket * 2</Exec><!--2 pointer sizeof(item_t)-->
|
||||
|
||||
<If Condition="*probe_item == child_this || *probe_item == 0">
|
||||
<Exec>child_real = *(pugi::xml_node_struct**)(probe_item + 1)</Exec><!--1 pointer offsetof(item_t, value)-->
|
||||
<Break/>
|
||||
</If>
|
||||
|
||||
<Exec>bucket = (bucket + probe + 1) & hashmod</Exec>
|
||||
<Exec>probe++</Exec>
|
||||
</Loop>
|
||||
|
||||
<Exec>child_data_copy = child_data</Exec>
|
||||
|
||||
<If Condition="child_data_copy >= 255 && child_real">
|
||||
<Item Name="[{number}]">*child_real,view(child)</Item>
|
||||
<Exec>child_this = (size_t)&(*child_real).next_sibling</Exec>
|
||||
<Exec>child_data = (*child_real).next_sibling._data</Exec>
|
||||
</If>
|
||||
<If Condition="child_data_copy < 255 && child_short">
|
||||
<Item Name="[{number}]">*child_short,view(child)</Item>
|
||||
<Exec>child_this = (size_t)&(*child_short).next_sibling</Exec>
|
||||
<Exec>child_data = (*child_short).next_sibling._data</Exec>
|
||||
</If>
|
||||
|
||||
<!-- next_sibling struct template arguments -->
|
||||
<Exec>child_T1 = 10</Exec>
|
||||
<Exec>child_T2 = 0</Exec>
|
||||
|
||||
<!-- find() prolog again -->
|
||||
<Exec>h = (unsigned)child_this</Exec>
|
||||
<Exec>bucket = 0</Exec>
|
||||
|
||||
<Exec>probe = 0</Exec>
|
||||
<Exec>probe_item = (size_t*)0</Exec>
|
||||
|
||||
<Exec>child_real = (pugi::xml_node_struct*)0</Exec>
|
||||
<Exec>child_short = (pugi::xml_node_struct*)(((size_t)child_this & ~(compact_alignment - 1)) + (child_data - 1 + child_T2) * compact_alignment)</Exec>
|
||||
|
||||
<Exec>number++</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
|
||||
<Item Name="next_sibling" ExcludeView="child">next_sibling</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="pugi::xml_attribute_struct">
|
||||
<Expand>
|
||||
<Item Name="name">name,na</Item>
|
||||
<Item Name="value">value,na</Item>
|
||||
|
||||
<CustomListItems ExcludeView="child">
|
||||
<Variable Name="attribute_this" InitialValue="&next_attribute" />
|
||||
<Variable Name="attribute_data" InitialValue="next_attribute._data" />
|
||||
|
||||
<!-- next_attribute struct template arguments -->
|
||||
<Variable Name="attribute_T1" InitialValue="7" />
|
||||
<Variable Name="attribute_T2" InitialValue="0" />
|
||||
|
||||
<Variable Name="compact_alignment_log2" InitialValue="2" />
|
||||
<Variable Name="compact_alignment" InitialValue="1 << compact_alignment_log2" />
|
||||
|
||||
<!-- compact_get_page() -->
|
||||
<Variable Name="_page" InitialValue="*(char*)(attribute_this - attribute_T1)" />
|
||||
<Variable Name="page" InitialValue="((attribute_this - attribute_T1 - (_page << compact_alignment_log2)) - *(unsigned*)(attribute_this - attribute_T1 - (_page << compact_alignment_log2)))" />
|
||||
|
||||
<!-- page->allocator->_hash -->
|
||||
<Variable Name="allocator" InitialValue="*(size_t*)page" />
|
||||
<Variable Name="_hash" InitialValue="*(size_t*)(allocator + 2 * sizeof(size_t))" /><!--2 pointer offsetof(allocator, _hash)-->
|
||||
<Variable Name="_items" InitialValue="*(size_t*)_hash" />
|
||||
<Variable Name="_capacity" InitialValue="*((size_t*)_hash + 1)" /><!--1 pointer offsetof(_hash, _capacity)-->
|
||||
<Variable Name="_count" InitialValue="*((size_t*)_hash + 2)" /><!--2 pointer offsetof(_hash, _count)-->
|
||||
|
||||
<!-- find() prolog -->
|
||||
<Variable Name="hashmod" InitialValue="_capacity - 1" />
|
||||
|
||||
<Variable Name="h" InitialValue="(unsigned)attribute_this" />
|
||||
<Variable Name="bucket" InitialValue="0" />
|
||||
|
||||
<Variable Name="probe" InitialValue="0" />
|
||||
<Variable Name="probe_item" InitialValue="(size_t*)0" />
|
||||
|
||||
<Variable Name="attribute_real" InitialValue="(pugi::xml_attribute_struct*)0" />
|
||||
|
||||
<!-- if _data < 255 -->
|
||||
<Variable Name="attribute_short" InitialValue="(pugi::xml_attribute_struct*)(((size_t)attribute_this & ~(compact_alignment - 1)) + (attribute_data - 1 + attribute_T2) * compact_alignment)" />
|
||||
|
||||
<!-- find() hash -->
|
||||
<Exec>h = h ^ (h >> 16)</Exec>
|
||||
<Exec>h = h * (0x85ebca6bu)</Exec>
|
||||
<Exec>h = h ^ (h >> 13)</Exec>
|
||||
<Exec>h = h * (0xc2b2ae35u)</Exec>
|
||||
<Exec>h = h ^ (h >> 16)</Exec>
|
||||
|
||||
<Exec>bucket = h & hashmod</Exec>
|
||||
|
||||
<!-- find() loop -->
|
||||
<Loop Condition="probe <= hashmod &&_capacity">
|
||||
<Exec>probe_item = (size_t*)_items + bucket * 2</Exec><!--2 pointer sizeof(item_t)-->
|
||||
|
||||
<If Condition="*probe_item == attribute_this || *probe_item == 0">
|
||||
<Exec>attribute_real = *(pugi::xml_attribute_struct**)(probe_item + 1)</Exec><!--1 pointer offsetof(item_t, value)-->
|
||||
<Break/>
|
||||
</If>
|
||||
|
||||
<Exec>bucket = (bucket + probe + 1) & hashmod</Exec>
|
||||
<Exec>probe++</Exec>
|
||||
</Loop>
|
||||
|
||||
<If Condition="attribute_data >= 255 && attribute_real">
|
||||
<Item Name="next_attribute">*attribute_real</Item>
|
||||
</If>
|
||||
<If Condition="attribute_data != 0 && attribute_data < 255 && attribute_short">
|
||||
<Item Name="next_attribute">*attribute_short</Item>
|
||||
</If>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="pugi::impl::`anonymous-namespace'::compact_string<*,*>">
|
||||
<Expand HideRawView="1">
|
||||
<CustomListItems Condition="_data && _data < 255">
|
||||
<Variable Name="compact_alignment_log2" InitialValue="2" />
|
||||
<Variable Name="compact_alignment" InitialValue="1 << compact_alignment_log2" />
|
||||
|
||||
<!-- compact_get_page() -->
|
||||
<Variable Name="_page" InitialValue="*(char*)(this - $T1)" />
|
||||
<Variable Name="page" InitialValue="((this - $T1 - (_page << compact_alignment_log2)) - *(unsigned*)(this - $T1 - (_page << compact_alignment_log2)))" />
|
||||
|
||||
<Variable Name="compact_string_base" InitialValue="*(size_t*)(page + 5 * sizeof(void*))" /><!-- 5 pointer offsetof(page, compact_string_base)-->
|
||||
<Variable Name="base" InitialValue="this - $T2" />
|
||||
<Variable Name="offset" InitialValue="((*(short*)base - 1) << 7) + (_data - 1)" />
|
||||
|
||||
<Item Name="value">(pugi::char_t*)(compact_string_base + offset * sizeof(pugi::char_t)),na</Item>
|
||||
</CustomListItems>
|
||||
|
||||
<CustomListItems Condition="_data && _data >= 255">
|
||||
<Variable Name="compact_alignment_log2" InitialValue="2" />
|
||||
<Variable Name="compact_alignment" InitialValue="1 << compact_alignment_log2" />
|
||||
|
||||
<!-- compact_get_page() -->
|
||||
<Variable Name="_page" InitialValue="*(char*)(this - $T1)" />
|
||||
<Variable Name="page" InitialValue="((this - $T1 - (_page << compact_alignment_log2)) - *(unsigned*)(this - $T1 - (_page << compact_alignment_log2)))" />
|
||||
|
||||
<!-- page->allocator->_hash -->
|
||||
<Variable Name="allocator" InitialValue="*(size_t*)page" />
|
||||
<Variable Name="_hash" InitialValue="*(size_t*)(allocator + 2 * sizeof(size_t))" /><!--2 pointer offsetof(allocator, _hash)-->
|
||||
<Variable Name="_items" InitialValue="*(size_t*)_hash" />
|
||||
<Variable Name="_capacity" InitialValue="*((size_t*)_hash + 1)" /><!--1 pointer offsetof(_hash, _capacity)-->
|
||||
<Variable Name="_count" InitialValue="*((size_t*)_hash + 2)" /><!--2 pointer offsetof(_hash, _count)-->
|
||||
|
||||
<!-- find() prolog -->
|
||||
<Variable Name="hashmod" InitialValue="_capacity - 1" />
|
||||
|
||||
<Variable Name="h" InitialValue="(unsigned)this" />
|
||||
<Variable Name="bucket" InitialValue="0" />
|
||||
|
||||
<Variable Name="probe" InitialValue="0" />
|
||||
<Variable Name="probe_item" InitialValue="(size_t*)0" />
|
||||
|
||||
<!-- find() hash -->
|
||||
<Exec>h = h ^ (h >> 16)</Exec>
|
||||
<Exec>h = h * (0x85ebca6bu)</Exec>
|
||||
<Exec>h = h ^ (h >> 13)</Exec>
|
||||
<Exec>h = h * (0xc2b2ae35u)</Exec>
|
||||
<Exec>h = h ^ (h >> 16)</Exec>
|
||||
|
||||
<Exec>bucket = h & hashmod</Exec>
|
||||
|
||||
<!-- find() loop -->
|
||||
<Loop Condition="probe <= hashmod &&_capacity">
|
||||
<Exec>probe_item = (size_t*)_items + bucket * 2</Exec><!--2 pointer sizeof(item_t)-->
|
||||
|
||||
<If Condition="*probe_item == this || *probe_item == 0">
|
||||
<Item Name="value">*(pugi::char_t**)(probe_item + 1)</Item><!--1 pointer offsetof(item_t, value)-->
|
||||
<Break/>
|
||||
</If>
|
||||
|
||||
<Exec>bucket = (bucket + probe + 1) & hashmod</Exec>
|
||||
<Exec>probe++</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="pugi::impl::`anonymous-namespace'::compact_pointer<pugi::xml_node_struct,*,*>">
|
||||
<DisplayString Condition="!_data">nullptr</DisplayString>
|
||||
<DisplayString Condition="_data">...</DisplayString>
|
||||
|
||||
<Expand HideRawView="1">
|
||||
<CustomListItems Condition="_data && _data < 255">
|
||||
<Variable Name="compact_alignment_log2" InitialValue="2" />
|
||||
<Variable Name="compact_alignment" InitialValue="1 << compact_alignment_log2" />
|
||||
|
||||
<Item Name="value">*(pugi::xml_node_struct*)(((size_t)this & ~(compact_alignment - 1)) + (_data - 1 + $T2) * compact_alignment)</Item>
|
||||
</CustomListItems>
|
||||
|
||||
<CustomListItems Condition="_data && _data >= 255">
|
||||
<Variable Name="compact_alignment_log2" InitialValue="2" />
|
||||
<Variable Name="compact_alignment" InitialValue="1 << compact_alignment_log2" />
|
||||
|
||||
<!-- compact_get_page() -->
|
||||
<Variable Name="_page" InitialValue="*(char*)(this - $T1)" />
|
||||
<Variable Name="page" InitialValue="((this - $T1 - (_page << compact_alignment_log2)) - *(unsigned*)(this - $T1 - (_page << compact_alignment_log2)))" />
|
||||
|
||||
<!-- page->allocator->_hash -->
|
||||
<Variable Name="allocator" InitialValue="*(size_t*)page" />
|
||||
<Variable Name="_hash" InitialValue="*(size_t*)(allocator + 2 * sizeof(size_t))" /><!--2 pointer offsetof(allocator, _hash)-->
|
||||
<Variable Name="_items" InitialValue="*(size_t*)_hash" />
|
||||
<Variable Name="_capacity" InitialValue="*((size_t*)_hash + 1)" /><!--1 pointer offsetof(_hash, _capacity)-->
|
||||
<Variable Name="_count" InitialValue="*((size_t*)_hash + 2)" /><!--2 pointer offsetof(_hash, _count)-->
|
||||
|
||||
<!-- find() prolog -->
|
||||
<Variable Name="hashmod" InitialValue="_capacity - 1" />
|
||||
|
||||
<Variable Name="h" InitialValue="(unsigned)this" />
|
||||
<Variable Name="bucket" InitialValue="0" />
|
||||
|
||||
<Variable Name="probe" InitialValue="0" />
|
||||
<Variable Name="probe_item" InitialValue="(size_t*)0" />
|
||||
|
||||
<!-- find() hash -->
|
||||
<Exec>h = h ^ (h >> 16)</Exec>
|
||||
<Exec>h = h * (0x85ebca6bu)</Exec>
|
||||
<Exec>h = h ^ (h >> 13)</Exec>
|
||||
<Exec>h = h * (0xc2b2ae35u)</Exec>
|
||||
<Exec>h = h ^ (h >> 16)</Exec>
|
||||
|
||||
<Exec>bucket = h & hashmod</Exec>
|
||||
|
||||
<!-- find() loop -->
|
||||
<Loop Condition="probe <= hashmod &&_capacity">
|
||||
<Exec>probe_item = (size_t*)_items + bucket * 2</Exec><!--2 pointer sizeof(item_t)-->
|
||||
|
||||
<If Condition="*probe_item == this || *probe_item == 0">
|
||||
<Item Name="value">**(pugi::xml_node_struct**)(probe_item + 1)</Item><!--1 pointer offsetof(item_t, value)-->
|
||||
<Break/>
|
||||
</If>
|
||||
|
||||
<Exec>bucket = (bucket + probe + 1) & hashmod</Exec>
|
||||
<Exec>probe++</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="pugi::impl::`anonymous-namespace'::compact_pointer<pugi::xml_attribute_struct,*,*>">
|
||||
<DisplayString Condition="!_data">nullptr</DisplayString>
|
||||
<DisplayString Condition="_data">...</DisplayString>
|
||||
|
||||
<Expand HideRawView="1">
|
||||
<CustomListItems Condition="_data && _data < 255">
|
||||
<Variable Name="compact_alignment_log2" InitialValue="2" />
|
||||
<Variable Name="compact_alignment" InitialValue="1 << compact_alignment_log2" />
|
||||
|
||||
<Item Name="value">*(pugi::xml_attribute_struct*)(((size_t)this & ~(compact_alignment - 1)) + (_data - 1 + $T2) * compact_alignment)</Item>
|
||||
</CustomListItems>
|
||||
|
||||
<CustomListItems Condition="_data && _data >= 255">
|
||||
<Variable Name="compact_alignment_log2" InitialValue="2" />
|
||||
<Variable Name="compact_alignment" InitialValue="1 << compact_alignment_log2" />
|
||||
|
||||
<!-- compact_get_page() -->
|
||||
<Variable Name="_page" InitialValue="*(char*)(this - $T1)" />
|
||||
<Variable Name="page" InitialValue="((this - $T1 - (_page << compact_alignment_log2)) - *(unsigned*)(this - $T1 - (_page << compact_alignment_log2)))" />
|
||||
|
||||
<!-- page->allocator->_hash -->
|
||||
<Variable Name="allocator" InitialValue="*(size_t*)page" />
|
||||
<Variable Name="_hash" InitialValue="*(size_t*)(allocator + 2 * sizeof(size_t))" /><!--2 pointer offsetof(allocator, _hash)-->
|
||||
<Variable Name="_items" InitialValue="*(size_t*)_hash" />
|
||||
<Variable Name="_capacity" InitialValue="*((size_t*)_hash + 1)" /><!--1 pointer offsetof(_hash, _capacity)-->
|
||||
<Variable Name="_count" InitialValue="*((size_t*)_hash + 2)" /><!--2 pointer offsetof(_hash, _count)-->
|
||||
|
||||
<!-- find() prolog -->
|
||||
<Variable Name="hashmod" InitialValue="_capacity - 1" />
|
||||
|
||||
<Variable Name="h" InitialValue="(unsigned)this" />
|
||||
<Variable Name="bucket" InitialValue="0" />
|
||||
|
||||
<Variable Name="probe" InitialValue="0" />
|
||||
<Variable Name="probe_item" InitialValue="(size_t*)0" />
|
||||
|
||||
<!-- find() hash -->
|
||||
<Exec>h = h ^ (h >> 16)</Exec>
|
||||
<Exec>h = h * (0x85ebca6bu)</Exec>
|
||||
<Exec>h = h ^ (h >> 13)</Exec>
|
||||
<Exec>h = h * (0xc2b2ae35u)</Exec>
|
||||
<Exec>h = h ^ (h >> 16)</Exec>
|
||||
|
||||
<Exec>bucket = h & hashmod</Exec>
|
||||
|
||||
<!-- find() loop -->
|
||||
<Loop Condition="probe <= hashmod &&_capacity">
|
||||
<Exec>probe_item = (size_t*)_items + bucket * 2</Exec><!--2 pointer sizeof(item_t)-->
|
||||
|
||||
<If Condition="*probe_item == this || *probe_item == 0">
|
||||
<Item Name="value">**(pugi::xml_attribute_struct**)(probe_item + 1)</Item><!--1 pointer offsetof(item_t, value)-->
|
||||
<Break/>
|
||||
</If>
|
||||
|
||||
<Exec>bucket = (bucket + probe + 1) & hashmod</Exec>
|
||||
<Exec>probe++</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="pugi::xpath_node">
|
||||
<DisplayString Condition="_node._root && _attribute._attr">{_node,na} {_attribute,na}</DisplayString>
|
||||
<DisplayString Condition="_node._root">{_node,na}</DisplayString>
|
||||
<DisplayString Condition="_attribute._attr">{_attribute}</DisplayString>
|
||||
<DisplayString>empty</DisplayString>
|
||||
|
||||
<Expand HideRawView="1">
|
||||
<ExpandedItem Condition="_node._root && !_attribute._attr">_node</ExpandedItem>
|
||||
<ExpandedItem Condition="!_node._root && _attribute._attr">_attribute</ExpandedItem>
|
||||
|
||||
<Item Name="node" Condition="_node._root && _attribute._attr">_node,na</Item>
|
||||
<Item Name="attribute" Condition="_node._root && _attribute._attr">_attribute,na</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="pugi::xpath_node_set">
|
||||
<Expand>
|
||||
<Item Name="type">_type</Item>
|
||||
<ArrayItems>
|
||||
<Size>_end - _begin</Size>
|
||||
<ValuePointer>_begin</ValuePointer>
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
</AutoVisualizer>
|
42
3rdparty/pugixml/scripts/nuget.autopkg
vendored
42
3rdparty/pugixml/scripts/nuget.autopkg
vendored
@ -1,42 +0,0 @@
|
||||
configurations {
|
||||
Toolset {
|
||||
key: "PlatformToolset";
|
||||
choices: { v140, v120, v110, v100 };
|
||||
}
|
||||
}
|
||||
nuget {
|
||||
nuspec {
|
||||
id = pugixml;
|
||||
version: 1.7.0-appveyor;
|
||||
|
||||
authors: {Arseny Kapoulkine};
|
||||
owners: {Arseny Kapoulkine};
|
||||
|
||||
projectUrl: "http://pugixml.org/";
|
||||
iconUrl: "https://github.com/zeux/pugixml/logo.svg";
|
||||
|
||||
title: pugixml;
|
||||
summary: "Light-weight, simple and fast XML parser for C++ with XPath support";
|
||||
releaseNotes: "http://pugixml.org/docs/manual.html#changes";
|
||||
copyright: "Copyright (c) 2006-2016 Arseny Kapoulkine";
|
||||
licenseUrl: "http://pugixml.org/license.html";
|
||||
requireLicenseAcceptance: false;
|
||||
|
||||
description: @"pugixml is a C++ XML processing library, which consists of a DOM-like interface with rich traversal/modification capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 implementation for complex data-driven tree queries. Full Unicode support is also available, with Unicode interface variants and conversions between different Unicode encodings (which happen automatically during parsing/saving).
|
||||
pugixml is used by a lot of projects, both open-source and proprietary, for performance and easy-to-use interface.";
|
||||
|
||||
tags: { native };
|
||||
}
|
||||
files {
|
||||
include: { "..\src\*.hpp" };
|
||||
|
||||
[x86,v120,release] { lib: vs2013\x32\pugixmls.lib; }
|
||||
[x86,v120,debug] { lib: vs2013\x32\pugixmlsd.lib; }
|
||||
[x64,v120,release] { lib: vs2013\x64\pugixmls.lib; }
|
||||
[x64,v120,debug] { lib: vs2013\x64\pugixmlsd.lib; }
|
||||
[x86,v140,release] { lib: vs2015\Win32_Release\pugixml.lib; }
|
||||
[x86,v140,debug] { lib: vs2015\Win32_Debug\pugixml.lib; }
|
||||
[x64,v140,release] { lib: vs2015\x64_Release\pugixml.lib; }
|
||||
[x64,v140,debug] { lib: vs2015\x64_Debug\pugixml.lib; }
|
||||
}
|
||||
}
|
15
3rdparty/pugixml/scripts/nuget/build/native/pugixml-propertiesui.xml
vendored
Normal file
15
3rdparty/pugixml/scripts/nuget/build/native/pugixml-propertiesui.xml
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ProjectSchemaDefinitions xmlns="clr-namespace:Microsoft.Build.Framework.XamlTypes;assembly=Microsoft.Build.Framework">
|
||||
<Rule Name="ReferencedPackages05032e35-86af-4ab2-a3dc-d3e348583165" PageTemplate="tool" DisplayName="Referenced Packages" SwitchPrefix="/" Order="1">
|
||||
<Rule.Categories>
|
||||
<Category Name="pugixml" DisplayName="pugixml" />
|
||||
</Rule.Categories>
|
||||
<Rule.DataSource>
|
||||
<DataSource Persistence="ProjectFile" ItemType="" />
|
||||
</Rule.DataSource>
|
||||
<EnumProperty Name="Linkage-pugixml" DisplayName="Linkage" Description="Which version of the runtime library to use for this library" Category="pugixml">
|
||||
<EnumValue Name="dynamic" DisplayName="Dynamic CRT (/MD, /MDd)" />
|
||||
<EnumValue Name="static" DisplayName="Static CRT (/MT, /MTd)" />
|
||||
</EnumProperty>
|
||||
</Rule>
|
||||
</ProjectSchemaDefinitions>
|
27
3rdparty/pugixml/scripts/nuget/build/native/pugixml.targets
vendored
Normal file
27
3rdparty/pugixml/scripts/nuget/build/native/pugixml.targets
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Label="Default initializers for properties">
|
||||
<Linkage-pugixml Condition="'$(Linkage-pugixml)' == ''">dynamic</Linkage-pugixml>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PropertyPageSchema Include="$(MSBuildThisFileDirectory)\pugixml-propertiesui.xml" />
|
||||
</ItemGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)include/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="$(Configuration.ToLower().IndexOf('debug')) != -1">
|
||||
<Link>
|
||||
<AdditionalDependencies>$(MSBuildThisFileDirectory)lib/$(Platform)\$(PlatformToolset.Split('_')[0])\$(Linkage-pugixml)\Debug\pugixml.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="$(Configuration.ToLower().IndexOf('debug')) == -1">
|
||||
<Link>
|
||||
<AdditionalDependencies>$(MSBuildThisFileDirectory)lib/$(Platform)\$(PlatformToolset.Split('_')[0])\$(Linkage-pugixml)\Release\pugixml.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
21
3rdparty/pugixml/scripts/nuget/pugixml.nuspec
vendored
Normal file
21
3rdparty/pugixml/scripts/nuget/pugixml.nuspec
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/10/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>pugixml</id>
|
||||
<version>1.10.0-appveyor</version>
|
||||
<title>pugixml</title>
|
||||
<authors>Arseny Kapoulkine</authors>
|
||||
<owners>Arseny Kapoulkine</owners>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<licenseUrl>https://pugixml.org/license.html</licenseUrl>
|
||||
<projectUrl>https://pugixml.org/</projectUrl>
|
||||
<iconUrl>https://github.com/zeux/pugixml/logo.svg</iconUrl>
|
||||
<description>pugixml is a C++ XML processing library, which consists of a DOM-like interface with rich traversal/modification capabilities, an extremely fast XML parser which constructs the DOM tree from an XML file/buffer, and an XPath 1.0 implementation for complex data-driven tree queries. Full Unicode support is also available, with Unicode interface variants and conversions between different Unicode encodings (which happen automatically during parsing/saving).
|
||||
pugixml is used by a lot of projects, both open-source and proprietary, for performance and easy-to-use interface.
|
||||
This package contains builds for VS2013, VS2015 and VS2017, VS2019, for both statically linked and DLL CRT; you can switch the CRT linkage in Project -> Properties -> Referenced Packages -> pugixml.</description>
|
||||
<summary>Light-weight, simple and fast XML parser for C++ with XPath support</summary>
|
||||
<releaseNotes>https://pugixml.org/docs/manual.html#changes</releaseNotes>
|
||||
<copyright>Copyright (c) 2006-2019 Arseny Kapoulkine</copyright>
|
||||
<tags>native nativepackage</tags>
|
||||
</metadata>
|
||||
</package>
|
13
3rdparty/pugixml/scripts/nuget_build.bat
vendored
13
3rdparty/pugixml/scripts/nuget_build.bat
vendored
@ -1,13 +0,0 @@
|
||||
@echo off
|
||||
cd %~dp0
|
||||
|
||||
"%VS140COMNTOOLS%\VsMSBuildCmd.bat" && ^
|
||||
msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo && ^
|
||||
msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo && ^
|
||||
msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo && ^
|
||||
msbuild pugixml_vs2013_static.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo && ^
|
||||
msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x86 /v:minimal /nologo && ^
|
||||
msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x86 /v:minimal /nologo && ^
|
||||
msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Debug /p:Platform=x64 /v:minimal /nologo && ^
|
||||
msbuild pugixml_vs2015.vcxproj /t:Rebuild /p:Configuration=Release /p:Platform=x64 /v:minimal /nologo && ^
|
||||
powershell Write-NuGetPackage nuget.autopkg
|
65
3rdparty/pugixml/scripts/nuget_build.ps1
vendored
Normal file
65
3rdparty/pugixml/scripts/nuget_build.ps1
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
function Run-Command([string]$cmd)
|
||||
{
|
||||
Invoke-Expression $cmd
|
||||
if ($LastExitCode) { exit $LastExitCode }
|
||||
}
|
||||
|
||||
function Force-Copy([string]$from, [string]$to)
|
||||
{
|
||||
Write-Host $from "->" $to
|
||||
New-Item -Force $to | Out-Null
|
||||
Copy-Item -Force $from $to
|
||||
if (! $?) { exit 1 }
|
||||
}
|
||||
|
||||
function Build-Version([string]$vs, [string]$toolset, [string]$linkage)
|
||||
{
|
||||
$prjsuffix = if ($linkage -eq "static") { "_static" } else { "" }
|
||||
$cfgsuffix = if ($linkage -eq "static") { "Static" } else { "" }
|
||||
|
||||
foreach ($configuration in "Debug","Release")
|
||||
{
|
||||
Run-Command "msbuild pugixml_$vs$prjsuffix.vcxproj /t:Rebuild /p:Configuration=$configuration /p:Platform=x86 /v:minimal /nologo"
|
||||
Run-Command "msbuild pugixml_$vs$prjsuffix.vcxproj /t:Rebuild /p:Configuration=$configuration /p:Platform=x64 /v:minimal /nologo"
|
||||
|
||||
Force-Copy "$vs/Win32_$configuration$cfgsuffix/pugixml.lib" "nuget/build/native/lib/Win32/$toolset/$linkage/$configuration/pugixml.lib"
|
||||
Force-Copy "$vs/x64_$configuration$cfgsuffix/pugixml.lib" "nuget/build/native/lib/x64/$toolset/$linkage/$configuration/pugixml.lib"
|
||||
}
|
||||
}
|
||||
|
||||
Push-Location
|
||||
$scriptdir = Split-Path $MyInvocation.MyCommand.Path
|
||||
cd $scriptdir
|
||||
|
||||
Force-Copy "../src/pugiconfig.hpp" "nuget/build/native/include/pugiconfig.hpp"
|
||||
Force-Copy "../src/pugixml.hpp" "nuget/build/native/include/pugixml.hpp"
|
||||
|
||||
if ($args[0] -eq 2019){
|
||||
Build-Version "vs2019" "v142" "dynamic"
|
||||
Build-Version "vs2019" "v142" "static"
|
||||
|
||||
} elseif ($args[0] -eq 2017){
|
||||
Build-Version "vs2017" "v141" "dynamic"
|
||||
Build-Version "vs2017" "v141" "static"
|
||||
|
||||
Build-Version "vs2015" "v140" "dynamic"
|
||||
Build-Version "vs2015" "v140" "static"
|
||||
|
||||
Build-Version "vs2013" "v120" "dynamic"
|
||||
Build-Version "vs2013" "v120" "static"
|
||||
|
||||
} elseif($args[0] -eq 2015){
|
||||
Build-Version "vs2015" "v140" "dynamic"
|
||||
Build-Version "vs2015" "v140" "static"
|
||||
|
||||
Build-Version "vs2013" "v120" "dynamic"
|
||||
Build-Version "vs2013" "v120" "static"
|
||||
|
||||
} elseif($args[0] -eq 2013){
|
||||
Build-Version "vs2013" "v120" "dynamic"
|
||||
Build-Version "vs2013" "v120" "static"
|
||||
}
|
||||
|
||||
Run-Command "nuget pack nuget"
|
||||
|
||||
Pop-Location
|
10
3rdparty/pugixml/scripts/pugixml.pc.in
vendored
10
3rdparty/pugixml/scripts/pugixml.pc.in
vendored
@ -1,11 +1,11 @@
|
||||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
includedir=${prefix}/include/pugixml-@PUGIXML_VERSION_STRING@
|
||||
libdir=${exec_prefix}/lib/pugixml-@PUGIXML_VERSION_STRING@
|
||||
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@@INSTALL_SUFFIX@
|
||||
libdir=@CMAKE_INSTALL_FULL_LIBDIR@@INSTALL_SUFFIX@
|
||||
|
||||
Name: pugixml
|
||||
Description: Light-weight, simple and fast XML parser for C++ with XPath support.
|
||||
URL: http://pugixml.org/
|
||||
Version: @PUGIXML_VERSION_STRING@
|
||||
URL: https://pugixml.org/
|
||||
Version: @pugixml_VERSION@
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lpugixml
|
||||
Libs: -L${libdir} -lpugixml
|
||||
|
29
3rdparty/pugixml/scripts/pugixml.podspec
vendored
29
3rdparty/pugixml/scripts/pugixml.podspec
vendored
@ -1,32 +1,9 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "pugixml"
|
||||
s.version = "1.7"
|
||||
s.version = "1.10"
|
||||
s.summary = "C++ XML parser library."
|
||||
s.homepage = "http://pugixml.org"
|
||||
s.license = { :type => 'MIT', :text => <<-qwertyuiop
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2006-2016 Arseny Kapoulkine
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
qwertyuiop
|
||||
}
|
||||
s.homepage = "https://pugixml.org"
|
||||
s.license = "MIT"
|
||||
s.author = { "Arseny Kapoulkine" => "arseny.kapoulkine@gmail.com" }
|
||||
s.platform = :ios, "7.0"
|
||||
|
||||
|
28
3rdparty/pugixml/scripts/pugixml_vs2010.vcxproj
vendored
28
3rdparty/pugixml/scripts/pugixml_vs2010.vcxproj
vendored
@ -64,17 +64,17 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\x32\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\x32\Debug\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixmld</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64\Debug\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixmld</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\x32\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\x32\Release\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\Win32_Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\Win32_Debug\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixml</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64_Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64_Debug\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixml</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\Win32_Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\Win32_Release\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixml</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64\Release\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64_Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64_Release\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@ -93,12 +93,12 @@
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)pugixmld.lib</OutputFile>
|
||||
<OutputFile>$(OutDir)pugixml.lib</OutputFile>
|
||||
</Lib>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixmld.pdb</ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@ -117,12 +117,12 @@
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)pugixmld.lib</OutputFile>
|
||||
<OutputFile>$(OutDir)pugixml.lib</OutputFile>
|
||||
</Lib>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixmld.pdb</ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
|
@ -64,18 +64,18 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\x32\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\x32\DebugStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixmlsd</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64\DebugStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixmlsd</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\x32\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\x32\ReleaseStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixmls</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64\ReleaseStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixmls</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\Win32_DebugStatic\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2010\Win32_DebugStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixml</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64_DebugStatic\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2010\x64_DebugStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixml</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\Win32_ReleaseStatic\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2010\Win32_ReleaseStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixml</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64_ReleaseStatic\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2010\x64_ReleaseStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@ -93,12 +93,12 @@
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)pugixmlsd.lib</OutputFile>
|
||||
<OutputFile>$(OutDir)pugixml.lib</OutputFile>
|
||||
</Lib>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixmlsd.pdb</ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@ -117,12 +117,12 @@
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)pugixmlsd.lib</OutputFile>
|
||||
<OutputFile>$(OutDir)pugixml.lib</OutputFile>
|
||||
</Lib>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixmlsd.pdb</ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@ -141,14 +141,14 @@
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)pugixmls.lib</OutputFile>
|
||||
<OutputFile>$(OutDir)pugixml.lib</OutputFile>
|
||||
</Lib>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixmls.pdb</ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@ -167,14 +167,14 @@
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)pugixmls.lib</OutputFile>
|
||||
<OutputFile>$(OutDir)pugixml.lib</OutputFile>
|
||||
</Lib>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixmls.pdb</ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
|
38
3rdparty/pugixml/scripts/pugixml_vs2013.vcxproj
vendored
38
3rdparty/pugixml/scripts/pugixml_vs2013.vcxproj
vendored
@ -68,17 +68,17 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\x32\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\x32\Debug\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixmld</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64\Debug\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixmld</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\x32\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\x32\Release\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\Win32_Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\Win32_Debug\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixml</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64_Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64_Debug\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixml</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\Win32_Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\Win32_Release\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixml</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64\Release\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64_Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64_Release\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
@ -92,18 +92,18 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)pugixmld.lib</OutputFile>
|
||||
<OutputFile>$(OutDir)pugixml.lib</OutputFile>
|
||||
</Lib>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixmld.pdb</ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@ -117,18 +117,18 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)pugixmld.lib</OutputFile>
|
||||
<OutputFile>$(OutDir)pugixml.lib</OutputFile>
|
||||
</Lib>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixmld.pdb</ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@ -142,7 +142,7 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -169,7 +169,7 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
@ -196,4 +196,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
@ -68,18 +68,18 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\x32\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\x32\DebugStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixmlsd</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64\DebugStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixmlsd</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\x32\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\x32\ReleaseStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixmls</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64\ReleaseStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixmls</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\Win32_DebugStatic\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">vs2013\Win32_DebugStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">pugixml</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64_DebugStatic\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">vs2013\x64_DebugStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">pugixml</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\Win32_ReleaseStatic\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">vs2013\Win32_ReleaseStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">pugixml</TargetName>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64_ReleaseStatic\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">vs2013\x64_ReleaseStatic\</IntDir>
|
||||
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@ -92,18 +92,18 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)pugixmlsd.lib</OutputFile>
|
||||
<OutputFile>$(OutDir)pugixml.lib</OutputFile>
|
||||
</Lib>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixmlsd.pdb</ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
@ -117,18 +117,18 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)pugixmlsd.lib</OutputFile>
|
||||
<OutputFile>$(OutDir)pugixml.lib</OutputFile>
|
||||
</Lib>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixmlsd.pdb</ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@ -142,20 +142,20 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)pugixmls.lib</OutputFile>
|
||||
<OutputFile>$(OutDir)pugixml.lib</OutputFile>
|
||||
</Lib>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixmls.pdb</ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
@ -169,20 +169,20 @@
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)pugixmls.lib</OutputFile>
|
||||
<OutputFile>$(OutDir)pugixml.lib</OutputFile>
|
||||
</Lib>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixmls.pdb</ProgramDataBaseFileName>
|
||||
<ProgramDataBaseFileName>$(OutDir)pugixml.pdb</ProgramDataBaseFileName>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
@ -196,4 +196,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
176
3rdparty/pugixml/scripts/pugixml_vs2015_static.vcxproj
vendored
Normal file
176
3rdparty/pugixml/scripts/pugixml_vs2015_static.vcxproj
vendored
Normal file
@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{07CF01C0-B887-499D-AD9C-799CB6A9FE64}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>pugixml</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>vs2015\$(Platform)_$(Configuration)Static\</OutDir>
|
||||
<IntDir>vs2015\$(Platform)_$(Configuration)Static\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>vs2015\$(Platform)_$(Configuration)Static\</OutDir>
|
||||
<IntDir>vs2015\$(Platform)_$(Configuration)Static\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>vs2015\$(Platform)_$(Configuration)Static\</OutDir>
|
||||
<IntDir>vs2015\$(Platform)_$(Configuration)Static\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>vs2015\$(Platform)_$(Configuration)Static\</OutDir>
|
||||
<IntDir>vs2015\$(Platform)_$(Configuration)Static\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\pugiconfig.hpp" />
|
||||
<ClInclude Include="..\src\pugixml.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\pugixml.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
172
3rdparty/pugixml/scripts/pugixml_vs2017.vcxproj
vendored
Normal file
172
3rdparty/pugixml/scripts/pugixml_vs2017.vcxproj
vendored
Normal file
@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{07CF01C0-B887-499D-AD9C-799CB6A9FE64}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>pugixml</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>vs2017\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir>vs2017\$(Platform)_$(Configuration)\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>vs2017\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir>vs2017\$(Platform)_$(Configuration)\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>vs2017\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir>vs2017\$(Platform)_$(Configuration)\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>vs2017\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir>vs2017\$(Platform)_$(Configuration)\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\pugiconfig.hpp" />
|
||||
<ClInclude Include="..\src\pugixml.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\pugixml.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
176
3rdparty/pugixml/scripts/pugixml_vs2017_static.vcxproj
vendored
Normal file
176
3rdparty/pugixml/scripts/pugixml_vs2017_static.vcxproj
vendored
Normal file
@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{07CF01C0-B887-499D-AD9C-799CB6A9FE64}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>pugixml</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v141</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>vs2017\$(Platform)_$(Configuration)Static\</OutDir>
|
||||
<IntDir>vs2017\$(Platform)_$(Configuration)Static\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>vs2017\$(Platform)_$(Configuration)Static\</OutDir>
|
||||
<IntDir>vs2017\$(Platform)_$(Configuration)Static\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>vs2017\$(Platform)_$(Configuration)Static\</OutDir>
|
||||
<IntDir>vs2017\$(Platform)_$(Configuration)Static\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>vs2017\$(Platform)_$(Configuration)Static\</OutDir>
|
||||
<IntDir>vs2017\$(Platform)_$(Configuration)Static\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\pugiconfig.hpp" />
|
||||
<ClInclude Include="..\src\pugixml.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\pugixml.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
172
3rdparty/pugixml/scripts/pugixml_vs2019.vcxproj
vendored
Normal file
172
3rdparty/pugixml/scripts/pugixml_vs2019.vcxproj
vendored
Normal file
@ -0,0 +1,172 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{07CF01C0-B887-499D-AD9C-799CB6A9FE64}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>pugixml</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>vs2019\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir>vs2019\$(Platform)_$(Configuration)\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>vs2019\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir>vs2019\$(Platform)_$(Configuration)\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>vs2019\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir>vs2019\$(Platform)_$(Configuration)\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>vs2019\$(Platform)_$(Configuration)\</OutDir>
|
||||
<IntDir>vs2019\$(Platform)_$(Configuration)\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\pugiconfig.hpp" />
|
||||
<ClInclude Include="..\src\pugixml.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\pugixml.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
176
3rdparty/pugixml/scripts/pugixml_vs2019_static.vcxproj
vendored
Normal file
176
3rdparty/pugixml/scripts/pugixml_vs2019_static.vcxproj
vendored
Normal file
@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{07CF01C0-B887-499D-AD9C-799CB6A9FE64}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>pugixml</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>vs2019\$(Platform)_$(Configuration)Static\</OutDir>
|
||||
<IntDir>vs2019\$(Platform)_$(Configuration)Static\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>vs2019\$(Platform)_$(Configuration)Static\</OutDir>
|
||||
<IntDir>vs2019\$(Platform)_$(Configuration)Static\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>vs2019\$(Platform)_$(Configuration)Static\</OutDir>
|
||||
<IntDir>vs2019\$(Platform)_$(Configuration)Static\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>vs2019\$(Platform)_$(Configuration)Static\</OutDir>
|
||||
<IntDir>vs2019\$(Platform)_$(Configuration)Static\</IntDir>
|
||||
<TargetName>pugixml</TargetName>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\src\pugiconfig.hpp" />
|
||||
<ClInclude Include="..\src\pugixml.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\src\pugixml.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
8
3rdparty/pugixml/src/pugiconfig.hpp
vendored
8
3rdparty/pugixml/src/pugiconfig.hpp
vendored
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* pugixml parser - version 1.7
|
||||
* pugixml parser - version 1.10
|
||||
* --------------------------------------------------------
|
||||
* Copyright (C) 2006-2016, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
* Report bugs and download new versions at http://pugixml.org/
|
||||
* Copyright (C) 2006-2019, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
* Report bugs and download new versions at https://pugixml.org/
|
||||
*
|
||||
* This library is distributed under the MIT License. See notice at the end
|
||||
* of this file.
|
||||
@ -49,7 +49,7 @@
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Copyright (c) 2006-2016 Arseny Kapoulkine
|
||||
* Copyright (c) 2006-2019 Arseny Kapoulkine
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
|
1566
3rdparty/pugixml/src/pugixml.cpp
vendored
1566
3rdparty/pugixml/src/pugixml.cpp
vendored
File diff suppressed because it is too large
Load Diff
99
3rdparty/pugixml/src/pugixml.hpp
vendored
99
3rdparty/pugixml/src/pugixml.hpp
vendored
@ -1,8 +1,8 @@
|
||||
/**
|
||||
* pugixml parser - version 1.7
|
||||
* pugixml parser - version 1.10
|
||||
* --------------------------------------------------------
|
||||
* Copyright (C) 2006-2016, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
* Report bugs and download new versions at http://pugixml.org/
|
||||
* Copyright (C) 2006-2019, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
* Report bugs and download new versions at https://pugixml.org/
|
||||
*
|
||||
* This library is distributed under the MIT License. See notice at the end
|
||||
* of this file.
|
||||
@ -12,8 +12,9 @@
|
||||
*/
|
||||
|
||||
#ifndef PUGIXML_VERSION
|
||||
// Define version macro; evaluates to major * 100 + minor so that it's safe to use in less-than comparisons
|
||||
# define PUGIXML_VERSION 170
|
||||
// Define version macro; evaluates to major * 1000 + minor * 10 + patch so that it's safe to use in less-than comparisons
|
||||
// Note: pugixml used major * 100 + minor * 10 + patch format up until 1.9 (which had version identifier 190); starting from pugixml 1.10, the minor version number is two digits
|
||||
# define PUGIXML_VERSION 1100
|
||||
#endif
|
||||
|
||||
// Include user configuration file (this can define various configuration macros)
|
||||
@ -72,10 +73,39 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// If the platform is known to have move semantics support, compile move ctor/operator implementation
|
||||
#ifndef PUGIXML_HAS_MOVE
|
||||
# if __cplusplus >= 201103
|
||||
# define PUGIXML_HAS_MOVE
|
||||
# elif defined(_MSC_VER) && _MSC_VER >= 1600
|
||||
# define PUGIXML_HAS_MOVE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// If C++ is 2011 or higher, add 'noexcept' specifiers
|
||||
#ifndef PUGIXML_NOEXCEPT
|
||||
# if __cplusplus >= 201103
|
||||
# define PUGIXML_NOEXCEPT noexcept
|
||||
# elif defined(_MSC_VER) && _MSC_VER >= 1900
|
||||
# define PUGIXML_NOEXCEPT noexcept
|
||||
# else
|
||||
# define PUGIXML_NOEXCEPT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Some functions can not be noexcept in compact mode
|
||||
#ifdef PUGIXML_COMPACT
|
||||
# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT
|
||||
#else
|
||||
# define PUGIXML_NOEXCEPT_IF_NOT_COMPACT PUGIXML_NOEXCEPT
|
||||
#endif
|
||||
|
||||
// If C++ is 2011 or higher, add 'override' qualifiers
|
||||
#ifndef PUGIXML_OVERRIDE
|
||||
# if __cplusplus >= 201103
|
||||
# define PUGIXML_OVERRIDE override
|
||||
# elif defined(_MSC_VER) && _MSC_VER >= 1700
|
||||
# define PUGIXML_OVERRIDE override
|
||||
# else
|
||||
# define PUGIXML_OVERRIDE
|
||||
# endif
|
||||
@ -220,6 +250,15 @@ namespace pugi
|
||||
// Write every attribute on a new line with appropriate indentation. This flag is off by default.
|
||||
const unsigned int format_indent_attributes = 0x40;
|
||||
|
||||
// Don't output empty element tags, instead writing an explicit start and end tag even if there are no children. This flag is off by default.
|
||||
const unsigned int format_no_empty_element_tags = 0x80;
|
||||
|
||||
// Skip characters belonging to range [0; 32) instead of "&#xNN;" encoding. This flag is off by default.
|
||||
const unsigned int format_skip_control_chars = 0x100;
|
||||
|
||||
// Use single quotes ' instead of double quotes " for enclosing attribute values. This flag is off by default.
|
||||
const unsigned int format_attribute_single_quote = 0x200;
|
||||
|
||||
// The default set of formatting flags.
|
||||
// Nodes are indented depending on their depth in DOM tree, a default declaration is output if document has none.
|
||||
const unsigned int format_default = format_indent;
|
||||
@ -619,8 +658,8 @@ namespace pugi
|
||||
xpath_node_set select_nodes(const xpath_query& query) const;
|
||||
|
||||
// (deprecated: use select_node instead) Select single node by evaluating XPath query.
|
||||
xpath_node select_single_node(const char_t* query, xpath_variable_set* variables = 0) const;
|
||||
xpath_node select_single_node(const xpath_query& query) const;
|
||||
PUGIXML_DEPRECATED xpath_node select_single_node(const char_t* query, xpath_variable_set* variables = 0) const;
|
||||
PUGIXML_DEPRECATED xpath_node select_single_node(const xpath_query& query) const;
|
||||
|
||||
#endif
|
||||
|
||||
@ -969,8 +1008,9 @@ namespace pugi
|
||||
xml_document(const xml_document&);
|
||||
xml_document& operator=(const xml_document&);
|
||||
|
||||
void create();
|
||||
void destroy();
|
||||
void _create();
|
||||
void _destroy();
|
||||
void _move(xml_document& rhs) PUGIXML_NOEXCEPT_IF_NOT_COMPACT;
|
||||
|
||||
public:
|
||||
// Default constructor, makes empty document
|
||||
@ -979,6 +1019,12 @@ namespace pugi
|
||||
// Destructor, invalidates all node/attribute handles to this document
|
||||
~xml_document();
|
||||
|
||||
#ifdef PUGIXML_HAS_MOVE
|
||||
// Move semantics support
|
||||
xml_document(xml_document&& rhs) PUGIXML_NOEXCEPT_IF_NOT_COMPACT;
|
||||
xml_document& operator=(xml_document&& rhs) PUGIXML_NOEXCEPT_IF_NOT_COMPACT;
|
||||
#endif
|
||||
|
||||
// Removes all nodes, leaving the empty document
|
||||
void reset();
|
||||
|
||||
@ -992,7 +1038,7 @@ namespace pugi
|
||||
#endif
|
||||
|
||||
// (deprecated: use load_string instead) Load document from zero-terminated string. No encoding conversions are applied.
|
||||
xml_parse_result load(const char_t* contents, unsigned int options = parse_default);
|
||||
PUGIXML_DEPRECATED xml_parse_result load(const char_t* contents, unsigned int options = parse_default);
|
||||
|
||||
// Load document from zero-terminated string. No encoding conversions are applied.
|
||||
xml_parse_result load_string(const char_t* contents, unsigned int options = parse_default);
|
||||
@ -1117,10 +1163,10 @@ namespace pugi
|
||||
xpath_variable_set(const xpath_variable_set& rhs);
|
||||
xpath_variable_set& operator=(const xpath_variable_set& rhs);
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#ifdef PUGIXML_HAS_MOVE
|
||||
// Move semantics support
|
||||
xpath_variable_set(xpath_variable_set&& rhs);
|
||||
xpath_variable_set& operator=(xpath_variable_set&& rhs);
|
||||
xpath_variable_set(xpath_variable_set&& rhs) PUGIXML_NOEXCEPT;
|
||||
xpath_variable_set& operator=(xpath_variable_set&& rhs) PUGIXML_NOEXCEPT;
|
||||
#endif
|
||||
|
||||
// Add a new variable or get the existing one, if the types match
|
||||
@ -1161,10 +1207,10 @@ namespace pugi
|
||||
// Destructor
|
||||
~xpath_query();
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#ifdef PUGIXML_HAS_MOVE
|
||||
// Move semantics support
|
||||
xpath_query(xpath_query&& rhs);
|
||||
xpath_query& operator=(xpath_query&& rhs);
|
||||
xpath_query(xpath_query&& rhs) PUGIXML_NOEXCEPT;
|
||||
xpath_query& operator=(xpath_query&& rhs) PUGIXML_NOEXCEPT;
|
||||
#endif
|
||||
|
||||
// Get query expression return type
|
||||
@ -1212,6 +1258,12 @@ namespace pugi
|
||||
};
|
||||
|
||||
#ifndef PUGIXML_NO_EXCEPTIONS
|
||||
#if defined(_MSC_VER)
|
||||
// C4275 can be ignored in Visual C++ if you are deriving
|
||||
// from a type in the Standard C++ Library
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4275)
|
||||
#endif
|
||||
// XPath exception class
|
||||
class PUGIXML_CLASS xpath_exception: public std::exception
|
||||
{
|
||||
@ -1228,6 +1280,9 @@ namespace pugi
|
||||
// Get parse result
|
||||
const xpath_parse_result& result() const;
|
||||
};
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// XPath node class (either xml_node or xml_attribute)
|
||||
@ -1302,10 +1357,10 @@ namespace pugi
|
||||
xpath_node_set(const xpath_node_set& ns);
|
||||
xpath_node_set& operator=(const xpath_node_set& ns);
|
||||
|
||||
#if __cplusplus >= 201103
|
||||
#ifdef PUGIXML_HAS_MOVE
|
||||
// Move semantics support
|
||||
xpath_node_set(xpath_node_set&& rhs);
|
||||
xpath_node_set& operator=(xpath_node_set&& rhs);
|
||||
xpath_node_set(xpath_node_set&& rhs) PUGIXML_NOEXCEPT;
|
||||
xpath_node_set& operator=(xpath_node_set&& rhs) PUGIXML_NOEXCEPT;
|
||||
#endif
|
||||
|
||||
// Get collection type
|
||||
@ -1333,13 +1388,13 @@ namespace pugi
|
||||
private:
|
||||
type_t _type;
|
||||
|
||||
xpath_node _storage;
|
||||
xpath_node _storage[1];
|
||||
|
||||
xpath_node* _begin;
|
||||
xpath_node* _end;
|
||||
|
||||
void _assign(const_iterator begin, const_iterator end, type_t type);
|
||||
void _move(xpath_node_set& rhs);
|
||||
void _move(xpath_node_set& rhs) PUGIXML_NOEXCEPT;
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -1397,7 +1452,7 @@ namespace std
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Copyright (c) 2006-2016 Arseny Kapoulkine
|
||||
* Copyright (c) 2006-2019 Arseny Kapoulkine
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
|
171
3rdparty/pugixml/tests/allocator.cpp
vendored
171
3rdparty/pugixml/tests/allocator.cpp
vendored
@ -1,171 +0,0 @@
|
||||
#include "allocator.hpp"
|
||||
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// Address sanitizer
|
||||
#if defined(__has_feature)
|
||||
# define ADDRESS_SANITIZER __has_feature(address_sanitizer)
|
||||
#else
|
||||
# define ADDRESS_SANITIZER defined(__SANITIZE_ADDRESS__)
|
||||
#endif
|
||||
|
||||
// Low-level allocation functions
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
# ifdef __MWERKS__
|
||||
# pragma ANSI_strict off // disable ANSI strictness to include windows.h
|
||||
# pragma cpp_extensions on // enable some extensions to include windows.h
|
||||
# endif
|
||||
|
||||
# if defined(_MSC_VER)
|
||||
# pragma warning(disable: 4201) // nonstandard extension used: nameless struct/union
|
||||
# endif
|
||||
|
||||
# ifdef _XBOX_VER
|
||||
# define NOD3D
|
||||
# include <xtl.h>
|
||||
# else
|
||||
# include <windows.h>
|
||||
# endif
|
||||
|
||||
namespace
|
||||
{
|
||||
const size_t page_size = 4096;
|
||||
|
||||
size_t align_to_page(size_t value)
|
||||
{
|
||||
return (value + page_size - 1) & ~(page_size - 1);
|
||||
}
|
||||
|
||||
void* allocate_page_aligned(size_t size)
|
||||
{
|
||||
// We can't use VirtualAlloc because it has 64Kb granularity so we run out of address space quickly
|
||||
// We can't use malloc because of occasional problems with CW on CRT termination
|
||||
static HANDLE heap = HeapCreate(0, 0, 0);
|
||||
|
||||
void* result = HeapAlloc(heap, 0, size + page_size);
|
||||
|
||||
return reinterpret_cast<void*>(align_to_page(reinterpret_cast<size_t>(result)));
|
||||
}
|
||||
|
||||
void* allocate(size_t size)
|
||||
{
|
||||
size_t aligned_size = align_to_page(size);
|
||||
|
||||
void* ptr = allocate_page_aligned(aligned_size + page_size);
|
||||
if (!ptr) return 0;
|
||||
|
||||
char* end = static_cast<char*>(ptr) + aligned_size;
|
||||
|
||||
DWORD old_flags;
|
||||
VirtualProtect(end, page_size, PAGE_NOACCESS, &old_flags);
|
||||
|
||||
return end - size;
|
||||
}
|
||||
|
||||
void deallocate(void* ptr, size_t size)
|
||||
{
|
||||
size_t aligned_size = align_to_page(size);
|
||||
|
||||
void* rptr = static_cast<char*>(ptr) + size - aligned_size;
|
||||
|
||||
DWORD old_flags;
|
||||
VirtualProtect(rptr, aligned_size + page_size, PAGE_NOACCESS, &old_flags);
|
||||
}
|
||||
}
|
||||
#elif (defined(__APPLE__) || defined(__linux__)) && (defined(__i386) || defined(__x86_64)) && !ADDRESS_SANITIZER
|
||||
# include <sys/mman.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
const size_t page_size = 4096;
|
||||
|
||||
size_t align_to_page(size_t value)
|
||||
{
|
||||
return (value + page_size - 1) & ~(page_size - 1);
|
||||
}
|
||||
|
||||
void* allocate_page_aligned(size_t size)
|
||||
{
|
||||
void* result = malloc(size + page_size);
|
||||
|
||||
return reinterpret_cast<void*>(align_to_page(reinterpret_cast<size_t>(result)));
|
||||
}
|
||||
|
||||
void* allocate(size_t size)
|
||||
{
|
||||
size_t aligned_size = align_to_page(size);
|
||||
|
||||
void* ptr = allocate_page_aligned(aligned_size + page_size);
|
||||
if (!ptr) return 0;
|
||||
|
||||
char* end = static_cast<char*>(ptr) + aligned_size;
|
||||
|
||||
int res = mprotect(end, page_size, PROT_NONE);
|
||||
assert(res == 0);
|
||||
(void)!res;
|
||||
|
||||
return end - size;
|
||||
}
|
||||
|
||||
void deallocate(void* ptr, size_t size)
|
||||
{
|
||||
size_t aligned_size = align_to_page(size);
|
||||
|
||||
void* rptr = static_cast<char*>(ptr) + size - aligned_size;
|
||||
|
||||
int res = mprotect(rptr, aligned_size + page_size, PROT_NONE);
|
||||
assert(res == 0);
|
||||
(void)!res;
|
||||
}
|
||||
}
|
||||
#else
|
||||
namespace
|
||||
{
|
||||
void* allocate(size_t size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void deallocate(void* ptr, size_t size)
|
||||
{
|
||||
(void)size;
|
||||
|
||||
free(ptr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// High-level allocation functions
|
||||
const size_t memory_alignment = sizeof(double) > sizeof(void*) ? sizeof(double) : sizeof(void*);
|
||||
|
||||
void* memory_allocate(size_t size)
|
||||
{
|
||||
void* result = allocate(size + memory_alignment);
|
||||
if (!result) return 0;
|
||||
|
||||
memcpy(result, &size, sizeof(size_t));
|
||||
|
||||
return static_cast<char*>(result) + memory_alignment;
|
||||
}
|
||||
|
||||
size_t memory_size(void* ptr)
|
||||
{
|
||||
assert(ptr);
|
||||
|
||||
size_t result;
|
||||
memcpy(&result, static_cast<char*>(ptr) - memory_alignment, sizeof(size_t));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void memory_deallocate(void* ptr)
|
||||
{
|
||||
if (!ptr) return;
|
||||
|
||||
size_t size = memory_size(ptr);
|
||||
|
||||
deallocate(static_cast<char*>(ptr) - memory_alignment, size + memory_alignment);
|
||||
}
|
||||
|
10
3rdparty/pugixml/tests/allocator.hpp
vendored
10
3rdparty/pugixml/tests/allocator.hpp
vendored
@ -1,10 +0,0 @@
|
||||
#ifndef HEADER_TEST_ALLOCATOR_HPP
|
||||
#define HEADER_TEST_ALLOCATOR_HPP
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
void* memory_allocate(size_t size);
|
||||
size_t memory_size(void* ptr);
|
||||
void memory_deallocate(void* ptr);
|
||||
|
||||
#endif
|
72
3rdparty/pugixml/tests/archive.pl
vendored
72
3rdparty/pugixml/tests/archive.pl
vendored
@ -1,72 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use Archive::Tar;
|
||||
use Archive::Zip;
|
||||
use File::Basename;
|
||||
|
||||
my $target = shift @ARGV;
|
||||
my @sources = @ARGV;
|
||||
|
||||
my $basedir = basename($target, ('.zip', '.tar.gz', '.tgz')) . '/';
|
||||
|
||||
my $zip = $target =~ /\.zip$/;
|
||||
my $arch = $zip ? Archive::Zip->new : Archive::Tar->new;
|
||||
|
||||
for $source (sort {$a cmp $b} @sources)
|
||||
{
|
||||
my $contents = &readfile_contents($source);
|
||||
my $meta = &readfile_meta($source);
|
||||
my $file = $basedir . $source;
|
||||
|
||||
if (-T $source)
|
||||
{
|
||||
# convert all newlines to Unix format
|
||||
$contents =~ s/\r//g;
|
||||
|
||||
if ($zip)
|
||||
{
|
||||
# convert all newlines to Windows format for .zip distribution
|
||||
$contents =~ s/\n/\r\n/g;
|
||||
}
|
||||
}
|
||||
|
||||
if ($zip)
|
||||
{
|
||||
my $path = $file;
|
||||
$arch->addDirectory($path) if $path =~ s/\/[^\/]+$/\// && !defined($arch->memberNamed($path));
|
||||
|
||||
my $member = $arch->addString($contents, $file);
|
||||
|
||||
$member->desiredCompressionMethod(COMPRESSION_DEFLATED);
|
||||
$member->desiredCompressionLevel(9);
|
||||
|
||||
$member->setLastModFileDateTimeFromUnix($$meta{mtime});
|
||||
}
|
||||
else
|
||||
{
|
||||
$arch->add_data($file, $contents, $meta);
|
||||
}
|
||||
}
|
||||
|
||||
$zip ? $arch->overwriteAs($target) : $arch->write($target, 9);
|
||||
|
||||
sub readfile_contents
|
||||
{
|
||||
my $file = shift;
|
||||
|
||||
open FILE, $file or die "Can't open $file: $!";
|
||||
binmode FILE;
|
||||
my @contents = <FILE>;
|
||||
close FILE;
|
||||
|
||||
return join('', @contents);
|
||||
}
|
||||
|
||||
sub readfile_meta
|
||||
{
|
||||
my $file = shift;
|
||||
|
||||
my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $atime, $mtime, $ctime, $blksize, $blocks) = stat($file);
|
||||
|
||||
return {mtime => $mtime};
|
||||
}
|
71
3rdparty/pugixml/tests/autotest-appveyor.ps1
vendored
71
3rdparty/pugixml/tests/autotest-appveyor.ps1
vendored
@ -1,71 +0,0 @@
|
||||
function Invoke-CmdScript($scriptName)
|
||||
{
|
||||
$cmdLine = """$scriptName"" $args & set"
|
||||
& $Env:SystemRoot\system32\cmd.exe /c $cmdLine |
|
||||
select-string '^([^=]*)=(.*)$' | foreach-object {
|
||||
$varName = $_.Matches[0].Groups[1].Value
|
||||
$varValue = $_.Matches[0].Groups[2].Value
|
||||
set-item Env:$varName $varValue
|
||||
}
|
||||
}
|
||||
|
||||
$sources = @("src/pugixml.cpp") + (Get-ChildItem -Path "tests/*.cpp" -Exclude "fuzz_*.cpp")
|
||||
$failed = $FALSE
|
||||
|
||||
foreach ($vs in 9,10,11,12,14)
|
||||
{
|
||||
foreach ($arch in "x86","x64")
|
||||
{
|
||||
Write-Output "# Setting up VS$vs $arch"
|
||||
|
||||
Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio $vs.0\VC\vcvarsall.bat" $arch
|
||||
if (! $?) { throw "Error setting up VS$vs $arch" }
|
||||
|
||||
foreach ($defines in "standard", "PUGIXML_WCHAR_MODE", "PUGIXML_COMPACT")
|
||||
{
|
||||
$target = "tests_vs${vs}_${arch}_${defines}"
|
||||
$deflist = if ($defines -eq "standard") { "" } else { "/D$defines" }
|
||||
|
||||
Add-AppveyorTest $target -Outcome Running
|
||||
|
||||
Write-Output "# Building $target.exe"
|
||||
& cmd /c "cl.exe /Fe$target.exe /EHsc /W4 /WX $deflist $sources 2>&1" | Tee-Object -Variable buildOutput
|
||||
|
||||
if ($?)
|
||||
{
|
||||
Write-Output "# Running $target.exe"
|
||||
|
||||
$sw = [Diagnostics.Stopwatch]::StartNew()
|
||||
|
||||
& .\$target | Tee-Object -Variable testOutput
|
||||
|
||||
if ($?)
|
||||
{
|
||||
Write-Output "# Passed"
|
||||
|
||||
Update-AppveyorTest $target -Outcome Passed -StdOut ($testOutput | out-string) -Duration $sw.ElapsedMilliseconds
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Output "# Failed"
|
||||
|
||||
Update-AppveyorTest $target -Outcome Failed -StdOut ($testOutput | out-string) -ErrorMessage "Running failed"
|
||||
|
||||
$failed = $TRUE
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Output "# Failed to build"
|
||||
|
||||
Update-AppveyorTest $target -Outcome Failed -StdOut ($buildOutput | out-string) -ErrorMessage "Compilation failed"
|
||||
|
||||
$failed = $TRUE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($failed) { throw "One or more build steps failed" }
|
||||
|
||||
Write-Output "# End"
|
8
3rdparty/pugixml/tests/common.hpp
vendored
8
3rdparty/pugixml/tests/common.hpp
vendored
@ -1,8 +0,0 @@
|
||||
#ifndef HEADER_TEST_COMMON_HPP
|
||||
#define HEADER_TEST_COMMON_HPP
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
using namespace pugi;
|
||||
|
||||
#endif
|
0
3rdparty/pugixml/tests/data/empty.xml
vendored
0
3rdparty/pugixml/tests/data/empty.xml
vendored
1
3rdparty/pugixml/tests/data/large.xml
vendored
1
3rdparty/pugixml/tests/data/large.xml
vendored
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?><EXAMPLE><!--This is a comment with special chars: <äöü>--><ORDER version="1.0" xml:lang="de"><!--This is another comment with special chars: <äöü>--><HEADER><X_ORDER_ID>0000053535</X_ORDER_ID><CUSTOMER_ID>1010</CUSTOMER_ID><NAME_1>Müller</NAME_1><NAME_2>Jörg</NAME_2></HEADER><ENTRIES><ENTRY><ARTICLE><Test></ARTICLE><ENTRY_NO>10</ENTRY_NO></ENTRY><ENTRY><ARTICLE><Test 2></ARTICLE><ENTRY_NO>20</ENTRY_NO></ENTRY></ENTRIES><FOOTER><TEXT>This is a text.</TEXT></FOOTER></ORDER></EXAMPLE>
|
@ -1 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?><EXAMPLE><!--This is a comment with special chars: <äöü>--><ORDER version="1.0" xml:lang="de"><!--This is another comment with special chars: <äöü>--><HEADER><X_ORDER_ID>0000053535</X_ORDER_ID><CUSTOMER_ID>1010</CUSTOMER_ID><NAME_1>Müller</NAME_1><NAME_2>Jörg</NAME_2></HEADER><ENTRIES><ENTRY><ARTICLE><Test></ARTICLE><ENTRY_NO>10</ENTRY_NO></ENTRY><ENTRY><ARTICLE><Test 2></ARTICLE><ENTRY_NO>20</ENTRY_NO></ENTRY></ENTRIES><FOOTER><TEXT>This is a text.</TEXT></FOOTER></ORDER></EXAMPLE>
|
3
3rdparty/pugixml/tests/data/multiline.xml
vendored
3
3rdparty/pugixml/tests/data/multiline.xml
vendored
@ -1,3 +0,0 @@
|
||||
<node1 />
|
||||
<node2 />
|
||||
<node3 />
|
1
3rdparty/pugixml/tests/data/small.xml
vendored
1
3rdparty/pugixml/tests/data/small.xml
vendored
@ -1 +0,0 @@
|
||||
<node/>
|
19
3rdparty/pugixml/tests/data/truncation.xml
vendored
19
3rdparty/pugixml/tests/data/truncation.xml
vendored
@ -1,19 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE 週報 SYSTEM "weekly-utf-8.dtd">
|
||||
<!-- 週報サンプル -->
|
||||
<mesh name="mesh_root">
|
||||
<!-- here is a mesh node -->
|
||||
some text
|
||||
<![CDATA[someothertext]]>
|
||||
some more text
|
||||
<node attr1="value1" attr2="value2" />
|
||||
<node attr1="value2">
|
||||
<汉语 名字="name" 价值="value">世界有很多语言𤭢</汉语>
|
||||
<innernode/>
|
||||
</node>
|
||||
<氏名>
|
||||
<氏>山田</氏>
|
||||
<名>太郎</名>
|
||||
</氏名>
|
||||
<?include somedata?>
|
||||
</mesh>
|
BIN
3rdparty/pugixml/tests/data/utftest_utf16_be.xml
vendored
BIN
3rdparty/pugixml/tests/data/utftest_utf16_be.xml
vendored
Binary file not shown.
BIN
3rdparty/pugixml/tests/data/utftest_utf16_be_bom.xml
vendored
BIN
3rdparty/pugixml/tests/data/utftest_utf16_be_bom.xml
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
3rdparty/pugixml/tests/data/utftest_utf16_le.xml
vendored
BIN
3rdparty/pugixml/tests/data/utftest_utf16_le.xml
vendored
Binary file not shown.
BIN
3rdparty/pugixml/tests/data/utftest_utf16_le_bom.xml
vendored
BIN
3rdparty/pugixml/tests/data/utftest_utf16_le_bom.xml
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
3rdparty/pugixml/tests/data/utftest_utf32_be.xml
vendored
BIN
3rdparty/pugixml/tests/data/utftest_utf32_be.xml
vendored
Binary file not shown.
BIN
3rdparty/pugixml/tests/data/utftest_utf32_be_bom.xml
vendored
BIN
3rdparty/pugixml/tests/data/utftest_utf32_be_bom.xml
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
3rdparty/pugixml/tests/data/utftest_utf32_le.xml
vendored
BIN
3rdparty/pugixml/tests/data/utftest_utf32_le.xml
vendored
Binary file not shown.
BIN
3rdparty/pugixml/tests/data/utftest_utf32_le_bom.xml
vendored
BIN
3rdparty/pugixml/tests/data/utftest_utf32_le_bom.xml
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
87
3rdparty/pugixml/tests/data/utftest_utf8.xml
vendored
87
3rdparty/pugixml/tests/data/utftest_utf8.xml
vendored
@ -1,87 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE 週報 SYSTEM "weekly-utf-8.dtd">
|
||||
<!-- 週報サンプル -->
|
||||
<週報>
|
||||
<English name="name" value="value">The world has many languages</English>
|
||||
<Russian name="название(имя)" value="ценность">Мир имеет много языков</Russian>
|
||||
<Spanish name="el nombre" value="el valor">el mundo tiene muchos idiomas</Spanish>
|
||||
<SimplifiedChinese name="名字" value="价值">世界有很多语言</SimplifiedChinese>
|
||||
<Русский название="name" ценность="value"><имеет></Русский>
|
||||
<汉语 名字="name" 价值="value">世界有很多语言𤭢</汉语>
|
||||
<Heavy>"Mëtæl!"</Heavy>
|
||||
<ä>Umlaut Element</ä>
|
||||
|
||||
<年月週>
|
||||
<年度>1997</年度>
|
||||
<月度>1</月度>
|
||||
<週>1</週>
|
||||
</年月週>
|
||||
|
||||
<氏名>
|
||||
<氏>山田</氏>
|
||||
<名>太郎</名>
|
||||
</氏名>
|
||||
|
||||
<業務報告リスト>
|
||||
<業務報告>
|
||||
<業務名>XMLエディターの作成</業務名>
|
||||
<業務コード>X3355-23</業務コード>
|
||||
<工数管理>
|
||||
<見積もり工数>1600</見積もり工数>
|
||||
<実績工数>320</実績工数>
|
||||
<当月見積もり工数>160</当月見積もり工数>
|
||||
<当月実績工数>24</当月実績工数>
|
||||
</工数管理>
|
||||
<予定項目リスト>
|
||||
<予定項目>
|
||||
<P>XMLエディターの基本仕様の作成</P>
|
||||
</予定項目>
|
||||
</予定項目リスト>
|
||||
<実施事項リスト>
|
||||
<実施事項>
|
||||
<P>XMLエディターの基本仕様の作成</P>
|
||||
</実施事項>
|
||||
<実施事項>
|
||||
<P>競合他社製品の機能調査</P>
|
||||
</実施事項>
|
||||
</実施事項リスト>
|
||||
<上長への要請事項リスト>
|
||||
<上長への要請事項>
|
||||
<P>特になし</P>
|
||||
</上長への要請事項>
|
||||
</上長への要請事項リスト>
|
||||
<問題点対策>
|
||||
<P>XMLとは何かわからない。</P>
|
||||
</問題点対策>
|
||||
</業務報告>
|
||||
|
||||
<業務報告>
|
||||
<業務名>検索エンジンの開発</業務名>
|
||||
<業務コード>S8821-76</業務コード>
|
||||
<工数管理>
|
||||
<見積もり工数>120</見積もり工数>
|
||||
<実績工数>6</実績工数>
|
||||
<当月見積もり工数>32</当月見積もり工数>
|
||||
<当月実績工数>2</当月実績工数>
|
||||
</工数管理>
|
||||
<予定項目リスト>
|
||||
<予定項目>
|
||||
<P><A href="http://www.goo.ne.jp">goo</A>の機能を調べてみる</P>
|
||||
</予定項目>
|
||||
</予定項目リスト>
|
||||
<実施事項リスト>
|
||||
<実施事項>
|
||||
<P>更に、どういう検索エンジンがあるか調査する</P>
|
||||
</実施事項>
|
||||
</実施事項リスト>
|
||||
<上長への要請事項リスト>
|
||||
<上長への要請事項>
|
||||
<P>開発をするのはめんどうなので、Yahoo!を買収して下さい。</P>
|
||||
</上長への要請事項>
|
||||
</上長への要請事項リスト>
|
||||
<問題点対策>
|
||||
<P>検索エンジンで車を走らせることができない。(要調査)</P>
|
||||
</問題点対策>
|
||||
</業務報告>
|
||||
</業務報告リスト>
|
||||
</週報>
|
87
3rdparty/pugixml/tests/data/utftest_utf8_bom.xml
vendored
87
3rdparty/pugixml/tests/data/utftest_utf8_bom.xml
vendored
@ -1,87 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE 週報 SYSTEM "weekly-utf-8.dtd">
|
||||
<!-- 週報サンプル -->
|
||||
<週報>
|
||||
<English name="name" value="value">The world has many languages</English>
|
||||
<Russian name="название(имя)" value="ценность">Мир имеет много языков</Russian>
|
||||
<Spanish name="el nombre" value="el valor">el mundo tiene muchos idiomas</Spanish>
|
||||
<SimplifiedChinese name="名字" value="价值">世界有很多语言</SimplifiedChinese>
|
||||
<Русский название="name" ценность="value"><имеет></Русский>
|
||||
<汉语 名字="name" 价值="value">世界有很多语言𤭢</汉语>
|
||||
<Heavy>"Mëtæl!"</Heavy>
|
||||
<ä>Umlaut Element</ä>
|
||||
|
||||
<年月週>
|
||||
<年度>1997</年度>
|
||||
<月度>1</月度>
|
||||
<週>1</週>
|
||||
</年月週>
|
||||
|
||||
<氏名>
|
||||
<氏>山田</氏>
|
||||
<名>太郎</名>
|
||||
</氏名>
|
||||
|
||||
<業務報告リスト>
|
||||
<業務報告>
|
||||
<業務名>XMLエディターの作成</業務名>
|
||||
<業務コード>X3355-23</業務コード>
|
||||
<工数管理>
|
||||
<見積もり工数>1600</見積もり工数>
|
||||
<実績工数>320</実績工数>
|
||||
<当月見積もり工数>160</当月見積もり工数>
|
||||
<当月実績工数>24</当月実績工数>
|
||||
</工数管理>
|
||||
<予定項目リスト>
|
||||
<予定項目>
|
||||
<P>XMLエディターの基本仕様の作成</P>
|
||||
</予定項目>
|
||||
</予定項目リスト>
|
||||
<実施事項リスト>
|
||||
<実施事項>
|
||||
<P>XMLエディターの基本仕様の作成</P>
|
||||
</実施事項>
|
||||
<実施事項>
|
||||
<P>競合他社製品の機能調査</P>
|
||||
</実施事項>
|
||||
</実施事項リスト>
|
||||
<上長への要請事項リスト>
|
||||
<上長への要請事項>
|
||||
<P>特になし</P>
|
||||
</上長への要請事項>
|
||||
</上長への要請事項リスト>
|
||||
<問題点対策>
|
||||
<P>XMLとは何かわからない。</P>
|
||||
</問題点対策>
|
||||
</業務報告>
|
||||
|
||||
<業務報告>
|
||||
<業務名>検索エンジンの開発</業務名>
|
||||
<業務コード>S8821-76</業務コード>
|
||||
<工数管理>
|
||||
<見積もり工数>120</見積もり工数>
|
||||
<実績工数>6</実績工数>
|
||||
<当月見積もり工数>32</当月見積もり工数>
|
||||
<当月実績工数>2</当月実績工数>
|
||||
</工数管理>
|
||||
<予定項目リスト>
|
||||
<予定項目>
|
||||
<P><A href="http://www.goo.ne.jp">goo</A>の機能を調べてみる</P>
|
||||
</予定項目>
|
||||
</予定項目リスト>
|
||||
<実施事項リスト>
|
||||
<実施事項>
|
||||
<P>更に、どういう検索エンジンがあるか調査する</P>
|
||||
</実施事項>
|
||||
</実施事項リスト>
|
||||
<上長への要請事項リスト>
|
||||
<上長への要請事項>
|
||||
<P>開発をするのはめんどうなので、Yahoo!を買収して下さい。</P>
|
||||
</上長への要請事項>
|
||||
</上長への要請事項リスト>
|
||||
<問題点対策>
|
||||
<P>検索エンジンで車を走らせることができない。(要調査)</P>
|
||||
</問題点対策>
|
||||
</業務報告>
|
||||
</業務報告リスト>
|
||||
</週報>
|
@ -1,84 +0,0 @@
|
||||
<?xml version="1.0"?><!-- 週報サンプル --><週報>
|
||||
<English name="name" value="value">The world has many languages</English>
|
||||
<Russian name="название(имя)" value="ценность">Мир имеет много языков</Russian>
|
||||
<Spanish name="el nombre" value="el valor">el mundo tiene muchos idiomas</Spanish>
|
||||
<SimplifiedChinese name="名字" value="价值">世界有很多语言</SimplifiedChinese>
|
||||
<Русский название="name" ценность="value"><имеет></Русский>
|
||||
<汉语 名字="name" 价值="value">世界有很多语言𤭢</汉语>
|
||||
<Heavy>quot;Mëtæl!quot;</Heavy>
|
||||
<ä>Umlaut Element</ä>
|
||||
|
||||
<年月週>
|
||||
<年度>1997</年度>
|
||||
<月度>1</月度>
|
||||
<週>1</週>
|
||||
</年月週>
|
||||
|
||||
<氏名>
|
||||
<氏>山田</氏>
|
||||
<名>太郎</名>
|
||||
</氏名>
|
||||
|
||||
<業務報告リスト>
|
||||
<業務報告>
|
||||
<業務名>XMLエディターの作成</業務名>
|
||||
<業務コード>X3355-23</業務コード>
|
||||
<工数管理>
|
||||
<見積もり工数>1600</見積もり工数>
|
||||
<実績工数>320</実績工数>
|
||||
<当月見積もり工数>160</当月見積もり工数>
|
||||
<当月実績工数>24</当月実績工数>
|
||||
</工数管理>
|
||||
<予定項目リスト>
|
||||
<予定項目>
|
||||
<P>XMLエディターの基本仕様の作成</P>
|
||||
</予定項目>
|
||||
</予定項目リスト>
|
||||
<実施事項リスト>
|
||||
<実施事項>
|
||||
<P>XMLエディターの基本仕様の作成</P>
|
||||
</実施事項>
|
||||
<実施事項>
|
||||
<P>競合他社製品の機能調査</P>
|
||||
</実施事項>
|
||||
</実施事項リスト>
|
||||
<上長への要請事項リスト>
|
||||
<上長への要請事項>
|
||||
<P>特になし</P>
|
||||
</上長への要請事項>
|
||||
</上長への要請事項リスト>
|
||||
<問題点対策>
|
||||
<P>XMLとは何かわからない。</P>
|
||||
</問題点対策>
|
||||
</業務報告>
|
||||
|
||||
<業務報告>
|
||||
<業務名>検索エンジンの開発</業務名>
|
||||
<業務コード>S8821-76</業務コード>
|
||||
<工数管理>
|
||||
<見積もり工数>120</見積もり工数>
|
||||
<実績工数>6</実績工数>
|
||||
<当月見積もり工数>32</当月見積もり工数>
|
||||
<当月実績工数>2</当月実績工数>
|
||||
</工数管理>
|
||||
<予定項目リスト>
|
||||
<予定項目>
|
||||
<P><A href="http://www.goo.ne.jp">goo</A>の機能を調べてみる</P>
|
||||
</予定項目>
|
||||
</予定項目リスト>
|
||||
<実施事項リスト>
|
||||
<実施事項>
|
||||
<P>更に、どういう検索エンジンがあるか調査する</P>
|
||||
</実施事項>
|
||||
</実施事項リスト>
|
||||
<上長への要請事項リスト>
|
||||
<上長への要請事項>
|
||||
<P>開発をするのはめんどうなので、Yahoo!を買収して下さい。</P>
|
||||
</上長への要請事項>
|
||||
</上長への要請事項リスト>
|
||||
<問題点対策>
|
||||
<P>検索エンジンで車を走らせることができない。(要調査)</P>
|
||||
</問題点対策>
|
||||
</業務報告>
|
||||
</業務報告リスト>
|
||||
</週報>
|
@ -1,86 +0,0 @@
|
||||
<!DOCTYPE 週報 SYSTEM "weekly-utf-8.dtd">
|
||||
<!-- 週報サンプル -->
|
||||
<週報>
|
||||
<English name="name" value="value">The world has many languages</English>
|
||||
<Russian name="название(имя)" value="ценность">Мир имеет много языков</Russian>
|
||||
<Spanish name="el nombre" value="el valor">el mundo tiene muchos idiomas</Spanish>
|
||||
<SimplifiedChinese name="名字" value="价值">世界有很多语言</SimplifiedChinese>
|
||||
<Русский название="name" ценность="value"><имеет></Русский>
|
||||
<汉语 名字="name" 价值="value">世界有很多语言𤭢</汉语>
|
||||
<Heavy>"Mëtæl!"</Heavy>
|
||||
<ä>Umlaut Element</ä>
|
||||
|
||||
<年月週>
|
||||
<年度>1997</年度>
|
||||
<月度>1</月度>
|
||||
<週>1</週>
|
||||
</年月週>
|
||||
|
||||
<氏名>
|
||||
<氏>山田</氏>
|
||||
<名>太郎</名>
|
||||
</氏名>
|
||||
|
||||
<業務報告リスト>
|
||||
<業務報告>
|
||||
<業務名>XMLエディターの作成</業務名>
|
||||
<業務コード>X3355-23</業務コード>
|
||||
<工数管理>
|
||||
<見積もり工数>1600</見積もり工数>
|
||||
<実績工数>320</実績工数>
|
||||
<当月見積もり工数>160</当月見積もり工数>
|
||||
<当月実績工数>24</当月実績工数>
|
||||
</工数管理>
|
||||
<予定項目リスト>
|
||||
<予定項目>
|
||||
<P>XMLエディターの基本仕様の作成</P>
|
||||
</予定項目>
|
||||
</予定項目リスト>
|
||||
<実施事項リスト>
|
||||
<実施事項>
|
||||
<P>XMLエディターの基本仕様の作成</P>
|
||||
</実施事項>
|
||||
<実施事項>
|
||||
<P>競合他社製品の機能調査</P>
|
||||
</実施事項>
|
||||
</実施事項リスト>
|
||||
<上長への要請事項リスト>
|
||||
<上長への要請事項>
|
||||
<P>特になし</P>
|
||||
</上長への要請事項>
|
||||
</上長への要請事項リスト>
|
||||
<問題点対策>
|
||||
<P>XMLとは何かわからない。</P>
|
||||
</問題点対策>
|
||||
</業務報告>
|
||||
|
||||
<業務報告>
|
||||
<業務名>検索エンジンの開発</業務名>
|
||||
<業務コード>S8821-76</業務コード>
|
||||
<工数管理>
|
||||
<見積もり工数>120</見積もり工数>
|
||||
<実績工数>6</実績工数>
|
||||
<当月見積もり工数>32</当月見積もり工数>
|
||||
<当月実績工数>2</当月実績工数>
|
||||
</工数管理>
|
||||
<予定項目リスト>
|
||||
<予定項目>
|
||||
<P><A href="http://www.goo.ne.jp">goo</A>の機能を調べてみる</P>
|
||||
</予定項目>
|
||||
</予定項目リスト>
|
||||
<実施事項リスト>
|
||||
<実施事項>
|
||||
<P>更に、どういう検索エンジンがあるか調査する</P>
|
||||
</実施事項>
|
||||
</実施事項リスト>
|
||||
<上長への要請事項リスト>
|
||||
<上長への要請事項>
|
||||
<P>開発をするのはめんどうなので、Yahoo!を買収して下さい。</P>
|
||||
</上長への要請事項>
|
||||
</上長への要請事項リスト>
|
||||
<問題点対策>
|
||||
<P>検索エンジンで車を走らせることができない。(要調査)</P>
|
||||
</問題点対策>
|
||||
</業務報告>
|
||||
</業務報告リスト>
|
||||
</週報>
|
1
3rdparty/pugixml/tests/data/тест.xml
vendored
1
3rdparty/pugixml/tests/data/тест.xml
vendored
@ -1 +0,0 @@
|
||||
<node/>
|
@ -1 +0,0 @@
|
||||
<node attr="value" />
|
@ -1 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE [ <!ELEMENT p (#PCDATA|emph)* > ]>
<!DOCTYPE foo [ <![INCLUDE[<!ATTLIST foo bar CDATA #IMPLIED>]]> <![IGNORE[some junk]]> ]>
<!DOCTYPE root [ <!ELEMENT a EMPTY> <!ATTLIST a attr1 CDATA "&ge1;"> <!--* GE reference in attr default before declaration *--> <!ENTITY ge1 "abcdef"> ]>
<node/>
|
@ -1 +0,0 @@
|
||||
<?xml version='1.0'?>
<node enc='< > & " '  «'>
pcdata < > & " '  «
&unknown; %entity;
</node>
|
@ -1 +0,0 @@
|
||||
<?xml version='1.0'?>
<!DOCTYPE html>
<node attr="value">
<child/>
pcdata
<![CDATA[ test ]]>
<!-- comment - -->
<?pi value?>
</node>
|
BIN
3rdparty/pugixml/tests/data_fuzz_parse/utf16.xml
vendored
BIN
3rdparty/pugixml/tests/data_fuzz_parse/utf16.xml
vendored
Binary file not shown.
BIN
3rdparty/pugixml/tests/data_fuzz_parse/utf32.xml
vendored
BIN
3rdparty/pugixml/tests/data_fuzz_parse/utf32.xml
vendored
Binary file not shown.
16
3rdparty/pugixml/tests/fuzz_parse.cpp
vendored
16
3rdparty/pugixml/tests/fuzz_parse.cpp
vendored
@ -1,16 +0,0 @@
|
||||
#include "../src/pugixml.hpp"
|
||||
#include "allocator.hpp"
|
||||
|
||||
int main(int argc, const char** argv)
|
||||
{
|
||||
pugi::set_memory_management_functions(memory_allocate, memory_deallocate);
|
||||
|
||||
pugi::xml_document doc;
|
||||
|
||||
for (int i = 1; i < argc; ++i)
|
||||
{
|
||||
doc.load_file(argv[i]);
|
||||
doc.load_file(argv[i], pugi::parse_minimal);
|
||||
doc.load_file(argv[i], pugi::parse_full);
|
||||
}
|
||||
}
|
114
3rdparty/pugixml/tests/helpers.hpp
vendored
114
3rdparty/pugixml/tests/helpers.hpp
vendored
@ -1,114 +0,0 @@
|
||||
#ifndef HEADER_TEST_HELPERS_HPP
|
||||
#define HEADER_TEST_HELPERS_HPP
|
||||
|
||||
#include "common.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
||||
template <typename T> static void generic_bool_ops_test(const T& obj)
|
||||
{
|
||||
T null;
|
||||
|
||||
CHECK(!null);
|
||||
CHECK(obj);
|
||||
CHECK(!!obj);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning) - we really want to just cast to bool instead of !!
|
||||
#endif
|
||||
|
||||
bool b1 = null, b2 = obj;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
CHECK(!b1);
|
||||
CHECK(b2);
|
||||
|
||||
CHECK(obj && b2);
|
||||
CHECK(obj || b2);
|
||||
CHECK(obj && obj);
|
||||
CHECK(obj || obj);
|
||||
}
|
||||
|
||||
template <typename T> static void generic_eq_ops_test(const T& obj1, const T& obj2)
|
||||
{
|
||||
T null = T();
|
||||
|
||||
// operator==
|
||||
CHECK(null == null);
|
||||
CHECK(obj1 == obj1);
|
||||
CHECK(!(null == obj1));
|
||||
CHECK(!(null == obj2));
|
||||
CHECK(T(null) == null);
|
||||
CHECK(T(obj1) == obj1);
|
||||
|
||||
// operator!=
|
||||
CHECK(!(null != null));
|
||||
CHECK(!(obj1 != obj1));
|
||||
CHECK(null != obj1);
|
||||
CHECK(null != obj2);
|
||||
CHECK(!(T(null) != null));
|
||||
CHECK(!(T(obj1) != obj1));
|
||||
}
|
||||
|
||||
template <typename T> static void generic_rel_ops_test(T obj1, T obj2)
|
||||
{
|
||||
T null = T();
|
||||
|
||||
// obj1 < obj2 (we use operator<, but there is no other choice
|
||||
if (obj1 > obj2)
|
||||
{
|
||||
T temp = obj1;
|
||||
obj1 = obj2;
|
||||
obj2 = temp;
|
||||
}
|
||||
|
||||
// operator<
|
||||
CHECK(null < obj1);
|
||||
CHECK(null < obj2);
|
||||
CHECK(obj1 < obj2);
|
||||
CHECK(!(null < null));
|
||||
CHECK(!(obj1 < obj1));
|
||||
CHECK(!(obj1 < null));
|
||||
CHECK(!(obj2 < obj1));
|
||||
|
||||
// operator<=
|
||||
CHECK(null <= obj1);
|
||||
CHECK(null <= obj2);
|
||||
CHECK(obj1 <= obj2);
|
||||
CHECK(null <= null);
|
||||
CHECK(obj1 <= obj1);
|
||||
CHECK(!(obj1 <= null));
|
||||
CHECK(!(obj2 <= obj1));
|
||||
|
||||
// operator>
|
||||
CHECK(obj1 > null);
|
||||
CHECK(obj2 > null);
|
||||
CHECK(obj2 > obj1);
|
||||
CHECK(!(null > null));
|
||||
CHECK(!(obj1 > obj1));
|
||||
CHECK(!(null > obj1));
|
||||
CHECK(!(obj1 > obj2));
|
||||
|
||||
// operator>=
|
||||
CHECK(obj1 >= null);
|
||||
CHECK(obj2 >= null);
|
||||
CHECK(obj2 >= obj1);
|
||||
CHECK(null >= null);
|
||||
CHECK(obj1 >= obj1);
|
||||
CHECK(!(null >= obj1));
|
||||
CHECK(!(obj1 >= obj2));
|
||||
}
|
||||
|
||||
template <typename T> static void generic_empty_test(const T& obj)
|
||||
{
|
||||
T null;
|
||||
|
||||
CHECK(null.empty());
|
||||
CHECK(!obj.empty());
|
||||
}
|
||||
|
||||
#endif
|
217
3rdparty/pugixml/tests/main.cpp
vendored
217
3rdparty/pugixml/tests/main.cpp
vendored
@ -1,217 +0,0 @@
|
||||
#include "test.hpp"
|
||||
#include "allocator.hpp"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <float.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
#ifndef PUGIXML_NO_EXCEPTIONS
|
||||
# include <exception>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
# undef DebugBreak
|
||||
# pragma warning(disable: 4201) // nonstandard extension used: nameless struct/union
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
test_runner* test_runner::_tests = 0;
|
||||
size_t test_runner::_memory_fail_threshold = 0;
|
||||
bool test_runner::_memory_fail_triggered = false;
|
||||
jmp_buf test_runner::_failure_buffer;
|
||||
const char* test_runner::_failure_message;
|
||||
const char* test_runner::_temp_path;
|
||||
|
||||
static size_t g_memory_total_size = 0;
|
||||
static size_t g_memory_total_count = 0;
|
||||
static size_t g_memory_fail_triggered = false;
|
||||
|
||||
static void* custom_allocate(size_t size)
|
||||
{
|
||||
if (test_runner::_memory_fail_threshold > 0 && test_runner::_memory_fail_threshold < g_memory_total_size + size)
|
||||
{
|
||||
g_memory_fail_triggered = true;
|
||||
test_runner::_memory_fail_triggered = true;
|
||||
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
void* ptr = memory_allocate(size);
|
||||
assert(ptr);
|
||||
|
||||
g_memory_total_size += memory_size(ptr);
|
||||
g_memory_total_count++;
|
||||
|
||||
return ptr;
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef PUGIXML_NO_EXCEPTIONS
|
||||
static void* custom_allocate_throw(size_t size)
|
||||
{
|
||||
void* result = custom_allocate(size);
|
||||
|
||||
if (!result)
|
||||
throw std::bad_alloc();
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void custom_deallocate(void* ptr)
|
||||
{
|
||||
assert(ptr);
|
||||
|
||||
g_memory_total_size -= memory_size(ptr);
|
||||
g_memory_total_count--;
|
||||
|
||||
memory_deallocate(ptr);
|
||||
}
|
||||
|
||||
static void replace_memory_management()
|
||||
{
|
||||
// create some document to touch original functions
|
||||
{
|
||||
pugi::xml_document doc;
|
||||
doc.append_child().set_name(STR("node"));
|
||||
}
|
||||
|
||||
// replace functions
|
||||
pugi::set_memory_management_functions(custom_allocate, custom_deallocate);
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER > 1200 && _MSC_VER < 1400 && !defined(__INTEL_COMPILER) && !defined(__DMC__)
|
||||
#include <exception>
|
||||
|
||||
namespace std
|
||||
{
|
||||
_CRTIMP2 _Prhand _Raise_handler;
|
||||
_CRTIMP2 void __cdecl _Throw(const exception&) {}
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool run_test(test_runner* test, const char* test_name, pugi::allocation_function allocate)
|
||||
{
|
||||
#ifndef PUGIXML_NO_EXCEPTIONS
|
||||
try
|
||||
{
|
||||
#endif
|
||||
g_memory_total_size = 0;
|
||||
g_memory_total_count = 0;
|
||||
g_memory_fail_triggered = false;
|
||||
test_runner::_memory_fail_threshold = 0;
|
||||
test_runner::_memory_fail_triggered = false;
|
||||
|
||||
pugi::set_memory_management_functions(allocate, custom_deallocate);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4611) // interaction between _setjmp and C++ object destruction is non-portable
|
||||
# pragma warning(disable: 4793) // function compiled as native: presence of '_setjmp' makes a function unmanaged
|
||||
#endif
|
||||
|
||||
volatile int result = setjmp(test_runner::_failure_buffer);
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
if (result)
|
||||
{
|
||||
printf("Test %s failed: %s\n", test_name, test_runner::_failure_message);
|
||||
return false;
|
||||
}
|
||||
|
||||
test->run();
|
||||
|
||||
if (test_runner::_memory_fail_triggered)
|
||||
{
|
||||
printf("Test %s failed: unguarded memory fail triggered\n", test_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (g_memory_total_size != 0 || g_memory_total_count != 0)
|
||||
{
|
||||
printf("Test %s failed: memory leaks found (%u bytes in %u allocations)\n", test_name, static_cast<unsigned int>(g_memory_total_size), static_cast<unsigned int>(g_memory_total_count));
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
#ifndef PUGIXML_NO_EXCEPTIONS
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
printf("Test %s failed: exception %s\n", test_name, e.what());
|
||||
return false;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
printf("Test %s failed for unknown reason\n", test_name);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__CELLOS_LV2__) && defined(PUGIXML_NO_EXCEPTIONS) && !defined(__SNC__)
|
||||
#include <exception>
|
||||
|
||||
void std::exception::_Raise() const
|
||||
{
|
||||
abort();
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int, char** argv)
|
||||
{
|
||||
#ifdef __BORLANDC__
|
||||
_control87(MCW_EM | PC_53, MCW_EM | MCW_PC);
|
||||
#endif
|
||||
|
||||
// setup temp path as the executable folder
|
||||
std::string temp = argv[0];
|
||||
std::string::size_type slash = temp.find_last_of("\\/");
|
||||
temp.erase((slash != std::string::npos) ? slash + 1 : 0);
|
||||
|
||||
test_runner::_temp_path = temp.c_str();
|
||||
|
||||
replace_memory_management();
|
||||
|
||||
unsigned int total = 0;
|
||||
unsigned int passed = 0;
|
||||
|
||||
test_runner* test = 0; // gcc3 "variable might be used uninitialized in this function" bug workaround
|
||||
|
||||
for (test = test_runner::_tests; test; test = test->_next)
|
||||
{
|
||||
total++;
|
||||
passed += run_test(test, test->_name, custom_allocate);
|
||||
|
||||
#ifndef PUGIXML_NO_EXCEPTIONS
|
||||
if (g_memory_fail_triggered)
|
||||
{
|
||||
total++;
|
||||
passed += run_test(test, (test->_name + std::string(" (throw)")).c_str(), custom_allocate_throw);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
unsigned int failed = total - passed;
|
||||
|
||||
if (failed != 0)
|
||||
printf("FAILURE: %u out of %u tests failed.\n", failed, total);
|
||||
else
|
||||
printf("Success: %u tests passed.\n", total);
|
||||
|
||||
return failed;
|
||||
}
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
|
||||
{
|
||||
return main(0, NULL);
|
||||
}
|
||||
#endif
|
220
3rdparty/pugixml/tests/test.cpp
vendored
220
3rdparty/pugixml/tests/test.cpp
vendored
@ -1,220 +0,0 @@
|
||||
#define _SCL_SECURE_NO_WARNINGS
|
||||
#define _SCL_SECURE_NO_DEPRECATE
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
#include "writer_string.hpp"
|
||||
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#ifndef PUGIXML_NO_XPATH
|
||||
static void build_document_order(std::vector<pugi::xpath_node>& result, pugi::xml_node root)
|
||||
{
|
||||
result.push_back(pugi::xpath_node());
|
||||
|
||||
pugi::xml_node cur = root;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
result.push_back(cur);
|
||||
|
||||
for (pugi::xml_attribute a = cur.first_attribute(); a; a = a.next_attribute())
|
||||
result.push_back(pugi::xpath_node(a, cur));
|
||||
|
||||
if (cur.first_child())
|
||||
cur = cur.first_child();
|
||||
else if (cur.next_sibling())
|
||||
cur = cur.next_sibling();
|
||||
else
|
||||
{
|
||||
while (cur && !cur.next_sibling()) cur = cur.parent();
|
||||
cur = cur.next_sibling();
|
||||
|
||||
if (!cur) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
bool test_string_equal(const pugi::char_t* lhs, const pugi::char_t* rhs)
|
||||
{
|
||||
return (!lhs || !rhs) ? lhs == rhs :
|
||||
#ifdef PUGIXML_WCHAR_MODE
|
||||
wcscmp(lhs, rhs) == 0;
|
||||
#else
|
||||
strcmp(lhs, rhs) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool test_node(const pugi::xml_node& node, const pugi::char_t* contents, const pugi::char_t* indent, unsigned int flags)
|
||||
{
|
||||
xml_writer_string writer;
|
||||
|
||||
node.print(writer, indent, flags, get_native_encoding());
|
||||
|
||||
return writer.as_string() == contents;
|
||||
}
|
||||
|
||||
bool test_double_nan(double value)
|
||||
{
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
return _isnan(value) != 0;
|
||||
#else
|
||||
return value != value;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef PUGIXML_NO_XPATH
|
||||
static size_t strlength(const pugi::char_t* s)
|
||||
{
|
||||
#ifdef PUGIXML_WCHAR_MODE
|
||||
return wcslen(s);
|
||||
#else
|
||||
return strlen(s);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool test_xpath_string(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, const pugi::char_t* expected)
|
||||
{
|
||||
pugi::xpath_query q(query, variables);
|
||||
if (!q) return false;
|
||||
|
||||
const size_t capacity = 64;
|
||||
pugi::char_t result[capacity];
|
||||
|
||||
size_t size = q.evaluate_string(result, capacity, node);
|
||||
|
||||
if (size != strlength(expected) + 1)
|
||||
return false;
|
||||
|
||||
if (size <= capacity)
|
||||
return test_string_equal(result, expected);
|
||||
|
||||
std::basic_string<pugi::char_t> buffer(size, ' ');
|
||||
|
||||
return q.evaluate_string(&buffer[0], size, node) == size && test_string_equal(buffer.c_str(), expected);
|
||||
}
|
||||
|
||||
bool test_xpath_boolean(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, bool expected)
|
||||
{
|
||||
pugi::xpath_query q(query, variables);
|
||||
if (!q) return false;
|
||||
|
||||
return q.evaluate_boolean(node) == expected;
|
||||
}
|
||||
|
||||
bool test_xpath_number(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, double expected)
|
||||
{
|
||||
pugi::xpath_query q(query, variables);
|
||||
if (!q) return false;
|
||||
|
||||
double value = q.evaluate_number(node);
|
||||
double absolute_error = fabs(value - expected);
|
||||
|
||||
const double tolerance = 1e-15f;
|
||||
return absolute_error < tolerance || absolute_error < fabs(expected) * tolerance;
|
||||
}
|
||||
|
||||
bool test_xpath_number_nan(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables)
|
||||
{
|
||||
pugi::xpath_query q(query, variables);
|
||||
if (!q) return false;
|
||||
|
||||
return test_double_nan(q.evaluate_number(node));
|
||||
}
|
||||
|
||||
bool test_xpath_fail_compile(const pugi::char_t* query, pugi::xpath_variable_set* variables)
|
||||
{
|
||||
#ifdef PUGIXML_NO_EXCEPTIONS
|
||||
return !pugi::xpath_query(query, variables);
|
||||
#else
|
||||
try
|
||||
{
|
||||
pugi::xpath_query q(query, variables);
|
||||
return false;
|
||||
}
|
||||
catch (const pugi::xpath_exception&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void xpath_node_set_tester::check(bool condition)
|
||||
{
|
||||
if (!condition)
|
||||
{
|
||||
test_runner::_failure_message = message;
|
||||
longjmp(test_runner::_failure_buffer, 1);
|
||||
}
|
||||
}
|
||||
|
||||
xpath_node_set_tester::xpath_node_set_tester(const pugi::xpath_node_set& set, const char* message_): last(0), message(message_)
|
||||
{
|
||||
result = set;
|
||||
|
||||
// only sort unsorted sets so that we're able to verify reverse order for some axes
|
||||
if (result.type() == pugi::xpath_node_set::type_unsorted) result.sort();
|
||||
|
||||
if (result.empty())
|
||||
{
|
||||
document_order = 0;
|
||||
document_size = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<pugi::xpath_node> order;
|
||||
build_document_order(order, (result[0].attribute() ? result[0].parent() : result[0].node()).root());
|
||||
|
||||
document_order = new pugi::xpath_node[order.size()];
|
||||
std::copy(order.begin(), order.end(), document_order);
|
||||
|
||||
document_size = order.size();
|
||||
}
|
||||
}
|
||||
|
||||
xpath_node_set_tester::~xpath_node_set_tester()
|
||||
{
|
||||
// check that we processed everything
|
||||
check(last == result.size());
|
||||
|
||||
delete[] document_order;
|
||||
}
|
||||
|
||||
xpath_node_set_tester& xpath_node_set_tester::operator%(unsigned int expected)
|
||||
{
|
||||
// check element count
|
||||
check(last < result.size());
|
||||
|
||||
// check document order
|
||||
check(expected < document_size);
|
||||
check(result.begin()[last] == document_order[expected]);
|
||||
|
||||
// continue to the next element
|
||||
last++;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool is_little_endian()
|
||||
{
|
||||
unsigned int ui = 1;
|
||||
return *reinterpret_cast<char*>(&ui) == 1;
|
||||
}
|
||||
|
||||
pugi::xml_encoding get_native_encoding()
|
||||
{
|
||||
#ifdef PUGIXML_WCHAR_MODE
|
||||
return pugi::encoding_wchar;
|
||||
#else
|
||||
return pugi::encoding_utf8;
|
||||
#endif
|
||||
}
|
171
3rdparty/pugixml/tests/test.hpp
vendored
171
3rdparty/pugixml/tests/test.hpp
vendored
@ -1,171 +0,0 @@
|
||||
#ifndef HEADER_TEST_TEST_HPP
|
||||
#define HEADER_TEST_TEST_HPP
|
||||
|
||||
#include "../src/pugixml.hpp"
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
struct test_runner
|
||||
{
|
||||
test_runner(const char* name)
|
||||
{
|
||||
_name = name;
|
||||
_next = _tests;
|
||||
_tests = this;
|
||||
}
|
||||
|
||||
virtual ~test_runner() {}
|
||||
|
||||
virtual void run() = 0;
|
||||
|
||||
const char* _name;
|
||||
test_runner* _next;
|
||||
|
||||
static test_runner* _tests;
|
||||
static size_t _memory_fail_threshold;
|
||||
static bool _memory_fail_triggered;
|
||||
static jmp_buf _failure_buffer;
|
||||
static const char* _failure_message;
|
||||
|
||||
static const char* _temp_path;
|
||||
};
|
||||
|
||||
bool test_string_equal(const pugi::char_t* lhs, const pugi::char_t* rhs);
|
||||
|
||||
template <typename Node> inline bool test_node_name_value(const Node& node, const pugi::char_t* name, const pugi::char_t* value)
|
||||
{
|
||||
return test_string_equal(node.name(), name) && test_string_equal(node.value(), value);
|
||||
}
|
||||
|
||||
bool test_node(const pugi::xml_node& node, const pugi::char_t* contents, const pugi::char_t* indent, unsigned int flags);
|
||||
bool test_double_nan(double value);
|
||||
|
||||
#ifndef PUGIXML_NO_XPATH
|
||||
bool test_xpath_string(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, const pugi::char_t* expected);
|
||||
bool test_xpath_boolean(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, bool expected);
|
||||
bool test_xpath_number(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables, double expected);
|
||||
bool test_xpath_number_nan(const pugi::xpath_node& node, const pugi::char_t* query, pugi::xpath_variable_set* variables);
|
||||
|
||||
bool test_xpath_fail_compile(const pugi::char_t* query, pugi::xpath_variable_set* variables);
|
||||
|
||||
struct xpath_node_set_tester
|
||||
{
|
||||
pugi::xpath_node* document_order;
|
||||
size_t document_size;
|
||||
|
||||
pugi::xpath_node_set result;
|
||||
unsigned int last;
|
||||
const char* message;
|
||||
|
||||
void check(bool condition);
|
||||
|
||||
xpath_node_set_tester(const pugi::xpath_node_set& set, const char* message);
|
||||
~xpath_node_set_tester();
|
||||
|
||||
xpath_node_set_tester& operator%(unsigned int expected);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
struct dummy_fixture {};
|
||||
|
||||
#define TEST_FIXTURE(name, fixture) \
|
||||
struct test_runner_helper_##name: fixture \
|
||||
{ \
|
||||
void run(); \
|
||||
}; \
|
||||
static struct test_runner_##name: test_runner \
|
||||
{ \
|
||||
test_runner_##name(): test_runner(#name) {} \
|
||||
\
|
||||
virtual void run() PUGIXML_OVERRIDE \
|
||||
{ \
|
||||
test_runner_helper_##name helper; \
|
||||
helper.run(); \
|
||||
} \
|
||||
} test_runner_instance_##name; \
|
||||
void test_runner_helper_##name::run()
|
||||
|
||||
#define TEST(name) TEST_FIXTURE(name, dummy_fixture)
|
||||
|
||||
#define TEST_XML_FLAGS(name, xml, flags) \
|
||||
struct test_fixture_##name \
|
||||
{ \
|
||||
pugi::xml_document doc; \
|
||||
\
|
||||
test_fixture_##name() \
|
||||
{ \
|
||||
CHECK(doc.load_string(PUGIXML_TEXT(xml), flags)); \
|
||||
} \
|
||||
\
|
||||
private: \
|
||||
test_fixture_##name(const test_fixture_##name&); \
|
||||
test_fixture_##name& operator=(const test_fixture_##name&); \
|
||||
}; \
|
||||
\
|
||||
TEST_FIXTURE(name, test_fixture_##name)
|
||||
|
||||
#define TEST_XML(name, xml) TEST_XML_FLAGS(name, xml, pugi::parse_default)
|
||||
|
||||
#define CHECK_JOIN(text, file, line) text " at " file ":" #line
|
||||
#define CHECK_JOIN2(text, file, line) CHECK_JOIN(text, file, line)
|
||||
#define CHECK_TEXT(condition, text) if (condition) ; else test_runner::_failure_message = CHECK_JOIN2(text, __FILE__, __LINE__), longjmp(test_runner::_failure_buffer, 1)
|
||||
#define CHECK_FORCE_FAIL(text) test_runner::_failure_message = CHECK_JOIN2(text, __FILE__, __LINE__), longjmp(test_runner::_failure_buffer, 1)
|
||||
|
||||
#if (defined(_MSC_VER) && _MSC_VER == 1200) || defined(__MWERKS__) || (defined(__BORLANDC__) && __BORLANDC__ <= 0x540)
|
||||
# define STRINGIZE(value) "??" // Some compilers have issues with stringizing expressions that contain strings w/escaping inside
|
||||
#else
|
||||
# define STRINGIZE(value) #value
|
||||
#endif
|
||||
|
||||
#define CHECK(condition) CHECK_TEXT(condition, STRINGIZE(condition) " is false")
|
||||
#define CHECK_STRING(value, expected) CHECK_TEXT(test_string_equal(value, expected), STRINGIZE(value) " is not equal to " STRINGIZE(expected))
|
||||
#define CHECK_DOUBLE(value, expected) CHECK_TEXT((value > expected ? value - expected : expected - value) < 1e-6, STRINGIZE(value) " is not equal to " STRINGIZE(expected))
|
||||
#define CHECK_DOUBLE_NAN(value) CHECK_TEXT(test_double_nan(value), STRINGIZE(value) " is not equal to NaN")
|
||||
#define CHECK_NAME_VALUE(node, name, value) CHECK_TEXT(test_node_name_value(node, name, value), STRINGIZE(node) " name/value do not match " STRINGIZE(name) " and " STRINGIZE(value))
|
||||
#define CHECK_NODE_EX(node, expected, indent, flags) CHECK_TEXT(test_node(node, expected, indent, flags), STRINGIZE(node) " contents does not match " STRINGIZE(expected))
|
||||
#define CHECK_NODE(node, expected) CHECK_NODE_EX(node, expected, PUGIXML_TEXT(""), pugi::format_raw)
|
||||
|
||||
#ifndef PUGIXML_NO_XPATH
|
||||
#define CHECK_XPATH_STRING_VAR(node, query, variables, expected) CHECK_TEXT(test_xpath_string(node, query, variables, expected), STRINGIZE(query) " does not evaluate to " STRINGIZE(expected) " in context " STRINGIZE(node))
|
||||
#define CHECK_XPATH_BOOLEAN_VAR(node, query, variables, expected) CHECK_TEXT(test_xpath_boolean(node, query, variables, expected), STRINGIZE(query) " does not evaluate to " STRINGIZE(expected) " in context " STRINGIZE(node))
|
||||
#define CHECK_XPATH_NUMBER_VAR(node, query, variables, expected) CHECK_TEXT(test_xpath_number(node, query, variables, expected), STRINGIZE(query) " does not evaluate to " STRINGIZE(expected) " in context " STRINGIZE(node))
|
||||
#define CHECK_XPATH_NUMBER_NAN_VAR(node, query, variables) CHECK_TEXT(test_xpath_number_nan(node, query, variables), STRINGIZE(query) " does not evaluate to NaN in context " STRINGIZE(node))
|
||||
#define CHECK_XPATH_NODESET_VAR(node, query, variables) xpath_node_set_tester(pugi::xpath_query(query, variables).evaluate_node_set(node), CHECK_JOIN2(STRINGIZE(query) " does not evaluate to expected set in context " STRINGIZE(node), __FILE__, __LINE__))
|
||||
#define CHECK_XPATH_FAIL_VAR(query, variables) CHECK_TEXT(test_xpath_fail_compile(query, variables), STRINGIZE(query) " should not compile")
|
||||
|
||||
#define CHECK_XPATH_STRING(node, query, expected) CHECK_XPATH_STRING_VAR(node, query, 0, expected)
|
||||
#define CHECK_XPATH_BOOLEAN(node, query, expected) CHECK_XPATH_BOOLEAN_VAR(node, query, 0, expected)
|
||||
#define CHECK_XPATH_NUMBER(node, query, expected) CHECK_XPATH_NUMBER_VAR(node, query, 0, expected)
|
||||
#define CHECK_XPATH_NUMBER_NAN(node, query) CHECK_XPATH_NUMBER_NAN_VAR(node, query, 0)
|
||||
#define CHECK_XPATH_NODESET(node, query) CHECK_XPATH_NODESET_VAR(node, query, 0)
|
||||
#define CHECK_XPATH_FAIL(query) CHECK_XPATH_FAIL_VAR(query, 0)
|
||||
#endif
|
||||
|
||||
#ifdef PUGIXML_NO_EXCEPTIONS
|
||||
#define CHECK_ALLOC_FAIL(code) do { CHECK(!test_runner::_memory_fail_triggered); code; CHECK(test_runner::_memory_fail_triggered); test_runner::_memory_fail_triggered = false; } while (test_runner::_memory_fail_triggered)
|
||||
#else
|
||||
#define CHECK_ALLOC_FAIL(code) do { CHECK(!test_runner::_memory_fail_triggered); try { code; } catch (std::bad_alloc&) {} CHECK(test_runner::_memory_fail_triggered); test_runner::_memory_fail_triggered = false; } while (test_runner::_memory_fail_triggered)
|
||||
#endif
|
||||
|
||||
#define STR(text) PUGIXML_TEXT(text)
|
||||
|
||||
#if defined(__DMC__) || defined(__BORLANDC__)
|
||||
#define U_LITERALS // DMC does not understand \x01234 (it parses first three digits), but understands \u01234
|
||||
#endif
|
||||
|
||||
#if (defined(_MSC_VER) && _MSC_VER == 1200) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER == 800) || defined(__BORLANDC__)
|
||||
// NaN comparison on MSVC6 is incorrect, see http://www.nabble.com/assertDoubleEquals,-NaN---Microsoft-Visual-Studio-6-td9137859.html
|
||||
// IC8 and BCC are also affected by the same bug
|
||||
# define MSVC6_NAN_BUG
|
||||
#endif
|
||||
|
||||
inline wchar_t wchar_cast(unsigned int value)
|
||||
{
|
||||
return static_cast<wchar_t>(value); // to avoid C4310 on MSVC
|
||||
}
|
||||
|
||||
bool is_little_endian();
|
||||
pugi::xml_encoding get_native_encoding();
|
||||
|
||||
#endif
|
1397
3rdparty/pugixml/tests/test_document.cpp
vendored
1397
3rdparty/pugixml/tests/test_document.cpp
vendored
File diff suppressed because it is too large
Load Diff
1746
3rdparty/pugixml/tests/test_dom_modify.cpp
vendored
1746
3rdparty/pugixml/tests/test_dom_modify.cpp
vendored
File diff suppressed because it is too large
Load Diff
445
3rdparty/pugixml/tests/test_dom_text.cpp
vendored
445
3rdparty/pugixml/tests/test_dom_text.cpp
vendored
@ -1,445 +0,0 @@
|
||||
#include "common.hpp"
|
||||
|
||||
#include "helpers.hpp"
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
TEST_XML_FLAGS(dom_text_empty, "<node><a>foo</a><b><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi)
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(node.child(STR("a")).text());
|
||||
CHECK(node.child(STR("b")).text());
|
||||
CHECK(!node.child(STR("c")).text());
|
||||
CHECK(!node.child(STR("d")).text());
|
||||
CHECK(!xml_node().text());
|
||||
CHECK(!xml_text());
|
||||
|
||||
generic_empty_test(node.child(STR("a")).text());
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_bool_ops, "<node>foo</node>")
|
||||
{
|
||||
generic_bool_ops_test(doc.child(STR("node")).text());
|
||||
}
|
||||
|
||||
TEST_XML_FLAGS(dom_text_get, "<node><a>foo</a><b><node/><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi)
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK_STRING(node.child(STR("a")).text().get(), STR("foo"));
|
||||
CHECK_STRING(node.child(STR("a")).first_child().text().get(), STR("foo"));
|
||||
|
||||
CHECK_STRING(node.child(STR("b")).text().get(), STR("bar"));
|
||||
CHECK_STRING(node.child(STR("b")).last_child().text().get(), STR("bar"));
|
||||
|
||||
CHECK_STRING(node.child(STR("c")).text().get(), STR(""));
|
||||
CHECK_STRING(node.child(STR("c")).first_child().text().get(), STR(""));
|
||||
|
||||
CHECK_STRING(node.child(STR("d")).text().get(), STR(""));
|
||||
|
||||
CHECK_STRING(xml_node().text().get(), STR(""));
|
||||
}
|
||||
|
||||
TEST_XML_FLAGS(dom_text_as_string, "<node><a>foo</a><b><node/><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi)
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK_STRING(node.child(STR("a")).text().as_string(), STR("foo"));
|
||||
CHECK_STRING(node.child(STR("a")).first_child().text().as_string(), STR("foo"));
|
||||
|
||||
CHECK_STRING(node.child(STR("b")).text().as_string(), STR("bar"));
|
||||
CHECK_STRING(node.child(STR("b")).last_child().text().as_string(), STR("bar"));
|
||||
|
||||
CHECK_STRING(node.child(STR("c")).text().as_string(), STR(""));
|
||||
CHECK_STRING(node.child(STR("c")).first_child().text().as_string(), STR(""));
|
||||
|
||||
CHECK_STRING(node.child(STR("d")).text().as_string(), STR(""));
|
||||
|
||||
CHECK_STRING(xml_node().text().as_string(), STR(""));
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_as_int, "<node><text1>1</text1><text2>-1</text2><text3>-2147483648</text3><text4>2147483647</text4><text5>0</text5></node>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(xml_text().as_int() == 0);
|
||||
CHECK(node.child(STR("text1")).text().as_int() == 1);
|
||||
CHECK(node.child(STR("text2")).text().as_int() == -1);
|
||||
CHECK(node.child(STR("text3")).text().as_int() == -2147483647 - 1);
|
||||
CHECK(node.child(STR("text4")).text().as_int() == 2147483647);
|
||||
CHECK(node.child(STR("text5")).text().as_int() == 0);
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_as_int_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>-0x20</text4><text5>-0x80000000</text5><text6>0x</text6></node>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(node.child(STR("text1")).text().as_int() == 777); // no octal support! intentional
|
||||
CHECK(node.child(STR("text2")).text().as_int() == 1451);
|
||||
CHECK(node.child(STR("text3")).text().as_int() == 255);
|
||||
CHECK(node.child(STR("text4")).text().as_int() == -32);
|
||||
CHECK(node.child(STR("text5")).text().as_int() == -2147483647 - 1);
|
||||
CHECK(node.child(STR("text6")).text().as_int() == 0);
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_as_uint, "<node><text1>0</text1><text2>1</text2><text3>2147483647</text3><text4>4294967295</text4><text5>0</text5></node>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(xml_text().as_uint() == 0);
|
||||
CHECK(node.child(STR("text1")).text().as_uint() == 0);
|
||||
CHECK(node.child(STR("text2")).text().as_uint() == 1);
|
||||
CHECK(node.child(STR("text3")).text().as_uint() == 2147483647);
|
||||
CHECK(node.child(STR("text4")).text().as_uint() == 4294967295u);
|
||||
CHECK(node.child(STR("text5")).text().as_uint() == 0);
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_as_uint_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>0x20</text4><text5>0xFFFFFFFF</text5><text6>0x</text6></node>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(node.child(STR("text1")).text().as_uint() == 777); // no octal support! intentional
|
||||
CHECK(node.child(STR("text2")).text().as_uint() == 1451);
|
||||
CHECK(node.child(STR("text3")).text().as_uint() == 255);
|
||||
CHECK(node.child(STR("text4")).text().as_uint() == 32);
|
||||
CHECK(node.child(STR("text5")).text().as_uint() == 4294967295u);
|
||||
CHECK(node.child(STR("text6")).text().as_uint() == 0);
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_as_integer_space, "<node><text1> \t\n1234</text1><text2>\n\t 0x123</text2><text3>- 16</text3><text4>- 0x10</text4></node>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(node.child(STR("text1")).text().as_int() == 1234);
|
||||
CHECK(node.child(STR("text2")).text().as_int() == 291);
|
||||
CHECK(node.child(STR("text3")).text().as_int() == 0);
|
||||
CHECK(node.child(STR("text4")).text().as_int() == 0);
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_as_float, "<node><text1>0</text1><text2>1</text2><text3>0.12</text3><text4>-5.1</text4><text5>3e-4</text5><text6>3.14159265358979323846</text6></node>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(xml_text().as_float() == 0);
|
||||
CHECK_DOUBLE(node.child(STR("text1")).text().as_float(), 0);
|
||||
CHECK_DOUBLE(node.child(STR("text2")).text().as_float(), 1);
|
||||
CHECK_DOUBLE(node.child(STR("text3")).text().as_float(), 0.12);
|
||||
CHECK_DOUBLE(node.child(STR("text4")).text().as_float(), -5.1);
|
||||
CHECK_DOUBLE(node.child(STR("text5")).text().as_float(), 3e-4);
|
||||
CHECK_DOUBLE(node.child(STR("text6")).text().as_float(), 3.14159265358979323846);
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_as_double, "<node><text1>0</text1><text2>1</text2><text3>0.12</text3><text4>-5.1</text4><text5>3e-4</text5><text6>3.14159265358979323846</text6></node>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(xml_text().as_double() == 0);
|
||||
CHECK_DOUBLE(node.child(STR("text1")).text().as_double(), 0);
|
||||
CHECK_DOUBLE(node.child(STR("text2")).text().as_double(), 1);
|
||||
CHECK_DOUBLE(node.child(STR("text3")).text().as_double(), 0.12);
|
||||
CHECK_DOUBLE(node.child(STR("text4")).text().as_double(), -5.1);
|
||||
CHECK_DOUBLE(node.child(STR("text5")).text().as_double(), 3e-4);
|
||||
CHECK_DOUBLE(node.child(STR("text6")).text().as_double(), 3.14159265358979323846);
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_as_bool, "<node><text1>0</text1><text2>1</text2><text3>true</text3><text4>True</text4><text5>Yes</text5><text6>yes</text6><text7>false</text7></node>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(!xml_text().as_bool());
|
||||
CHECK(!node.child(STR("text1")).text().as_bool());
|
||||
CHECK(node.child(STR("text2")).text().as_bool());
|
||||
CHECK(node.child(STR("text3")).text().as_bool());
|
||||
CHECK(node.child(STR("text4")).text().as_bool());
|
||||
CHECK(node.child(STR("text5")).text().as_bool());
|
||||
CHECK(node.child(STR("text6")).text().as_bool());
|
||||
CHECK(!node.child(STR("text7")).text().as_bool());
|
||||
}
|
||||
|
||||
#ifdef PUGIXML_HAS_LONG_LONG
|
||||
TEST_XML(dom_text_as_llong, "<node><text1>1</text1><text2>-1</text2><text3>-9223372036854775808</text3><text4>9223372036854775807</text4><text5>0</text5></node>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(xml_text().as_llong() == 0);
|
||||
CHECK(node.child(STR("text1")).text().as_llong() == 1);
|
||||
CHECK(node.child(STR("text2")).text().as_llong() == -1);
|
||||
CHECK(node.child(STR("text3")).text().as_llong() == -9223372036854775807ll - 1);
|
||||
CHECK(node.child(STR("text4")).text().as_llong() == 9223372036854775807ll);
|
||||
CHECK(node.child(STR("text5")).text().as_llong() == 0);
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_as_llong_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>-0x20</text4><text5>-0x8000000000000000</text5><text6>0x</text6></node>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(node.child(STR("text1")).text().as_llong() == 777); // no octal support! intentional
|
||||
CHECK(node.child(STR("text2")).text().as_llong() == 1451);
|
||||
CHECK(node.child(STR("text3")).text().as_llong() == 255);
|
||||
CHECK(node.child(STR("text4")).text().as_llong() == -32);
|
||||
CHECK(node.child(STR("text5")).text().as_llong() == -9223372036854775807ll - 1);
|
||||
CHECK(node.child(STR("text6")).text().as_llong() == 0);
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_as_ullong, "<node><text1>0</text1><text2>1</text2><text3>9223372036854775807</text3><text4>18446744073709551615</text4><text5>0</text5></node>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(xml_text().as_ullong() == 0);
|
||||
CHECK(node.child(STR("text1")).text().as_ullong() == 0);
|
||||
CHECK(node.child(STR("text2")).text().as_ullong() == 1);
|
||||
CHECK(node.child(STR("text3")).text().as_ullong() == 9223372036854775807ll);
|
||||
CHECK(node.child(STR("text4")).text().as_ullong() == 18446744073709551615ull);
|
||||
CHECK(node.child(STR("text5")).text().as_ullong() == 0);
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_as_ullong_hex, "<node><text1>0777</text1><text2>0x5ab</text2><text3>0XFf</text3><text4>0x20</text4><text5>0xFFFFFFFFFFFFFFFF</text5><text6>0x</text6></node>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(node.child(STR("text1")).text().as_ullong() == 777); // no octal support! intentional
|
||||
CHECK(node.child(STR("text2")).text().as_ullong() == 1451);
|
||||
CHECK(node.child(STR("text3")).text().as_ullong() == 255);
|
||||
CHECK(node.child(STR("text4")).text().as_ullong() == 32);
|
||||
CHECK(node.child(STR("text5")).text().as_ullong() == 18446744073709551615ull);
|
||||
CHECK(node.child(STR("text6")).text().as_ullong() == 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_XML(dom_text_get_no_state, "<node/>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
xml_text t = node.text();
|
||||
|
||||
CHECK(!t);
|
||||
CHECK(t.get() && *t.get() == 0);
|
||||
CHECK(!node.first_child());
|
||||
|
||||
node.append_child(node_pcdata);
|
||||
|
||||
CHECK(t);
|
||||
CHECK_STRING(t.get(), STR(""));
|
||||
|
||||
node.first_child().set_value(STR("test"));
|
||||
|
||||
CHECK(t);
|
||||
CHECK_STRING(t.get(), STR("test"));
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_set, "<node/>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
xml_text t = node.text();
|
||||
|
||||
t.set(STR(""));
|
||||
CHECK(node.first_child().type() == node_pcdata);
|
||||
CHECK_NODE(node, STR("<node></node>"));
|
||||
|
||||
t.set(STR("boo"));
|
||||
CHECK(node.first_child().type() == node_pcdata);
|
||||
CHECK(node.first_child() == node.last_child());
|
||||
CHECK_NODE(node, STR("<node>boo</node>"));
|
||||
|
||||
t.set(STR("foobarfoobar"));
|
||||
CHECK(node.first_child().type() == node_pcdata);
|
||||
CHECK(node.first_child() == node.last_child());
|
||||
CHECK_NODE(node, STR("<node>foobarfoobar</node>"));
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_assign, "<node/>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
node.append_child(STR("text1")).text() = STR("v1");
|
||||
xml_text() = STR("v1");
|
||||
|
||||
node.append_child(STR("text2")).text() = -2147483647;
|
||||
node.append_child(STR("text3")).text() = -2147483647 - 1;
|
||||
xml_text() = -2147483647 - 1;
|
||||
|
||||
node.append_child(STR("text4")).text() = 4294967295u;
|
||||
node.append_child(STR("text5")).text() = 4294967294u;
|
||||
xml_text() = 4294967295u;
|
||||
|
||||
node.append_child(STR("text6")).text() = 0.5;
|
||||
xml_text() = 0.5;
|
||||
|
||||
node.append_child(STR("text7")).text() = 0.25f;
|
||||
xml_text() = 0.25f;
|
||||
|
||||
node.append_child(STR("text8")).text() = true;
|
||||
xml_text() = true;
|
||||
|
||||
CHECK_NODE(node, STR("<node><text1>v1</text1><text2>-2147483647</text2><text3>-2147483648</text3><text4>4294967295</text4><text5>4294967294</text5><text6>0.5</text6><text7>0.25</text7><text8>true</text8></node>"));
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_set_value, "<node/>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(node.append_child(STR("text1")).text().set(STR("v1")));
|
||||
CHECK(!xml_text().set(STR("v1")));
|
||||
|
||||
CHECK(node.append_child(STR("text2")).text().set(-2147483647));
|
||||
CHECK(node.append_child(STR("text3")).text().set(-2147483647 - 1));
|
||||
CHECK(!xml_text().set(-2147483647 - 1));
|
||||
|
||||
CHECK(node.append_child(STR("text4")).text().set(4294967295u));
|
||||
CHECK(node.append_child(STR("text5")).text().set(4294967294u));
|
||||
CHECK(!xml_text().set(4294967295u));
|
||||
|
||||
CHECK(node.append_child(STR("text6")).text().set(0.5));
|
||||
CHECK(!xml_text().set(0.5));
|
||||
|
||||
CHECK(node.append_child(STR("text7")).text().set(0.25f));
|
||||
CHECK(!xml_text().set(0.25f));
|
||||
|
||||
CHECK(node.append_child(STR("text8")).text().set(true));
|
||||
CHECK(!xml_text().set(true));
|
||||
|
||||
CHECK_NODE(node, STR("<node><text1>v1</text1><text2>-2147483647</text2><text3>-2147483648</text3><text4>4294967295</text4><text5>4294967294</text5><text6>0.5</text6><text7>0.25</text7><text8>true</text8></node>"));
|
||||
}
|
||||
|
||||
#if LONG_MAX > 2147483647
|
||||
TEST_XML(dom_text_assign_long, "<node/>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
node.append_child(STR("text1")).text() = -9223372036854775807l;
|
||||
node.append_child(STR("text2")).text() = -9223372036854775807l - 1;
|
||||
xml_text() = -9223372036854775807l - 1;
|
||||
|
||||
node.append_child(STR("text3")).text() = 18446744073709551615ul;
|
||||
node.append_child(STR("text4")).text() = 18446744073709551614ul;
|
||||
xml_text() = 18446744073709551615ul;
|
||||
|
||||
CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>"));
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_set_value_long, "<node/>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(node.append_child(STR("text1")).text().set(-9223372036854775807l));
|
||||
CHECK(node.append_child(STR("text2")).text().set(-9223372036854775807l - 1));
|
||||
CHECK(!xml_text().set(-9223372036854775807l - 1));
|
||||
|
||||
CHECK(node.append_child(STR("text3")).text().set(18446744073709551615ul));
|
||||
CHECK(node.append_child(STR("text4")).text().set(18446744073709551614ul));
|
||||
CHECK(!xml_text().set(18446744073709551615ul));
|
||||
|
||||
CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>"));
|
||||
}
|
||||
#else
|
||||
TEST_XML(dom_text_assign_long, "<node/>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
node.append_child(STR("text1")).text() = -2147483647l;
|
||||
node.append_child(STR("text2")).text() = -2147483647l - 1;
|
||||
xml_text() = -2147483647l - 1;
|
||||
|
||||
node.append_child(STR("text3")).text() = 4294967295ul;
|
||||
node.append_child(STR("text4")).text() = 4294967294ul;
|
||||
xml_text() = 4294967295ul;
|
||||
|
||||
CHECK_NODE(node, STR("<node><text1>-2147483647</text1><text2>-2147483648</text2><text3>4294967295</text3><text4>4294967294</text4></node>"));
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_set_value_long, "<node/>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(node.append_child(STR("text1")).text().set(-2147483647l));
|
||||
CHECK(node.append_child(STR("text2")).text().set(-2147483647l - 1));
|
||||
CHECK(!xml_text().set(-2147483647l - 1));
|
||||
|
||||
CHECK(node.append_child(STR("text3")).text().set(4294967295ul));
|
||||
CHECK(node.append_child(STR("text4")).text().set(4294967294ul));
|
||||
CHECK(!xml_text().set(4294967295ul));
|
||||
|
||||
CHECK_NODE(node, STR("<node><text1>-2147483647</text1><text2>-2147483648</text2><text3>4294967295</text3><text4>4294967294</text4></node>"));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PUGIXML_HAS_LONG_LONG
|
||||
TEST_XML(dom_text_assign_llong, "<node/>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
node.append_child(STR("text1")).text() = -9223372036854775807ll;
|
||||
node.append_child(STR("text2")).text() = -9223372036854775807ll - 1;
|
||||
xml_text() = -9223372036854775807ll - 1;
|
||||
|
||||
node.append_child(STR("text3")).text() = 18446744073709551615ull;
|
||||
node.append_child(STR("text4")).text() = 18446744073709551614ull;
|
||||
xml_text() = 18446744073709551615ull;
|
||||
|
||||
CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>"));
|
||||
}
|
||||
|
||||
TEST_XML(dom_text_set_value_llong, "<node/>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(node.append_child(STR("text1")).text().set(-9223372036854775807ll));
|
||||
CHECK(node.append_child(STR("text2")).text().set(-9223372036854775807ll - 1));
|
||||
CHECK(!xml_text().set(-9223372036854775807ll - 1));
|
||||
|
||||
CHECK(node.append_child(STR("text3")).text().set(18446744073709551615ull));
|
||||
CHECK(node.append_child(STR("text4")).text().set(18446744073709551614ull));
|
||||
CHECK(!xml_text().set(18446744073709551615ull));
|
||||
|
||||
CHECK_NODE(node, STR("<node><text1>-9223372036854775807</text1><text2>-9223372036854775808</text2><text3>18446744073709551615</text3><text4>18446744073709551614</text4></node>"));
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_XML(dom_text_middle, "<node><c1>notthisone</c1>text<c2/></node>")
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
xml_text t = node.text();
|
||||
|
||||
CHECK_STRING(t.get(), STR("text"));
|
||||
t.set(STR("notext"));
|
||||
|
||||
CHECK_NODE(node, STR("<node><c1>notthisone</c1>notext<c2/></node>"));
|
||||
CHECK(node.remove_child(t.data()));
|
||||
|
||||
CHECK(!t);
|
||||
CHECK_NODE(node, STR("<node><c1>notthisone</c1><c2/></node>"));
|
||||
|
||||
t.set(STR("yestext"));
|
||||
|
||||
CHECK(t);
|
||||
CHECK_NODE(node, STR("<node><c1>notthisone</c1><c2/>yestext</node>"));
|
||||
CHECK(t.data() == node.last_child());
|
||||
}
|
||||
|
||||
TEST_XML_FLAGS(dom_text_data, "<node><a>foo</a><b><![CDATA[bar]]></b><c><?pi value?></c><d/></node>", parse_default | parse_pi)
|
||||
{
|
||||
xml_node node = doc.child(STR("node"));
|
||||
|
||||
CHECK(node.child(STR("a")).text().data() == node.child(STR("a")).first_child());
|
||||
CHECK(node.child(STR("b")).text().data() == node.child(STR("b")).first_child());
|
||||
CHECK(!node.child(STR("c")).text().data());
|
||||
CHECK(!node.child(STR("d")).text().data());
|
||||
CHECK(!xml_text().data());
|
||||
}
|
||||
|
||||
TEST(dom_text_defaults)
|
||||
{
|
||||
xml_text text;
|
||||
|
||||
CHECK_STRING(text.as_string(STR("foo")), STR("foo"));
|
||||
CHECK(text.as_int(42) == 42);
|
||||
CHECK(text.as_uint(42) == 42);
|
||||
CHECK(text.as_double(42) == 42);
|
||||
CHECK(text.as_float(42) == 42);
|
||||
CHECK(text.as_bool(true) == true);
|
||||
|
||||
#ifdef PUGIXML_HAS_LONG_LONG
|
||||
CHECK(text.as_llong(42) == 42);
|
||||
CHECK(text.as_ullong(42) == 42);
|
||||
#endif
|
||||
}
|
1276
3rdparty/pugixml/tests/test_dom_traverse.cpp
vendored
1276
3rdparty/pugixml/tests/test_dom_traverse.cpp
vendored
File diff suppressed because it is too large
Load Diff
3
3rdparty/pugixml/tests/test_header_guard.cpp
vendored
3
3rdparty/pugixml/tests/test_header_guard.cpp
vendored
@ -1,3 +0,0 @@
|
||||
// Tests header guards
|
||||
#include "../src/pugixml.hpp"
|
||||
#include "../src/pugixml.hpp"
|
@ -1,3 +0,0 @@
|
||||
// Tests compatibility with iosfwd
|
||||
#include "../src/pugixml.hpp"
|
||||
#include <iosfwd>
|
@ -1,3 +0,0 @@
|
||||
// Tests compatibility with iosfwd
|
||||
#include <iosfwd>
|
||||
#include "../src/pugixml.hpp"
|
@ -1,3 +0,0 @@
|
||||
// Tests compatibility with iostream
|
||||
#include "../src/pugixml.hpp"
|
||||
#include <iostream>
|
@ -1,3 +0,0 @@
|
||||
// Tests compatibility with iostream
|
||||
#include <iostream>
|
||||
#include "../src/pugixml.hpp"
|
19
3rdparty/pugixml/tests/test_header_only_1.cpp
vendored
19
3rdparty/pugixml/tests/test_header_only_1.cpp
vendored
@ -1,19 +0,0 @@
|
||||
#define PUGIXML_HEADER_ONLY
|
||||
#define pugi pugih
|
||||
|
||||
#include "common.hpp"
|
||||
|
||||
// Check header guards
|
||||
#include "../src/pugixml.hpp"
|
||||
#include "../src/pugixml.hpp"
|
||||
|
||||
TEST(header_only_1)
|
||||
{
|
||||
xml_document doc;
|
||||
CHECK(doc.load_string(STR("<node/>")));
|
||||
CHECK_STRING(doc.first_child().name(), STR("node"));
|
||||
|
||||
#ifndef PUGIXML_NO_XPATH
|
||||
CHECK(doc.first_child() == doc.select_node(STR("//*")).node());
|
||||
#endif
|
||||
}
|
19
3rdparty/pugixml/tests/test_header_only_2.cpp
vendored
19
3rdparty/pugixml/tests/test_header_only_2.cpp
vendored
@ -1,19 +0,0 @@
|
||||
#define PUGIXML_HEADER_ONLY
|
||||
#define pugi pugih
|
||||
|
||||
#include "common.hpp"
|
||||
|
||||
// Check header guards
|
||||
#include "../src/pugixml.hpp"
|
||||
#include "../src/pugixml.hpp"
|
||||
|
||||
TEST(header_only_2)
|
||||
{
|
||||
xml_document doc;
|
||||
CHECK(doc.load_string(STR("<node/>")));
|
||||
CHECK_STRING(doc.first_child().name(), STR("node"));
|
||||
|
||||
#ifndef PUGIXML_NO_XPATH
|
||||
CHECK(doc.first_child() == doc.select_node(STR("//*")).node());
|
||||
#endif
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
// Tests compatibility with string
|
||||
#include "../src/pugixml.hpp"
|
||||
#include <string>
|
@ -1,3 +0,0 @@
|
||||
// Tests compatibility with string
|
||||
#include <string>
|
||||
#include "../src/pugixml.hpp"
|
@ -1,5 +0,0 @@
|
||||
// Tests compatibility with string/iostream
|
||||
#include <string>
|
||||
#include "../src/pugixml.hpp"
|
||||
#include <istream>
|
||||
#include <ostream>
|
301
3rdparty/pugixml/tests/test_memory.cpp
vendored
301
3rdparty/pugixml/tests/test_memory.cpp
vendored
@ -1,301 +0,0 @@
|
||||
#include "common.hpp"
|
||||
|
||||
#include "writer_string.hpp"
|
||||
#include "allocator.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace
|
||||
{
|
||||
int page_allocs = 0;
|
||||
int page_deallocs = 0;
|
||||
|
||||
bool is_page(size_t size)
|
||||
{
|
||||
return size >= 16384;
|
||||
}
|
||||
|
||||
void* allocate(size_t size)
|
||||
{
|
||||
void* ptr = memory_allocate(size);
|
||||
page_allocs += is_page(memory_size(ptr));
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void deallocate(void* ptr)
|
||||
{
|
||||
page_deallocs += is_page(memory_size(ptr));
|
||||
memory_deallocate(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(memory_custom_memory_management)
|
||||
{
|
||||
page_allocs = page_deallocs = 0;
|
||||
|
||||
// remember old functions
|
||||
allocation_function old_allocate = get_memory_allocation_function();
|
||||
deallocation_function old_deallocate = get_memory_deallocation_function();
|
||||
|
||||
// replace functions
|
||||
set_memory_management_functions(allocate, deallocate);
|
||||
|
||||
{
|
||||
// parse document
|
||||
xml_document doc;
|
||||
|
||||
CHECK(page_allocs == 0 && page_deallocs == 0);
|
||||
|
||||
CHECK(doc.load_string(STR("<node />")));
|
||||
|
||||
CHECK(page_allocs == 1 && page_deallocs == 0);
|
||||
|
||||
// modify document (no new page)
|
||||
CHECK(doc.first_child().set_name(STR("foobars")));
|
||||
CHECK(page_allocs == 1 && page_deallocs == 0);
|
||||
|
||||
// modify document (new page)
|
||||
std::basic_string<pugi::char_t> s(65536, 'x');
|
||||
|
||||
CHECK(doc.first_child().set_name(s.c_str()));
|
||||
CHECK(page_allocs == 2 && page_deallocs == 0);
|
||||
|
||||
// modify document (new page, old one should die)
|
||||
s += s;
|
||||
|
||||
CHECK(doc.first_child().set_name(s.c_str()));
|
||||
CHECK(page_allocs == 3 && page_deallocs == 1);
|
||||
}
|
||||
|
||||
CHECK(page_allocs == 3 && page_deallocs == 3);
|
||||
|
||||
// restore old functions
|
||||
set_memory_management_functions(old_allocate, old_deallocate);
|
||||
}
|
||||
|
||||
TEST(memory_large_allocations)
|
||||
{
|
||||
page_allocs = page_deallocs = 0;
|
||||
|
||||
// remember old functions
|
||||
allocation_function old_allocate = get_memory_allocation_function();
|
||||
deallocation_function old_deallocate = get_memory_deallocation_function();
|
||||
|
||||
// replace functions
|
||||
set_memory_management_functions(allocate, deallocate);
|
||||
|
||||
{
|
||||
xml_document doc;
|
||||
|
||||
CHECK(page_allocs == 0 && page_deallocs == 0);
|
||||
|
||||
// initial fill
|
||||
for (size_t i = 0; i < 128; ++i)
|
||||
{
|
||||
std::basic_string<pugi::char_t> s(i * 128, 'x');
|
||||
|
||||
CHECK(doc.append_child(node_pcdata).set_value(s.c_str()));
|
||||
}
|
||||
|
||||
CHECK(page_allocs > 0 && page_deallocs == 0);
|
||||
|
||||
// grow-prune loop
|
||||
while (doc.first_child())
|
||||
{
|
||||
pugi::xml_node node;
|
||||
|
||||
// grow
|
||||
for (node = doc.first_child(); node; node = node.next_sibling())
|
||||
{
|
||||
std::basic_string<pugi::char_t> s = node.value();
|
||||
|
||||
CHECK(node.set_value((s + s).c_str()));
|
||||
}
|
||||
|
||||
// prune
|
||||
for (node = doc.first_child(); node; )
|
||||
{
|
||||
pugi::xml_node next = node.next_sibling().next_sibling();
|
||||
|
||||
node.parent().remove_child(node);
|
||||
|
||||
node = next;
|
||||
}
|
||||
}
|
||||
|
||||
CHECK(page_allocs == page_deallocs + 1); // only one live page left (it waits for new allocations)
|
||||
|
||||
char buffer;
|
||||
CHECK(doc.load_buffer_inplace(&buffer, 0, parse_fragment, get_native_encoding()));
|
||||
|
||||
CHECK(page_allocs == page_deallocs); // no live pages left
|
||||
}
|
||||
|
||||
CHECK(page_allocs == page_deallocs); // everything is freed
|
||||
|
||||
// restore old functions
|
||||
set_memory_management_functions(old_allocate, old_deallocate);
|
||||
}
|
||||
|
||||
TEST(memory_page_management)
|
||||
{
|
||||
page_allocs = page_deallocs = 0;
|
||||
|
||||
// remember old functions
|
||||
allocation_function old_allocate = get_memory_allocation_function();
|
||||
deallocation_function old_deallocate = get_memory_deallocation_function();
|
||||
|
||||
// replace functions
|
||||
set_memory_management_functions(allocate, deallocate);
|
||||
|
||||
{
|
||||
xml_document doc;
|
||||
|
||||
CHECK(page_allocs == 0 && page_deallocs == 0);
|
||||
|
||||
// initial fill
|
||||
std::vector<xml_node> nodes;
|
||||
|
||||
for (size_t i = 0; i < 4000; ++i)
|
||||
{
|
||||
xml_node node = doc.append_child(STR("node"));
|
||||
CHECK(node);
|
||||
|
||||
nodes.push_back(node);
|
||||
}
|
||||
|
||||
CHECK(page_allocs > 0 && page_deallocs == 0);
|
||||
|
||||
// grow-prune loop
|
||||
size_t offset = 0;
|
||||
size_t prime = 15485863;
|
||||
|
||||
while (nodes.size() > 0)
|
||||
{
|
||||
offset = (offset + prime) % nodes.size();
|
||||
|
||||
doc.remove_child(nodes[offset]);
|
||||
|
||||
nodes[offset] = nodes.back();
|
||||
nodes.pop_back();
|
||||
}
|
||||
|
||||
CHECK(page_allocs == page_deallocs + 1); // only one live page left (it waits for new allocations)
|
||||
|
||||
char buffer;
|
||||
CHECK(doc.load_buffer_inplace(&buffer, 0, parse_fragment, get_native_encoding()));
|
||||
|
||||
CHECK(page_allocs == page_deallocs); // no live pages left
|
||||
}
|
||||
|
||||
CHECK(page_allocs == page_deallocs); // everything is freed
|
||||
|
||||
// restore old functions
|
||||
set_memory_management_functions(old_allocate, old_deallocate);
|
||||
}
|
||||
|
||||
TEST(memory_string_allocate_increasing)
|
||||
{
|
||||
xml_document doc;
|
||||
|
||||
doc.append_child(node_pcdata).set_value(STR("x"));
|
||||
|
||||
std::basic_string<char_t> s = STR("ab");
|
||||
|
||||
for (int i = 0; i < 17; ++i)
|
||||
{
|
||||
doc.append_child(node_pcdata).set_value(s.c_str());
|
||||
|
||||
s += s;
|
||||
}
|
||||
|
||||
std::string result = save_narrow(doc, format_no_declaration | format_raw, encoding_utf8);
|
||||
|
||||
CHECK(result.size() == 262143);
|
||||
CHECK(result[0] == 'x');
|
||||
|
||||
for (size_t j = 1; j < result.size(); ++j)
|
||||
{
|
||||
CHECK(result[j] == (j % 2 ? 'a' : 'b'));
|
||||
}
|
||||
}
|
||||
|
||||
TEST(memory_string_allocate_decreasing)
|
||||
{
|
||||
xml_document doc;
|
||||
|
||||
std::basic_string<char_t> s = STR("ab");
|
||||
|
||||
for (int i = 0; i < 17; ++i) s += s;
|
||||
|
||||
for (int j = 0; j < 17; ++j)
|
||||
{
|
||||
s.resize(s.size() / 2);
|
||||
|
||||
doc.append_child(node_pcdata).set_value(s.c_str());
|
||||
}
|
||||
|
||||
doc.append_child(node_pcdata).set_value(STR("x"));
|
||||
|
||||
std::string result = save_narrow(doc, format_no_declaration | format_raw, encoding_utf8);
|
||||
|
||||
CHECK(result.size() == 262143);
|
||||
CHECK(result[result.size() - 1] == 'x');
|
||||
|
||||
for (size_t k = 0; k + 1 < result.size(); ++k)
|
||||
{
|
||||
CHECK(result[k] == (k % 2 ? 'b' : 'a'));
|
||||
}
|
||||
}
|
||||
|
||||
TEST(memory_string_allocate_increasing_inplace)
|
||||
{
|
||||
xml_document doc;
|
||||
|
||||
xml_node node = doc.append_child(node_pcdata);
|
||||
|
||||
node.set_value(STR("x"));
|
||||
|
||||
std::basic_string<char_t> s = STR("ab");
|
||||
|
||||
for (int i = 0; i < 17; ++i)
|
||||
{
|
||||
node.set_value(s.c_str());
|
||||
|
||||
s += s;
|
||||
}
|
||||
|
||||
std::string result = save_narrow(doc, format_no_declaration | format_raw, encoding_utf8);
|
||||
|
||||
CHECK(result.size() == 131072);
|
||||
|
||||
for (size_t j = 0; j < result.size(); ++j)
|
||||
{
|
||||
CHECK(result[j] == (j % 2 ? 'b' : 'a'));
|
||||
}
|
||||
}
|
||||
|
||||
TEST(memory_string_allocate_decreasing_inplace)
|
||||
{
|
||||
xml_document doc;
|
||||
|
||||
xml_node node = doc.append_child(node_pcdata);
|
||||
|
||||
std::basic_string<char_t> s = STR("ab");
|
||||
|
||||
for (int i = 0; i < 17; ++i) s += s;
|
||||
|
||||
for (int j = 0; j < 17; ++j)
|
||||
{
|
||||
s.resize(s.size() / 2);
|
||||
|
||||
node.set_value(s.c_str());
|
||||
}
|
||||
|
||||
node.set_value(STR("x"));
|
||||
|
||||
std::string result = save_narrow(doc, format_no_declaration | format_raw, encoding_utf8);
|
||||
|
||||
CHECK(result == "x");
|
||||
}
|
1208
3rdparty/pugixml/tests/test_parse.cpp
vendored
1208
3rdparty/pugixml/tests/test_parse.cpp
vendored
File diff suppressed because it is too large
Load Diff
364
3rdparty/pugixml/tests/test_parse_doctype.cpp
vendored
364
3rdparty/pugixml/tests/test_parse_doctype.cpp
vendored
@ -1,364 +0,0 @@
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
|
||||
#include "common.hpp"
|
||||
|
||||
#include <string.h>
|
||||
#include <wchar.h>
|
||||
#include <string>
|
||||
|
||||
static xml_parse_result load_concat(xml_document& doc, const char_t* a, const char_t* b = STR(""), const char_t* c = STR(""))
|
||||
{
|
||||
char_t buffer[768];
|
||||
|
||||
#ifdef PUGIXML_WCHAR_MODE
|
||||
wcscpy(buffer, a);
|
||||
wcscat(buffer, b);
|
||||
wcscat(buffer, c);
|
||||
#else
|
||||
strcpy(buffer, a);
|
||||
strcat(buffer, b);
|
||||
strcat(buffer, c);
|
||||
#endif
|
||||
|
||||
return doc.load_string(buffer, parse_fragment);
|
||||
}
|
||||
|
||||
static bool test_doctype_wf(const char_t* decl)
|
||||
{
|
||||
xml_document doc;
|
||||
|
||||
// standalone
|
||||
if (!load_concat(doc, decl) || !doc.first_child().empty()) return false;
|
||||
|
||||
// pcdata pre/postfix
|
||||
if (!load_concat(doc, STR("a"), decl) || !test_node(doc, STR("a"), STR(""), format_raw)) return false;
|
||||
if (!load_concat(doc, decl, STR("b")) || !test_node(doc, STR("b"), STR(""), format_raw)) return false;
|
||||
if (!load_concat(doc, STR("a"), decl, STR("b")) || !test_node(doc, STR("ab"), STR(""), format_raw)) return false;
|
||||
|
||||
// node pre/postfix
|
||||
if (!load_concat(doc, STR("<nodea/>"), decl) || !test_node(doc, STR("<nodea/>"), STR(""), format_raw)) return false;
|
||||
if (!load_concat(doc, decl, STR("<nodeb/>")) || !test_node(doc, STR("<nodeb/>"), STR(""), format_raw)) return false;
|
||||
if (!load_concat(doc, STR("<nodea/>"), decl, STR("<nodeb/>")) || !test_node(doc, STR("<nodea/><nodeb/>"), STR(""), format_raw)) return false;
|
||||
|
||||
// check load-store contents preservation
|
||||
CHECK(doc.load_string(decl, parse_doctype | parse_fragment));
|
||||
CHECK_NODE(doc, decl);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool test_doctype_nwf(const char_t* decl)
|
||||
{
|
||||
xml_document doc;
|
||||
|
||||
// standalone
|
||||
if (load_concat(doc, decl).status != status_bad_doctype) return false;
|
||||
|
||||
// pcdata postfix
|
||||
if (load_concat(doc, decl, STR("b")).status != status_bad_doctype) return false;
|
||||
|
||||
// node postfix
|
||||
if (load_concat(doc, decl, STR("<nodeb/>")).status != status_bad_doctype) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#define TEST_DOCTYPE_WF(contents) CHECK(test_doctype_wf(STR(contents)))
|
||||
#define TEST_DOCTYPE_NWF(contents) CHECK(test_doctype_nwf(STR(contents)))
|
||||
|
||||
TEST(parse_doctype_skip)
|
||||
{
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc SYSTEM 'foo'>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc SYSTEM \"foo\">");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc PUBLIC \"foo\" 'bar'>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc PUBLIC \"foo'\">");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc SYSTEM 'foo' [<!ELEMENT foo 'ANY'>]>");
|
||||
}
|
||||
|
||||
TEST(parse_doctype_error)
|
||||
{
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE doc");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE doc SYSTEM 'foo");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE doc SYSTEM \"foo");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE doc PUBLIC \"foo\" 'bar");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE doc PUBLIC \"foo'\"");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE doc SYSTEM 'foo' [<!ELEMENT foo 'ANY");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE doc SYSTEM 'foo' [<!ELEMENT foo 'ANY'>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE doc SYSTEM 'foo' [<!ELEMENT foo 'ANY'>]");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE doc SYSTEM 'foo' [<!ELEMENT foo 'ANY'>] ");
|
||||
}
|
||||
|
||||
// Examples from W3C recommendations
|
||||
TEST(parse_doctype_w3c_wf)
|
||||
{
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE greeting SYSTEM \"hello.dtd\">");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE greeting [ <!ELEMENT greeting (#PCDATA)> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE greeting [ <!ATTLIST list type (bullets|ordered|glossary) \"ordered\"> <!ATTLIST form method CDATA #FIXED \"POST\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE greeting [ <!ENTITY % draft 'INCLUDE' > <!ENTITY % final 'IGNORE' > <![%draft;[ <!ELEMENT book (comments*, title, body, supplements?)> ]]> <![%final;[ <!ELEMENT book (title, body, supplements?)> ]]>]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE greeting [ <!ENTITY open-hatch PUBLIC \"-//Textuality//TEXT Standard open-hatch boilerplate//EN\" \"http://www.textuality.com/boilerplate/OpenHatch.xml\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE greeting [ <!ENTITY EndAttr \"27'\" > ]>");
|
||||
}
|
||||
|
||||
TEST(parse_doctype_w3c_nwf)
|
||||
{
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE greeting SYSTEM \"hello.dtd>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE greeting SYSTEM");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE greeting [ <!ELEMENT greeting (#PCDATA)> ]");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE greeting [ <!ELEMENT greeting (#PCDATA)>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE greeting [ <!ELEMENT greeting (#PCDATA");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE greeting [ ");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE greeting [ <!ATTLIST list type (bullets|ordered|glossary) \"ordered\"> ]");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE greeting [ <!ATTLIST list type (bullets|ordered|glossary) \"ordered\">");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE greeting [ <!ATTLIST list type (bullets|ordered|glossary) \"orde");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE greeting [ <!ATTLIST list type (bullets|ordered|glossary) ");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE greeting [ <!ENTITY open-hatch PUBLIC \"-//Textuality//TEXT Standard open-hatch boilerplate//EN\" \"http://www.textuality.com/boilerplate/OpenHatch.x");
|
||||
}
|
||||
|
||||
// Examples from xmlsuite
|
||||
TEST(parse_doctype_xmlconf_eduni_1)
|
||||
{
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!NOTATION gif SYSTEM \"file:///usr/X11R6/bin/xv\"> <!ENTITY declared SYSTEM \"xyzzy\" NDATA gif> <!ATTLIST foo bar ENTITY \"7\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!NOTATION gif SYSTEM \"file:///usr/X11R6/bin/xv\"> <!ENTITY declared SYSTEM \"xyzzy\" NDATA gif> <!ATTLIST foo bar ENTITY \"undeclared\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY % e SYSTEM \"E60.ent\"> %e; ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY e \"an &unparsed; entity\"> <!NOTATION gif SYSTEM \"file:///usr/X11R6/bin/xv\"> <!ENTITY unparsed SYSTEM \"xyzzy\" NDATA gif> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ATTLIST foo bar CDATA #IMPLIED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ATTLIST foo xml:lang CDATA #IMPLIED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY e SYSTEM \"E38.ent\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo SYSTEM \"E36.dtd\">");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ELEMENT bar (foo|foo)> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!NOTATION one SYSTEM \"file:///usr/bin/awk\"> <!ATTLIST foo bar NOTATION (one|one) #IMPLIED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ATTLIST foo bar (one|one) #IMPLIED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ATTLIST foo xml:lang NMTOKEN #IMPLIED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY gt \">\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ATTLIST foo bar NMTOKENS #IMPLIED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY % pe SYSTEM \"subdir1/E18-pe\"> %pe; %intpe; ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo (PCDATA|foo)*> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo (foo*)> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo (foo*)> <!ENTITY space \"&#32;\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo (foo*)> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo (foo*)> <!ENTITY space \" \"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo EMPTY> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo EMPTY> <!ENTITY empty \"\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <![INCLUDE[<!ATTLIST foo bar CDATA #IMPLIED>]]> <![IGNORE[some junk]]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY % pe \"hello\"> <!-- If forward were expanded when ent was declared, we were get an error, but it is bypassed and not expanded until ent is used in the instance --> <!ENTITY ent \"%pe; ! &forward;\"> <!ENTITY forward \"goodbye\"> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY % e \"bar CDATA #IMPLIED>\"> <!ATTLIST foo %e;");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY % e \"bar CDATA #IMPLIED>\"> <!ATTLIST foo %e; ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ENTITY ent SYSTEM 'E18-ent'> ]>");
|
||||
}
|
||||
|
||||
TEST(parse_doctype_xmlconf_eduni_2)
|
||||
{
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ENTITY % pe \"<!ENTITY ent1 'text'>\"> %pe; <!ELEMENT foo ANY> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ENTITY ent SYSTEM \"ent\"> <!ELEMENT foo ANY> <!ATTLIST foo a CDATA \"contains &ent; reference\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ATTLIST foo id ID #IMPLIED> <!ATTLIST foo ref IDREF \"undef\"> <!ATTLIST foo ent ENTITY \"undef\"> <!-- can't test NOTATION attribute, because if it's undeclared then we'll get an error for one of the enumerated values being undeclared. --> <!ENTITY ent SYSTEM \"foo\" NDATA not> <!NOTATION not SYSTEM \"not\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo EMPTY> <!ATTLIST foo a (one|two|three) \"four\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ATTLIST foo a NOTATION (not) \"not2\"> <!NOTATION not SYSTEM \"not\"> <!NOTATION not2 SYSTEM \"not2\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo EMPTY> <!ATTLIST foo a NMTOKENS \"34+\"> ]>");
|
||||
}
|
||||
|
||||
TEST(parse_doctype_xmlconf_eduni_3)
|
||||
{
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE animal [ <!ELEMENT animal ANY> <?_\xd9\x9f an only legal per 5th edition extender #x65f in PITarget ?> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT root ANY> <!ELEMENT \xc2\xb7_BadName EMPTY> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc [ <!ENTITY e \"<X๜></X๜>\"> ]>");
|
||||
}
|
||||
|
||||
TEST(parse_doctype_xmlconf_eduni_4)
|
||||
{
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY a:b \"bogus\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ATTLIST foo xmlns:a CDATA #IMPLIED xmlns:b NMTOKEN #IMPLIED xmlns:c CDATA #IMPLIED> <!ELEMENT bar ANY> <!ATTLIST bar a:attr CDATA #IMPLIED b:attr CDATA #IMPLIED c:attr CDATA #IMPLIED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ATTLIST foo xmlns:a CDATA #IMPLIED xmlns:b CDATA #IMPLIED xmlns:c CDATA #IMPLIED> <!ELEMENT bar ANY> <!ATTLIST bar a:attr CDATA #IMPLIED b:attr CDATA #IMPLIED c:attr CDATA #IMPLIED> <!ENTITY tilde \"~\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT xmlns:foo EMPTY> ]>");
|
||||
}
|
||||
|
||||
TEST(parse_doctype_xmlconf_eduni_5)
|
||||
{
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ENTITY e \"\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo (foo*)> <!ENTITY e \"abc…def\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE foo [ <!ELEMENT foo ANY> <!ATTLIST foo bar NMTOKENS #IMPLIED> <!ENTITY val \"abc…def\"> ]>");
|
||||
}
|
||||
|
||||
TEST(parse_doctype_xmlconf_ibm_1)
|
||||
{
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE animal SYSTEM \"ibm32i04.dtd\" [ <!ATTLIST animal xml:space (default|preserve) 'preserve'> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT root (a,b)> <!ELEMENT a EMPTY> <!ELEMENT b (#PCDATA|c)* > <!ELEMENT c ANY> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT root (PCDATA|b)* > <!ELEMENT b (#PCDATA) > <!ATTLIST b attr1 CDATA #REQUIRED> <!ATTLIST b attr2 (abc|def) \"abc\"> <!ATTLIST b attr3 CDATA #FIXED \"fixed\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE test [ <!ELEMENT test ANY> <!ELEMENT landscape EMPTY> <!ENTITY parsedentity1 SYSTEM \"ibm56iv01.xml\"> <!ENTITY parsedentity2 SYSTEM \"ibm56iv02.xml\"> <!ATTLIST landscape sun ENTITIES #IMPLIED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE test [ <!ELEMENT test ANY> <!ELEMENT landscape EMPTY> <!ENTITY image1 SYSTEM \"d:\\testspec\\images\\sunset.gif\" NDATA gif> <!ENTITY image2 SYSTEM \"d:\\testspec\\images\\frontpag.gif\" NDATA gif> <!ATTLIST landscape sun ENTITIES #IMPLIED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE tokenizer [ <!ELEMENT tokenizer ANY> <!ATTLIST tokenizer UniqueName ID #FIXED \"AC1999\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE test [ <!ELEMENT test ANY> <!ELEMENT blob (#PCDATA)> <!NOTATION base64 SYSTEM \"mimecode\"> <!NOTATION uuencode SYSTEM \"uudecode\"> <!ATTLIST blob content-encoding NOTATION (base64|uuencode|raw|ascii) #REQUIRED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE test [ <!ELEMENT test ANY> <!ELEMENT a EMPTY> <!ELEMENT nametoken EMPTY> <!ATTLIST nametoken namevalue NMTOKEN \"@#$\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT root (#PCDATA)* > <!ENTITY % pe1 SYSTEM \"ibm68i04.ent\"> %pe1; ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT a EMPTY> <!ATTLIST a attr1 CDATA \"&ge1;\"> <!--* GE reference in attr default before declaration *--> <!ENTITY ge1 \"abcdef\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ENTITY ge1 \"abcdef\"> <!ELEMENT a EMPTY> <!ATTLIST a attr1 CDATA \"&ge1;\"> <!ENTITY % pe2 \"<!ATTLIST a attr2 CDATA #IMPLIED>\"> %pe3; <!--* PE reference in above doesn't match declaration *--> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT root (#PCDATA)> <!ATTLIST root att CDATA #IMPLIED> <!ENTITY % pe1 '<!ATTLIST root att2 CDATA \"&ge1;\">'> <!ENTITY ge1 \"attdefaultvalue\" > %pe1; <!--* notation JPGformat not declared *--> <!ENTITY ge2 SYSTEM \"image.jpg\" NDATA JPGformat> ]>");
|
||||
}
|
||||
|
||||
TEST(parse_doctype_xmlconf_ibm_2)
|
||||
{
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!ENTITY gewithElemnetDecl \"<!ELEMENT bogus ANY>\"> <!ATTLIST student att1 CDATA #REQUIRED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!ENTITY gewithlt \"abcd&#x3c;\"> <!ATTLIST student att1 CDATA #REQUIRED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!ENTITY gewithlt \"abcd<\"> <!ATTLIST student att1 CDATA #REQUIRED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE 5A_name_starts_with_digit [ <!ELEMENT 5A_name_starts_with_digit EMPTY> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!ENTITY FullName \"Snow&Man\"> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!ENTITY FullName \"Snow\"Man\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!ATTLIST student first CDATA #REQUIRED middle CDATA #IMPLIED last CDATA #IMPLIED > <!ENTITY myfirst \"Snow\"> <!ENTITY mymiddle \"I\"> <!ENTITY mylast \"Man\"> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE student SYSTEM 'student.DTD [ <!ELEMENT student (#PCDATA)> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!ENTITY info PUBLIC '..\\info.dtd> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!ENTITY info PUBLIC '..\\info'.dtd'> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!ENTITY info PUBLIC \"..\\info.dtd> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student [ <!ENTITY info PUBLIC \"This is a {test} \" \"student.dtd\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE aniaml [ <!ELEMENT animal ANY> <!ENTITY generalE \"leopard\"> &generalE; <!ENTITY % parameterE \"<!ELEMENT leopard EMPTY>\"> %parameterE; ] animal>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE animal SYSTEM \"ibm28an01.dtd\" [ <!ELEMENT animal (cat|tiger|leopard)+> <!NOTATION animal_class SYSTEM \"ibm29v01.txt\"> <!ELEMENT cat ANY> <!ENTITY forcat \"This is a small cat\"> <!ELEMENT tiger (#PCDATA)> <!ELEMENT small EMPTY> <!ELEMENT big EMPTY> <!ATTLIST tiger color CDATA #REQUIRED> <?sound \"This is a PI\" ?> <!-- This is a comment --> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE animal [ <!ELEMENT animal ANY> <!ENTITY % parameterE \"cat SYSTEM\"> <!NOTATION %parameterE; \"cat.txt\"> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE animal [ <!ELEMENT animal ANY> <!ENTITY % parameterE \"A music file -->\"> <!-- Parameter reference appears inside a comment in DTD --> <!-- This is %parameterE; ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE animal [ <!ELEMENT animal ANY> <!ENTITY % parameterE \"A music file ?>\"> <?music %parameterE; ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE animal [ <!ELEMENT animal ANY> <!ENTITY % parameterE \"leopard EMPTY>\"> <!ELEMENT %parameterE; ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT root ANY> <!ATTLIST root attr1 CDATA #IMPLIED> <!ATTLIST root attr2 CDATA #IMPLIED> <!ENTITY withlt \"have <lessthan> inside\"> <!ENTITY aIndirect \"&withlt;\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT root (#PCDATA)> <!--* Mising Name S contentspec in elementdecl *--> <!ELEMENT > ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT root (#PCDATA)> <!ELEMENT a ANY> <!ELEMENT b ANY> <!--* extra separator in seq *--> <!ELEMENT aElement ((a|b),,a)? > ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT root (#PCDATA)> <!ELEMENT a ANY> <!--* Missing white space before Name in AttDef *--> <!ATTLIST a attr1 CDATA \"default\"attr2 ID #required> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE test [ <!ELEMENT test ANY> <!ELEMENT one EMPTY> <!ELEMENT two EMPTY> <!NOTATION this SYSTEM \"alpha\"> <!ATTLIST three attr NOTATION (\"this\") #IMPLIED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!-- DTD for Production 62--> <![ include [ <!ELEMENT tiger EMPTY> <!ELEMENT animal ANY> ]]> <!--Negative test with pattern1 of P62--> <!--include(Case sensitive)--> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <![[INCLUDE[ <!ELEMENT tiger EMPTY> <!ELEMENT animal ANY> ]]> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE root [ <?[INCLUDE[ <!ELEMENT tiger EMPTY> <!ELEMENT animal ANY> ]]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <![[ <!ELEMENT tiger EMPTY> <!ELEMENT animal ANY> ]]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <![INCLUDE <!ELEMENT tiger EMPTY> <!ELEMENT animal ANY> ]]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <![ <!ELEMENT tiger EMPTY> <!ELEMENT animal ANY> [INCLUDE ]]> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE root [ <![ INCLUDE [ <!ELEMENT tiger EMPTY> <!ELEMENT animal ANY> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE root [ <![INCLUDE[ ]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT root (#PCDATA)> <!--* PE referenced before declared, against WFC: entity declared --> %paaa; <!ENTITY % paaa \"<!ATTLIST root att CDATA #IMPLIED>\"> <!ENTITY aaa \"aString\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT root (#PCDATA)> <!ATTLIST root att CDATA #IMPLIED> <!--* missing space *--> <!ENTITY% paaa \"<!-- comments -->\"> %paaa; ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE root [ <!ELEMENT root (#PCDATA)> <!ATTLIST root att CDATA #IMPLIED> <!--* missing closing bracket *--> <!ENTITY % paaa \"<!-- comments -->\" %paaa; ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root PUBLIC \"-//W3C//DTD//EN\"\"empty.dtd\" [ <!ELEMENT root (#PCDATA)> <!ATTLIST root att CDATA #IMPLIED> ]>");
|
||||
}
|
||||
|
||||
TEST(parse_doctype_xmlconf_ibm_3)
|
||||
{
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE animal [ <!ELEMENT animal (cat|tiger|leopard)+> <!ELEMENT cat EMPTY> <!ELEMENT tiger (#PCDATA)> <!ELEMENT leopard ANY> <!ELEMENT small EMPTY> <!ELEMENT big EMPTY> <!ATTLIST tiger color CDATA #REQUIRED> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE book [ <!ELEMENT book ANY> <!-- This test case covers legal character ranges plus discrete legal characters for production 02. --> <?NAME target ?> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!ATTLIST student first CDATA #REQUIRED middle CDATA #IMPLIED last CDATA #REQUIRED > <!ENTITY myfirst \"Snow\"> <!ENTITY mymiddle \"I\"> <!ENTITY mylast 'Man &myfirst; and &myfirst; mymiddle;.'> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student SYSTEM 'student.dtd'[ ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!ENTITY unref SYSTEM \"\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student PUBLIC \"\" \"student.dtd\"[ ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student PUBLIC '' 'student.dtd'[ ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student PUBLIC \"The big ' in it\" \"student.dtd\"[ ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student PUBLIC 'The latest version' 'student.dtd'[ ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student PUBLIC \"#x20 #xD #xA abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -'()+,./:=?;!*#@$_% \" \"student.dtd\"[ ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!----> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <!---> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <?pi?> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <?> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE student [ <!ELEMENT student (#PCDATA)> <?MyInstruct AVOID ? BEFORE > IN PI ?> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE animal SYSTEM \"ibm28v02.dtd\" [ <!NOTATION animal_class SYSTEM \"ibm28v02.txt\"> <!ENTITY forcat \"This is a small cat\"> <!ELEMENT tiger (#PCDATA)> <!ENTITY % make_small \"<!ELEMENT small EMPTY>\"> <!ENTITY % make_leopard_element \"<!ELEMENT leopard ANY>\"> <!ENTITY % make_attlist \"<!ATTLIST tiger color CDATA #REQUIRED>\"> %make_leopard_element; <!ELEMENT cat ANY> %make_small; <!ENTITY % make_big \"<!ELEMENT big EMPTY>\"> %make_big; %make_attlist; <?sound \"This is a PI\" ?> <!-- This is a valid test file for p28 --> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE animal [ <![INCLUDE[ <!ENTITY % rootElement \"<!ELEMENT animal ANY>\"> ]]> %rootElement; <!-- Following is a makupdecl --> <!ENTITY % make_tiger_element \"<!ELEMENT tiger EMPTY>\"> %make_tiger_element; <![IGNORE[ <!ELEMENT animal EMPTY> ]]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT root (a,b)> <!ELEMENT a EMPTY> <!ELEMENT b (#PCDATA|c)* > <!ELEMENT c ANY> <!ENTITY inContent \"<b>General entity reference in element content</b>\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT a EMPTY> <!ELEMENT b (#PCDATA|c)* > <!ELEMENT c ANY> <!--* PE replace Text have both parentheses *--> <!ENTITY % seq1 \"(a,b,c)\"> <!ELEMENT child1 %seq1; > <!--* Another legal PE replace Text *--> <!ENTITY % seq2 \"a,b\"> <!ELEMENT child2 (%seq2;,c) > ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <![IGNORE[ Everything is ignored within an ignored section, except the sub-section delimiters '<![' and ']]>'. These must be balanced <!ok ]]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <![IGNORE[ Everything is ignored within an ignored section, except the sub-section delimiters '<![' and ']]>'. These must be balanced <![ <!ELEMENT animal EMPTY> ]]> ]]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <![IGNORE[ begin Everything is ignored within an ignored section, except the sub-section delimiters '<![' and ']]>'. These must be balanced <![ <!ELEMENT animal EMPTY> ]]> nesting <![ <!ELEMENT tiger (#PCDATA)> ]]> nesting again <![ <!ELEMENT abc ANY> ]]> end ]]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!DOCTYPE root SYSTEM \"ibm69v01.dtd\" [ <!ELEMENT root (#PCDATA|a)* > <!ENTITY % pe1 \"<!-- comment in PE -->\"> %pe1; ]> ]>");
|
||||
}
|
||||
|
||||
TEST(parse_doctype_xmlconf_oasis_1)
|
||||
{
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT doc EMPTY> <!ENTITY % ent1 \"\"> <!ENTITY ent2 \"text2\"> <!ENTITY % ent3 \"<!-- <!DOCTYPE <!ELEMENT <? '''"&ent2; %ent1;\"> <!ENTITY % ent4 '\"\"''\"'> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <![INCLUDE[ <!ENTITY % rootel \"<!ELEMENT doc EMPTY>\"> ]]> %rootel; <!ATTLIST doc att CDATA #IMPLIED> <![IGNORE[ <!ELEMENT doc (a)> ]]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <![INCLUDE[<![INCLUDE[ <![IGNORE[ ignored ]]> <!ELEMENT doc EMPTY> ]]>]]> <![IGNORE[ ignored ]]> <![IGNORE[ <!ELEMENT doc ignored ]]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <![INCLUDE[ <![ INCLUDE [ <!ELEMENT doc EMPTY> <![IGNORE[asdfasdf]]> ]]>]]> <![INCLUDE[]]> <![INCLUDE[ ]]> <![INCLUDE[ ]]> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE root [ <!ELEMENT doc EMPTY> <![IGNORE[<![]]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT doc EMPTY> <![IGNORE[ <![INCLUDE[ <!ELEMENT doc ]]>]]> <![ IGNORE [ ]]> <![IGNORE[]]> <![IGNORE[ ]]> <![IGNORE[ ]]> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE root [ <!ELEMENT doc EMPTY> <![IGNORE[ <![ starts must balance ]]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT doc EMPTY> <![IGNORE[ Everything is ignored within an ignored section, except the sub-section delimiters '<![' and ']]>'. These must be balanced, but it is no section keyword is required: <![]]> <![DUNNO[ ]]> <![INCLUDE[ asdfasdfasdf <!OK ]]> ] ]> ]] > ]]> <![IGNORE[ < ![ <! [ <![]]>]]> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc [ <!ELEMENT doc EMPTY> <!NOTATION not1 SYSTEM \"a%a&b�<!ELEMENT<!--<?</>?>/\''\"> <!NOTATION not2 SYSTEM 'a b\"\"\"'> <!NOTATION not3 SYSTEM \"\"> <!NOTATION not4 SYSTEM ''> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc [ <!ELEMENT doc EMPTY> <!NOTATION not1 PUBLIC \"<\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc [ <!ELEMENT doc EMPTY> <!NOTATION not1 PUBLIC \"a b cdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"> <!NOTATION not2 PUBLIC '0123456789-()+,./:=?;!*#@$_%'> <!NOTATION not3 PUBLIC \"0123456789-()+,.'/:=?;!*#@$_%\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc SYSTEM \"p31pass1.dtd\" [<!ELEMENT doc EMPTY>]>");
|
||||
|
||||
// not actually a doctype :)
|
||||
xml_document doc;
|
||||
CHECK(doc.load_string(STR("<!--a <!DOCTYPE <?- ]]>-<[ CDATA [ \"- -'- -<doc>--> <!---->"), parse_full | parse_fragment) && doc.first_child().type() == node_comment && doc.last_child().type() == node_comment && doc.first_child().next_sibling() == doc.last_child());
|
||||
CHECK(doc.load_string(STR("<?xmla <!DOCTYPE <[ CDATA [</doc> &a%b&#c?>"), parse_full | parse_fragment) && doc.first_child().type() == node_pi && doc.first_child() == doc.last_child());
|
||||
}
|
||||
|
||||
TEST(parse_doctype_xmlconf_xmltest_1)
|
||||
{
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE root [ <![ INCLUDE [ <!ELEMENT doc (#PCDATA)> ]> ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE root [ <!ELEMENT doc (#PCDATA)> <![ IGNORE [");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE root [ <!ELEMENT doc (#PCDATA)> <![ IGNORE [ ]>");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE root [ <!ELEMENT doc (#PCDATA)> <![ INCLUDE [");
|
||||
TEST_DOCTYPE_NWF("<!DOCTYPE root [ <!ELEMENT doc (#PCDATA)> <![ INCLUDE [ ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE root [ <!ELEMENT doc EMPTY> <!ENTITY % e \"<!--\"> %e; -->");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc [ <!NOTATION foo PUBLIC \"[\" \"null.ent\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc [ <!ELEMENT doc (#PCDATA)> <!ATTLIST doc a CDATA #IMPLIED> <!ENTITY e '\"'> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc [ <!ENTITY e \"<foo a='&'></foo>\"> ]>");
|
||||
TEST_DOCTYPE_WF("<!DOCTYPE doc [ <!ELEMENT doc (#PCDATA)> <!ENTITY e \"<![CDATA[Tim & Michael]]>\"> ]>");
|
||||
}
|
||||
|
||||
TEST_XML_FLAGS(parse_doctype_value, "<!DOCTYPE doc [ <!ELEMENT doc (#PCDATA)> <!ENTITY e \"<![CDATA[Tim & Michael]]>\"> ]>", parse_fragment | parse_doctype)
|
||||
{
|
||||
xml_node n = doc.first_child();
|
||||
|
||||
CHECK(n.type() == node_doctype);
|
||||
CHECK_STRING(n.value(), STR("doc [ <!ELEMENT doc (#PCDATA)> <!ENTITY e \"<![CDATA[Tim & Michael]]>\"> ]"));
|
||||
}
|
||||
|
||||
TEST(parse_doctype_error_toplevel)
|
||||
{
|
||||
xml_document doc;
|
||||
CHECK(doc.load_string(STR("<node><!DOCTYPE></node>")).status == status_bad_doctype);
|
||||
CHECK(doc.load_string(STR("<node><!DOCTYPE></node>"), parse_doctype).status == status_bad_doctype);
|
||||
}
|
||||
|
||||
TEST(parse_doctype_error_ignore)
|
||||
{
|
||||
xml_document doc;
|
||||
CHECK(doc.load_string(STR("<!DOCTYPE root [ <![IGNORE[ ")).status == status_bad_doctype);
|
||||
CHECK(doc.load_string(STR("<!DOCTYPE root [ <![IGNORE[ "), parse_doctype).status == status_bad_doctype);
|
||||
CHECK(doc.load_string(STR("<!DOCTYPE root [ <![IGNORE[ <![INCLUDE[")).status == status_bad_doctype);
|
||||
CHECK(doc.load_string(STR("<!DOCTYPE root [ <![IGNORE[ <![INCLUDE["), parse_doctype).status == status_bad_doctype);
|
||||
}
|
||||
|
||||
TEST(parse_doctype_stackless_group)
|
||||
{
|
||||
std::basic_string<char_t> str;
|
||||
|
||||
int count = 100000;
|
||||
|
||||
str += STR("<!DOCTYPE ");
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
str += STR("<!G ");
|
||||
|
||||
for (int j = 0; j < count; ++j)
|
||||
str += STR(">");
|
||||
|
||||
str += STR(">");
|
||||
|
||||
xml_document doc;
|
||||
CHECK(doc.load_string(str.c_str(), parse_fragment));
|
||||
}
|
||||
|
||||
TEST(parse_doctype_stackless_ignore)
|
||||
{
|
||||
std::basic_string<char_t> str;
|
||||
|
||||
int count = 100000;
|
||||
|
||||
str += STR("<!DOCTYPE ");
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
str += STR("<![IGNORE[ ");
|
||||
|
||||
for (int j = 0; j < count; ++j)
|
||||
str += STR("]]>");
|
||||
|
||||
str += STR(">");
|
||||
|
||||
xml_document doc;
|
||||
CHECK(doc.load_string(str.c_str(), parse_fragment));
|
||||
}
|
151
3rdparty/pugixml/tests/test_unicode.cpp
vendored
151
3rdparty/pugixml/tests/test_unicode.cpp
vendored
@ -1,151 +0,0 @@
|
||||
#ifndef PUGIXML_NO_STL
|
||||
|
||||
#include "common.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
// letters taken from http://www.utf8-chartable.de/
|
||||
|
||||
TEST(as_wide_empty)
|
||||
{
|
||||
CHECK(as_wide("") == L"");
|
||||
}
|
||||
|
||||
TEST(as_wide_valid_basic)
|
||||
{
|
||||
// valid 1-byte, 2-byte and 3-byte inputs
|
||||
#ifdef U_LITERALS
|
||||
CHECK(as_wide("?\xd0\x80\xe2\x80\xbd") == L"?\u0400\u203D");
|
||||
#else
|
||||
CHECK(as_wide("?\xd0\x80\xe2\x80\xbd") == L"?\x0400\x203D");
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST(as_wide_valid_astral)
|
||||
{
|
||||
// valid 4-byte input
|
||||
std::basic_string<wchar_t> b4 = as_wide("\xf2\x97\x98\xa4 \xf4\x80\x8f\xbf");
|
||||
|
||||
size_t wcharsize = sizeof(wchar_t);
|
||||
|
||||
if (wcharsize == 4)
|
||||
{
|
||||
CHECK(b4.size() == 3 && b4[0] == wchar_cast(0x97624) && b4[1] == L' ' && b4[2] == wchar_cast(0x1003ff));
|
||||
}
|
||||
else
|
||||
{
|
||||
CHECK(b4.size() == 5 && b4[0] == wchar_cast(0xda1d) && b4[1] == wchar_cast(0xde24) && b4[2] == L' ' && b4[3] == wchar_cast(0xdbc0) && b4[4] == wchar_cast(0xdfff));
|
||||
}
|
||||
}
|
||||
|
||||
TEST(as_wide_invalid)
|
||||
{
|
||||
// invalid 1-byte input
|
||||
CHECK(as_wide("a\xb0") == L"a");
|
||||
CHECK(as_wide("a\xb0_") == L"a_");
|
||||
|
||||
// invalid 2-byte input
|
||||
CHECK(as_wide("a\xc0") == L"a");
|
||||
CHECK(as_wide("a\xd0") == L"a");
|
||||
CHECK(as_wide("a\xc0_") == L"a_");
|
||||
CHECK(as_wide("a\xd0_") == L"a_");
|
||||
|
||||
// invalid 3-byte input
|
||||
CHECK(as_wide("a\xe2\x80") == L"a");
|
||||
CHECK(as_wide("a\xe2") == L"a");
|
||||
CHECK(as_wide("a\xe2\x80_") == L"a_");
|
||||
CHECK(as_wide("a\xe2_") == L"a_");
|
||||
|
||||
// invalid 4-byte input
|
||||
CHECK(as_wide("a\xf2\x97\x98") == L"a");
|
||||
CHECK(as_wide("a\xf2\x97") == L"a");
|
||||
CHECK(as_wide("a\xf2") == L"a");
|
||||
CHECK(as_wide("a\xf2\x97\x98_") == L"a_");
|
||||
CHECK(as_wide("a\xf2\x97_") == L"a_");
|
||||
CHECK(as_wide("a\xf2_") == L"a_");
|
||||
|
||||
// invalid 5-byte input
|
||||
std::basic_string<wchar_t> b5 = as_wide("\xf8\nbcd");
|
||||
CHECK(b5 == L"\nbcd");
|
||||
}
|
||||
|
||||
TEST(as_wide_string)
|
||||
{
|
||||
std::string s = "abcd";
|
||||
|
||||
CHECK(as_wide(s) == L"abcd");
|
||||
}
|
||||
|
||||
TEST(as_utf8_empty)
|
||||
{
|
||||
CHECK(as_utf8(L"") == "");
|
||||
}
|
||||
|
||||
TEST(as_utf8_valid_basic)
|
||||
{
|
||||
// valid 1-byte, 2-byte and 3-byte outputs
|
||||
#ifdef U_LITERALS
|
||||
CHECK(as_utf8(L"?\u0400\u203D") == "?\xd0\x80\xe2\x80\xbd");
|
||||
#else
|
||||
CHECK(as_utf8(L"?\x0400\x203D") == "?\xd0\x80\xe2\x80\xbd");
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST(as_utf8_valid_astral)
|
||||
{
|
||||
// valid 4-byte output
|
||||
size_t wcharsize = sizeof(wchar_t);
|
||||
|
||||
if (wcharsize == 4)
|
||||
{
|
||||
std::basic_string<wchar_t> s;
|
||||
s.resize(3);
|
||||
s[0] = wchar_cast(0x97624);
|
||||
s[1] = ' ';
|
||||
s[2] = wchar_cast(0x1003ff);
|
||||
|
||||
CHECK(as_utf8(s.c_str()) == "\xf2\x97\x98\xa4 \xf4\x80\x8f\xbf");
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef U_LITERALS
|
||||
CHECK(as_utf8(L"\uda1d\ude24 \udbc0\udfff") == "\xf2\x97\x98\xa4 \xf4\x80\x8f\xbf");
|
||||
#else
|
||||
CHECK(as_utf8(L"\xda1d\xde24 \xdbc0\xdfff") == "\xf2\x97\x98\xa4 \xf4\x80\x8f\xbf");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
TEST(as_utf8_invalid)
|
||||
{
|
||||
size_t wcharsize = sizeof(wchar_t);
|
||||
|
||||
if (wcharsize == 2)
|
||||
{
|
||||
// check non-terminated degenerate handling
|
||||
#ifdef U_LITERALS
|
||||
CHECK(as_utf8(L"a\uda1d") == "a");
|
||||
CHECK(as_utf8(L"a\uda1d_") == "a_");
|
||||
#else
|
||||
CHECK(as_utf8(L"a\xda1d") == "a");
|
||||
CHECK(as_utf8(L"a\xda1d_") == "a_");
|
||||
#endif
|
||||
|
||||
// check incorrect leading code
|
||||
#ifdef U_LITERALS
|
||||
CHECK(as_utf8(L"a\ude24") == "a");
|
||||
CHECK(as_utf8(L"a\ude24_") == "a_");
|
||||
#else
|
||||
CHECK(as_utf8(L"a\xde24") == "a");
|
||||
CHECK(as_utf8(L"a\xde24_") == "a_");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
TEST(as_utf8_string)
|
||||
{
|
||||
std::basic_string<wchar_t> s = L"abcd";
|
||||
|
||||
CHECK(as_utf8(s) == "abcd");
|
||||
}
|
||||
#endif
|
5
3rdparty/pugixml/tests/test_version.cpp
vendored
5
3rdparty/pugixml/tests/test_version.cpp
vendored
@ -1,5 +0,0 @@
|
||||
#include "../src/pugixml.hpp"
|
||||
|
||||
#if PUGIXML_VERSION != 170
|
||||
#error Unexpected pugixml version
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user