diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ae5b70c5..fb86fabe1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,38 +10,6 @@ jobs: steps: - checkout - # Download and cache dependencies - # - restore_cache: - # keys: - # - iqcache-{{ checksum ".circleci/cache-lock" }}-{{ checksum "iqtestdata/.cache-lock" }} - # # fallback to using the latest cache if no exact match is found - # - iqcache- - - # - run: yarn install --cache-folder ~/yarn-cache - - # - run: - # name: Install Git LFS - # command: | - # curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash - # sudo apt-get update - # sudo apt-get install -y git-lfs openssh-client - # git lfs install - # mkdir -p ~/.ssh - # ssh-keyscan -H github.com >> ~/.ssh/known_hosts - # ssh git@github.com git-lfs-authenticate "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" download - # git lfs pull - - # - save_cache: - # paths: - # - node_modules - # - iqtestdata - # - web/node_modules - # - iqbak/node_modules - # - iqshared/node_modules - # - ~/yarn-cache - - # key: iqcache-{{ checksum ".circleci/cache-lock" }}-{{ checksum "iqtestdata/.cache-lock" }} - - run: name: Cmake command: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 470b34716..8a16ce745 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ file(GLOB_RECURSE SRC_MX_CORE ${PRIVATE_DIR}/mx/core/*.c* ${PRIVATE_DIR}/mx/core file(GLOB_RECURSE SRC_MX_IMPL ${PRIVATE_DIR}/mx/impl/*.cpp ${PRIVATE_DIR}/mx/impl/*.h) file(GLOB_RECURSE SRC_MX_PUGIXML ${PRIVATE_DIR}/mx/pugixml/*.cpp ${PRIVATE_DIR}/mx/pugixml/*.hpp) file(GLOB_RECURSE SRC_MX_UTILITY ${PRIVATE_DIR}/mx/utility/*.cpp ${PRIVATE_DIR}/mx/utility/*.h) -file(GLOB_RECURSE SRC_MX_XML ${PRIVATE_DIR}/mx/xml/*.cpp ${PRIVATE_DIR}/mx/xml/*.h) +file(GLOB_RECURSE SRC_MX_EXTERN ${PRIVATE_DIR}/extern/*.cpp ${PRIVATE_DIR}/extern/*.h) file(GLOB_RECURSE SRC_MX_TEST_API ${PRIVATE_DIR}/mxtest/api/*.cpp ${PRIVATE_DIR}/mxtest/api/*.h) file(GLOB_RECURSE SRC_MX_TEST_CONTROL ${PRIVATE_DIR}/mxtest/control/*.cpp ${PRIVATE_DIR}/mxtest/control/*.h) @@ -32,23 +32,25 @@ file(GLOB_RECURSE SRC_MX_TEST_IMPL ${PRIVATE_DIR}/mxtest/impl/*.cpp ${PRIVATE_DI file(GLOB_RECURSE SRC_MX_TEST_CORE ${PRIVATE_DIR}/mxtest/core/*.cpp ${PRIVATE_DIR}/mxtest/core/*.h) file(GLOB_RECURSE SRC_MX_TEST_IMPORT ${PRIVATE_DIR}/mxtest/import/*.cpp ${PRIVATE_DIR}/mxtest/import/*.h) file(GLOB_RECURSE SRC_MX_TEST_UTILITY ${PRIVATE_DIR}/mxtest/utility/*.cpp ${PRIVATE_DIR}/mxtest/utility/*.h) -file(GLOB_RECURSE SRC_MX_TEST_XML ${PRIVATE_DIR}/mxtest/xml/*.cpp ${PRIVATE_DIR}/mxtest/xml/*.h) +#file(GLOB_RECURSE SRC_MX_TEST_XML ${PRIVATE_DIR}/mxtest/xml/*.cpp ${PRIVATE_DIR}/mxtest/xml/*.h) file(GLOB_RECURSE SRC_CPUL ${PRIVATE_DIR}/cpul/*.cpp ${SOURCE}/cpul/*.h) # Mx Library -add_library(Mx STATIC ${SRC_MX_API} ${SRC_MX_CORE} ${SRC_MX_IMPL} ${SRC_MX_PUGIXML} ${SRC_MX_UTILITY} ${SRC_MX_XML}) +add_library(Mx STATIC ${SRC_MX_API} ${SRC_MX_CORE} ${SRC_MX_IMPL} ${SRC_MX_PUGIXML} ${SRC_MX_UTILITY}) source_group( "api-public" FILES ${HEADERS_MX_API}) source_group( "api" FILES ${SRC_MX_API} ) source_group( "core" FILES ${SRC_MX_CORE} ) source_group( "impl" FILES ${SRC_MX_IMPL} ) source_group( "pugixml" FILES ${SRC_MX_PUGIXML} ) source_group( "utility" FILES ${SRC_MX_UTILITY} ) -source_group( "xml" FILES ${SRC_MX_XML} ) +source_group( "extern" FILES ${SRC_MX_EXTERN} ) set_property(TARGET Mx PROPERTY CXX_STANDARD 14) target_include_directories(Mx PUBLIC ${PUBLIC_DIR}) target_include_directories(Mx PRIVATE ${PRIVATE_DIR}) - +add_subdirectory("${PRIVATE_DIR}/extern/ezxml") +target_link_libraries(Mx ezxml) +target_include_directories(Mx PRIVATE "${PRIVATE_DIR}/extern/ezxml/src/include") file(WRITE ${PRIVATE_DIR}/mxtest/file/PathRoot.h "// This file is auto generated by CMake @@ -80,6 +82,7 @@ if(MX_BUILD_TESTS) find_package( Threads ) add_executable(MxTest ${SRC_MX_TEST_API} ${SRC_MX_TEST_CONTROL} ${SRC_MX_TEST_CORE} ${SRC_MX_TEST_FILE} ${SRC_MX_TEST_IMPL} ${SRC_MX_TEST_IMPORT} ${SRC_MX_TEST_UTILITY} ${SRC_MX_TEST_XML} ${SRC_CPUL}) target_include_directories(MxTest PRIVATE ${PRIVATE_DIR}) + target_include_directories(MxTest PRIVATE "${PRIVATE_DIR}/extern/ezxml/src/include") target_link_libraries(MxTest Mx) target_link_libraries(MxTest ${CMAKE_THREAD_LIBS_INIT}) set_property(TARGET MxTest PROPERTY CXX_STANDARD 14) diff --git a/README.md b/README.md index 12c7363b2..d83563183 100755 --- a/README.md +++ b/README.md @@ -293,14 +293,14 @@ The MusicXML classes in `mx::core` are tightly bound to the `musicxml.xsd` speci ##### Namespaces ``` -using namespace mx::core; -using namespace mx::xml; +using namespace ezxml; using namespace mx::api; +using namespace mx::core; ``` The `mx::core` namespace contains the MusicXML representation objects such as elements and attributes. In the musicxml.xsd there are many cases of 'xs:choice' or 'xs:group' being used. These constructs are typically represented in the mx::core class structure the same way that they are found in the musicxml.xsd specification. The interfaces in this namespace are relatively stable, however they are tightly bound to MusicXML's specification and thus they will change when it comes time to support a future version of MusicXML. -The `mx::xml` namespace contains generic XML DOM functionality. Under the hood [pugixml](http://pugixml.org/) is being used. See the XML DOM section for more information. +The `::ezxml::` namespace contains generic XML DOM functionality. Under the hood [pugixml](http://pugixml.org/) is being used. See the XML DOM section for more information. The `mx::utility` namespace contains the beginnings of an api for simplifying the interactions with MusicXML. This namespace and its interfaces will change completely and should be avoided for now. @@ -528,20 +528,20 @@ private: When `getChoice() == BendChoice::Choice::preBend` then we will see `` in the XML, but when `getChoice() == BendChoice::Choice::postBend` then we will see `` in the XML. -### XML DOM (mx::xml) +### XML DOM (::ezxml::) -Any XML document can be read and manipulated with the classes in the `mx::xml` namespace. Most notably, look at the following pure virtual interfaces XDoc, XElement, XAttribute. Also look at the STL-compliant iterators XElementIterator and XAttributeIterator. +Any XML document can be read and manipulated with the classes in the `::ezxml::` namespace. Most notably, look at the following pure virtual interfaces XDoc, XElement, XAttribute. Also look at the STL-compliant iterators XElementIterator and XAttributeIterator. These interfaces are designed to wrap any underlying XML DOM software so that `mx::core` does not care or know about the XML DOM code. A set of implementation classes wrapping pugixml are provided, but if you need to use, say Xerces or RapidXML, you can look at the PugiElement, PugiDoc, etc classes and wrap whatever library you need. -Here's how you can read a MusicXML document into `mx::core` classes by way of `mx::xml`. +Here's how you can read a MusicXML document into `mx::core` classes by way of `::ezxml::`. ``` #include "mx/core/Document.h" #include "mx/utility/Utility.h" #include "functions.h" -#include "mx/xml/XFactory.h" -#include "mx/xml/XDoc.h" +#include "ezxml/XFactory.h" +#include "ezxml/XDoc.h" #include #include @@ -551,7 +551,7 @@ int main(int argc, const char *argv[]) { // allocate the objects mx::core::DocumentPtr mxDoc = makeDocument(); - mx::xml::XDocPtr xmlDoc = mx::xml::XFactory::makeXDoc(); + ::ezxml::::XDocPtr xmlDoc = ::ezxml::::XFactory::makeXDoc(); // read a MusicXML file into the XML DOM structure xmlDoc->loadFile( "music.xml" ); @@ -684,7 +684,7 @@ Each of these test input files has been "scrubbed" using the XDoc classes (i.e. Currently this tester is a "wire-up". All 263 of these round-trip import/export tests fail because the implementation does not yet exist in mx::core. The next body of work will be the mx::core implementation. -**Historical Note: June 20, 2016:** A simple interface to for XML DOM has been added in the mx::xml namespace. The key classes (pure virtual) are XDoc, XElement, XAttribute, XElementIterator, XAttributeIterator. These are implemented by concrete classes PugiDoc, PugiElement, etc. which serve as a wrapper for the pugixml library (http://pugixml.org/). Although this is a static library, a class XFactory can be used to create a Pugi instance of the XDoc interface. +**Historical Note: June 20, 2016:** A simple interface to for XML DOM has been added in the ::ezxml:: namespace. The key classes (pure virtual) are XDoc, XElement, XAttribute, XElementIterator, XAttributeIterator. These are implemented by concrete classes PugiDoc, PugiElement, etc. which serve as a wrapper for the pugixml library (http://pugixml.org/). Although this is a static library, a class XFactory can be used to create a Pugi instance of the XDoc interface. The idea behind using a pure virtual interface is that the client of the Music XML Class Library can, in theory choose a different XML DOM library (Xerces, TinyXML, etc) and wrap with instances of the XDoc interfaces and the Music XML core classes will not know the difference. diff --git a/Sourcecode/private/extern/ezxml/.gitattributes b/Sourcecode/private/extern/ezxml/.gitattributes new file mode 100644 index 000000000..ae12e6ea9 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/.gitattributes @@ -0,0 +1,12 @@ +*.a filter=lfs diff=lfs merge=lfs -text +*.dylib filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.gif filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.svg filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text diff --git a/Sourcecode/private/extern/ezxml/.gitignore b/Sourcecode/private/extern/ezxml/.gitignore new file mode 100644 index 000000000..5e892f97c --- /dev/null +++ b/Sourcecode/private/extern/ezxml/.gitignore @@ -0,0 +1,236 @@ +# generated +# Created by https://www.gitignore.io/api/c++,clion,xcode,macos,linux,cmake,windows +# Edit at https://www.gitignore.io/?templates=c++,clion,xcode,macos,linux,cmake,windows + +### C++ ### +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app + +### CLion ### +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/modules.xml +# .idea/*.iml +# .idea/modules + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### CLion Patch ### +# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721 + +# *.iml +# modules.xml +# .idea/misc.xml +# *.ipr + +# Sonarlint plugin +.idea/sonarlint + +### CMake ### +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps + +### CMake Patch ### +# External projects +*-prefix/ + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +### Xcode ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + +### Xcode Patch ### +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcworkspace/contents.xcworkspacedata +/*.gcno +**/xcshareddata/WorkspaceSettings.xcsettings + +# End of https://www.gitignore.io/api/c++,clion,xcode,macos,linux,cmake,windows \ No newline at end of file diff --git a/Sourcecode/private/extern/ezxml/CMakeLists.txt b/Sourcecode/private/extern/ezxml/CMakeLists.txt new file mode 100644 index 000000000..59c046231 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/CMakeLists.txt @@ -0,0 +1,57 @@ +cmake_minimum_required(VERSION 3.7.2) +project(ezxml + VERSION 0.0.0 + LANGUAGES CXX) + +option(EZXML_BUILD_TESTS "build or skip the test suite" OFF) +option(EZXML_BUILD_EXAMPLES "build or skip the examples" OFF) + +find_package( Threads ) +set(SOURCE_ROOT "./src") +set(PRIVATE_DIR "${SOURCE_ROOT}/private") +set(PUBLIC_DIR "${SOURCE_ROOT}/include") +set(TEST_DIR "${SOURCE_ROOT}/test") + +file(GLOB_RECURSE PUBLIC_HEADERS ${PUBLIC_DIR}/ezxml/*.h) +file(GLOB_RECURSE PRIVATE_HEADERS ${PRIVATE_DIR}/ezx/*.h) +file(GLOB_RECURSE PRIVATE_CXX ${PRIVATE_DIR}/private/*.cpp) + +add_library(ezxml STATIC ${PRIVATE_CXX}) +source_group( "ezxml-public" FILES ${PUBLIC_HEADERS}) +source_group( "ezxml-private" FILES ${PRIVATE_HEADERS} ${PRIVATE_CXX}) +set_property(TARGET ezxml PROPERTY CXX_STANDARD 14) +target_include_directories(ezxml PUBLIC ${PUBLIC_DIR}) +target_include_directories(ezxml PRIVATE ${PRIVATE_DIR}) + +file(WRITE ${TEST_DIR}/Path.h +"// ezxml, Copyright 2019 by Matthew James Briggs +// This file is auto generated by CMake +#pragma once + +// The absolute path to the root of the repository. +#ifndef EZXML_ROOT +#define EZXML_ROOT \"${CMAKE_CURRENT_SOURCE_DIR}\" +#endif + +// The absolute path to the binary output directory. +#ifndef EZXML_BIN +#define EZXML_BIN \"${CMAKE_BINARY_DIR}\" +#endif +") + +if(EZXML_BUILD_TESTS) + message("tests will be compiled") + target_compile_options(ezxml PRIVATE -Werror -Wall -Wextra) + file(GLOB_RECURSE TEST_CXX ${TEST_DIR}/*.cpp) + file(GLOB_RECURSE TEST_HEADERS ${TEST_CXX}/*.h) + source_group( "ezxml-test" FILES ${TEST_CXX} ${TEST_HEADERS}) + add_executable(ezxml_test ${TEST_CXX} ${TEST_HEADERS}) + target_include_directories(ezxml_test PRIVATE ${PRIVATE_DIR}) + target_include_directories(ezxml_test PRIVATE ${PUBLIC_DIR}) + target_include_directories(ezxml_test PRIVATE ${PRIVATE_DIR}) + target_link_libraries(ezxml_test ezxml) + target_link_libraries(ezxml_test ${CMAKE_THREAD_LIBS_INIT}) + set_property(TARGET ezxml_test PROPERTY CXX_STANDARD 14) +else() + message("tests will not be compiled") +endif() \ No newline at end of file diff --git a/Sourcecode/private/extern/ezxml/license.txt b/Sourcecode/private/extern/ezxml/license.txt new file mode 100755 index 000000000..2d9c94606 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/license.txt @@ -0,0 +1,8 @@ +The MIT License (MIT) +Copyright (c) 2017 Matthew James Briggs + +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. \ No newline at end of file diff --git a/Sourcecode/private/extern/ezxml/other/ezxml.sublime-project b/Sourcecode/private/extern/ezxml/other/ezxml.sublime-project new file mode 100644 index 000000000..1d0c0fef8 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/other/ezxml.sublime-project @@ -0,0 +1,8 @@ +{ + "folders": + [ + { + "path": ".." + } + ] +} diff --git a/Sourcecode/private/extern/ezxml/other/ezxml.sublime-workspace.example copy b/Sourcecode/private/extern/ezxml/other/ezxml.sublime-workspace.example copy new file mode 100644 index 000000000..cc51b99b5 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/other/ezxml.sublime-workspace.example copy @@ -0,0 +1,172 @@ +{ + "auto_complete": + { + "selected_items": + [ + [ + "FONT_S", + "FONT_SEMIBOLD" + ] + ] + }, + "buffers": + [ + ], + "build_system": "", + "build_system_choices": + [ + [ + + ], + [ + + ], + [ + + ] + ], + "build_varint": "", + + + "expanded_folders": + [ + "..", + ], + "file_history": + [ + + ], + "find": + { + "height": 43.0 + }, + "find_in_files": + { + "height": 119.0, + "where_history": + [ + ] + }, + "find_state": + { + "case_sensitive": false, + "find_history": + [ + ], + "highlight": true, + "in_selection": false, + "preserve_case": false, + "regex": false, + "replace_history": + [ + ], + "reverse": false, + "show_context": true, + "use_buffer2": true, + "whole_word": false, + "wrap": true + }, + "groups": + [ + { + "sheets": + [ + ] + } + ], + "incremental_find": + { + "height": 31.0 + }, + "input": + { + "height": 53.0 + }, + "layout": + { + "cells": + [ + [ + 0, + 0, + 1, + 1 + ] + ], + "cols": + [ + 0.0, + 1.0 + ], + "rows": + [ + 0.0, + 1.0 + ] + }, + "menu_visible": true, + "output.SublimeLinter": + { + "height": 0.0 + }, + "output.exec": + { + "height": 264.0 + }, + "output.find_results": + { + "height": 126.0 + }, + "output.gofmt": + { + "height": 0.0 + }, + "pinned_build_system": "", + "project": "xlripper.sublime-project", + "replace": + { + "height": 58.0 + }, + "save_all_on_build": true, + "select_file": + { + "height": 0.0, + "last_filter": "", + "selected_items": + [ + + ], + "width": 0.0 + }, + "select_project": + { + "height": 500.0, + "last_filter": "", + "selected_items": + [ + ], + "width": 380.0 + }, + "select_symbol": + { + "height": 0.0, + "last_filter": "", + "selected_items": + [ + ], + "width": 0.0 + }, + "selected_group": 0, + "settings": + { + }, + "show_minimap": true, + "show_open_files": false, + "show_tabs": true, + "side_bar_visible": true, + "side_bar_width": 304.0, + "status_bar_visible": true, + "template_settings": + { + } +} diff --git a/Sourcecode/private/extern/ezxml/readme.md b/Sourcecode/private/extern/ezxml/readme.md new file mode 100644 index 000000000..2a7d50fbd --- /dev/null +++ b/Sourcecode/private/extern/ezxml/readme.md @@ -0,0 +1,5 @@ +ezxml +===== + +[![CircleCI](https://circleci.com/gh/webern/ezxml.svg?style=svg)](https://circleci.com/gh/webern/ezxml) + diff --git a/Sourcecode/private/extern/ezxml/src/include/ezxml/XAttribute.h b/Sourcecode/private/extern/ezxml/src/include/ezxml/XAttribute.h new file mode 100755 index 000000000..0c2180862 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/include/ezxml/XAttribute.h @@ -0,0 +1,37 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include +#include + +namespace ezxml +{ + class XAttribute; + using XAttributePtr = std::shared_ptr; + + class XAttribute; + using XAttributePtr = std::shared_ptr; + + class XAttributeIterator; + using XAttributeIteratorPtr = std::shared_ptr; + + class XAttributeIterator; + using XAttributeIteratorPtr = std::shared_ptr; + + class XElement; + using XElementPtr = std::shared_ptr; + + class XAttribute + { + public: + virtual ~XAttribute() = default; + + virtual bool getIsNull() const = 0; + virtual std::string getName() const = 0; + virtual std::string getValue() const = 0; + + virtual void setName( const std::string& name ) = 0; + virtual void setValue( const std::string& name ) = 0; + }; +} diff --git a/Sourcecode/private/extern/ezxml/src/include/ezxml/XAttributeIterImpl.h b/Sourcecode/private/extern/ezxml/src/include/ezxml/XAttributeIterImpl.h new file mode 100755 index 000000000..1e51ea345 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/include/ezxml/XAttributeIterImpl.h @@ -0,0 +1,32 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include "ezxml/XAttribute.h" + +#include + +namespace ezxml +{ + class XAttributeIterImpl; + using XAttributeIterImplUP = std::unique_ptr; + + class XAttributeIterImpl + { + public: + + virtual ~XAttributeIterImpl() = default; + + virtual bool getIsPayloadNull() const = 0; + virtual bool getIsEndIter() const = 0; + + virtual XAttributeIterImplUP clone() const = 0; + virtual bool equals( const XAttributeIterator& other ) const = 0; + + virtual XAttribute& getRef() const = 0; + virtual XAttribute* getPtr() const = 0; + + virtual const XAttributeIterImpl& increment() = 0; + virtual const XAttributeIterImpl& decrement() = 0; + }; +} diff --git a/Sourcecode/private/extern/ezxml/src/include/ezxml/XAttributeIterator.h b/Sourcecode/private/extern/ezxml/src/include/ezxml/XAttributeIterator.h new file mode 100755 index 000000000..53230aa3e --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/include/ezxml/XAttributeIterator.h @@ -0,0 +1,53 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include "ezxml/XAttribute.h" +#include "ezxml/XAttributeIterImpl.h" + +#include +#include +#include + +namespace ezxml +{ + class XAttributeIterator final + { + + public: + XAttributeIterator(); + explicit XAttributeIterator( const XAttributeIterImpl& impl ); + XAttributeIterator( const XAttributeIterator& other ); + XAttributeIterator( XAttributeIterator&& other ) = default; + XAttributeIterator& operator=( const XAttributeIterator& other ); + XAttributeIterator& operator=( XAttributeIterator&& other ) = default; + ~XAttributeIterator() = default; + + // STL Iterator Compliance + typedef ptrdiff_t difference_type; // ??? + typedef XAttribute value_type; + typedef XAttribute* pointer; + typedef XAttribute& reference; + typedef std::bidirectional_iterator_tag iterator_category; + + // Iterator operators + bool operator==( const XAttributeIterator& rhs ) const; + bool operator!=( const XAttributeIterator& rhs ) const; + + XAttribute& operator*() const; + XAttribute* operator->() const; + + const XAttributeIterator& operator++(); + XAttributeIterator operator++( int ); + + const XAttributeIterator& operator--(); + XAttributeIterator operator--( int ); + + // Reveal the private data member, violates + // encapsulation but could not find a better way + const XAttributeIterImplUP& reveal() const; + + private: + XAttributeIterImplUP myImpl; + }; +} diff --git a/Sourcecode/private/extern/ezxml/src/include/ezxml/XDoc.h b/Sourcecode/private/extern/ezxml/src/include/ezxml/XDoc.h new file mode 100755 index 000000000..be111173f --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/include/ezxml/XDoc.h @@ -0,0 +1,53 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include "ezxml/XDocSpec.h" +#include "ezxml/XElement.h" + +#include +#include + +namespace ezxml +{ + class XDoc; + using XDocPtr = std::shared_ptr; + using XDocCPtr = std::shared_ptr; + + class XDoc : public std::enable_shared_from_this + { + public: + virtual ~XDoc() = default; + + // these can throw std::runtime_error + virtual void loadStream( std::istream& is ) = 0; + virtual void saveStream( std::ostream& os ) const = 0; + + // these can throw std::runtime_error + virtual void loadFile( const std::string& filename ) = 0; + virtual void saveFile( const std::string& filename ) const = 0; + + // Xml Declaration + virtual XmlVersion getXmlVersion() const = 0; + virtual void setXmlVersion( XmlVersion value ) = 0; + virtual Encoding getEncoding() const = 0; + virtual void setEncoding( Encoding value ) = 0; + virtual bool getHasStandaloneAttribute() const = 0; + virtual void setHasStandaloneAttribute( bool value ) = 0; + virtual bool getIsStandalone() const = 0; + virtual void setIsStandalone( bool value ) = 0; + + // Doctype Declaration + virtual bool getHasDoctypeDeclaration() const = 0; + virtual void setHasDoctypeDeclaration( bool value ) = 0; + virtual std::string getDoctypeValue() const = 0; + virtual void setDoctypeValue( const std::string& value ) = 0; + + // when calling the write function, this value will + // determine whether or not to include the BOM + virtual void setDoWriteByteOrderMark( bool value ) = 0; + + // Node Access + virtual XElementPtr getRoot() const = 0; + }; +} diff --git a/Sourcecode/private/extern/ezxml/src/include/ezxml/XDocSpec.h b/Sourcecode/private/extern/ezxml/src/include/ezxml/XDocSpec.h new file mode 100755 index 000000000..798861d1a --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/include/ezxml/XDocSpec.h @@ -0,0 +1,119 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include +#include +#include +#include + +namespace ezxml +{ + enum class XmlVersion + { + unknown, + onePointZero, + onePointOne + }; + + const XmlVersion DEFAULT_XML_VERSION = XmlVersion::onePointZero; + + + inline std::ostream& + toStream( std::ostream& os, const XmlVersion value ) + { + switch( value ) + { + case XmlVersion::unknown:os << "unknown"; + break; + case XmlVersion::onePointZero:os << "1.0"; + break; + case XmlVersion::onePointOne:os << "1.1"; + break; + default:os << "error"; + break; + } + return os; + } + + + inline std::string + toString( const XmlVersion value ) + { + std::stringstream ss; + toStream( ss, value ); + return ss.str(); + } + + + inline XmlVersion + parseXmlVersion( const std::string& str ) + { + if( str == "1.0" ) + { + return XmlVersion::onePointZero; + } + + if( str == "1.1" ) + { + return XmlVersion::onePointOne; + } + + return DEFAULT_XML_VERSION; + } + + + enum class Encoding + { + unknown, + utfEight, + utfSixteen + }; + + const Encoding DEFAULT_ENCODING = Encoding::utfEight; + + + inline std::ostream& + toStream( std::ostream& os, const Encoding value ) + { + switch( value ) + { + case Encoding::unknown:os << "unknown"; + break; + case Encoding::utfEight:os << "UTF-8"; + break; + case Encoding::utfSixteen:os << "UTF-16"; + break; + default:os << "error"; + break; + } + return os; + } + + + inline std::string + toString( const Encoding value ) + { + std::stringstream ss; + toStream( ss, value ); + return ss.str(); + } + + + inline Encoding + parseEncoding( const std::string& str ) + { + auto lowerStr = str; + std::transform( lowerStr.begin(), lowerStr.end(), lowerStr.begin(), ::tolower ); + + if( lowerStr == "utf-8" ) + { + return Encoding::utfEight; + } + if( lowerStr == "utf-16" ) + { + return Encoding::utfSixteen; + } + return DEFAULT_ENCODING; + } +} diff --git a/Sourcecode/private/extern/ezxml/src/include/ezxml/XElement.h b/Sourcecode/private/extern/ezxml/src/include/ezxml/XElement.h new file mode 100755 index 000000000..eb25d8a67 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/include/ezxml/XElement.h @@ -0,0 +1,147 @@ +#pragma once + +#include +#include +#include +#include + +namespace ezxml +{ + enum class XElementType + { + null, // The element is in a bad, unusable state and getIsNull will return true + empty, // The element has no text and no child elements + element, // The element has child elements + text, // The element has text data + }; + + class XDoc; + using XDocCPtr = std::shared_ptr; + + class XElement; + using XElementPtr = std::shared_ptr; + + class XAttribute; + using XAttributePtr = std::shared_ptr; + + class XElementIterator; + using XElementIteratorPtr = std::shared_ptr; + + class XAttributeIterator; + using XAttributeIteratorPtr = std::shared_ptr; + + class XElement + { + public: + virtual ~XElement() = default; + virtual XElementPtr clone() const = 0; + + virtual XElementType getType() const = 0; + virtual bool getIsNull() const = 0; + + virtual bool getIsProcessingInstruction() const = 0; + + virtual std::string getName() const = 0; + virtual std::string getValue() const = 0; + + virtual void setName( const std::string& name ) = 0; + virtual void setValue( const std::string& name ) = 0; + + // get the XDoc from which this + // entire XML tree descends + virtual XDocCPtr getDoc() const = 0; + + // get the element that contains this element + // returns an XElement with type == null if this + // element is the root of the entire XML tree + virtual XElementPtr getParent() const = 0; + + // return the next element after this one, can + // return nullptr if there are no more siblings + virtual XElementPtr getNextSibling() const = 0; + + // STL compliant iterators to the elements + // which are children of this element. If + // this element has text or has no children + // then begin() == end() + virtual XElementIterator begin() const = 0; + virtual XElementIterator end() const = 0; + + // if you want iterations to include processing + // instructions then use this function. + virtual XElementIterator beginWithProcessingInstructions() const = 0; + + // STL compliant iterators to the attributes + // of this element. If this element has no + // attributes then begin() == end() + virtual XAttributeIterator attributesBegin() const = 0; + virtual XAttributeIterator attributesEnd() const = 0; + + // add an element as the last child of this element. + // throws if this element's type == text + virtual XElementPtr appendChild( const std::string& name ) = 0; + + // add an element as the first child of this element. + // throws if this element's type == text + virtual XElementPtr prependChild( const std::string& name ) = 0; + + // removes the first occurence of a child element with the given name + virtual bool removeChild( const std::string& elementName ) = 0; + + // adds an element after this element, at this element's + // same level in the tree. throws if this element is the + // root of the entire XML tree + virtual XElementPtr insertSiblingAfter( const std::string& newElementName ) = 0; + + virtual XAttributePtr appendAttribute( const std::string& name ) = 0; + virtual XAttributePtr prependAttribute( const std::string& name ) = 0; + virtual void removeAttribute( const XAttributeIterator& iter ) = 0; + }; + + + + // utils for the XElementType enum + + + constexpr const char* const xElementNullString = "XELEMENT_NULL"; + constexpr const char* const xElementEmptyString = "XELEMENT_EMPTY"; + constexpr const char* const xElementElementString = "XELEMENT_ELEMENT"; + constexpr const char* const xElementTextString = "XELEMENT_TEXT"; + constexpr const char* const xElementUnknownString = "XELEMENT_UNKNOWN"; + + + inline std::string + toString( XElementType t ) + { + switch( t ) + { + case XElementType::null:return xElementNullString; + case XElementType::empty:return xElementEmptyString; + case XElementType::element:return xElementElementString; + case XElementType::text:return xElementTextString; + default: break; + } + + return xElementUnknownString; + } + + + inline XElementType + xElementTypeFromString( const std::string& inString ) + { + if( inString == xElementNullString ) + { + return XElementType::null; + } + else if( inString == xElementEmptyString ) + { + return XElementType::empty; + } + else if( inString == xElementElementString ) + { + return XElementType::element; + } + + return XElementType::null; + } +} diff --git a/Sourcecode/private/extern/ezxml/src/include/ezxml/XElementIterImpl.h b/Sourcecode/private/extern/ezxml/src/include/ezxml/XElementIterImpl.h new file mode 100755 index 000000000..88e9809f5 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/include/ezxml/XElementIterImpl.h @@ -0,0 +1,35 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include "ezxml/XElementIterator.h" + +#include + +namespace ezxml +{ + class XElementIterImpl; + using XElementIterImplUP = std::unique_ptr; + + class XElementIterImpl + { + public: + + virtual ~XElementIterImpl() = default;; + + virtual bool getIsPayloadNull() const = 0; + virtual bool getIsEndIter() const = 0; + virtual bool getIsProcessingInstruction() const = 0; + virtual bool getSkipProcessingInstructions() const = 0; + virtual void setSkipProcessingInstructions( bool inValue ) = 0; + + virtual XElementIterImplUP clone() const = 0; + virtual bool equals( const XElementIterator& other ) const = 0; + + virtual XElement& getRef() const = 0; + virtual XElement* getPtr() const = 0; + + virtual const XElementIterImpl& increment() = 0; + virtual const XElementIterImpl& decrement() = 0; + }; +} diff --git a/Sourcecode/private/extern/ezxml/src/include/ezxml/XElementIterator.h b/Sourcecode/private/extern/ezxml/src/include/ezxml/XElementIterator.h new file mode 100755 index 000000000..5a7d5d770 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/include/ezxml/XElementIterator.h @@ -0,0 +1,58 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include "ezxml/XElement.h" +#include "ezxml/XElementIterImpl.h" + +#include +#include +#include + +namespace ezxml +{ + class XElementIterator final + { + + public: + XElementIterator(); + explicit XElementIterator( const XElementIterImpl& impl ); + XElementIterator( const XElementIterator& other ); + XElementIterator( XElementIterator&& other ) = default; + XElementIterator& operator=( const XElementIterator& other ); + XElementIterator& operator=( XElementIterator&& other ) = default; + ~XElementIterator() = default; + + // STL Iterator Compliance + typedef ptrdiff_t difference_type; // ??? + typedef XElement value_type; + typedef XElement* pointer; + typedef XElement& reference; + typedef std::bidirectional_iterator_tag iterator_category; + + // Iterator operators + bool operator==( const XElementIterator& rhs ) const; + bool operator!=( const XElementIterator& rhs ) const; + + XElement& operator*() const; + XElement* operator->() const; + + const XElementIterator& operator++(); + const XElementIterator operator++( int ); + + const XElementIterator& operator--(); + const XElementIterator operator--( int ); + + bool getIsPayloadNull() const; + + bool getSkipProcessingInstructions() const; + void setSkipProcessingInstructions( bool inValue ); + + // Reveal the private data member, violates + // encapsulation but could not find a better way + const XElementIterImplUP& reveal() const; + + private: + XElementIterImplUP myImpl; + }; +} diff --git a/Sourcecode/private/extern/ezxml/src/include/ezxml/XFactory.h b/Sourcecode/private/extern/ezxml/src/include/ezxml/XFactory.h new file mode 100755 index 000000000..005273984 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/include/ezxml/XFactory.h @@ -0,0 +1,16 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include "ezxml/XDoc.h" +#include + +namespace ezxml +{ + class XFactory + { + public: + static XDocPtr makeXDoc(); + static XElementPtr makeXElement(); + }; +} diff --git a/Sourcecode/private/extern/ezxml/src/include/ezxml/XForwardDeclare.h b/Sourcecode/private/extern/ezxml/src/include/ezxml/XForwardDeclare.h new file mode 100755 index 000000000..66ed5ebd7 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/include/ezxml/XForwardDeclare.h @@ -0,0 +1,13 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#ifndef EZXML_XML_FORWARD_DECLARE_ELEMENT +#define EZXML_XML_FORWARD_DECLARE_ELEMENT \ +namespace ezxml \ +{ \ + class XElement; \ + using XElementPtr ## Ptr = std::shared_ptr; \ +} \ + +#endif diff --git a/Sourcecode/private/extern/ezxml/src/include/ezxml/ezxml.h b/Sourcecode/private/extern/ezxml/src/include/ezxml/ezxml.h new file mode 100644 index 000000000..c8b4752b6 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/include/ezxml/ezxml.h @@ -0,0 +1,11 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include "ezxml/XAttribute.h" +#include "ezxml/XAttributeIterator.h" +#include "ezxml/XDoc.h" +#include "ezxml/XDocSpec.h" +#include "ezxml/XElement.h" +#include "ezxml/XElementIterator.h" +#include "ezxml/XFactory.h" diff --git a/Sourcecode/private/extern/ezxml/src/private/private/Parse.h b/Sourcecode/private/extern/ezxml/src/private/private/Parse.h new file mode 100755 index 000000000..3f31d2837 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/Parse.h @@ -0,0 +1,93 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include +#include +#include +#include +#include + +namespace ezxml +{ + inline bool + charCompareCaseInsensitive( char a, char b ) + { + return std::tolower( a ) == std::tolower( b ); + } + + + inline bool + charCompareCaseSensitive( char a, char b ) + { + return a == b; + } + + + inline bool + compareCaseInsensitive( const std::string& a, const std::string& b ) + { + if( a.length() == b.length() ) + { + return std::equal( b.begin(), b.end(), a.begin(), charCompareCaseInsensitive ); + } + else + { + return false; + } + } + + + // http://stackoverflow.com/a/3152296/2779792 + // templated version of my_equal so it could work with both char and wchar_t + template< typename charT > + struct my_equal + { + explicit my_equal( const std::locale& loc ) + : myLoc( loc ) + { + + } + + + bool operator()( charT ch1, charT ch2 ) + { + return std::toupper( ch1, myLoc ) == std::toupper( ch2, myLoc ); + } + + + private: + const std::locale& myLoc; + }; + + + // find substring (case insensitive) + template< typename T > + inline int + findCaseInsensitive( const T& str1, const T& str2, const std::locale& loc = std::locale() ) + { + typename T::const_iterator it = + std::search( + str1.begin(), str1.end(), + str2.begin(), str2.end(), + my_equal( loc ) + ); + + if( it != str1.end() ) + { + return static_cast( it - str1.begin() ); + } + return -1; + } + + + inline bool + containsCaseInsensitive( + const std::string& substringToFind, + const std::string& stringToFindItIn + ) + { + auto position = findCaseInsensitive( stringToFindItIn, substringToFind ); + return position > -1; + } +} diff --git a/Sourcecode/private/extern/ezxml/src/private/private/PugiAttribute.cpp b/Sourcecode/private/extern/ezxml/src/private/private/PugiAttribute.cpp new file mode 100755 index 000000000..27a7a4f57 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/PugiAttribute.cpp @@ -0,0 +1,72 @@ +// Copyright (c) Matthew James Briggs + +#include "private/PugiAttribute.h" +#include "ezxml/XDoc.h" +#include "private/PugiAttributeIterImpl.h" + +namespace ezxml +{ + PugiAttribute::PugiAttribute() + : myAttribute(), myParentElement(), myXDoc() + { + + } + + + PugiAttribute::PugiAttribute( + const pugi::xml_attribute& attribute, + const pugi::xml_node& parentElement, + const XDocCPtr& parentXDoc + ) + : myAttribute( attribute ), myParentElement( parentElement ), myXDoc( parentXDoc ) + { + + } + + + bool + PugiAttribute::getIsNull() const + { + auto ptr = myXDoc.lock(); + + if( !ptr ) + { + return true; + } + + if( myParentElement.type() != pugi::node_element ) + { + return true; + } + + return false; + } + + + std::string + PugiAttribute::getName() const + { + return myAttribute.name(); + } + + + std::string + PugiAttribute::getValue() const + { + return myAttribute.value(); + } + + + void + PugiAttribute::setName( const std::string& name ) + { + myAttribute.set_name( name.c_str() ); + } + + + void + PugiAttribute::setValue( const std::string& value ) + { + myAttribute.set_value( value.c_str() ); + } +} diff --git a/Sourcecode/private/extern/ezxml/src/private/private/PugiAttribute.h b/Sourcecode/private/extern/ezxml/src/private/private/PugiAttribute.h new file mode 100755 index 000000000..13bb44e9d --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/PugiAttribute.h @@ -0,0 +1,47 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include "ezxml/XAttribute.h" +#include "private/pugixml.hpp" + +#include + +namespace ezxml +{ + class PugiAttribute; + using PugiAttributePtr = std::shared_ptr; + + class XDoc; + using XDocCPtr = std::shared_ptr; + using XDocCWPtr = std::weak_ptr; + + class PugiAttribute : public XAttribute + { + public: + PugiAttribute(); + + PugiAttribute( + const pugi::xml_attribute& attribute, + const pugi::xml_node& parentElement, + const XDocCPtr& parentXDoc + ); + + PugiAttribute( const PugiAttribute& other ) = default; + PugiAttribute( PugiAttribute&& other ) = default; + PugiAttribute& operator=( const PugiAttribute& other ) = default; + PugiAttribute& operator=( PugiAttribute&& other ) = default; + + virtual bool getIsNull() const override; + virtual std::string getName() const override; + virtual std::string getValue() const override; + + virtual void setName( const std::string& name ) override; + virtual void setValue( const std::string& name ) override; + + private: + pugi::xml_attribute myAttribute; + pugi::xml_node myParentElement; + XDocCWPtr myXDoc; + }; +} diff --git a/Sourcecode/private/extern/ezxml/src/private/private/PugiAttributeIterImpl.cpp b/Sourcecode/private/extern/ezxml/src/private/private/PugiAttributeIterImpl.cpp new file mode 100755 index 000000000..f4f5a6b80 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/PugiAttributeIterImpl.cpp @@ -0,0 +1,137 @@ +// Copyright (c) Matthew James Briggs + +#include "private/PugiAttributeIterImpl.h" +#include "ezxml/XDoc.h" +#include "private/XThrow.h" + +#define EZXML_CHECK_NODE_STATE if( myParentElement.type() != pugi::node_element ) { EZXML_THROW_XNULL; } + +namespace ezxml +{ + PugiAttributeIterImpl::PugiAttributeIterImpl() + : myIter(), myParentElement(), myXDoc(), myReturnableAttribute() + { + + } + + + PugiAttributeIterImpl::PugiAttributeIterImpl( + const pugi::xml_attribute_iterator& iter, + const pugi::xml_node& iterParentElement, + const XDocCPtr& parentXDoc + ) + : myIter( iter ), myParentElement( iterParentElement ), myXDoc( parentXDoc ), myReturnableAttribute() + { + EZXML_CHECK_NODE_STATE; + if( myParentElement.type() != pugi::node_element ) + { + EZXML_THROW( "improperly constructed, parent should be of element type" ); + } + } + + + bool + PugiAttributeIterImpl::getIsPayloadNull() const + { + auto ptr = myXDoc.lock(); + + if( !ptr ) + { + return true; + } + else if( myParentElement.type() != pugi::node_element ) + { + return true; + } + + return false; + } + + + bool + PugiAttributeIterImpl::getIsEndIter() const + { + if( myIter == myParentElement.attributes_end() ) + { + return true; + } + + return false; + } + + + XAttributeIterImplUP + PugiAttributeIterImpl::clone() const + { + return XAttributeIterImplUP{ new PugiAttributeIterImpl{ *this } }; + } + + + bool + PugiAttributeIterImpl::equals( const XAttributeIterator& other ) const + { + const auto& otherImpl = other.reveal(); + if( !otherImpl ) + { + return false; + } + auto pugi = dynamic_cast( otherImpl.get() ); + if( !pugi ) + { + throw std::runtime_error( "PugiAttributeIterImpl::equals - a downcast failed" ); + } + return this->myIter == pugi->myIter; + } + + + XAttribute& + PugiAttributeIterImpl::getRef() const + { + if( getIsPayloadNull() ) + { + EZXML_THROW_XNULL; + } + + if( getIsEndIter() ) + { + EZXML_THROW( "XAttributeIterator attempted to dereference an 'end' iterator" ); + } + + myReturnableAttribute = PugiAttribute{ *myIter, myParentElement, myXDoc.lock() }; + return myReturnableAttribute; + } + + + XAttribute* + PugiAttributeIterImpl::getPtr() const + { + if( getIsPayloadNull() ) + { + EZXML_THROW_XNULL; + } + + if( getIsEndIter() ) + { + EZXML_THROW( "XAttributeIterator attempted to dereference an 'end' iterator" ); + } + + myReturnableAttribute = PugiAttribute{ *myIter, myParentElement, myXDoc.lock() }; + return &myReturnableAttribute; + } + + + const PugiAttributeIterImpl& + PugiAttributeIterImpl::increment() + { + ++myIter; + return *this; + } + + + const PugiAttributeIterImpl& + PugiAttributeIterImpl::decrement() + { + --myIter; + return *this; + } +} diff --git a/Sourcecode/private/extern/ezxml/src/private/private/PugiAttributeIterImpl.h b/Sourcecode/private/extern/ezxml/src/private/private/PugiAttributeIterImpl.h new file mode 100755 index 000000000..c8dffb361 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/PugiAttributeIterImpl.h @@ -0,0 +1,47 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include "ezxml/XAttributeIterator.h" +#include "ezxml/XAttributeIterImpl.h" +#include "private/PugiAttribute.h" +#include "private/pugixml.hpp" + +namespace ezxml +{ + class XDoc; + using XDocCPtr = std::shared_ptr; + using XDocCWPtr = std::weak_ptr; + + class PugiAttributeIterImpl : public XAttributeIterImpl + { + public: + + PugiAttributeIterImpl(); + + PugiAttributeIterImpl( + const pugi::xml_attribute_iterator& iter, + const pugi::xml_node& iterParentElement, + const XDocCPtr& parentXDoc ); + + virtual ~PugiAttributeIterImpl() = default; + + virtual bool getIsPayloadNull() const override; + virtual bool getIsEndIter() const override; + + virtual XAttributeIterImplUP clone() const override; + virtual bool equals( const XAttributeIterator& other ) const override; + + virtual XAttribute& getRef() const override; + virtual XAttribute* getPtr() const override; + + virtual const PugiAttributeIterImpl& increment() override; + virtual const PugiAttributeIterImpl& decrement() override; + + public: + pugi::xml_attribute_iterator myIter; + pugi::xml_node myParentElement; + XDocCWPtr myXDoc; + mutable PugiAttribute myReturnableAttribute; + }; +} diff --git a/Sourcecode/private/extern/ezxml/src/private/private/PugiDoc.cpp b/Sourcecode/private/extern/ezxml/src/private/private/PugiDoc.cpp new file mode 100755 index 000000000..95522fdc5 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/PugiDoc.cpp @@ -0,0 +1,597 @@ +// Copyright (c) Matthew James Briggs + +#include "private/PugiDoc.h" +#include "private/PugiElement.h" +#include "private/Throw.h" +#include "private/Parse.h" + +#include + +namespace ezxml +{ + + static constexpr unsigned int standardOptions = + pugi::parse_default | pugi::parse_declaration | pugi::parse_doctype | pugi::parse_pi; + + + PugiDoc::PugiDoc() + : myDoc(), + myXmlVersion( DEFAULT_XML_VERSION ), + myEncoding( DEFAULT_ENCODING ), + myIsStandalone( false ), + myDoWriteBom( false ) + { + std::istringstream is( R"()" ); + auto options = pugi::parse_default | pugi::parse_declaration | pugi::parse_doctype; + myDoc.load( is, options ); + } + + // Don't look at me, I'm ugly. + + void + PugiDoc::loadStream( std::istream& is ) + { + auto parseResult = myDoc.load( is, standardOptions ); + if( parseResult.status != pugi::status_ok ) + { + std::stringstream ss; + ss << "pugixml parsing failed - '"; + switch( parseResult.status ) + { + case pugi::status_file_not_found:ss << "status_file_not_found'"; + break; + + case pugi::status_io_error:ss << "status_io_error'"; + break; + + case pugi::status_out_of_memory:ss << "status_out_of_memory'"; + break; + + case pugi::status_internal_error:ss << "status_internal_error'"; + break; + + case pugi::status_unrecognized_tag:ss << "status_unrecognized_tag'"; + break; + + case pugi::status_bad_pi:ss << "status_bad_pi'"; + break; + + case pugi::status_bad_comment:ss << "status_bad_comment'"; + break; + + case pugi::status_bad_cdata:ss << "status_bad_cdata'"; + break; + + case pugi::status_bad_doctype:ss << "status_bad_doctype'"; + break; + + case pugi::status_bad_pcdata:ss << "status_bad_pcdata'"; + break; + + case pugi::status_bad_start_element:ss << "status_bad_start_element'"; + break; + + case pugi::status_bad_attribute:ss << "status_bad_attribute'"; + break; + + case pugi::status_end_element_mismatch:ss << "status_end_element_mismatch'"; + break; + + case pugi::status_append_invalid_root:ss << "status_append_invalid_root'"; + break; + + case pugi::status_no_document_element:ss << "status_no_document_element'"; + break; + + default:break; + } + ss << " - " << parseResult.description(); + EZXML_THROW( ss.str() ); + } + else if( myDoc.begin() == myDoc.end() ) + { + EZXML_THROW( "pugixml parse created an empty document" ); + } + else if( myDoc.begin()->type() != pugi::node_declaration ) + { + auto xmlDeclaration = myDoc.prepend_child( pugi::node_declaration ); + xmlDeclaration.set_name( "xml" ); + auto ver = xmlDeclaration.append_attribute( "version" ); + ver.set_value( "1.0" ); + ver = xmlDeclaration.append_attribute( "encoding" ); + ver.set_value( "UTF-8" ); + } + else + { + auto xmlDec = *( myDoc.begin() ); + if( xmlDec.attributes_begin() == xmlDec.attributes_end() ) + { + auto attr = xmlDec.append_attribute( "version" ); + attr.set_value( "1.0" ); + attr = xmlDec.append_attribute( "encoding" ); + attr.set_value( "UTF-8" ); + } + else + { + auto it = xmlDec.attributes_begin(); + auto end = xmlDec.attributes_end(); + if( !compareCaseInsensitive( "version", it->name() ) ) + { + auto attr = xmlDec.prepend_attribute( "version" ); + attr.set_value( "1.0" ); + } + auto verAttr = xmlDec.attributes_begin(); + it = xmlDec.attributes_begin(); + ++it; + if( it == end || !compareCaseInsensitive( "encoding", it->name() ) ) + { + auto encodingAttr = xmlDec.insert_attribute_after( "encoding", *verAttr ); + encodingAttr.set_value( "UTF-8" ); + } + } + } + parseXmlDeclarationValues(); + + // if the detected encoding doesn't match the encoding tag, take the actual encoding ?? + switch( parseResult.encoding ) + { + case pugi::encoding_auto: + case pugi::encoding_utf8: + case pugi::encoding_utf16_le: + case pugi::encoding_utf16_be:setEncoding( Encoding::utfEight ); + break; + case pugi::encoding_utf16:setEncoding( Encoding::utfSixteen ); + break; + case pugi::encoding_utf32_le: + case pugi::encoding_utf32_be: + case pugi::encoding_utf32: + case pugi::encoding_wchar: + case pugi::encoding_latin1: + default:setEncoding( Encoding::utfEight ); + break; + } + } + + + void + PugiDoc::saveStream( std::ostream& os ) const + { + auto pugiEncoding = pugi::encoding_utf8; + switch( myEncoding ) + { + case Encoding::utfEight:pugiEncoding = pugi::encoding_utf8; + break; + case Encoding::utfSixteen:pugiEncoding = pugi::encoding_utf16; + break; + default:pugiEncoding = pugi::encoding_utf8; + break; + } + auto flags = pugi::format_indent; + + if( myDoWriteBom ) + { + flags = pugi::format_indent | pugi::format_write_bom; + } + + pugi::xml_writer_stream writer( os ); + myDoc.save( writer, " ", flags, pugiEncoding ); + } + + + void + PugiDoc::loadFile( const std::string& filename ) + { + std::ifstream infile( filename.c_str() ); + if( !infile.is_open() ) + { + std::string message = std::string{ "error opening input file: " } + filename; + throw std::runtime_error( message ); + } + + loadStream( infile ); + infile.close(); + } + + + void + PugiDoc::saveFile( const std::string& filename ) const + { + std::ofstream outfile( filename.c_str() ); + if( !outfile.is_open() ) + { + std::string message = std::string{ "error opening file for writing: " } + filename; + throw std::runtime_error( message ); + } + + saveStream( outfile ); + outfile.close(); + } + + + XmlVersion + PugiDoc::getXmlVersion() const + { + return myXmlVersion; + } + + + void + PugiDoc::setXmlVersion( XmlVersion value ) + { + if( value == XmlVersion::unknown ) + { + EZXML_THROW( "cannot set the XmlVersion to 'unknown'" ); + } + if( myDoc.begin() == myDoc.end() ) + { + EZXML_THROW( "the xml document does not have an xml declaration - bad state" ); + } + else if( myDoc.begin()->type() != pugi::node_declaration ) + { + EZXML_THROW( "the first node in the xml document should be an xml declaration - bad state" ); + } + else + { + auto node = *( myDoc.begin() ); + if( node.attributes_begin() == node.attributes_end() ) + { + node.prepend_attribute( "version" ); + } + auto attr = node.attributes_begin(); + if( attr == node.attributes_end() ) + { + EZXML_THROW( "something bad happened - this line should be unreachable" ); + } + if( !compareCaseInsensitive( "version", attr->name() ) ) + { + EZXML_THROW( "the first attribute of the xml declaration must be 'version'" ); + } + attr->set_value( toString( value ).c_str() ); + } + myXmlVersion = value; + } + + + Encoding + PugiDoc::getEncoding() const + { + return myEncoding; + } + + + void + PugiDoc::setEncoding( Encoding value ) + { + if( value == Encoding::unknown ) + { + EZXML_THROW( "the encoding cannot be unknown" ); + } + auto attr = getXmlDeclarationAttribute( "encoding" ); + if( !compareCaseInsensitive( "encoding", attr.name() ) ) + { + EZXML_THROW( "the 'encoding' attribute could not be found" ); + } + attr.set_value( toString( value ).c_str() ); + myEncoding = value; + } + + + bool + PugiDoc::getHasStandaloneAttribute() const + { + auto standalone = getXmlDeclarationAttribute( "standalone" ); + if( compareCaseInsensitive( standalone.name(), "standalone" ) ) + { + return true; + } + return false; + } + + + void + PugiDoc::setHasStandaloneAttribute( bool value ) + { + bool isStandaloneCurrentlyPresent = getHasStandaloneAttribute(); + if( isStandaloneCurrentlyPresent && value ) + { + return; + } + else if( !isStandaloneCurrentlyPresent && !value ) + { + return; + } + else if( value ) + { + auto xmlDeclarationNode = getXmlDeclarationNode(); + auto it = xmlDeclarationNode.attributes_begin(); + if( it == xmlDeclarationNode.attributes_end() ) + { + EZXML_THROW( "the xml declaration node must have attributes" ); + } + if( !compareCaseInsensitive( "version", it->name() ) ) + { + EZXML_THROW( "the first xml declaration attribute must be 'version'" ); + } + ++it; + if( it == xmlDeclarationNode.attributes_end() ) + { + EZXML_THROW( "the xml declaration node must have an 'encoding' attribute" ); + } + if( !compareCaseInsensitive( "encoding", it->name() ) ) + { + EZXML_THROW( "the second attribute of the xml declaration node must be 'encoding'" ); + } + auto attr = xmlDeclarationNode.insert_attribute_after( "standalone", *it ); + if( myIsStandalone ) + { + attr.set_value( "yes" ); + } + else + { + attr.set_value( "no" ); + } + return; + } + else if( !value ) + { + auto xmlDeclarationNode = getXmlDeclarationNode(); + for( auto it = xmlDeclarationNode.attributes_begin(); + it != xmlDeclarationNode.attributes_end(); ++it ) + { + if( compareCaseInsensitive( "standalone", it->name() ) ) + { + xmlDeclarationNode.remove_attribute( *it ); + myIsStandalone = false; + return; + } + } + } + } + + + bool + PugiDoc::getIsStandalone() const + { + return myIsStandalone; + } + + + void + PugiDoc::setIsStandalone( bool value ) + { + setHasStandaloneAttribute( true ); + auto attr = getXmlDeclarationAttribute( "standalone" ); + if( value ) + { + attr.set_value( "yes" ); + } + else + { + attr.set_value( "no" ); + } + myIsStandalone = value; + } + + + bool + PugiDoc::getHasDoctypeDeclaration() const + { + auto doctype = getDoctypeNode(); + if( doctype.type() != pugi::node_doctype ) + { + return false; + } + return true; + } + + + void + PugiDoc::setHasDoctypeDeclaration( bool value ) + { + bool isDoctypeCurrentlyPresent = getHasDoctypeDeclaration(); + if( value && isDoctypeCurrentlyPresent ) + { + // is requested and already exists, nothing to do + return; + } + else if( !isDoctypeCurrentlyPresent && !value ) + { + // is not requested and doesn't exist, nothing to do + return; + } + else if( value ) + { + // add doctype + if( myDoc.begin() == myDoc.end() ) + { + EZXML_THROW( "empty documet" ); + } + auto xmlDeclarationNode = *( myDoc.begin() ); + if( xmlDeclarationNode.type() != pugi::node_declaration ) + { + EZXML_THROW( "bad xml document state" ); + } + myDoc.insert_child_after( pugi::node_doctype, xmlDeclarationNode ); + return; + } + else if( !value ) + { + // delete doctype + for( auto it = myDoc.begin(); it != myDoc.end(); ++it ) + { + if( it->type() == pugi::node_doctype ) + { + myDoc.remove_child( *it ); + return; + } + } + } + } + + + std::string + PugiDoc::getDoctypeValue() const + { + auto doctypeNode = getDoctypeNode(); + return doctypeNode.value(); + } + + + void + PugiDoc::setDoctypeValue( const std::string& value ) + { + setHasDoctypeDeclaration( true ); + auto doctypeNode = getDoctypeNode(); + doctypeNode.set_value( value.c_str() ); + } + + + XElementPtr + PugiDoc::getRoot() const + { + for( auto it = myDoc.begin(); + it != myDoc.end(); ++it ) + { + if( it->type() == pugi::node_element ) + { + return std::make_shared( *it, XDoc::shared_from_this() ); + } + } + return XElementPtr{}; + } + + + void + PugiDoc::parseXmlDeclarationValues() + { + parseXmlVersionFromDoc(); + parseEncodingFromDoc(); + parseStandalone(); + } + + + void + PugiDoc::parseXmlVersionFromDoc() + { + auto xmlDeclaration = getXmlDeclarationNode(); + if( xmlDeclaration.type() != pugi::node_declaration ) + { + EZXML_THROW( "the xml document must have an xml declaration as its first node" ); + } + + auto version = xmlDeclaration.attribute( "version" ); + std::string value{ version.value() }; + if( value == "" ) + { + myXmlVersion = DEFAULT_XML_VERSION; + setXmlVersion( DEFAULT_XML_VERSION ); + return; + } + + myXmlVersion = parseXmlVersion( value ); + } + + + void + PugiDoc::parseEncodingFromDoc() + { + auto attr = getXmlDeclarationAttribute( "encoding" ); + if( !compareCaseInsensitive( "encoding", attr.name() ) ) + { + EZXML_THROW( "encoding value was not found" ); + } + myEncoding = parseEncoding( attr.value() ); + attr.set_value( toString( myEncoding ).c_str() ); + } + + + void + PugiDoc::parseStandalone() + { + + if( !getHasStandaloneAttribute() ) + { + myIsStandalone = false; + return; + } + auto standalone = getXmlDeclarationAttribute( "standalone" ); + if( std::string{ standalone.value() } == std::string{ "yes" } ) + { + myIsStandalone = true; + return; + } + myIsStandalone = false; + } + + + pugi::xml_node + PugiDoc::getDoctypeNode() const + { + if( myDoc.empty() ) + { + return pugi::xml_node{}; + } + + auto childrenIter = myDoc.begin(); + if( childrenIter == myDoc.end() ) + { + return pugi::xml_node{}; + } + if( childrenIter->type() == pugi::node_declaration ) + { + ++childrenIter; + } + if( childrenIter == myDoc.end() || + childrenIter->type() != pugi::node_doctype ) + { + return pugi::xml_node{}; + } + else + { + return *childrenIter; + } + } + + + pugi::xml_node + PugiDoc::getXmlDeclarationNode() const + { + if( myDoc.empty() ) + { + return pugi::xml_node{}; + } + + auto firstNode = myDoc.first_child(); + + if( firstNode.type() != pugi::node_declaration ) + { + return pugi::xml_node{}; + } + std::string nodeName{ firstNode.name() }; + if( !compareCaseInsensitive( nodeName, "xml" ) ) + { + return pugi::xml_node{}; + } + + return firstNode; + } + + + pugi::xml_attribute + PugiDoc::getXmlDeclarationAttribute( const char* const name ) const + { + auto declaration = getXmlDeclarationNode(); + if( declaration.type() != pugi::node_declaration ) + { + return pugi::xml_attribute{}; + } + return declaration.attribute( name ); + } + + + void + PugiDoc::setDoWriteByteOrderMark( bool value ) + { + myDoWriteBom = value; + } +} diff --git a/Sourcecode/private/extern/ezxml/src/private/private/PugiDoc.h b/Sourcecode/private/extern/ezxml/src/private/private/PugiDoc.h new file mode 100755 index 000000000..f07b38511 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/PugiDoc.h @@ -0,0 +1,65 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include "ezxml/XDoc.h" +#include "private/pugixml.hpp" + +namespace ezxml +{ + class PugiDoc; + using PugiDocPtr = std::shared_ptr; + + class PugiDoc : public XDoc + { + public: + virtual ~PugiDoc() = default; + PugiDoc(); + PugiDoc( const PugiDoc& other ) = delete; + PugiDoc( PugiDoc&& other ) = default; + PugiDoc& operator=( const PugiDoc& other ) = delete; + PugiDoc& operator=( PugiDoc&& other ) = default; + + virtual void loadStream( std::istream& is ) override; + virtual void saveStream( std::ostream& os ) const override; + + virtual void loadFile( const std::string& filename ) override; + virtual void saveFile( const std::string& filename ) const override; + + // Xml Declaration + virtual XmlVersion getXmlVersion() const override; + virtual void setXmlVersion( XmlVersion value ) override; + virtual Encoding getEncoding() const override; + virtual void setEncoding( Encoding value ) override; + virtual bool getHasStandaloneAttribute() const override; + virtual void setHasStandaloneAttribute( bool value ) override; + virtual bool getIsStandalone() const override; + virtual void setIsStandalone( bool value ) override; + + // Doctype Declaration + virtual bool getHasDoctypeDeclaration() const override; + virtual void setHasDoctypeDeclaration( bool value ) override; + virtual std::string getDoctypeValue() const override; + virtual void setDoctypeValue( const std::string& value ) override; + + // Node Access + virtual XElementPtr getRoot() const override; + + virtual void setDoWriteByteOrderMark( bool value ) override; + + private: + pugi::xml_document myDoc; + XmlVersion myXmlVersion; + Encoding myEncoding; + bool myIsStandalone; + bool myDoWriteBom; + + void parseXmlDeclarationValues(); + void parseXmlVersionFromDoc(); + void parseEncodingFromDoc(); + void parseStandalone(); + pugi::xml_node getDoctypeNode() const; + pugi::xml_node getXmlDeclarationNode() const; + pugi::xml_attribute getXmlDeclarationAttribute( const char* const name ) const; + }; +} diff --git a/Sourcecode/private/extern/ezxml/src/private/private/PugiElement.cpp b/Sourcecode/private/extern/ezxml/src/private/private/PugiElement.cpp new file mode 100755 index 000000000..00ec2eac1 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/PugiElement.cpp @@ -0,0 +1,378 @@ +// MusicXML Class Library +// Copyright (c) by Matthew James Briggs +// Distributed under the MIT License + +#include "private/PugiElement.h" +#include "private/PugiElementIterImpl.h" +#include "ezxml/XAttributeIterImpl.h" +#include "private/PugiAttributeIterImpl.h" +#include "private/XThrow.h" + +#define EZXML_CHECK_NULL_NODE if( getIsNull() ) { EZXML_THROW_XNULL; } +#define EZXML_CHECK_NODE_ELEMENT if ( myNodeType != pugi::node_element && myNodeType != pugi::node_pi ) { EZXML_THROW( "bad internal state, node should be an element" ); } + +namespace ezxml +{ + + PugiElement::PugiElement() + : myNode(), myXDoc( XDocCPtr{ nullptr } ), myNodeType{ pugi::xml_node_type::node_null }, myEndIter{} + { + update(); + } + + + PugiElement::PugiElement( + const pugi::xml_node& node, + const XDocCPtr& xdoc + ) + : myNode( node ), myXDoc( xdoc ), myNodeType{ pugi::xml_node_type::node_null }, myEndIter{} + { + update(); + const bool isElement = myNodeType == pugi::node_element; + const bool isProcessingInstruction = myNodeType == pugi::node_pi; + + if( ( !isElement ) && ( !isProcessingInstruction ) ) + { + EZXML_THROW( "bad internal state, node should be an element" ); + } + } + + + XElementPtr + PugiElement::clone() const + { + return XElementPtr( new PugiElement{ myNode, myXDoc.lock() } ); + } + + + XElementType + PugiElement::getType() const + { + if( getIsNull() ) + { + return XElementType::null; + } + + if( std::string{ myNode.text().as_string() }.length() > 0 ) + { + return XElementType::text; + } + + if( begin() == end() ) + { + return XElementType::empty; + } + + return XElementType::element; + } + + + bool + PugiElement::getIsNull() const + { + auto ptr = myXDoc.lock(); + + if( !ptr ) + { + return true; + } + else if( myNodeType != pugi::node_element ) + { + if( myNodeType != pugi::node_pi ) + { + return true; + } + } + + return false; + } + + + bool + PugiElement::getIsProcessingInstruction() const + { + if( myNodeType == pugi::node_pi ) + { + return true; + } + + return false; + } + + + std::string + PugiElement::getName() const + { + if( getIsNull() ) + { + return ""; + } + return std::string{ myNode.name() }; + } + + + std::string + PugiElement::getValue() const + { + if( getIsNull() ) + { + return std::string{}; + } + + if( getIsProcessingInstruction() ) + { + return std::string{ myNode.value() }; + } + else + { + return std::string{ myNode.text().as_string() }; + } + } + + + void + PugiElement::setName( const std::string& name ) + { + if( getIsNull() ) + { + return; + } + myNode.set_name( name.c_str() ); + update(); + } + + + void + PugiElement::setValue( const std::string& value ) + { + if( getIsNull() ) + { + return; + } + XElementType xetype = getType(); + + if( xetype == XElementType::element ) + { + EZXML_THROW( "the object cannot hold both elements and text" ); + } + else if( xetype == XElementType::empty ) + { + auto newnode = myNode.prepend_child( pugi::node_pcdata ); + newnode.set_value( value.c_str() ); + update(); + return; + } + else if( xetype == XElementType::text ) + { + auto it = myNode.begin(); + it->set_value( value.c_str() ); + update(); + return; + } + } + + + XDocCPtr + PugiElement::getDoc() const + { + return myXDoc.lock(); + } + + + XElementPtr + PugiElement::getParent() const + { + EZXML_CHECK_NULL_NODE; + EZXML_CHECK_NODE_ELEMENT; + return XElementPtr{ new PugiElement{ myNode.parent(), myXDoc.lock() } }; + } + + + XElementPtr + PugiElement::getNextSibling() const + { + EZXML_CHECK_NULL_NODE; + EZXML_CHECK_NODE_ELEMENT; + const auto nextSibling = myNode.next_sibling(); + + if( nextSibling.type() == pugi::node_null ) + { + return XElementPtr{}; + } + + if( nextSibling.type() == pugi::node_element ) + { + return XElementPtr{ new PugiElement{ nextSibling, myXDoc.lock() } }; + } + + if( nextSibling.type() == pugi::node_pi ) + { + return XElementPtr{ new PugiElement{ nextSibling, myXDoc.lock() } }; + } + + return XElementPtr{}; + } + + + XElementIterator + PugiElement::begin() const + { + auto iter = beginWithProcessingInstructions(); + iter.setSkipProcessingInstructions( true ); + + if( iter.getSkipProcessingInstructions() && + iter != end() && + iter->getIsProcessingInstruction() ) + { + ++iter; + } + + return iter; + } + + + XElementIterator + PugiElement::beginWithProcessingInstructions() const + { + EZXML_CHECK_NULL_NODE; + EZXML_CHECK_NODE_ELEMENT; + const auto beginIter = myNode.begin(); + + if( beginIter == myNode.end() ) + { + return this->end(); + } + + const auto type = beginIter->type(); + + if( type == pugi::node_element || + type == pugi::node_pi ) + { + auto result = XElementIterator( PugiElementIterImpl{ myNode.begin(), myNode, myXDoc.lock() } ); + result.setSkipProcessingInstructions( false ); + return result; + } + + return this->end(); + } + + + XElementIterator + PugiElement::end() const + { + EZXML_CHECK_NULL_NODE; + EZXML_CHECK_NODE_ELEMENT; + return myEndIter; + } + + + XAttributeIterator + PugiElement::attributesBegin() const + { + EZXML_CHECK_NULL_NODE; + EZXML_CHECK_NODE_ELEMENT; + return XAttributeIterator( PugiAttributeIterImpl{ myNode.attributes_begin(), myNode, myXDoc.lock() } ); + } + + + XAttributeIterator + PugiElement::attributesEnd() const + { + EZXML_CHECK_NULL_NODE; + EZXML_CHECK_NODE_ELEMENT; + return XAttributeIterator( PugiAttributeIterImpl{ myNode.attributes_end(), myNode, myXDoc.lock() } ); + } + + + XElementPtr + PugiElement::appendChild( const std::string& name ) + { + EZXML_CHECK_NULL_NODE; + EZXML_CHECK_NODE_ELEMENT; + const auto result = XElementPtr{ new PugiElement{ myNode.append_child( name.c_str() ), myXDoc.lock() } }; + update(); + return result; + } + + + XElementPtr + PugiElement::prependChild( const std::string& name ) + { + EZXML_CHECK_NULL_NODE; + EZXML_CHECK_NODE_ELEMENT; + const auto result = XElementPtr{ new PugiElement{ myNode.prepend_child( name.c_str() ), myXDoc.lock() } }; + update(); + return result; + } + + + XElementPtr + PugiElement::insertSiblingAfter( const std::string& newElementName ) + { + EZXML_CHECK_NULL_NODE; + EZXML_CHECK_NODE_ELEMENT; + auto newNode = myNode.parent().insert_child_after( newElementName.c_str(), myNode ); + const auto result = XElementPtr{ new PugiElement{ newNode, myXDoc.lock() } }; + update(); + return result; + } + + + bool + PugiElement::removeChild( const std::string& elementName ) + { + const auto result = myNode.remove_child( elementName.c_str() ); + update(); + return result; + } + + + XAttributePtr + PugiElement::appendAttribute( const std::string& name ) + { + EZXML_CHECK_NULL_NODE; + EZXML_CHECK_NODE_ELEMENT; + const auto result = XAttributePtr{ + new PugiAttribute{ myNode.append_attribute( name.c_str() ), myNode, myXDoc.lock() } }; + update(); + return result; + } + + + XAttributePtr + PugiElement::prependAttribute( const std::string& name ) + { + EZXML_CHECK_NULL_NODE; + EZXML_CHECK_NODE_ELEMENT; + const auto result = XAttributePtr{ + new PugiAttribute{ myNode.prepend_attribute( name.c_str() ), myNode, myXDoc.lock() } }; + update(); + return result; + } + + + void + PugiElement::removeAttribute( const XAttributeIterator& iter ) + { + auto it = myNode.attributes_begin(); + auto e = myNode.attributes_end(); + for( ; it != e; ++it ) + { + if( iter->getName() == it->name() ) + { + myNode.remove_attribute( *it ); + update(); + return; + } + } + } + + + void + PugiElement::update() + { + myNodeType = myNode.type(); + myEndIter = XElementIterator( PugiElementIterImpl{ myNode.end(), myNode, myXDoc.lock() } ); + } +} + diff --git a/Sourcecode/private/extern/ezxml/src/private/private/PugiElement.h b/Sourcecode/private/extern/ezxml/src/private/private/PugiElement.h new file mode 100755 index 000000000..46083ca4c --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/PugiElement.h @@ -0,0 +1,80 @@ +#pragma once + +#include "ezxml/XElement.h" +#include "private/pugixml.hpp" +#include "ezxml/XElementIterator.h" + +#include + +namespace ezxml +{ + class PugiElement; + using PugiElementPtr = std::shared_ptr; + + class XDoc; + using XDocCPtr = std::shared_ptr; + using XDocCWPtr = std::weak_ptr; + + class PugiElement : public XElement + { + public: + PugiElement(); + + PugiElement( + const pugi::xml_node& node, + const XDocCPtr& xdoc + ); + + // copy + PugiElement( const PugiElement& other ) = default; + PugiElement& operator=( const PugiElement& other ) = default; + + // move + PugiElement( PugiElement&& other ) noexcept = default; + PugiElement& operator=( PugiElement&& other ) noexcept = default; + + virtual XElementPtr clone() const override; + + virtual XElementType getType() const override; + virtual bool getIsNull() const override; + + virtual bool getIsProcessingInstruction() const override; + + virtual std::string getName() const override; + virtual std::string getValue() const override; + + virtual void setName( const std::string& name ) override; + virtual void setValue( const std::string& name ) override; + + virtual XDocCPtr getDoc() const override; + virtual XElementPtr getParent() const override; + virtual XElementPtr getNextSibling() const override; + + virtual XElementIterator begin() const override; + virtual XElementIterator beginWithProcessingInstructions() const override; + virtual XElementIterator end() const override; + + virtual XAttributeIterator attributesBegin() const override; + virtual XAttributeIterator attributesEnd() const override; + + virtual XElementPtr appendChild( const std::string& name ) override; + virtual XElementPtr prependChild( const std::string& name ) override; + + virtual XElementPtr insertSiblingAfter( const std::string& newElementName ) override; + virtual bool removeChild( const std::string& elementName ) override; + + virtual XAttributePtr appendAttribute( const std::string& name ) override; + virtual XAttributePtr prependAttribute( const std::string& name ) override; + virtual void removeAttribute( const XAttributeIterator& iter ) override; + + private: + pugi::xml_node myNode; + XDocCWPtr myXDoc; + pugi::xml_node_type myNodeType; + XElementIterator myEndIter; + + private: + void update(); + }; +} + diff --git a/Sourcecode/private/extern/ezxml/src/private/private/PugiElementIterImpl.cpp b/Sourcecode/private/extern/ezxml/src/private/private/PugiElementIterImpl.cpp new file mode 100755 index 000000000..2225522c4 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/PugiElementIterImpl.cpp @@ -0,0 +1,266 @@ +#include "private/PugiElementIterImpl.h" +#include "private/XThrow.h" + +namespace ezxml +{ + PugiElementIterImpl::PugiElementIterImpl() + : myIter(), + myIterParent(), + myXDoc(), + mySkipProcessingInstructions{ true }, + myReturnableElement{ nullptr } + { + + } + + + PugiElementIterImpl::PugiElementIterImpl( + const pugi::xml_node_iterator& iter, + const pugi::xml_node& iterParent, + const XDocCPtr& parentDoc + ) + : myIter( iter ), + myIterParent( iterParent ), + myXDoc( parentDoc ), + mySkipProcessingInstructions{ true }, + myReturnableElement{ nullptr } + { + + } + + + PugiElementIterImpl::PugiElementIterImpl( const PugiElementIterImpl& inOther ) + : myIter( inOther.myIter ), + myIterParent( inOther.myIterParent ), + myXDoc( inOther.myXDoc ), + mySkipProcessingInstructions{ inOther.mySkipProcessingInstructions }, + myReturnableElement{ inOther.myReturnableElement == nullptr ? nullptr : std::make_unique( + *inOther.myReturnableElement + ) } + { + + } + + + PugiElementIterImpl& + PugiElementIterImpl::operator=( const PugiElementIterImpl& inOther ) + { + myIter = inOther.myIter; + myIterParent = inOther.myIterParent; + myXDoc = inOther.myXDoc; + mySkipProcessingInstructions = inOther.mySkipProcessingInstructions; + myReturnableElement = inOther.myReturnableElement == nullptr ? nullptr + : std::make_unique( *inOther.myReturnableElement ); + return *this; + } + + + XElementIterImplUP + PugiElementIterImpl::clone() const + { + return XElementIterImplUP{ new PugiElementIterImpl{ *this } }; + } + + + bool + PugiElementIterImpl::getIsPayloadNull() const + { + auto ptr = myXDoc.lock(); + + if( !ptr ) + { + return true; + } + + const auto type = myIterParent.type(); + const auto isElement = type == pugi::node_element; + const auto isProcessingInstruction = type == pugi::node_pi; + + if( ( !isElement ) && ( !isProcessingInstruction ) ) + { + return true; + } + + return false; + } + + + bool + PugiElementIterImpl::getIsEndIter() const + { + if( myIter == myIterParent.end() ) + { + return true; + } + + return false; + } + + + bool + PugiElementIterImpl::getIsBeginIter() const + { + if( myIter == myIterParent.begin() ) + { + return true; + } + + return false; + } + + + bool + PugiElementIterImpl::getIsProcessingInstruction() const + { + if( this->getIsEndIter() ) + { + return false; + } + else if( this->getIsPayloadNull() ) + { + return false; + } + + const auto type = myIter->type(); + + if( type == pugi::node_pi ) + { + return true; + } + + return false; + } + + + bool + PugiElementIterImpl::getSkipProcessingInstructions() const + { + return mySkipProcessingInstructions; + } + + + void + PugiElementIterImpl::setSkipProcessingInstructions( bool inValue ) + { + mySkipProcessingInstructions = inValue; + } + + + bool + PugiElementIterImpl::equals( const XElementIterator& other ) const + { + + auto& otherXImplPtr = other.reveal(); + + if( !otherXImplPtr ) + { + return false; + } + + auto otherPtr = dynamic_cast( otherXImplPtr.get() ); + + return myIter == otherPtr->myIter; + } + + + XElement& + PugiElementIterImpl::getRef() const + { + if( getIsPayloadNull() ) + { + EZXML_THROW_XNULL; + } + + if( getIsEndIter() ) + { + EZXML_THROW( "XElementIterator attempted to dereference an 'end' iterator" ); + } + + myReturnableElement = std::make_unique( *myIter, myXDoc.lock() ); + return *myReturnableElement; + } + + + XElement* + PugiElementIterImpl::getPtr() const + { + if( getIsPayloadNull() ) + { + EZXML_THROW_XNULL; + } + + if( getIsEndIter() ) + { + EZXML_THROW( "XElementIterator attempted to dereference an 'end' iterator" ); + } + + myReturnableElement = std::make_unique( *myIter, myXDoc.lock() ); + return myReturnableElement.get(); + } + + + const PugiElementIterImpl& + PugiElementIterImpl::increment() + { + ++myIter; + + if( mySkipProcessingInstructions ) + { + bool isEnd = getIsEndIter(); + bool isPi = getIsProcessingInstruction(); + + while( !isEnd && isPi ) + { + ++myIter; + isEnd = getIsEndIter(); + isPi = getIsProcessingInstruction(); + } + } + return *this; + } + + + const PugiElementIterImpl& + PugiElementIterImpl::decrement() + { + --myIter; + + if( mySkipProcessingInstructions ) + { + bool isBegin = getIsBeginIter(); + bool isPi = getIsProcessingInstruction(); + + while( !isBegin && isPi ) + { + --myIter; + isBegin = getIsBeginIter(); + isPi = getIsProcessingInstruction(); + } + } + return *this; + } + + + pugi::xml_node_type + PugiElementIterImpl::getPugiXmlNodeType() const + { + if( getIsPayloadNull() ) + { + return pugi::node_null; + } + return myIter->type(); + } + + + bool + PugiElementIterImpl::hasTextData() const + { + if( getIsPayloadNull() ) + { + return false; + } + return std::string{ myIter->child_value() }.size() > 0; + } + +} + diff --git a/Sourcecode/private/extern/ezxml/src/private/private/PugiElementIterImpl.h b/Sourcecode/private/extern/ezxml/src/private/private/PugiElementIterImpl.h new file mode 100755 index 000000000..cad2ac443 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/PugiElementIterImpl.h @@ -0,0 +1,65 @@ +// MusicXML Class Library +// Copyright (c) by Matthew James Briggs +// Distributed under the MIT License + +#pragma once + +#include "ezxml/XElementIterator.h" +#include "ezxml/XElementIterImpl.h" +#include "ezxml/XDoc.h" +#include "private/PugiElement.h" +#include "private/pugixml.hpp" + +namespace ezxml +{ + + class PugiElementIterImpl : public XElementIterImpl + { + public: + ~PugiElementIterImpl() = default; + + PugiElementIterImpl(); + + PugiElementIterImpl( + const pugi::xml_node_iterator& iter, + const pugi::xml_node& iterParent, + const XDocCPtr& parentDoc + ); + + PugiElementIterImpl( const PugiElementIterImpl& ); + PugiElementIterImpl( PugiElementIterImpl&& ) = default; + + PugiElementIterImpl& operator=( const PugiElementIterImpl& ); + PugiElementIterImpl& operator=( PugiElementIterImpl&& ) = default; + + virtual bool getIsPayloadNull() const override; + virtual bool getIsEndIter() const override; + virtual bool getIsProcessingInstruction() const override; + virtual bool getSkipProcessingInstructions() const override; + virtual void setSkipProcessingInstructions( bool inValue ) override; + + virtual XElementIterImplUP clone() const override; + virtual bool equals( const XElementIterator& other ) const override; + + virtual XElement& getRef() const override; + virtual XElement* getPtr() const override; + + virtual const PugiElementIterImpl& increment() override; + virtual const PugiElementIterImpl& decrement() override; + + // not part of inherited interface + virtual pugi::xml_node_type getPugiXmlNodeType() const final; + virtual bool hasTextData() const final; + + public: + pugi::xml_node_iterator myIter; + pugi::xml_node myIterParent; + XDocCWPtr myXDoc; + bool mySkipProcessingInstructions; + mutable std::unique_ptr myReturnableElement; + + private: + bool getIsBeginIter() const; + }; +} + diff --git a/Sourcecode/private/extern/ezxml/src/private/private/Throw.h b/Sourcecode/private/extern/ezxml/src/private/private/Throw.h new file mode 100755 index 000000000..6f2c40001 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/Throw.h @@ -0,0 +1,60 @@ +// Copyright (c) Matthew James Briggs + +#pragma once + +#include +#include + +#ifndef __FILENAME__ + + #if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) + + #define __FILENAME__ (strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__) + + #else + + #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) + + #endif + +#endif + +#ifndef EZXML_THROW +#define EZXML_THROW(throw_error_message) \ +throw std::runtime_error ( \ + std::string( "error in " ) \ ++ std::string( __FILENAME__ ) \ ++ std::string(" (line ") \ ++ std::string( std::to_string(__LINE__ ) ) \ ++ std::string(") ") \ ++ std::string( __FUNCTION__ ) \ ++ std::string(": '") \ ++ std::string( throw_error_message ) ); +#endif + +#ifndef EZXML_THROW_NULL +#define THROW_NULL THROW("null pointer encountered") +#endif + +#ifndef EZXML_THROW_IF_NULL +#define THROW_IF_NULL(pointerVariable) \ +if ( pointerVariable == nullptr ) { THROW_NULL } +#endif + +#ifndef EZXML_THROW_IF_BAD_VALUE +#define THROW_IF_BAD_VALUE( VALUE, MIN_VAL, MAX_VAL ) \ +if( VALUE < MIN_VAL || VALUE > MAX_VAL ) { \ +std::stringstream BADVALUEMESSAGE; \ +BADVALUEMESSAGE << "value out of range. " << \ +#VALUE << " = " << VALUE << ", min = " << MIN_VAL << ", max = " << MAX_VAL; \ +THROW( BADVALUEMESSAGE.str() ) } +#endif + +#ifndef EZXML_BUG +#define EZXML_BUG EZXML_THROW( "this exception is due to a coding error, please report the bug https://github.com/Webern/MusicXML-Class-Library/issues" ); +#endif + +#ifndef EZXML_ASSERT +#define EZXML_ASSERT(expectedTrueStatement) \ +if ( ! (expectedTrueStatement) ) { EZXML_THROW("assertion failed '" #expectedTrueStatement "'"); } +#endif diff --git a/Sourcecode/private/extern/ezxml/src/private/private/XAttributeIterator.cpp b/Sourcecode/private/extern/ezxml/src/private/private/XAttributeIterator.cpp new file mode 100755 index 000000000..20de4bc7a --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/XAttributeIterator.cpp @@ -0,0 +1,139 @@ +// Copyright (c) Matthew James Briggs + +#include "ezxml/XAttributeIterator.h" + +namespace ezxml +{ + XAttributeIterator::XAttributeIterator() + : myImpl( nullptr ) + { + + } + + + XAttributeIterator::XAttributeIterator( const XAttributeIterImpl& impl ) + : myImpl( impl.clone() ) + { + + } + + + XAttributeIterator::XAttributeIterator( const XAttributeIterator& other ) + : myImpl( nullptr ) + { + if( other.myImpl ) + { + myImpl = other.myImpl->clone(); + } + } + + + XAttributeIterator& + XAttributeIterator::operator=( const XAttributeIterator& other ) + { + if( other.myImpl ) + { + myImpl = other.myImpl->clone(); + } + return *this; + } + + + bool + XAttributeIterator::operator==( const XAttributeIterator& rhs ) const + { + if( !myImpl ) + { + return false; + } + return myImpl->equals( rhs ); + } + + + bool + XAttributeIterator::operator!=( const XAttributeIterator& rhs ) const + { + if( !myImpl ) + { + return false; + } + return !myImpl->equals( rhs ); + } + + + XAttribute& + XAttributeIterator::operator*() const + { + if( !myImpl ) + { + throw std::runtime_error( "XAttributeIterator::operator*() - null dereference attempted" ); + } + return myImpl->getRef(); + } + + + XAttribute* + XAttributeIterator::operator->() const + { + if( !myImpl ) + { + throw std::runtime_error( "XAttributeIterator::operator->() - null dereference attempted" ); + } + return myImpl->getPtr(); + } + + + const XAttributeIterator& + XAttributeIterator::operator++() + { + if( myImpl ) + { + myImpl->increment(); + } + return *this; + } + + + XAttributeIterator + XAttributeIterator::operator++( int ) + { + if( !myImpl ) + { + return XAttributeIterator{}; + } + XAttributeIterImplUP temp = myImpl->clone(); + myImpl->increment(); + return XAttributeIterator{ *temp }; + } + + + const XAttributeIterator& + XAttributeIterator::operator--() + { + if( myImpl ) + { + myImpl->decrement(); + } + return *this; + } + + + XAttributeIterator + XAttributeIterator::operator--( int ) + { + if( !myImpl ) + { + return XAttributeIterator{}; + } + XAttributeIterImplUP temp = myImpl->clone(); + myImpl->decrement(); + return XAttributeIterator{ *temp }; + } + + + const XAttributeIterImplUP& + XAttributeIterator::reveal() const + { + return myImpl; + } +} diff --git a/Sourcecode/private/extern/ezxml/src/private/private/XElementIterator.cpp b/Sourcecode/private/extern/ezxml/src/private/private/XElementIterator.cpp new file mode 100755 index 000000000..d5b25501a --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/XElementIterator.cpp @@ -0,0 +1,170 @@ +// Copyright (c) Matthew James Briggs + +#include "ezxml/XElementIterator.h" + +namespace ezxml +{ + XElementIterator::XElementIterator() + : myImpl( nullptr ) + { + + } + + + XElementIterator::XElementIterator( const XElementIterImpl& impl ) + : myImpl( impl.clone() ) + { + + } + + + XElementIterator::XElementIterator( const XElementIterator& other ) + : myImpl( nullptr ) + { + if( other.myImpl ) + { + myImpl = other.myImpl->clone(); + } + } + + + XElementIterator& + XElementIterator::operator=( const XElementIterator& other ) + { + if( other.myImpl ) + { + myImpl = other.myImpl->clone(); + } + return *this; + } + + + bool + XElementIterator::operator==( const XElementIterator& rhs ) const + { + if( !myImpl ) + { + return false; + } + return myImpl->equals( rhs ); + } + + + bool + XElementIterator::operator!=( const XElementIterator& rhs ) const + { + if( !myImpl ) + { + return false; + } + return !myImpl->equals( rhs ); + } + + + XElement& + XElementIterator::operator*() const + { + if( !myImpl ) + { + throw std::runtime_error( "XElementIterator::operator*() - null dereference attempted" ); + } + return myImpl->getRef(); + } + + + XElement* + XElementIterator::operator->() const + { + if( !myImpl ) + { + throw std::runtime_error( "XElementIterator::operator->() - null dereference attempted" ); + } + return myImpl->getPtr(); + } + + + const XElementIterator& + XElementIterator::operator++() + { + if( myImpl ) + { + myImpl->increment(); + } + return *this; + } + + + const XElementIterator + XElementIterator::operator++( int ) + { + if( !myImpl ) + { + return XElementIterator{}; + } + XElementIterImplUP temp = myImpl->clone(); + myImpl->increment(); + return XElementIterator{ *temp }; + } + + + const XElementIterator& + XElementIterator::operator--() + { + if( myImpl ) + { + myImpl->decrement(); + } + return *this; + } + + + const XElementIterator + XElementIterator::operator--( int ) + { + if( !myImpl ) + { + return XElementIterator{}; + } + XElementIterImplUP temp = myImpl->clone(); + myImpl->decrement(); + return XElementIterator{ *temp }; + } + + + bool + XElementIterator::getIsPayloadNull() const + { + if( !myImpl ) + { + return true; + } + + if( myImpl->getIsPayloadNull() ) + { + return true; + } + + return false; + } + + + bool + XElementIterator::getSkipProcessingInstructions() const + { + return myImpl->getSkipProcessingInstructions(); + } + + + void + XElementIterator::setSkipProcessingInstructions( bool inValue ) + { + myImpl->setSkipProcessingInstructions( inValue ); + } + + + const XElementIterImplUP& + XElementIterator::reveal() const + { + return myImpl; + } +} diff --git a/Sourcecode/private/extern/ezxml/src/private/private/XFactory.cpp b/Sourcecode/private/extern/ezxml/src/private/private/XFactory.cpp new file mode 100755 index 000000000..3feafc91b --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/XFactory.cpp @@ -0,0 +1,21 @@ +// Copyright (c) Matthew James Briggs + +#include "ezxml/XFactory.h" +#include "private/PugiDoc.h" +#include "private/PugiElement.h" + +namespace ezxml +{ + XDocPtr + XFactory::makeXDoc() + { + return XDocPtr{ new PugiDoc{} }; + } + + + XElementPtr + XFactory::makeXElement() + { + return XElementPtr{ new PugiElement{} }; + } +} diff --git a/Sourcecode/private/extern/ezxml/src/private/private/XThrow.h b/Sourcecode/private/extern/ezxml/src/private/private/XThrow.h new file mode 100755 index 000000000..f517d65ce --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/XThrow.h @@ -0,0 +1,6 @@ +// Copyright (c) Matthew James Briggs + +#pragma once +#include "private/Throw.h" + +#define EZXML_THROW_XNULL EZXML_THROW( "The internal object is null. This probably means that XDoc has gone out of scope causing all of its children to be destroyed." ); diff --git a/Sourcecode/private/mx/pugixml/pugiconfig.hpp b/Sourcecode/private/extern/ezxml/src/private/private/pugiconfig.hpp old mode 100755 new mode 100644 similarity index 92% rename from Sourcecode/private/mx/pugixml/pugiconfig.hpp rename to Sourcecode/private/extern/ezxml/src/private/private/pugiconfig.hpp index e50b580bf..2fb691802 --- a/Sourcecode/private/mx/pugixml/pugiconfig.hpp +++ b/Sourcecode/private/extern/ezxml/src/private/private/pugiconfig.hpp @@ -1,8 +1,8 @@ /** - * pugixml parser - version 1.7 + * pugixml parser - version 1.10 * -------------------------------------------------------- - * Copyright (C) 2006-2015, 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-2015 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 @@ -62,7 +62,7 @@ * * 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 diff --git a/Sourcecode/private/extern/ezxml/src/private/private/pugilicense.txt b/Sourcecode/private/extern/ezxml/src/private/private/pugilicense.txt new file mode 100644 index 000000000..3af59b178 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/private/private/pugilicense.txt @@ -0,0 +1,50 @@ +pugixml 1.10 - an XML processing library + +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 +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). + +The distribution contains the following folders: + + docs/ - documentation + docs/samples - pugixml usage examples + docs/quickstart.html - quick start guide + docs/manual.html - complete manual + + scripts/ - project files for IDE/build systems + + src/ - header and source files + + readme.txt - this file. + +This library is distributed under the MIT License: + +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 +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. diff --git a/Sourcecode/private/mx/pugixml/pugixml.cpp b/Sourcecode/private/extern/ezxml/src/private/private/pugixml.cpp old mode 100755 new mode 100644 similarity index 87% rename from Sourcecode/private/mx/pugixml/pugixml.cpp rename to Sourcecode/private/extern/ezxml/src/private/private/pugixml.cpp index aad62d05f..90c48b215 --- a/Sourcecode/private/mx/pugixml/pugixml.cpp +++ b/Sourcecode/private/extern/ezxml/src/private/private/pugixml.cpp @@ -1,8 +1,8 @@ /** - * pugixml parser - version 1.7 + * pugixml parser - version 1.10 * -------------------------------------------------------- - * Copyright (C) 2006-2015, 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. @@ -11,14 +11,10 @@ * Copyright (C) 2003, by Kristen Wegner (kristen@tima.net) */ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wconversion" -#pragma clang diagnostic ignored "-Wsign-conversion" - #ifndef SOURCE_PUGIXML_CPP #define SOURCE_PUGIXML_CPP -#include "mx/pugixml/pugixml.hpp" +#include "pugixml.hpp" #include #include @@ -33,9 +29,6 @@ #ifndef PUGIXML_NO_XPATH # include # include -# ifdef PUGIXML_NO_EXCEPTIONS -# include -# endif #endif #ifndef PUGIXML_NO_STL @@ -51,14 +44,17 @@ # pragma warning(push) # pragma warning(disable: 4127) // conditional expression is constant # pragma warning(disable: 4324) // structure was padded due to __declspec(align()) -# pragma warning(disable: 4611) // interaction between '_setjmp' and C++ object destruction is non-portable # pragma warning(disable: 4702) // unreachable code # pragma warning(disable: 4996) // this function or variable may be unsafe -# pragma warning(disable: 4793) // function compiled as native: presence of '_setjmp' makes a function unmanaged +#endif + +#if defined(_MSC_VER) && defined(__c2__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wdeprecated" // this function or variable may be unsafe #endif #ifdef __INTEL_COMPILER -# pragma warning(disable: 177) // function was declared but never referenced +# pragma warning(disable: 177) // function was declared but never referenced # pragma warning(disable: 279) // controlling expression is constant # pragma warning(disable: 1478 1786) // function was declared "deprecated" # pragma warning(disable: 1684) // conversion from pointer to same-sized integral type @@ -80,17 +76,21 @@ # pragma diag_suppress=237 // controlling expression is constant #endif +#ifdef __TI_COMPILER_VERSION__ +# pragma diag_suppress 179 // function was declared but never referenced +#endif + // Inlining controls #if defined(_MSC_VER) && _MSC_VER >= 1300 # define PUGI__NO_INLINE __declspec(noinline) #elif defined(__GNUC__) # define PUGI__NO_INLINE __attribute__((noinline)) #else -# define PUGI__NO_INLINE +# define PUGI__NO_INLINE #endif // Branch weight controls -#if defined(__GNUC__) +#if defined(__GNUC__) && !defined(__c2__) # define PUGI__UNLIKELY(cond) __builtin_expect(cond, 0) #else # define PUGI__UNLIKELY(cond) (cond) @@ -106,6 +106,17 @@ # define PUGI__DMC_VOLATILE #endif +// Integer sanitizer workaround; we only apply this for clang since gcc8 has no_sanitize but not unsigned-integer-overflow and produces "attribute directive ignored" warnings +#if defined(__clang__) && defined(__has_attribute) +# if __has_attribute(no_sanitize) +# define PUGI__UNSIGNED_OVERFLOW __attribute__((no_sanitize("unsigned-integer-overflow"))) +# else +# define PUGI__UNSIGNED_OVERFLOW +# endif +#else +# define PUGI__UNSIGNED_OVERFLOW +#endif + // Borland C++ bug workaround for not defining ::memcpy depending on header include order (can't always use std::memcpy because some compilers don't have it at all) #if defined(__BORLANDC__) && !defined(__MEM_H_USING_LIST) using std::memcpy; @@ -113,11 +124,28 @@ using std::memmove; using std::memset; #endif +// Some MinGW/GCC versions have headers that erroneously omit LLONG_MIN/LLONG_MAX/ULLONG_MAX definitions from limits.h in some configurations +#if defined(PUGIXML_HAS_LONG_LONG) && defined(__GNUC__) && !defined(LLONG_MAX) && !defined(LLONG_MIN) && !defined(ULLONG_MAX) +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define LLONG_MAX __LONG_LONG_MAX__ +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +#endif + // In some environments MSVC is a compiler but the CRT lacks certain MSVC-specific features #if defined(_MSC_VER) && !defined(__S3E__) # define PUGI__MSVC_CRT_VERSION _MSC_VER #endif +// Not all platforms have snprintf; we define a wrapper that uses snprintf if possible. This only works with buffers with a known size. +#if __cplusplus >= 201103 +# define PUGI__SNPRINTF(buf, ...) snprintf(buf, sizeof(buf), __VA_ARGS__) +#elif defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 +# define PUGI__SNPRINTF(buf, ...) _snprintf_s(buf, _countof(buf), _TRUNCATE, __VA_ARGS__) +#else +# define PUGI__SNPRINTF sprintf +#endif + +// We put implementation details into an anonymous namespace in source mode, but have to keep it in non-anonymous namespace in header-only mode to prevent binary bloat. #ifdef PUGIXML_HEADER_ONLY # define PUGI__NS_BEGIN namespace pugi { namespace impl { # define PUGI__NS_END } } @@ -136,9 +164,7 @@ using std::memset; #endif // uintptr_t -#if !defined(_MSC_VER) || _MSC_VER >= 1600 -# include -#else +#if (defined(_MSC_VER) && _MSC_VER < 1600) || (defined(__BORLANDC__) && __BORLANDC__ < 0x561) namespace pugi { # ifndef _UINTPTR_T_DEFINED @@ -149,6 +175,8 @@ namespace pugi typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; } +#else +# include #endif // Memory allocation @@ -210,7 +238,7 @@ PUGI__NS_BEGIN for (size_t i = 0; i < count; ++i) if (lhs[i] != rhs[i]) return false; - + return lhs[count] == 0; } @@ -231,8 +259,10 @@ PUGI__NS_END // auto_ptr-like object for exception recovery PUGI__NS_BEGIN - template struct auto_deleter + template struct auto_deleter { + typedef void (*D)(T*); + T* data; D deleter; @@ -274,67 +304,37 @@ PUGI__NS_BEGIN } } - void** find(const void* key) + void* find(const void* key) { - assert(key); - if (_capacity == 0) return 0; - size_t hashmod = _capacity - 1; - size_t bucket = hash(key) & hashmod; - - for (size_t probe = 0; probe <= hashmod; ++probe) - { - item_t& probe_item = _items[bucket]; - - if (probe_item.key == key) - return &probe_item.value; + item_t* item = get_item(key); + assert(item); + assert(item->key == key || (item->key == 0 && item->value == 0)); - if (probe_item.key == 0) - return 0; - - // hash collision, quadratic probing - bucket = (bucket + probe + 1) & hashmod; - } - - assert(!"Hash table is full"); - return 0; + return item->value; } - void** insert(const void* key) + void insert(const void* key, void* value) { - assert(key); assert(_capacity != 0 && _count < _capacity - _capacity / 4); - size_t hashmod = _capacity - 1; - size_t bucket = hash(key) & hashmod; + item_t* item = get_item(key); + assert(item); - for (size_t probe = 0; probe <= hashmod; ++probe) + if (item->key == 0) { - item_t& probe_item = _items[bucket]; - - if (probe_item.key == 0) - { - probe_item.key = key; - _count++; - return &probe_item.value; - } - - if (probe_item.key == key) - return &probe_item.value; - - // hash collision, quadratic probing - bucket = (bucket + probe + 1) & hashmod; + _count++; + item->key = key; } - assert(!"Hash table is full"); - return 0; + item->value = value; } - bool reserve() + bool reserve(size_t extra = 16) { - if (_count + 16 >= _capacity - _capacity / 4) - return rehash(); + if (_count + extra >= _capacity - _capacity / 4) + return rehash(_count + extra); return true; } @@ -351,9 +351,32 @@ PUGI__NS_BEGIN size_t _count; - bool rehash(); + bool rehash(size_t count); + + item_t* get_item(const void* key) + { + assert(key); + assert(_capacity > 0); + + size_t hashmod = _capacity - 1; + size_t bucket = hash(key) & hashmod; + + for (size_t probe = 0; probe <= hashmod; ++probe) + { + item_t& probe_item = _items[bucket]; + + if (probe_item.key == key || probe_item.key == 0) + return &probe_item; - static unsigned int hash(const void* key) + // hash collision, quadratic probing + bucket = (bucket + probe + 1) & hashmod; + } + + assert(false && "Hash table is full"); // unreachable + return 0; + } + + static PUGI__UNSIGNED_OVERFLOW unsigned int hash(const void* key) { unsigned int h = static_cast(reinterpret_cast(key)); @@ -368,25 +391,29 @@ PUGI__NS_BEGIN } }; - PUGI__FN_NO_INLINE bool compact_hash_table::rehash() + PUGI__FN_NO_INLINE bool compact_hash_table::rehash(size_t count) { + size_t capacity = 32; + while (count >= capacity - capacity / 4) + capacity *= 2; + compact_hash_table rt; - rt._capacity = (_capacity == 0) ? 32 : _capacity * 2; - rt._items = static_cast(xml_memory::allocate(sizeof(item_t) * rt._capacity)); + rt._capacity = capacity; + rt._items = static_cast(xml_memory::allocate(sizeof(item_t) * capacity)); if (!rt._items) return false; - memset(rt._items, 0, sizeof(item_t) * rt._capacity); + memset(rt._items, 0, sizeof(item_t) * capacity); for (size_t i = 0; i < _capacity; ++i) if (_items[i].key) - *rt.insert(_items[i].key) = _items[i].value; + rt.insert(_items[i].key, _items[i].value); if (_items) xml_memory::deallocate(_items); - _capacity = rt._capacity; + _capacity = capacity; _items = rt._items; assert(_count == rt._count); @@ -398,43 +425,33 @@ PUGI__NS_END #endif PUGI__NS_BEGIN - static const size_t xml_memory_page_size = - #ifdef PUGIXML_MEMORY_PAGE_SIZE - PUGIXML_MEMORY_PAGE_SIZE - #else - 32768 - #endif - ; - #ifdef PUGIXML_COMPACT static const uintptr_t xml_memory_block_alignment = 4; - - static const uintptr_t xml_memory_page_alignment = sizeof(void*); #else static const uintptr_t xml_memory_block_alignment = sizeof(void*); - - static const uintptr_t xml_memory_page_alignment = 64; - static const uintptr_t xml_memory_page_pointer_mask = ~(xml_memory_page_alignment - 1); #endif // extra metadata bits - static const uintptr_t xml_memory_page_contents_shared_mask = 32; - static const uintptr_t xml_memory_page_name_allocated_mask = 16; - static const uintptr_t xml_memory_page_value_allocated_mask = 8; - static const uintptr_t xml_memory_page_type_mask = 7; + static const uintptr_t xml_memory_page_contents_shared_mask = 64; + static const uintptr_t xml_memory_page_name_allocated_mask = 32; + static const uintptr_t xml_memory_page_value_allocated_mask = 16; + static const uintptr_t xml_memory_page_type_mask = 15; // combined masks for string uniqueness static const uintptr_t xml_memory_page_name_allocated_or_shared_mask = xml_memory_page_name_allocated_mask | xml_memory_page_contents_shared_mask; static const uintptr_t xml_memory_page_value_allocated_or_shared_mask = xml_memory_page_value_allocated_mask | xml_memory_page_contents_shared_mask; #ifdef PUGIXML_COMPACT + #define PUGI__GETHEADER_IMPL(object, page, flags) // unused #define PUGI__GETPAGE_IMPL(header) (header).get_page() #else - #define PUGI__GETPAGE_IMPL(header) reinterpret_cast((header) & impl::xml_memory_page_pointer_mask) + #define PUGI__GETHEADER_IMPL(object, page, flags) (((reinterpret_cast(object) - reinterpret_cast(page)) << 8) | (flags)) + // this macro casts pointers through void* to avoid 'cast increases required alignment of target type' warnings + #define PUGI__GETPAGE_IMPL(header) static_cast(const_cast(static_cast(reinterpret_cast(&header) - (header >> 8)))) #endif #define PUGI__GETPAGE(n) PUGI__GETPAGE_IMPL((n)->header) - #define PUGI__NODETYPE(n) static_cast(((n)->header & impl::xml_memory_page_type_mask) + 1) + #define PUGI__NODETYPE(n) static_cast((n)->header & impl::xml_memory_page_type_mask) struct xml_allocator; @@ -474,6 +491,14 @@ PUGI__NS_BEGIN #endif }; + static const size_t xml_memory_page_size = + #ifdef PUGIXML_MEMORY_PAGE_SIZE + (PUGIXML_MEMORY_PAGE_SIZE) + #else + 32768 + #endif + - sizeof(xml_memory_page); + struct xml_memory_string_header { uint16_t page_offset; // offset from page->data @@ -494,30 +519,21 @@ PUGI__NS_BEGIN size_t size = sizeof(xml_memory_page) + data_size; // allocate block with some alignment, leaving memory for worst-case padding - void* memory = xml_memory::allocate(size + xml_memory_page_alignment); + void* memory = xml_memory::allocate(size); if (!memory) return 0; - // align to next page boundary (note: this guarantees at least 1 usable byte before the page) - char* page_memory = reinterpret_cast((reinterpret_cast(memory) + xml_memory_page_alignment) & ~(xml_memory_page_alignment - 1)); - // prepare page structure - xml_memory_page* page = xml_memory_page::construct(page_memory); + xml_memory_page* page = xml_memory_page::construct(memory); assert(page); page->allocator = _root->allocator; - // record the offset for freeing the memory block - assert(page_memory > memory && page_memory - static_cast(memory) <= 127); - page_memory[-1] = static_cast(page_memory - static_cast(memory)); - return page; } static void deallocate_page(xml_memory_page* page) { - char* page_memory = reinterpret_cast(page); - - xml_memory::deallocate(page_memory - page_memory[-1]); + xml_memory::deallocate(page); } void* allocate_memory_oob(size_t size, xml_memory_page*& out_page); @@ -626,7 +642,7 @@ PUGI__NS_BEGIN // allocate memory for string and header block size_t size = sizeof(xml_memory_string_header) + length * sizeof(char_t); - + // round size up to block alignment boundary size_t full_size = (size + (xml_memory_block_alignment - 1)) & ~(xml_memory_block_alignment - 1); @@ -784,12 +800,12 @@ PUGI__NS_BEGIN template PUGI__FN_NO_INLINE T* compact_get_value(const void* object) { - return static_cast(*compact_get_page(object, header_offset)->allocator->_hash->find(object)); + return static_cast(compact_get_page(object, header_offset)->allocator->_hash->find(object)); } template PUGI__FN_NO_INLINE void compact_set_value(const void* object, T* value) { - *compact_get_page(object, header_offset)->allocator->_hash->insert(object) = value; + compact_get_page(object, header_offset)->allocator->_hash->insert(object, value); } template class compact_pointer @@ -836,7 +852,7 @@ PUGI__NS_BEGIN { uintptr_t base = reinterpret_cast(this) & ~(compact_alignment - 1); - return reinterpret_cast(base + ((_data - 1 + start) << compact_alignment_log2)); + return reinterpret_cast(base + (_data - 1 + start) * compact_alignment); } else return compact_get_value(this); @@ -914,7 +930,7 @@ PUGI__NS_BEGIN { uintptr_t base = reinterpret_cast(this) & ~(compact_alignment - 1); - return reinterpret_cast(base + ((_data - 1 - 65533) << compact_alignment_log2)); + return reinterpret_cast(base + (_data - 1 - 65533) * compact_alignment); } else if (_data == 65534) return static_cast(compact_get_page(this, header_offset)->compact_shared_parent); @@ -1050,7 +1066,7 @@ namespace pugi struct xml_node_struct { - xml_node_struct(impl::xml_memory_page* page, xml_node_type type): header(page, type - 1), namevalue_base(0) + xml_node_struct(impl::xml_memory_page* page, xml_node_type type): header(page, type), namevalue_base(0) { PUGI__STATIC_ASSERT(sizeof(xml_node_struct) == 12); } @@ -1077,8 +1093,9 @@ namespace pugi { struct xml_attribute_struct { - xml_attribute_struct(impl::xml_memory_page* page): header(reinterpret_cast(page)), name(0), value(0), prev_attribute_c(0), next_attribute(0) + xml_attribute_struct(impl::xml_memory_page* page): name(0), value(0), prev_attribute_c(0), next_attribute(0) { + header = PUGI__GETHEADER_IMPL(this, page, 0); } uintptr_t header; @@ -1092,8 +1109,9 @@ namespace pugi struct xml_node_struct { - xml_node_struct(impl::xml_memory_page* page, xml_node_type type): header(reinterpret_cast(page) | (type - 1)), name(0), value(0), parent(0), first_child(0), prev_sibling_c(0), next_sibling(0), first_attribute(0) + xml_node_struct(impl::xml_memory_page* page, xml_node_type type): name(0), value(0), parent(0), first_child(0), prev_sibling_c(0), next_sibling(0), first_attribute(0) { + header = PUGI__GETHEADER_IMPL(this, page, type); } uintptr_t header; @@ -1124,9 +1142,6 @@ PUGI__NS_BEGIN { xml_document_struct(xml_memory_page* page): xml_node_struct(page, node_document), xml_allocator(page), buffer(0), extra_buffers(0) { - #ifdef PUGIXML_COMPACT - _hash = &hash; - #endif } const char_t* buffer; @@ -1846,18 +1861,18 @@ PUGI__NS_BEGIN enum chartypex_t { ctx_special_pcdata = 1, // Any symbol >= 0 and < 32 (except \t, \r, \n), &, <, > - ctx_special_attr = 2, // Any symbol >= 0 and < 32 (except \t), &, <, >, " + ctx_special_attr = 2, // Any symbol >= 0 and < 32, &, <, ", ' ctx_start_symbol = 4, // Any symbol > 127, a-z, A-Z, _ ctx_digit = 8, // 0-9 ctx_symbol = 16 // Any symbol > 127, a-z, A-Z, 0-9, _, -, . }; - + static const unsigned char chartypex_table[256] = { - 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 2, 3, 3, 2, 3, 3, // 0-15 + 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 3, 3, 2, 3, 3, // 0-15 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 16-31 - 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 16, 16, 0, // 32-47 - 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 0, 3, 0, 3, 0, // 48-63 + 0, 0, 2, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 16, 16, 0, // 32-47 + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 0, 3, 0, 1, 0, // 48-63 0, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, // 64-79 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 0, 0, 0, 0, 20, // 80-95 @@ -1873,7 +1888,7 @@ PUGI__NS_BEGIN 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 }; - + #ifdef PUGIXML_WCHAR_MODE #define PUGI__IS_CHARTYPE_IMPL(c, ct, table) ((static_cast(c) < 128 ? table[static_cast(c)] : table[128]) & (ct)) #else @@ -1896,12 +1911,71 @@ PUGI__NS_BEGIN if (sizeof(wchar_t) == 2) return is_little_endian() ? encoding_utf16_le : encoding_utf16_be; - else + else return is_little_endian() ? encoding_utf32_le : encoding_utf32_be; } - PUGI__FN xml_encoding guess_buffer_encoding(uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3) + PUGI__FN bool parse_declaration_encoding(const uint8_t* data, size_t size, const uint8_t*& out_encoding, size_t& out_length) { + #define PUGI__SCANCHAR(ch) { if (offset >= size || data[offset] != ch) return false; offset++; } + #define PUGI__SCANCHARTYPE(ct) { while (offset < size && PUGI__IS_CHARTYPE(data[offset], ct)) offset++; } + + // check if we have a non-empty XML declaration + if (size < 6 || !((data[0] == '<') & (data[1] == '?') & (data[2] == 'x') & (data[3] == 'm') & (data[4] == 'l') && PUGI__IS_CHARTYPE(data[5], ct_space))) + return false; + + // scan XML declaration until the encoding field + for (size_t i = 6; i + 1 < size; ++i) + { + // declaration can not contain ? in quoted values + if (data[i] == '?') + return false; + + if (data[i] == 'e' && data[i + 1] == 'n') + { + size_t offset = i; + + // encoding follows the version field which can't contain 'en' so this has to be the encoding if XML is well formed + PUGI__SCANCHAR('e'); PUGI__SCANCHAR('n'); PUGI__SCANCHAR('c'); PUGI__SCANCHAR('o'); + PUGI__SCANCHAR('d'); PUGI__SCANCHAR('i'); PUGI__SCANCHAR('n'); PUGI__SCANCHAR('g'); + + // S? = S? + PUGI__SCANCHARTYPE(ct_space); + PUGI__SCANCHAR('='); + PUGI__SCANCHARTYPE(ct_space); + + // the only two valid delimiters are ' and " + uint8_t delimiter = (offset < size && data[offset] == '"') ? '"' : '\''; + + PUGI__SCANCHAR(delimiter); + + size_t start = offset; + + out_encoding = data + offset; + + PUGI__SCANCHARTYPE(ct_symbol); + + out_length = offset - start; + + PUGI__SCANCHAR(delimiter); + + return true; + } + } + + return false; + + #undef PUGI__SCANCHAR + #undef PUGI__SCANCHARTYPE + } + + PUGI__FN xml_encoding guess_buffer_encoding(const uint8_t* data, size_t size) + { + // skip encoding autodetection if input buffer is too small + if (size < 4) return encoding_utf8; + + uint8_t d0 = data[0], d1 = data[1], d2 = data[2], d3 = data[3]; + // look for BOM in first few bytes if (d0 == 0 && d1 == 0 && d2 == 0xfe && d3 == 0xff) return encoding_utf32_be; if (d0 == 0xff && d1 == 0xfe && d2 == 0 && d3 == 0) return encoding_utf32_le; @@ -1914,13 +1988,32 @@ PUGI__NS_BEGIN if (d0 == 0x3c && d1 == 0 && d2 == 0 && d3 == 0) return encoding_utf32_le; if (d0 == 0 && d1 == 0x3c && d2 == 0 && d3 == 0x3f) return encoding_utf16_be; if (d0 == 0x3c && d1 == 0 && d2 == 0x3f && d3 == 0) return encoding_utf16_le; - if (d0 == 0x3c && d1 == 0x3f && d2 == 0x78 && d3 == 0x6d) return encoding_utf8; // look for utf16 < followed by node name (this may fail, but is better than utf8 since it's zero terminated so early) if (d0 == 0 && d1 == 0x3c) return encoding_utf16_be; if (d0 == 0x3c && d1 == 0) return encoding_utf16_le; - // no known BOM detected, assume utf8 + // no known BOM detected; parse declaration + const uint8_t* enc = 0; + size_t enc_length = 0; + + if (d0 == 0x3c && d1 == 0x3f && d2 == 0x78 && d3 == 0x6d && parse_declaration_encoding(data, size, enc, enc_length)) + { + // iso-8859-1 (case-insensitive) + if (enc_length == 10 + && (enc[0] | ' ') == 'i' && (enc[1] | ' ') == 's' && (enc[2] | ' ') == 'o' + && enc[3] == '-' && enc[4] == '8' && enc[5] == '8' && enc[6] == '5' && enc[7] == '9' + && enc[8] == '-' && enc[9] == '1') + return encoding_latin1; + + // latin1 (case-insensitive) + if (enc_length == 6 + && (enc[0] | ' ') == 'l' && (enc[1] | ' ') == 'a' && (enc[2] | ' ') == 't' + && (enc[3] | ' ') == 'i' && (enc[4] | ' ') == 'n' + && enc[5] == '1') + return encoding_latin1; + } + return encoding_utf8; } @@ -1938,15 +2031,10 @@ PUGI__NS_BEGIN // only do autodetection if no explicit encoding is requested if (encoding != encoding_auto) return encoding; - // skip encoding autodetection if input buffer is too small - if (size < 4) return encoding_utf8; - // try to guess encoding (based on XML specification, Appendix F.1) const uint8_t* data = static_cast(contents); - PUGI__DMC_VOLATILE uint8_t d0 = data[0], d1 = data[1], d2 = data[2], d3 = data[3]; - - return guess_buffer_encoding(d0, d1, d2, d3); + return guess_buffer_encoding(data, size); } PUGI__FN bool get_mutable_buffer(char_t*& out_buffer, size_t& out_length, const void* contents, size_t size, bool is_mutable) @@ -2079,7 +2167,7 @@ PUGI__NS_BEGIN if (encoding == encoding_latin1) return convert_buffer_generic(out_buffer, out_length, contents, size, latin1_decoder()); - assert(!"Invalid encoding"); + assert(false && "Invalid encoding"); // unreachable return false; } #else @@ -2184,7 +2272,7 @@ PUGI__NS_BEGIN if (encoding == encoding_latin1) return convert_buffer_latin1(out_buffer, out_length, contents, size, is_mutable); - assert(!"Invalid encoding"); + assert(false && "Invalid encoding"); // unreachable return false; } #endif @@ -2200,12 +2288,12 @@ PUGI__NS_BEGIN // convert to utf8 uint8_t* begin = reinterpret_cast(buffer); uint8_t* end = wchar_decoder::process(str, length, begin, utf8_writer()); - + assert(begin + size == end); (void)!end; (void)!size; } - + #ifndef PUGIXML_NO_STL PUGI__FN std::string as_utf8_impl(const wchar_t* str, size_t length) { @@ -2273,7 +2361,7 @@ PUGI__NS_BEGIN xml_allocator* alloc = PUGI__GETPAGE_IMPL(header)->allocator; if (header & header_mask) alloc->deallocate_string(dest); - + // mark the string as not allocated dest = 0; header &= ~header_mask; @@ -2285,7 +2373,7 @@ PUGI__NS_BEGIN // we can reuse old buffer, so just copy the new data (including zero terminator) memcpy(dest, source, source_length * sizeof(char_t)); dest[source_length] = 0; - + return true; } else @@ -2304,7 +2392,7 @@ PUGI__NS_BEGIN // deallocate old buffer (*after* the above to protect against overlapping memory and/or allocation failures) if (header & header_mask) alloc->deallocate_string(dest); - + // the string is now allocated, so set the flag dest = buf; header |= header_mask; @@ -2317,11 +2405,11 @@ PUGI__NS_BEGIN { char_t* end; size_t size; - + gap(): end(0), size(0) { } - + // Push new gap, move s count bytes further (skipping the gap). // Collapse previous gap. void push(char_t*& s, size_t count) @@ -2332,14 +2420,14 @@ PUGI__NS_BEGIN assert(s >= end); memmove(end - size, end, reinterpret_cast(s) - reinterpret_cast(end)); } - + s += count; // end of current gap - + // "merge" two gaps end = s; size += count; } - + // Collapse all gaps, return past-the-end pointer char_t* flush(char_t* s) { @@ -2354,7 +2442,7 @@ PUGI__NS_BEGIN else return s; } }; - + PUGI__FN char_t* strconv_escape(char_t* s, gap& g) { char_t* stre = s + 1; @@ -2386,7 +2474,7 @@ PUGI__NS_BEGIN ch = *++stre; } - + ++stre; } else // &#... (dec code) @@ -2397,7 +2485,7 @@ PUGI__NS_BEGIN for (;;) { - if (static_cast(static_cast(ch) - '0') <= 9) + if (static_cast(ch - '0') <= 9) ucsc = 10 * ucsc + (ch - '0'); else if (ch == ';') break; @@ -2406,7 +2494,7 @@ PUGI__NS_BEGIN ch = *++stre; } - + ++stre; } @@ -2415,7 +2503,7 @@ PUGI__NS_BEGIN #else s = reinterpret_cast(utf8_writer::any(reinterpret_cast(s), ucsc)); #endif - + g.push(s, stre - s); return stre; } @@ -2430,7 +2518,7 @@ PUGI__NS_BEGIN { *s++ = '&'; ++stre; - + g.push(s, stre - s); return stre; } @@ -2455,7 +2543,7 @@ PUGI__NS_BEGIN { *s++ = '>'; ++stre; - + g.push(s, stre - s); return stre; } @@ -2468,7 +2556,7 @@ PUGI__NS_BEGIN { *s++ = '<'; ++stre; - + g.push(s, stre - s); return stre; } @@ -2481,7 +2569,7 @@ PUGI__NS_BEGIN { *s++ = '"'; ++stre; - + g.push(s, stre - s); return stre; } @@ -2491,7 +2579,7 @@ PUGI__NS_BEGIN default: break; } - + return stre; } @@ -2499,7 +2587,7 @@ PUGI__NS_BEGIN #define PUGI__ENDSWITH(c, e) ((c) == (e) || ((c) == 0 && endch == (e))) #define PUGI__SKIPWS() { while (PUGI__IS_CHARTYPE(*s, ct_space)) ++s; } #define PUGI__OPTSET(OPT) ( optmsk & (OPT) ) - #define PUGI__PUSHNODE(TYPE) { cursor = append_new_node(cursor, alloc, TYPE); if (!cursor) PUGI__THROW_ERROR(status_out_of_memory, s); } + #define PUGI__PUSHNODE(TYPE) { cursor = append_new_node(cursor, *alloc, TYPE); if (!cursor) PUGI__THROW_ERROR(status_out_of_memory, s); } #define PUGI__POPNODE() { cursor = cursor->parent; } #define PUGI__SCANFOR(X) { while (*s != 0 && !(X)) ++s; } #define PUGI__SCANWHILE(X) { while (X) ++s; } @@ -2511,21 +2599,21 @@ PUGI__NS_BEGIN PUGI__FN char_t* strconv_comment(char_t* s, char_t endch) { gap g; - + while (true) { PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_comment)); - + if (*s == '\r') // Either a single 0x0d or 0x0d 0x0a pair { *s++ = '\n'; // replace first one with 0x0a - + if (*s == '\n') g.push(s, 1); } else if (s[0] == '-' && s[1] == '-' && PUGI__ENDSWITH(s[2], '>')) // comment ends here { *g.flush(s) = 0; - + return s + (s[2] == '>' ? 3 : 2); } else if (*s == 0) @@ -2539,21 +2627,21 @@ PUGI__NS_BEGIN PUGI__FN char_t* strconv_cdata(char_t* s, char_t endch) { gap g; - + while (true) { PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_cdata)); - + if (*s == '\r') // Either a single 0x0d or 0x0d 0x0a pair { *s++ = '\n'; // replace first one with 0x0a - + if (*s == '\n') g.push(s, 1); } else if (s[0] == ']' && s[1] == ']' && PUGI__ENDSWITH(s[2], '>')) // CDATA ends here { *g.flush(s) = 0; - + return s + 1; } else if (*s == 0) @@ -2563,9 +2651,9 @@ PUGI__NS_BEGIN else ++s; } } - + typedef char_t* (*strconv_pcdata_t)(char_t*); - + template struct strconv_pcdata_impl { static char_t* parse(char_t* s) @@ -2587,13 +2675,13 @@ PUGI__NS_BEGIN --end; *end = 0; - + return s + 1; } else if (opt_eol::value && *s == '\r') // Either a single 0x0d or 0x0d 0x0a pair { *s++ = '\n'; // replace first one with 0x0a - + if (*s == '\n') g.push(s, 1); } else if (opt_escape::value && *s == '&') @@ -2616,12 +2704,12 @@ PUGI__NS_BEGIN } } }; - + PUGI__FN strconv_pcdata_t get_strconv_pcdata(unsigned int optmask) { PUGI__STATIC_ASSERT(parse_escapes == 0x10 && parse_eol == 0x20 && parse_trim_pcdata == 0x0800); - switch (((optmask >> 4) & 3) | ((optmask >> 9) & 4)) // get bitmask for flags (eol escapes trim) + switch (((optmask >> 4) & 3) | ((optmask >> 9) & 4)) // get bitmask for flags (trim eol escapes); this simultaneously checks 3 options from assertion above { case 0: return strconv_pcdata_impl::parse; case 1: return strconv_pcdata_impl::parse; @@ -2631,12 +2719,12 @@ PUGI__NS_BEGIN case 5: return strconv_pcdata_impl::parse; case 6: return strconv_pcdata_impl::parse; case 7: return strconv_pcdata_impl::parse; - default: assert(false); return 0; // should not get here + default: assert(false); return 0; // unreachable } } typedef char_t* (*strconv_attribute_t)(char_t*, char_t); - + template struct strconv_attribute_impl { static char_t* parse_wnorm(char_t* s, char_t end_quote) @@ -2647,35 +2735,35 @@ PUGI__NS_BEGIN if (PUGI__IS_CHARTYPE(*s, ct_space)) { char_t* str = s; - + do ++str; while (PUGI__IS_CHARTYPE(*str, ct_space)); - + g.push(s, str - s); } while (true) { PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr_ws | ct_space)); - + if (*s == end_quote) { char_t* str = g.flush(s); - + do *str-- = 0; while (PUGI__IS_CHARTYPE(*str, ct_space)); - + return s + 1; } else if (PUGI__IS_CHARTYPE(*s, ct_space)) { *s++ = ' '; - + if (PUGI__IS_CHARTYPE(*s, ct_space)) { char_t* str = s + 1; while (PUGI__IS_CHARTYPE(*str, ct_space)) ++str; - + g.push(s, str - s); } } @@ -2698,11 +2786,11 @@ PUGI__NS_BEGIN while (true) { PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr_ws)); - + if (*s == end_quote) { *g.flush(s) = 0; - + return s + 1; } else if (PUGI__IS_CHARTYPE(*s, ct_space)) @@ -2710,7 +2798,7 @@ PUGI__NS_BEGIN if (*s == '\r') { *s++ = ' '; - + if (*s == '\n') g.push(s, 1); } else *s++ = ' '; @@ -2734,17 +2822,17 @@ PUGI__NS_BEGIN while (true) { PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr)); - + if (*s == end_quote) { *g.flush(s) = 0; - + return s + 1; } else if (*s == '\r') { *s++ = '\n'; - + if (*s == '\n') g.push(s, 1); } else if (opt_escape::value && *s == '&') @@ -2766,11 +2854,11 @@ PUGI__NS_BEGIN while (true) { PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPE(ss, ct_parse_attr)); - + if (*s == end_quote) { *g.flush(s) = 0; - + return s + 1; } else if (opt_escape::value && *s == '&') @@ -2789,8 +2877,8 @@ PUGI__NS_BEGIN PUGI__FN strconv_attribute_t get_strconv_attribute(unsigned int optmask) { PUGI__STATIC_ASSERT(parse_escapes == 0x10 && parse_eol == 0x20 && parse_wconv_attribute == 0x40 && parse_wnorm_attribute == 0x80); - - switch ((optmask >> 4) & 15) // get bitmask for flags (wconv wnorm eol escapes) + + switch ((optmask >> 4) & 15) // get bitmask for flags (wnorm wconv eol escapes); this simultaneously checks 4 options from assertion above { case 0: return strconv_attribute_impl::parse_simple; case 1: return strconv_attribute_impl::parse_simple; @@ -2808,7 +2896,7 @@ PUGI__NS_BEGIN case 13: return strconv_attribute_impl::parse_wnorm; case 14: return strconv_attribute_impl::parse_wnorm; case 15: return strconv_attribute_impl::parse_wnorm; - default: assert(false); return 0; // should not get here + default: assert(false); return 0; // unreachable } } @@ -2823,18 +2911,12 @@ PUGI__NS_BEGIN struct xml_parser { - xml_allocator alloc; - xml_allocator* alloc_state; + xml_allocator* alloc; char_t* error_offset; xml_parse_status error_status; - - xml_parser(xml_allocator* alloc_): alloc(*alloc_), alloc_state(alloc_), error_offset(0), error_status(status_ok) - { - } - ~xml_parser() + xml_parser(xml_allocator* alloc_): alloc(alloc_), error_offset(0), error_status(status_ok) { - *alloc_state = alloc; } // DOCTYPE consists of nested sections of the following possible types: @@ -3161,7 +3243,7 @@ PUGI__NS_BEGIN { strconv_attribute_t strconv_attribute = get_strconv_attribute(optmsk); strconv_pcdata_t strconv_pcdata = get_strconv_pcdata(optmsk); - + char_t ch = 0; xml_node_struct* cursor = root; char_t* mark = s; @@ -3192,10 +3274,10 @@ PUGI__NS_BEGIN while (true) { PUGI__SKIPWS(); // Eat any whitespace. - + if (PUGI__IS_CHARTYPE(*s, ct_start_symbol)) // <... #... { - xml_attribute_struct* a = append_new_attribute(cursor, alloc); // Make space for this attribute. + xml_attribute_struct* a = append_new_attribute(cursor, *alloc); // Make space for this attribute. if (!a) PUGI__THROW_ERROR(status_out_of_memory, s); a->name = s; // Save the offset. @@ -3210,7 +3292,7 @@ PUGI__NS_BEGIN ch = *s; ++s; } - + if (ch == '=') // '<... #=...' { PUGI__SKIPWS(); // Eat any whitespace. @@ -3222,7 +3304,7 @@ PUGI__NS_BEGIN a->value = s; // Save the offset. s = strconv_attribute(s, ch); - + if (!s) PUGI__THROW_ERROR(status_bad_attribute, a->value); // After this line the loop continues from the start; @@ -3237,7 +3319,7 @@ PUGI__NS_BEGIN else if (*s == '/') { ++s; - + if (*s == '>') { PUGI__POPNODE(); @@ -3278,7 +3360,7 @@ PUGI__NS_BEGIN { // we stepped over null terminator, backtrack & handle closing tag --s; - + if (endch != '>') PUGI__THROW_ERROR(status_bad_start_element, s); } else PUGI__THROW_ERROR(status_bad_start_element, s); @@ -3287,20 +3369,22 @@ PUGI__NS_BEGIN { ++s; + mark = s; + char_t* name = cursor->name; - if (!name) PUGI__THROW_ERROR(status_end_element_mismatch, s); - + if (!name) PUGI__THROW_ERROR(status_end_element_mismatch, mark); + while (PUGI__IS_CHARTYPE(*s, ct_symbol)) { - if (*s++ != *name++) PUGI__THROW_ERROR(status_end_element_mismatch, s); + if (*s++ != *name++) PUGI__THROW_ERROR(status_end_element_mismatch, mark); } if (*name) { if (*s == 0 && name[0] == endch && name[1] == 0) PUGI__THROW_ERROR(status_bad_end_element, s); - else PUGI__THROW_ERROR(status_end_element_mismatch, s); + else PUGI__THROW_ERROR(status_end_element_mismatch, mark); } - + PUGI__POPNODE(); // Pop. PUGI__SKIPWS(); @@ -3354,23 +3438,31 @@ PUGI__NS_BEGIN if (!PUGI__OPTSET(parse_trim_pcdata)) s = mark; - + if (cursor->parent || PUGI__OPTSET(parse_fragment)) { - PUGI__PUSHNODE(node_pcdata); // Append a new node on the tree. - cursor->value = s; // Save the offset. + if (PUGI__OPTSET(parse_embed_pcdata) && cursor->parent && !cursor->first_child && !cursor->value) + { + cursor->value = s; // Save the offset. + } + else + { + PUGI__PUSHNODE(node_pcdata); // Append a new node on the tree. + + cursor->value = s; // Save the offset. + + PUGI__POPNODE(); // Pop since this is a standalone. + } s = strconv_pcdata(s); - - PUGI__POPNODE(); // Pop since this is a standalone. - + if (!*s) break; } else { PUGI__SCANFOR(*s == '<'); // '...<' if (!*s) break; - + ++s; } @@ -3418,14 +3510,14 @@ PUGI__NS_BEGIN // get last child of the root before parsing xml_node_struct* last_root_child = root->first_child ? root->first_child->prev_sibling_c + 0 : 0; - + // create parser on stack xml_parser parser(static_cast(xmldoc)); // save last character and make buffer zero-terminated (speeds up parsing) char_t endch = buffer[length - 1]; buffer[length - 1] = 0; - + // skip BOM to make sure it does not end up as part of parse output char_t* buffer_data = parse_skip_bom(buffer); @@ -3515,7 +3607,7 @@ PUGI__NS_BEGIN { if (length < 1) return 0; - // discard last character if it's the lead of a surrogate pair + // discard last character if it's the lead of a surrogate pair return (sizeof(wchar_t) == 2 && static_cast(static_cast(data[length - 1]) - 0xD800) < 0x400) ? length - 1 : length; } @@ -3528,7 +3620,7 @@ PUGI__NS_BEGIN return length * sizeof(char_t); } - + // convert to utf8 if (encoding == encoding_utf8) return convert_buffer_output_generic(r_u8, data, length, wchar_decoder(), utf8_writer()); @@ -3553,7 +3645,7 @@ PUGI__NS_BEGIN if (encoding == encoding_latin1) return convert_buffer_output_generic(r_u8, data, length, wchar_decoder(), latin1_writer()); - assert(!"Invalid encoding"); + assert(false && "Invalid encoding"); // unreachable return 0; } #else @@ -3592,7 +3684,7 @@ PUGI__NS_BEGIN if (encoding == encoding_latin1) return convert_buffer_output_generic(r_u8, data, length, utf8_decoder(), latin1_writer()); - assert(!"Invalid encoding"); + assert(false && "Invalid encoding"); // unreachable return 0; } #endif @@ -3811,15 +3903,15 @@ PUGI__NS_BEGIN xml_encoding encoding; }; - PUGI__FN void text_output_escaped(xml_buffered_writer& writer, const char_t* s, chartypex_t type) + PUGI__FN void text_output_escaped(xml_buffered_writer& writer, const char_t* s, chartypex_t type, unsigned int flags) { while (*s) { const char_t* prev = s; - + // While *s is a usual symbol PUGI__SCANWHILE_UNROLL(!PUGI__IS_CHARTYPEX(ss, type)); - + writer.write_buffer(prev, static_cast(s - prev)); switch (*s) @@ -3838,7 +3930,17 @@ PUGI__NS_BEGIN ++s; break; case '"': - writer.write('&', 'q', 'u', 'o', 't', ';'); + if (flags & format_attribute_single_quote) + writer.write('"'); + else + writer.write('&', 'q', 'u', 'o', 't', ';'); + ++s; + break; + case '\'': + if (flags & format_attribute_single_quote) + writer.write('&', 'a', 'p', 'o', 's', ';'); + else + writer.write('\''); ++s; break; default: // s is not a usual symbol @@ -3846,7 +3948,8 @@ PUGI__NS_BEGIN unsigned int ch = static_cast(*s++); assert(ch < 32); - writer.write('&', '#', static_cast((ch / 10) + '0'), static_cast((ch % 10) + '0'), ';'); + if (!(flags & format_skip_control_chars)) + writer.write('&', '#', static_cast((ch / 10) + '0'), static_cast((ch % 10) + '0'), ';'); } } } @@ -3857,7 +3960,7 @@ PUGI__NS_BEGIN if (flags & format_no_escapes) writer.write_string(s); else - text_output_escaped(writer, s, type); + text_output_escaped(writer, s, type, flags); } PUGI__FN void text_output_cdata(xml_buffered_writer& writer, const char_t* s) @@ -3971,6 +4074,7 @@ PUGI__NS_BEGIN PUGI__FN void node_output_attributes(xml_buffered_writer& writer, xml_node_struct* node, const char_t* indent, size_t indent_length, unsigned int flags, unsigned int depth) { const char_t* default_name = PUGIXML_TEXT(":anonymous"); + const char_t enquotation_char = (flags & format_attribute_single_quote) ? '\'' : '"'; for (xml_attribute_struct* a = node->first_attribute; a; a = a->next_attribute) { @@ -3986,12 +4090,12 @@ PUGI__NS_BEGIN } writer.write_string(a->name ? a->name + 0 : default_name); - writer.write('=', '"'); + writer.write('=', enquotation_char); if (a->value) text_output(writer, a->value, ctx_special_attr, flags); - writer.write('"'); + writer.write(enquotation_char); } } @@ -4006,17 +4110,54 @@ PUGI__NS_BEGIN if (node->first_attribute) node_output_attributes(writer, node, indent, indent_length, flags, depth); - if (!node->first_child) + // element nodes can have value if parse_embed_pcdata was used + if (!node->value) { - writer.write(' ', '/', '>'); + if (!node->first_child) + { + if (flags & format_no_empty_element_tags) + { + writer.write('>', '<', '/'); + writer.write_string(name); + writer.write('>'); - return false; + return false; + } + else + { + if ((flags & format_raw) == 0) + writer.write(' '); + + writer.write('/', '>'); + + return false; + } + } + else + { + writer.write('>'); + + return true; + } } else { writer.write('>'); - return true; + text_output(writer, node->value, ctx_special_pcdata, flags); + + if (!node->first_child) + { + writer.write('<', '/'); + writer.write_string(name); + writer.write('>'); + + return false; + } + else + { + return true; + } } } @@ -4082,7 +4223,7 @@ PUGI__NS_BEGIN break; default: - assert(!"Invalid node type"); + assert(false && "Invalid node type"); // unreachable } } @@ -4124,6 +4265,10 @@ PUGI__NS_BEGIN if (node_output_start(writer, node, indent, indent_length, flags, depth)) { + // element nodes can have value if parse_embed_pcdata was used + if (node->value) + indent_flags = 0; + node = node->first_child; depth++; continue; @@ -4290,6 +4435,7 @@ PUGI__NS_BEGIN while (sit && sit != sn) { + // when a tree is copied into one of the descendants, we need to skip that subtree to avoid an infinite loop if (sit != dn) { xml_node_struct* copy = append_new_node(dit, alloc, PUGI__NODETYPE(sit)); @@ -4340,7 +4486,7 @@ PUGI__NS_BEGIN } // get value with conversion functions - template U string_to_integer(const char_t* value, U minneg, U maxpos) + template PUGI__FN PUGI__UNSIGNED_OVERFLOW U string_to_integer(const char_t* value, U minv, U maxv) { U result = 0; const char_t* s = value; @@ -4410,14 +4556,21 @@ PUGI__NS_BEGIN } if (negative) - return (overflow || result > minneg) ? 0 - minneg : 0 - result; + { + // Workaround for crayc++ CC-3059: Expected no overflow in routine. + #ifdef _CRAYC + return (overflow || result > ~minv + 1) ? minv : ~result + 1; + #else + return (overflow || result > 0 - minv) ? minv : 0 - result; + #endif + } else - return (overflow || result > maxpos) ? maxpos : result; + return (overflow || result > maxv) ? maxv : result; } PUGI__FN int get_value_int(const char_t* value) { - return string_to_integer(value, 0 - static_cast(INT_MIN), INT_MAX); + return string_to_integer(value, static_cast(INT_MIN), INT_MAX); } PUGI__FN unsigned int get_value_uint(const char_t* value) @@ -4455,7 +4608,7 @@ PUGI__NS_BEGIN #ifdef PUGIXML_HAS_LONG_LONG PUGI__FN long long get_value_llong(const char_t* value) { - return string_to_integer(value, 0 - static_cast(LLONG_MIN), LLONG_MAX); + return string_to_integer(value, static_cast(LLONG_MIN), LLONG_MAX); } PUGI__FN unsigned long long get_value_ullong(const char_t* value) @@ -4464,8 +4617,7 @@ PUGI__NS_BEGIN } #endif - template - PUGI__FN char_t* integer_to_string(char_t* begin, char_t* end, U value, bool negative) + template PUGI__FN PUGI__UNSIGNED_OVERFLOW char_t* integer_to_string(char_t* begin, char_t* end, U value, bool negative) { char_t* result = end - 1; U rest = negative ? 0 - value : value; @@ -4502,31 +4654,21 @@ PUGI__NS_BEGIN #endif } - template - PUGI__FN bool set_value_convert(String& dest, Header& header, uintptr_t header_mask, int value) + template + PUGI__FN bool set_value_integer(String& dest, Header& header, uintptr_t header_mask, U value, bool negative) { char_t buf[64]; char_t* end = buf + sizeof(buf) / sizeof(buf[0]); - char_t* begin = integer_to_string(buf, end, value, value < 0); + char_t* begin = integer_to_string(buf, end, value, negative); return strcpy_insitu(dest, header, header_mask, begin, end - begin); } template - PUGI__FN bool set_value_convert(String& dest, Header& header, uintptr_t header_mask, unsigned int value) + PUGI__FN bool set_value_convert(String& dest, Header& header, uintptr_t header_mask, float value) { - char_t buf[64]; - char_t* end = buf + sizeof(buf) / sizeof(buf[0]); - char_t* begin = integer_to_string(buf, end, value, false); - - return strcpy_insitu(dest, header, header_mask, begin, end - begin); - } - - template - PUGI__FN bool set_value_convert(String& dest, Header& header, uintptr_t header_mask, float value) - { - char buf[128]; - sprintf(buf, "%.9g", value); + char buf[128]; + PUGI__SNPRINTF(buf, "%.9g", double(value)); return set_value_ascii(dest, header, header_mask, buf); } @@ -4535,38 +4677,16 @@ PUGI__NS_BEGIN PUGI__FN bool set_value_convert(String& dest, Header& header, uintptr_t header_mask, double value) { char buf[128]; - sprintf(buf, "%.17g", value); + PUGI__SNPRINTF(buf, "%.17g", value); return set_value_ascii(dest, header, header_mask, buf); } - - template - PUGI__FN bool set_value_convert(String& dest, Header& header, uintptr_t header_mask, bool value) - { - return strcpy_insitu(dest, header, header_mask, value ? PUGIXML_TEXT("true") : PUGIXML_TEXT("false"), value ? 4 : 5); - } - -#ifdef PUGIXML_HAS_LONG_LONG - template - PUGI__FN bool set_value_convert(String& dest, Header& header, uintptr_t header_mask, long long value) - { - char_t buf[64]; - char_t* end = buf + sizeof(buf) / sizeof(buf[0]); - char_t* begin = integer_to_string(buf, end, value, value < 0); - - return strcpy_insitu(dest, header, header_mask, begin, end - begin); - } template - PUGI__FN bool set_value_convert(String& dest, Header& header, uintptr_t header_mask, unsigned long long value) + PUGI__FN bool set_value_bool(String& dest, Header& header, uintptr_t header_mask, bool value) { - char_t buf[64]; - char_t* end = buf + sizeof(buf) / sizeof(buf[0]); - char_t* begin = integer_to_string(buf, end, value, false); - - return strcpy_insitu(dest, header, header_mask, begin, end - begin); + return strcpy_insitu(dest, header, header_mask, value ? PUGIXML_TEXT("true") : PUGIXML_TEXT("false"), value ? 4 : 5); } -#endif PUGI__FN xml_parse_result load_buffer_impl(xml_document_struct* doc, xml_node_struct* root, void* contents, size_t size, unsigned int options, xml_encoding encoding, bool is_mutable, bool own, char_t** out_buffer) { @@ -4580,6 +4700,7 @@ PUGI__NS_BEGIN char_t* buffer = 0; size_t length = 0; + // coverity[var_deref_model] if (!impl::convert_buffer(buffer, length, buffer_encoding, contents, size, is_mutable)) return impl::make_parse_result(status_out_of_memory); // delete original buffer if we performed a conversion @@ -4628,7 +4749,7 @@ PUGI__NS_BEGIN // check for I/O errors if (length < 0) return status_io_error; - + // check for overflow size_t result = static_cast(length); @@ -4641,7 +4762,7 @@ PUGI__NS_BEGIN } // This function assumes that buffer has extra sizeof(char_t) writable bytes after size - PUGI__FN size_t zero_terminate_buffer(void* buffer, size_t size, xml_encoding encoding) + PUGI__FN size_t zero_terminate_buffer(void* buffer, size_t size, xml_encoding encoding) { // We only need to zero-terminate if encoding conversion does not do it for us #ifdef PUGIXML_WCHAR_MODE @@ -4673,7 +4794,7 @@ PUGI__NS_BEGIN size_t size = 0; xml_parse_status size_status = get_file_size(file, size); if (size_status != status_ok) return make_parse_result(size_status); - + size_t max_suffix_size = sizeof(char_t); // allocate buffer for the whole file @@ -4694,6 +4815,11 @@ PUGI__NS_BEGIN return load_buffer_impl(doc, doc, contents, zero_terminate_buffer(contents, size, real_encoding), options, real_encoding, true, true, out_buffer); } + PUGI__FN void close_file(FILE* file) + { + fclose(file); + } + #ifndef PUGIXML_NO_STL template struct xml_stream_chunk { @@ -4701,7 +4827,7 @@ PUGI__NS_BEGIN { void* memory = xml_memory::allocate(sizeof(xml_stream_chunk)); if (!memory) return 0; - + return new (memory) xml_stream_chunk(); } @@ -4811,7 +4937,7 @@ PUGI__NS_BEGIN // return buffer size_t actual_length = static_cast(stream.gcount()); assert(actual_length <= read_length); - + *out_buffer = buffer.release(); *out_size = actual_length * sizeof(T); @@ -4839,7 +4965,7 @@ PUGI__NS_BEGIN if (status != status_ok) return make_parse_result(status); xml_encoding real_encoding = get_buffer_encoding(encoding, buffer, size); - + return load_buffer_impl(doc, doc, buffer, zero_terminate_buffer(buffer, size, real_encoding), options, real_encoding, true, true, out_buffer); } #endif @@ -4959,7 +5085,7 @@ namespace pugi PUGI__FN xml_tree_walker::xml_tree_walker(): _depth(0) { } - + PUGI__FN xml_tree_walker::~xml_tree_walker() { } @@ -5005,7 +5131,7 @@ namespace pugi { return (_attr == r._attr); } - + PUGI__FN bool xml_attribute::operator!=(const xml_attribute& r) const { return (_attr != r._attr); @@ -5015,17 +5141,17 @@ namespace pugi { return (_attr < r._attr); } - + PUGI__FN bool xml_attribute::operator>(const xml_attribute& r) const { return (_attr > r._attr); } - + PUGI__FN bool xml_attribute::operator<=(const xml_attribute& r) const { return (_attr <= r._attr); } - + PUGI__FN bool xml_attribute::operator>=(const xml_attribute& r) const { return (_attr >= r._attr); @@ -5113,7 +5239,7 @@ namespace pugi set_value(rhs); return *this; } - + PUGI__FN xml_attribute& xml_attribute::operator=(int rhs) { set_value(rhs); @@ -5126,12 +5252,24 @@ namespace pugi return *this; } + PUGI__FN xml_attribute& xml_attribute::operator=(long rhs) + { + set_value(rhs); + return *this; + } + + PUGI__FN xml_attribute& xml_attribute::operator=(unsigned long rhs) + { + set_value(rhs); + return *this; + } + PUGI__FN xml_attribute& xml_attribute::operator=(double rhs) { set_value(rhs); return *this; } - + PUGI__FN xml_attribute& xml_attribute::operator=(float rhs) { set_value(rhs); @@ -5161,10 +5299,10 @@ namespace pugi PUGI__FN bool xml_attribute::set_name(const char_t* rhs) { if (!_attr) return false; - + return impl::strcpy_insitu(_attr->name, _attr->header, impl::xml_memory_page_name_allocated_mask, rhs, impl::strlength(rhs)); } - + PUGI__FN bool xml_attribute::set_value(const char_t* rhs) { if (!_attr) return false; @@ -5176,14 +5314,28 @@ namespace pugi { if (!_attr) return false; - return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); + return impl::set_value_integer(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs, rhs < 0); } PUGI__FN bool xml_attribute::set_value(unsigned int rhs) { if (!_attr) return false; - return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); + return impl::set_value_integer(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs, false); + } + + PUGI__FN bool xml_attribute::set_value(long rhs) + { + if (!_attr) return false; + + return impl::set_value_integer(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs, rhs < 0); + } + + PUGI__FN bool xml_attribute::set_value(unsigned long rhs) + { + if (!_attr) return false; + + return impl::set_value_integer(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs, false); } PUGI__FN bool xml_attribute::set_value(double rhs) @@ -5192,7 +5344,7 @@ namespace pugi return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); } - + PUGI__FN bool xml_attribute::set_value(float rhs) { if (!_attr) return false; @@ -5204,7 +5356,7 @@ namespace pugi { if (!_attr) return false; - return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); + return impl::set_value_bool(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); } #ifdef PUGIXML_HAS_LONG_LONG @@ -5212,14 +5364,14 @@ namespace pugi { if (!_attr) return false; - return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); + return impl::set_value_integer(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs, rhs < 0); } PUGI__FN bool xml_attribute::set_value(unsigned long long rhs) { if (!_attr) return false; - return impl::set_value_convert(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs); + return impl::set_value_integer(_attr->value, _attr->header, impl::xml_memory_page_value_allocated_mask, rhs, false); } #endif @@ -5242,7 +5394,7 @@ namespace pugi PUGI__FN xml_node::xml_node(xml_node_struct* p): _root(p) { } - + PUGI__FN static void unspecified_bool_xml_node(xml_node***) { } @@ -5266,7 +5418,7 @@ namespace pugi { return iterator(0, _root); } - + PUGI__FN xml_node::attribute_iterator xml_node::attributes_begin() const { return attribute_iterator(_root ? _root->first_attribute + 0 : 0, _root); @@ -5276,7 +5428,7 @@ namespace pugi { return attribute_iterator(0, _root); } - + PUGI__FN xml_object_range xml_node::children() const { return xml_object_range(begin(), end()); @@ -5306,17 +5458,17 @@ namespace pugi { return (_root < r._root); } - + PUGI__FN bool xml_node::operator>(const xml_node& r) const { return (_root > r._root); } - + PUGI__FN bool xml_node::operator<=(const xml_node& r) const { return (_root <= r._root); } - + PUGI__FN bool xml_node::operator>=(const xml_node& r) const { return (_root >= r._root); @@ -5326,7 +5478,7 @@ namespace pugi { return !_root; } - + PUGI__FN const char_t* xml_node::name() const { return (_root && _root->name) ? _root->name + 0 : PUGIXML_TEXT(""); @@ -5336,12 +5488,12 @@ namespace pugi { return _root ? PUGI__NODETYPE(_root) : node_null; } - + PUGI__FN const char_t* xml_node::value() const { return (_root && _root->value) ? _root->value + 0 : PUGIXML_TEXT(""); } - + PUGI__FN xml_node xml_node::child(const char_t* name_) const { if (!_root) return xml_node(); @@ -5359,14 +5511,14 @@ namespace pugi for (xml_attribute_struct* i = _root->first_attribute; i; i = i->next_attribute) if (i->name && impl::strequal(name_, i->name)) return xml_attribute(i); - + return xml_attribute(); } - + PUGI__FN xml_node xml_node::next_sibling(const char_t* name_) const { if (!_root) return xml_node(); - + for (xml_node_struct* i = _root->next_sibling; i; i = i->next_sibling) if (i->name && impl::strequal(name_, i->name)) return xml_node(i); @@ -5381,7 +5533,7 @@ namespace pugi PUGI__FN xml_node xml_node::previous_sibling(const char_t* name_) const { if (!_root) return xml_node(); - + for (xml_node_struct* i = _root->prev_sibling_c; i->next_sibling; i = i->prev_sibling_c) if (i->name && impl::strequal(name_, i->name)) return xml_node(i); @@ -5424,7 +5576,7 @@ namespace pugi PUGI__FN xml_node xml_node::previous_sibling() const { if (!_root) return xml_node(); - + if (_root->prev_sibling_c->next_sibling) return xml_node(_root->prev_sibling_c); else return xml_node(); } @@ -5447,7 +5599,11 @@ namespace pugi PUGI__FN const char_t* xml_node::child_value() const { if (!_root) return PUGIXML_TEXT(""); - + + // element nodes can have value if parse_embed_pcdata was used + if (PUGI__NODETYPE(_root) == node_element && _root->value) + return _root->value; + for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling) if (impl::is_text_node(i) && i->value) return i->value; @@ -5489,7 +5645,7 @@ namespace pugi return impl::strcpy_insitu(_root->name, _root->header, impl::xml_memory_page_name_allocated_mask, rhs, impl::strlength(rhs)); } - + PUGI__FN bool xml_node::set_value(const char_t* rhs) { xml_node_type type_ = _root ? PUGI__NODETYPE(_root) : node_null; @@ -5503,7 +5659,7 @@ namespace pugi PUGI__FN xml_attribute xml_node::append_attribute(const char_t* name_) { if (!impl::allow_insert_attribute(type())) return xml_attribute(); - + impl::xml_allocator& alloc = impl::get_allocator(_root); if (!alloc.reserve()) return xml_attribute(); @@ -5513,14 +5669,14 @@ namespace pugi impl::append_attribute(a._attr, _root); a.set_name(name_); - + return a; } PUGI__FN xml_attribute xml_node::prepend_attribute(const char_t* name_) { if (!impl::allow_insert_attribute(type())) return xml_attribute(); - + impl::xml_allocator& alloc = impl::get_allocator(_root); if (!alloc.reserve()) return xml_attribute(); @@ -5538,7 +5694,7 @@ namespace pugi { if (!impl::allow_insert_attribute(type())) return xml_attribute(); if (!attr || !impl::is_attribute_of(attr._attr, _root)) return xml_attribute(); - + impl::xml_allocator& alloc = impl::get_allocator(_root); if (!alloc.reserve()) return xml_attribute(); @@ -5556,7 +5712,7 @@ namespace pugi { if (!impl::allow_insert_attribute(type())) return xml_attribute(); if (!attr || !impl::is_attribute_of(attr._attr, _root)) return xml_attribute(); - + impl::xml_allocator& alloc = impl::get_allocator(_root); if (!alloc.reserve()) return xml_attribute(); @@ -5643,7 +5799,7 @@ namespace pugi PUGI__FN xml_node xml_node::append_child(xml_node_type type_) { if (!impl::allow_insert_child(type(), type_)) return xml_node(); - + impl::xml_allocator& alloc = impl::get_allocator(_root); if (!alloc.reserve()) return xml_node(); @@ -5663,12 +5819,12 @@ namespace pugi impl::xml_allocator& alloc = impl::get_allocator(_root); if (!alloc.reserve()) return xml_node(); - + xml_node n(impl::allocate_node(alloc, type_)); if (!n) return xml_node(); impl::prepend_node(n._root, _root); - + if (type_ == node_declaration) n.set_name(PUGIXML_TEXT("xml")); return n; @@ -5681,7 +5837,7 @@ namespace pugi impl::xml_allocator& alloc = impl::get_allocator(_root); if (!alloc.reserve()) return xml_node(); - + xml_node n(impl::allocate_node(alloc, type_)); if (!n) return xml_node(); @@ -5699,7 +5855,7 @@ namespace pugi impl::xml_allocator& alloc = impl::get_allocator(_root); if (!alloc.reserve()) return xml_node(); - + xml_node n(impl::allocate_node(alloc, type_)); if (!n) return xml_node(); @@ -5931,14 +6087,20 @@ namespace pugi // disable document_buffer_order optimization since in a document with multiple buffers comparing buffer pointers does not make sense doc->header |= impl::xml_memory_page_contents_shared_mask; - + // get extra buffer element (we'll store the document fragment buffer there so that we can deallocate it later) impl::xml_memory_page* page = 0; - impl::xml_extra_buffer* extra = static_cast(doc->allocate_memory(sizeof(impl::xml_extra_buffer), page)); + impl::xml_extra_buffer* extra = static_cast(doc->allocate_memory(sizeof(impl::xml_extra_buffer) + sizeof(void*), page)); (void)page; if (!extra) return impl::make_parse_result(status_out_of_memory); + #ifdef PUGIXML_COMPACT + // align the memory block to a pointer boundary; this is required for compact mode where memory allocations are only 4b aligned + // note that this requires up to sizeof(void*)-1 additional memory, which the allocation above takes into account + extra = reinterpret_cast((reinterpret_cast(extra) + (sizeof(void*) - 1)) & ~(sizeof(void*) - 1)); + #endif + // add extra buffer to the list extra->buffer = 0; extra->next = doc->extra_buffers; @@ -5953,7 +6115,7 @@ namespace pugi PUGI__FN xml_node xml_node::find_child_by_attribute(const char_t* name_, const char_t* attr_name, const char_t* attr_value) const { if (!_root) return xml_node(); - + for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling) if (i->name && impl::strequal(name_, i->name)) { @@ -5968,7 +6130,7 @@ namespace pugi PUGI__FN xml_node xml_node::find_child_by_attribute(const char_t* attr_name, const char_t* attr_value) const { if (!_root) return xml_node(); - + for (xml_node_struct* i = _root->first_child; i; i = i->next_sibling) for (xml_attribute_struct* a = i->first_attribute; a; a = a->next_attribute) if (a->name && impl::strequal(attr_name, a->name) && impl::strequal(attr_value, a->value ? a->value + 0 : PUGIXML_TEXT(""))) @@ -5998,7 +6160,7 @@ namespace pugi if (j != _root) result[--offset] = delimiter; - if (j->name && *j->name) + if (j->name) { size_t length = impl::strlength(j->name); @@ -6017,7 +6179,7 @@ namespace pugi { xml_node found = *this; // Current search context. - if (!_root || !path_ || !path_[0]) return found; + if (!_root || !path_[0]) return found; if (path_[0] == delimiter) { @@ -6063,48 +6225,47 @@ namespace pugi PUGI__FN bool xml_node::traverse(xml_tree_walker& walker) { walker._depth = -1; - - xml_node arg_begin = *this; + + xml_node arg_begin(_root); if (!walker.begin(arg_begin)) return false; - xml_node cur = first_child(); - + xml_node_struct* cur = _root ? _root->first_child + 0 : 0; + if (cur) { ++walker._depth; - do + do { - xml_node arg_for_each = cur; + xml_node arg_for_each(cur); if (!walker.for_each(arg_for_each)) return false; - - if (cur.first_child()) + + if (cur->first_child) { ++walker._depth; - cur = cur.first_child(); + cur = cur->first_child; } - else if (cur.next_sibling()) - cur = cur.next_sibling(); + else if (cur->next_sibling) + cur = cur->next_sibling; else { - // Borland C++ workaround - while (!cur.next_sibling() && cur != *this && !cur.parent().empty()) + while (!cur->next_sibling && cur != _root && cur->parent) { --walker._depth; - cur = cur.parent(); + cur = cur->parent; } - - if (cur != *this) - cur = cur.next_sibling(); + + if (cur != _root) + cur = cur->next_sibling; } } - while (cur && cur != *this); + while (cur && cur != _root); } assert(walker._depth == -1); - xml_node arg_end = *this; + xml_node arg_end(_root); return walker.end(arg_end); } @@ -6171,6 +6332,7 @@ namespace pugi return _root->value && (_root->header & impl::xml_memory_page_value_allocated_or_shared_mask) == 0 ? _root->value - doc.buffer : -1; default: + assert(false && "Invalid node type"); // unreachable return -1; } } @@ -6195,6 +6357,10 @@ namespace pugi { if (!_root || impl::is_text_node(_root)) return _root; + // element nodes can have value if parse_embed_pcdata was used + if (PUGI__NODETYPE(_root) == node_element && _root->value) + return _root; + for (xml_node_struct* node = _root->first_child; node; node = node->next_sibling) if (impl::is_text_node(node)) return node; @@ -6309,14 +6475,28 @@ namespace pugi { xml_node_struct* dn = _data_new(); - return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false; + return dn ? impl::set_value_integer(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs, rhs < 0) : false; } PUGI__FN bool xml_text::set(unsigned int rhs) { xml_node_struct* dn = _data_new(); - return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false; + return dn ? impl::set_value_integer(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs, false) : false; + } + + PUGI__FN bool xml_text::set(long rhs) + { + xml_node_struct* dn = _data_new(); + + return dn ? impl::set_value_integer(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs, rhs < 0) : false; + } + + PUGI__FN bool xml_text::set(unsigned long rhs) + { + xml_node_struct* dn = _data_new(); + + return dn ? impl::set_value_integer(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs, false) : false; } PUGI__FN bool xml_text::set(float rhs) @@ -6337,7 +6517,7 @@ namespace pugi { xml_node_struct* dn = _data_new(); - return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false; + return dn ? impl::set_value_bool(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false; } #ifdef PUGIXML_HAS_LONG_LONG @@ -6345,14 +6525,14 @@ namespace pugi { xml_node_struct* dn = _data_new(); - return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false; + return dn ? impl::set_value_integer(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs, rhs < 0) : false; } PUGI__FN bool xml_text::set(unsigned long long rhs) { xml_node_struct* dn = _data_new(); - return dn ? impl::set_value_convert(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs) : false; + return dn ? impl::set_value_integer(dn->value, dn->header, impl::xml_memory_page_value_allocated_mask, rhs, false) : false; } #endif @@ -6374,6 +6554,18 @@ namespace pugi return *this; } + PUGI__FN xml_text& xml_text::operator=(long rhs) + { + set(rhs); + return *this; + } + + PUGI__FN xml_text& xml_text::operator=(unsigned long rhs) + { + set(rhs); + return *this; + } + PUGI__FN xml_text& xml_text::operator=(double rhs) { set(rhs); @@ -6439,7 +6631,7 @@ namespace pugi { return _wrap._root == rhs._wrap._root && _parent._root == rhs._parent._root; } - + PUGI__FN bool xml_node_iterator::operator!=(const xml_node_iterator& rhs) const { return _wrap._root != rhs._wrap._root || _parent._root != rhs._parent._root; @@ -6454,7 +6646,7 @@ namespace pugi PUGI__FN xml_node* xml_node_iterator::operator->() const { assert(_wrap._root); - return const_cast(&_wrap); // BCC32 workaround + return const_cast(&_wrap); // BCC5 workaround } PUGI__FN const xml_node_iterator& xml_node_iterator::operator++() @@ -6500,7 +6692,7 @@ namespace pugi { return _wrap._attr == rhs._wrap._attr && _parent._root == rhs._parent._root; } - + PUGI__FN bool xml_attribute_iterator::operator!=(const xml_attribute_iterator& rhs) const { return _wrap._attr != rhs._wrap._attr || _parent._root != rhs._parent._root; @@ -6515,7 +6707,7 @@ namespace pugi PUGI__FN xml_attribute* xml_attribute_iterator::operator->() const { assert(_wrap._attr); - return const_cast(&_wrap); // BCC32 workaround + return const_cast(&_wrap); // BCC5 workaround } PUGI__FN const xml_attribute_iterator& xml_attribute_iterator::operator++() @@ -6576,7 +6768,7 @@ namespace pugi PUGI__FN xml_node* xml_named_node_iterator::operator->() const { assert(_wrap._root); - return const_cast(&_wrap); // BCC32 workaround + return const_cast(&_wrap); // BCC5 workaround } PUGI__FN const xml_named_node_iterator& xml_named_node_iterator::operator++() @@ -6657,18 +6849,37 @@ namespace pugi PUGI__FN xml_document::xml_document(): _buffer(0) { - create(); + _create(); } PUGI__FN xml_document::~xml_document() { - destroy(); + _destroy(); + } + +#ifdef PUGIXML_HAS_MOVE + PUGI__FN xml_document::xml_document(xml_document&& rhs) PUGIXML_NOEXCEPT_IF_NOT_COMPACT: _buffer(0) + { + _create(); + _move(rhs); + } + + PUGI__FN xml_document& xml_document::operator=(xml_document&& rhs) PUGIXML_NOEXCEPT_IF_NOT_COMPACT + { + if (this == &rhs) return *this; + + _destroy(); + _create(); + _move(rhs); + + return *this; } +#endif PUGI__FN void xml_document::reset() { - destroy(); - create(); + _destroy(); + _create(); } PUGI__FN void xml_document::reset(const xml_document& proto) @@ -6679,24 +6890,22 @@ namespace pugi append_copy(cur); } - PUGI__FN void xml_document::create() + PUGI__FN void xml_document::_create() { assert(!_root); #ifdef PUGIXML_COMPACT - const size_t page_offset = sizeof(uint32_t); + // space for page marker for the first page (uint32_t), rounded up to pointer size; assumes pointers are at least 32-bit + const size_t page_offset = sizeof(void*); #else const size_t page_offset = 0; #endif // initialize sentinel page - PUGI__STATIC_ASSERT(sizeof(impl::xml_memory_page) + sizeof(impl::xml_document_struct) + impl::xml_memory_page_alignment - sizeof(void*) + page_offset <= sizeof(_memory)); - - // align upwards to page boundary - void* page_memory = reinterpret_cast((reinterpret_cast(_memory) + (impl::xml_memory_page_alignment - 1)) & ~(impl::xml_memory_page_alignment - 1)); + PUGI__STATIC_ASSERT(sizeof(impl::xml_memory_page) + sizeof(impl::xml_document_struct) + page_offset <= sizeof(_memory)); // prepare page structure - impl::xml_memory_page* page = impl::xml_memory_page::construct(page_memory); + impl::xml_memory_page* page = impl::xml_memory_page::construct(_memory); assert(page); page->busy_size = impl::xml_memory_page_size; @@ -6715,11 +6924,16 @@ namespace pugi // setup sentinel page page->allocator = static_cast(_root); + // setup hash table pointer in allocator + #ifdef PUGIXML_COMPACT + page->allocator->_hash = &static_cast(_root)->hash; + #endif + // verify the document allocation assert(reinterpret_cast(_root) + sizeof(impl::xml_document_struct) <= _memory + sizeof(_memory)); } - PUGI__FN void xml_document::destroy() + PUGI__FN void xml_document::_destroy() { assert(_root); @@ -6758,6 +6972,113 @@ namespace pugi _root = 0; } +#ifdef PUGIXML_HAS_MOVE + PUGI__FN void xml_document::_move(xml_document& rhs) PUGIXML_NOEXCEPT_IF_NOT_COMPACT + { + impl::xml_document_struct* doc = static_cast(_root); + impl::xml_document_struct* other = static_cast(rhs._root); + + // save first child pointer for later; this needs hash access + xml_node_struct* other_first_child = other->first_child; + + #ifdef PUGIXML_COMPACT + // reserve space for the hash table up front; this is the only operation that can fail + // if it does, we have no choice but to throw (if we have exceptions) + if (other_first_child) + { + size_t other_children = 0; + for (xml_node_struct* node = other_first_child; node; node = node->next_sibling) + other_children++; + + // in compact mode, each pointer assignment could result in a hash table request + // during move, we have to relocate document first_child and parents of all children + // normally there's just one child and its parent has a pointerless encoding but + // we assume the worst here + if (!other->_hash->reserve(other_children + 1)) + { + #ifdef PUGIXML_NO_EXCEPTIONS + return; + #else + throw std::bad_alloc(); + #endif + } + } + #endif + + // move allocation state + doc->_root = other->_root; + doc->_busy_size = other->_busy_size; + + // move buffer state + doc->buffer = other->buffer; + doc->extra_buffers = other->extra_buffers; + _buffer = rhs._buffer; + + #ifdef PUGIXML_COMPACT + // move compact hash; note that the hash table can have pointers to other but they will be "inactive", similarly to nodes removed with remove_child + doc->hash = other->hash; + doc->_hash = &doc->hash; + + // make sure we don't access other hash up until the end when we reinitialize other document + other->_hash = 0; + #endif + + // move page structure + impl::xml_memory_page* doc_page = PUGI__GETPAGE(doc); + assert(doc_page && !doc_page->prev && !doc_page->next); + + impl::xml_memory_page* other_page = PUGI__GETPAGE(other); + assert(other_page && !other_page->prev); + + // relink pages since root page is embedded into xml_document + if (impl::xml_memory_page* page = other_page->next) + { + assert(page->prev == other_page); + + page->prev = doc_page; + + doc_page->next = page; + other_page->next = 0; + } + + // make sure pages point to the correct document state + for (impl::xml_memory_page* page = doc_page->next; page; page = page->next) + { + assert(page->allocator == other); + + page->allocator = doc; + + #ifdef PUGIXML_COMPACT + // this automatically migrates most children between documents and prevents ->parent assignment from allocating + if (page->compact_shared_parent == other) + page->compact_shared_parent = doc; + #endif + } + + // move tree structure + assert(!doc->first_child); + + doc->first_child = other_first_child; + + for (xml_node_struct* node = other_first_child; node; node = node->next_sibling) + { + #ifdef PUGIXML_COMPACT + // most children will have migrated when we reassigned compact_shared_parent + assert(node->parent == other || node->parent == doc); + + node->parent = doc; + #else + assert(node->parent == other); + node->parent = doc; + #endif + } + + // reset other document + new (other) impl::xml_document_struct(PUGI__GETPAGE(other)); + rhs._buffer = 0; + } +#endif + #ifndef PUGIXML_NO_STL PUGI__FN xml_parse_result xml_document::load(std::basic_istream >& stream, unsigned int options, xml_encoding encoding) { @@ -6796,7 +7117,7 @@ namespace pugi reset(); using impl::auto_deleter; // MSVC7 workaround - auto_deleter file(fopen(path_, "rb"), fclose); + auto_deleter file(fopen(path_, "rb"), impl::close_file); return impl::load_file_impl(static_cast(_root), file.data, options, encoding, &_buffer); } @@ -6806,7 +7127,7 @@ namespace pugi reset(); using impl::auto_deleter; // MSVC7 workaround - auto_deleter file(impl::open_file_wide(path_, L"rb"), fclose); + auto_deleter file(impl::open_file_wide(path_, L"rb"), impl::close_file); return impl::load_file_impl(static_cast(_root), file.data, options, encoding, &_buffer); } @@ -6879,7 +7200,7 @@ namespace pugi PUGI__FN bool xml_document::save_file(const char* path_, const char_t* indent, unsigned int flags, xml_encoding encoding) const { using impl::auto_deleter; // MSVC7 workaround - auto_deleter file(fopen(path_, (flags & format_save_file_text) ? "w" : "wb"), fclose); + auto_deleter file(fopen(path_, (flags & format_save_file_text) ? "w" : "wb"), impl::close_file); return impl::save_file_impl(*this, file.data, indent, flags, encoding); } @@ -6887,7 +7208,7 @@ namespace pugi PUGI__FN bool xml_document::save_file(const wchar_t* path_, const char_t* indent, unsigned int flags, xml_encoding encoding) const { using impl::auto_deleter; // MSVC7 workaround - auto_deleter file(impl::open_file_wide(path_, (flags & format_save_file_text) ? L"w" : L"wb"), fclose); + auto_deleter file(impl::open_file_wide(path_, (flags & format_save_file_text) ? L"w" : L"wb"), impl::close_file); return impl::save_file_impl(*this, file.data, indent, flags, encoding); } @@ -6915,14 +7236,14 @@ namespace pugi { return impl::as_utf8_impl(str.c_str(), str.size()); } - + PUGI__FN std::basic_string PUGIXML_FUNCTION as_wide(const char* str) { assert(str); return impl::as_wide_impl(str, strlen(str)); } - + PUGI__FN std::basic_string PUGIXML_FUNCTION as_wide(const std::string& str) { return impl::as_wide_impl(str.c_str(), str.size()); @@ -7023,14 +7344,14 @@ PUGI__NS_BEGIN } }; - template void swap(T& lhs, T& rhs) + template inline void swap(T& lhs, T& rhs) { T temp = lhs; lhs = rhs; rhs = temp; } - template I min_element(I begin, I end, const Pred& pred) + template PUGI__FN I min_element(I begin, I end, const Pred& pred) { I result = begin; @@ -7041,20 +7362,23 @@ PUGI__NS_BEGIN return result; } - template void reverse(I begin, I end) + template PUGI__FN void reverse(I begin, I end) { - while (end - begin > 1) swap(*begin++, *--end); + while (end - begin > 1) + swap(*begin++, *--end); } - template I unique(I begin, I end) + template PUGI__FN I unique(I begin, I end) { // fast skip head - while (end - begin > 1 && *begin != *(begin + 1)) begin++; + while (end - begin > 1 && *begin != *(begin + 1)) + begin++; - if (begin == end) return begin; + if (begin == end) + return begin; // last written element - I write = begin++; + I write = begin++; // merge unique elements while (begin != end) @@ -7069,134 +7393,79 @@ PUGI__NS_BEGIN return write + 1; } - template void copy_backwards(I begin, I end, I target) + template PUGI__FN void insertion_sort(T* begin, T* end, const Pred& pred) { - while (begin != end) *--target = *--end; - } - - template void insertion_sort(I begin, I end, const Pred& pred, T*) - { - assert(begin != end); + if (begin == end) + return; - for (I it = begin + 1; it != end; ++it) + for (T* it = begin + 1; it != end; ++it) { T val = *it; + T* hole = it; - if (pred(val, *begin)) + // move hole backwards + while (hole > begin && pred(val, *(hole - 1))) { - // move to front - copy_backwards(begin, it, it + 1); - *begin = val; + *hole = *(hole - 1); + hole--; } - else - { - I hole = it; - - // move hole backwards - while (pred(val, *(hole - 1))) - { - *hole = *(hole - 1); - hole--; - } - // fill hole with element - *hole = val; - } + // fill hole with element + *hole = val; } } - // std variant for elements with == - template void partition(I begin, I middle, I end, const Pred& pred, I* out_eqbeg, I* out_eqend) + template inline I median3(I first, I middle, I last, const Pred& pred) { - I eqbeg = middle, eqend = middle + 1; - - // expand equal range - while (eqbeg != begin && *(eqbeg - 1) == *eqbeg) --eqbeg; - while (eqend != end && *eqend == *eqbeg) ++eqend; - - // process outer elements - I ltend = eqbeg, gtbeg = eqend; - - for (;;) - { - // find the element from the right side that belongs to the left one - for (; gtbeg != end; ++gtbeg) - if (!pred(*eqbeg, *gtbeg)) - { - if (*gtbeg == *eqbeg) swap(*gtbeg, *eqend++); - else break; - } - - // find the element from the left side that belongs to the right one - for (; ltend != begin; --ltend) - if (!pred(*(ltend - 1), *eqbeg)) - { - if (*eqbeg == *(ltend - 1)) swap(*(ltend - 1), *--eqbeg); - else break; - } - - // scanned all elements - if (gtbeg == end && ltend == begin) - { - *out_eqbeg = eqbeg; - *out_eqend = eqend; - return; - } + if (pred(*middle, *first)) + swap(middle, first); + if (pred(*last, *middle)) + swap(last, middle); + if (pred(*middle, *first)) + swap(middle, first); - // make room for elements by moving equal area - if (gtbeg == end) - { - if (--ltend != --eqbeg) swap(*ltend, *eqbeg); - swap(*eqbeg, *--eqend); - } - else if (ltend == begin) - { - if (eqend != gtbeg) swap(*eqbeg, *eqend); - ++eqend; - swap(*gtbeg++, *eqbeg++); - } - else swap(*gtbeg++, *--ltend); - } + return middle; } - template void median3(I first, I middle, I last, const Pred& pred) + template PUGI__FN void partition3(T* begin, T* end, T pivot, const Pred& pred, T** out_eqbeg, T** out_eqend) { - if (pred(*middle, *first)) swap(*middle, *first); - if (pred(*last, *middle)) swap(*last, *middle); - if (pred(*middle, *first)) swap(*middle, *first); - } + // invariant: array is split into 4 groups: = < ? > (each variable denotes the boundary between the groups) + T* eq = begin; + T* lt = begin; + T* gt = end; - template void median(I first, I middle, I last, const Pred& pred) - { - if (last - first <= 40) + while (lt < gt) { - // median of three for small chunks - median3(first, middle, last, pred); + if (pred(*lt, pivot)) + lt++; + else if (*lt == pivot) + swap(*eq++, *lt++); + else + swap(*lt, *--gt); } - else - { - // median of nine - size_t step = (last - first + 1) / 8; - median3(first, first + step, first + 2 * step, pred); - median3(middle - step, middle, middle + step, pred); - median3(last - 2 * step, last - step, last, pred); - median3(first + step, middle, last - step, pred); - } + // we now have just 4 groups: = < >; move equal elements to the middle + T* eqbeg = gt; + + for (T* it = begin; it != eq; ++it) + swap(*it, *--eqbeg); + + *out_eqbeg = eqbeg; + *out_eqend = gt; } - template void sort(I begin, I end, const Pred& pred) + template PUGI__FN void sort(I begin, I end, const Pred& pred) { // sort large chunks - while (end - begin > 32) + while (end - begin > 16) { // find median element I middle = begin + (end - begin) / 2; - median(begin, middle, end - 1, pred); + I median = median3(begin, middle, end - 1, pred); // partition in three chunks (< = >) I eqbeg, eqend; - partition(begin, middle, end, pred, &eqbeg, &eqend); + partition3(begin, end, *median, pred, &eqbeg, &eqend); // loop on larger half if (eqbeg - begin > end - eqend) @@ -7212,52 +7481,80 @@ PUGI__NS_BEGIN } // insertion sort small chunk - if (begin != end) insertion_sort(begin, end, pred, &*begin); + insertion_sort(begin, end, pred); } -PUGI__NS_END -// Allocator used for AST and evaluation stacks -PUGI__NS_BEGIN - static const size_t xpath_memory_page_size = - #ifdef PUGIXML_MEMORY_XPATH_PAGE_SIZE - PUGIXML_MEMORY_XPATH_PAGE_SIZE - #else - 4096 - #endif - ; + PUGI__FN bool hash_insert(const void** table, size_t size, const void* key) + { + assert(key); - static const uintptr_t xpath_memory_block_alignment = sizeof(double) > sizeof(void*) ? sizeof(double) : sizeof(void*); + unsigned int h = static_cast(reinterpret_cast(key)); - struct xpath_memory_block - { - xpath_memory_block* next; - size_t capacity; + // MurmurHash3 32-bit finalizer + h ^= h >> 16; + h *= 0x85ebca6bu; + h ^= h >> 13; + h *= 0xc2b2ae35u; + h ^= h >> 16; - union + size_t hashmod = size - 1; + size_t bucket = h & hashmod; + + for (size_t probe = 0; probe <= hashmod; ++probe) + { + if (table[bucket] == 0) + { + table[bucket] = key; + return true; + } + + if (table[bucket] == key) + return false; + + // hash collision, quadratic probing + bucket = (bucket + probe + 1) & hashmod; + } + + assert(false && "Hash table is full"); // unreachable + return false; + } +PUGI__NS_END + +// Allocator used for AST and evaluation stacks +PUGI__NS_BEGIN + static const size_t xpath_memory_page_size = + #ifdef PUGIXML_MEMORY_XPATH_PAGE_SIZE + PUGIXML_MEMORY_XPATH_PAGE_SIZE + #else + 4096 + #endif + ; + + static const uintptr_t xpath_memory_block_alignment = sizeof(double) > sizeof(void*) ? sizeof(double) : sizeof(void*); + + struct xpath_memory_block + { + xpath_memory_block* next; + size_t capacity; + + union { char data[xpath_memory_page_size]; double alignment; }; }; - - class xpath_allocator + + struct xpath_allocator { xpath_memory_block* _root; size_t _root_size; + bool* _error; - public: - #ifdef PUGIXML_NO_EXCEPTIONS - jmp_buf* error_handler; - #endif - - xpath_allocator(xpath_memory_block* root, size_t root_size = 0): _root(root), _root_size(root_size) + xpath_allocator(xpath_memory_block* root, bool* error = 0): _root(root), _root_size(0), _error(error) { - #ifdef PUGIXML_NO_EXCEPTIONS - error_handler = 0; - #endif } - - void* allocate_nothrow(size_t size) + + void* allocate(size_t size) { // round size up to block alignment boundary size = (size + xpath_memory_block_alignment - 1) & ~(xpath_memory_block_alignment - 1); @@ -7278,33 +7575,20 @@ PUGI__NS_BEGIN size_t block_size = block_capacity + offsetof(xpath_memory_block, data); xpath_memory_block* block = static_cast(xml_memory::allocate(block_size)); - if (!block) return 0; - + if (!block) + { + if (_error) *_error = true; + return 0; + } + block->next = _root; block->capacity = block_capacity; - + _root = block; _root_size = size; - - return block->data; - } - } - void* allocate(size_t size) - { - void* result = allocate_nothrow(size); - - if (!result) - { - #ifdef PUGIXML_NO_EXCEPTIONS - assert(error_handler); - longjmp(*error_handler, 1); - #else - throw std::bad_alloc(); - #endif + return block->data; } - - return result; } void* reallocate(void* ptr, size_t old_size, size_t new_size) @@ -7316,33 +7600,35 @@ PUGI__NS_BEGIN // we can only reallocate the last object assert(ptr == 0 || static_cast(ptr) + old_size == &_root->data[0] + _root_size); - // adjust root size so that we have not allocated the object at all - bool only_object = (_root_size == old_size); - - if (ptr) _root_size -= old_size; + // try to reallocate the object inplace + if (ptr && _root_size - old_size + new_size <= _root->capacity) + { + _root_size = _root_size - old_size + new_size; + return ptr; + } - // allocate a new version (this will obviously reuse the memory if possible) + // allocate a new block void* result = allocate(new_size); - assert(result); + if (!result) return 0; // we have a new block - if (result != ptr && ptr) + if (ptr) { - // copy old data + // copy old data (we only support growing) assert(new_size >= old_size); memcpy(result, ptr, old_size); // free the previous page if it had no other objects - if (only_object) - { - assert(_root->data == result); - assert(_root->next); + assert(_root->data == result); + assert(_root->next); + if (_root->next->data == ptr) + { + // deallocate the whole page, unless it was the first one xpath_memory_block* next = _root->next->next; if (next) { - // deallocate the whole page, unless it was the first one xml_memory::deallocate(_root->next); _root->next = next; } @@ -7414,22 +7700,15 @@ PUGI__NS_BEGIN xpath_allocator result; xpath_allocator temp; xpath_stack stack; + bool oom; - #ifdef PUGIXML_NO_EXCEPTIONS - jmp_buf error_handler; - #endif - - xpath_stack_data(): result(blocks + 0), temp(blocks + 1) + xpath_stack_data(): result(blocks + 0, &oom), temp(blocks + 1, &oom), oom(false) { blocks[0].next = blocks[1].next = 0; blocks[0].capacity = blocks[1].capacity = sizeof(blocks[0].data); stack.result = &result; stack.temp = &temp; - - #ifdef PUGIXML_NO_EXCEPTIONS - result.error_handler = temp.error_handler = &error_handler; - #endif } ~xpath_stack_data() @@ -7451,7 +7730,7 @@ PUGI__NS_BEGIN static char_t* duplicate_string(const char_t* string, size_t length, xpath_allocator* alloc) { char_t* result = static_cast(alloc->allocate((length + 1) * sizeof(char_t))); - assert(result); + if (!result) return 0; memcpy(result, string, length * sizeof(char_t)); result[length] = 0; @@ -7480,9 +7759,13 @@ PUGI__NS_BEGIN { assert(begin <= end); + if (begin == end) + return xpath_string(); + size_t length = static_cast(end - begin); + const char_t* data = duplicate_string(begin, length, alloc); - return length == 0 ? xpath_string() : xpath_string(duplicate_string(begin, length, alloc), true, length); + return data ? xpath_string(data, true, length) : xpath_string(); } xpath_string(): _buffer(PUGIXML_TEXT("")), _uses_heap(false), _length_heap(0) @@ -7508,7 +7791,7 @@ PUGI__NS_BEGIN // allocate new buffer char_t* result = static_cast(alloc->reallocate(_uses_heap ? const_cast(_buffer) : 0, (target_length + 1) * sizeof(char_t), (result_length + 1) * sizeof(char_t))); - assert(result); + if (!result) return; // append first string to the new buffer in case there was no reallocation if (!_uses_heap) memcpy(result, _buffer, target_length * sizeof(char_t)); @@ -7533,15 +7816,18 @@ PUGI__NS_BEGIN { return _uses_heap ? _length_heap : strlength(_buffer); } - + char_t* data(xpath_allocator* alloc) { // make private heap copy if (!_uses_heap) { size_t length_ = strlength(_buffer); + const char_t* data_ = duplicate_string(_buffer, length_, alloc); - _buffer = duplicate_string(_buffer, length_, alloc); + if (!data_) return 0; + + _buffer = data_; _uses_heap = true; _length_heap = length_; } @@ -7623,14 +7909,18 @@ PUGI__NS_BEGIN case node_comment: case node_pi: return xpath_string::from_const(n.value()); - + case node_document: case node_element: { xpath_string result; + // element nodes can have value if parse_embed_pcdata was used + if (n.value()[0]) + result.append(xpath_string::from_const(n.value()), alloc); + xml_node cur = n.first_child(); - + while (cur && cur != n) { if (cur.type() == node_pcdata || cur.type() == node_cdata) @@ -7648,16 +7938,16 @@ PUGI__NS_BEGIN if (cur != n) cur = cur.next_sibling(); } } - + return result; } - + default: return xpath_string(); } } } - + PUGI__FN bool node_is_before_sibling(xml_node_struct* ln, xml_node_struct* rn) { assert(ln->parent == rn->parent); @@ -7681,7 +7971,7 @@ PUGI__NS_BEGIN // if rn sibling chain ended ln must be before rn return !rs; } - + PUGI__FN bool node_is_before(xml_node_struct* ln, xml_node_struct* rn) { // find common ancestor at the same depth, if any @@ -7732,9 +8022,9 @@ PUGI__NS_BEGIN return parent && node == parent; } - PUGI__FN const void* document_buffer_order(const xpath_node& XElement) + PUGI__FN const void* document_buffer_order(const xpath_node& xnode) { - xml_node_struct* node = XElement.node().internal_object(); + xml_node_struct* node = xnode.node().internal_object(); if (node) { @@ -7747,7 +8037,7 @@ PUGI__NS_BEGIN return 0; } - xml_attribute_struct* attr = XElement.attribute().internal_object(); + xml_attribute_struct* attr = xnode.attribute().internal_object(); if (attr) { @@ -7762,7 +8052,7 @@ PUGI__NS_BEGIN return 0; } - + struct document_order_comparator { bool operator()(const xpath_node& lhs, const xpath_node& rhs) const @@ -7786,10 +8076,10 @@ PUGI__NS_BEGIN for (xml_attribute a = lhs.attribute(); a; a = a.next_attribute()) if (a == rhs.attribute()) return true; - + return false; } - + // compare attribute parents ln = lhs.parent(); rn = rhs.parent(); @@ -7798,47 +8088,40 @@ PUGI__NS_BEGIN { // attributes go after the parent element if (lhs.parent() == rhs.node()) return false; - + ln = lhs.parent(); } else if (rhs.attribute()) { // attributes go after the parent element if (rhs.parent() == lhs.node()) return true; - + rn = rhs.parent(); } if (ln == rn) return false; if (!ln || !rn) return ln < rn; - + return node_is_before(ln.internal_object(), rn.internal_object()); } }; - struct duplicate_comparator - { - bool operator()(const xpath_node& lhs, const xpath_node& rhs) const - { - if (lhs.attribute()) return rhs.attribute() ? lhs.attribute() < rhs.attribute() : true; - else return rhs.attribute() ? false : lhs.node() < rhs.node(); - } - }; - PUGI__FN double gen_nan() { #if defined(__STDC_IEC_559__) || ((FLT_RADIX - 0 == 2) && (FLT_MAX_EXP - 0 == 128) && (FLT_MANT_DIG - 0 == 24)) - union { float f; uint32_t i; } u[sizeof(float) == sizeof(uint32_t) ? 1 : -1]; - u[0].i = 0x7fc00000; - return u[0].f; + PUGI__STATIC_ASSERT(sizeof(float) == sizeof(uint32_t)); + typedef uint32_t UI; // BCC5 workaround + union { float f; UI i; } u; + u.i = 0x7fc00000; + return double(u.f); #else // fallback const volatile double zero = 0.0; return zero / zero; #endif } - + PUGI__FN bool is_nan(double value) { #if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__) @@ -7851,7 +8134,7 @@ PUGI__NS_BEGIN return v != v; #endif } - + PUGI__FN const char_t* convert_number_to_string_special(double value) { #if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__) @@ -7883,12 +8166,12 @@ PUGI__NS_BEGIN return 0; #endif } - + PUGI__FN bool convert_number_to_boolean(double value) { return (value != 0 && !is_nan(value)); } - + PUGI__FN void truncate_zeros(char* begin, char* end) { while (begin != end && end[-1] == '0') end--; @@ -7898,11 +8181,11 @@ PUGI__NS_BEGIN // gets mantissa digits in the form of 0.xxxxx with 0. implied and the exponent #if defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 && !defined(_WIN32_WCE) - PUGI__FN void convert_number_to_mantissa_exponent(double value, char* buffer, size_t buffer_size, char** out_mantissa, int* out_exponent) + PUGI__FN void convert_number_to_mantissa_exponent(double value, char (&buffer)[32], char** out_mantissa, int* out_exponent) { // get base values int sign, exponent; - _ecvt_s(buffer, buffer_size, value, DBL_DIG + 1, &exponent, &sign); + _ecvt_s(buffer, sizeof(buffer), value, DBL_DIG + 1, &exponent, &sign); // truncate redundant zeros truncate_zeros(buffer, buffer + strlen(buffer)); @@ -7912,12 +8195,10 @@ PUGI__NS_BEGIN *out_exponent = exponent; } #else - PUGI__FN void convert_number_to_mantissa_exponent(double value, char* buffer, size_t buffer_size, char** out_mantissa, int* out_exponent) + PUGI__FN void convert_number_to_mantissa_exponent(double value, char (&buffer)[32], char** out_mantissa, int* out_exponent) { // get a scientific notation value with IEEE DBL_DIG decimals - sprintf(buffer, "%.*e", DBL_DIG, value); - assert(strlen(buffer) < buffer_size); - (void)!buffer_size; + PUGI__SNPRINTF(buffer, "%.*e", DBL_DIG, value); // get the exponent (possibly negative) char* exponent_string = strchr(buffer, 'e'); @@ -7954,12 +8235,12 @@ PUGI__NS_BEGIN char* mantissa; int exponent; - convert_number_to_mantissa_exponent(value, mantissa_buffer, sizeof(mantissa_buffer), &mantissa, &exponent); + convert_number_to_mantissa_exponent(value, mantissa_buffer, &mantissa, &exponent); // allocate a buffer of suitable length for the number size_t result_size = strlen(mantissa_buffer) + (exponent > 0 ? exponent : -exponent) + 4; char_t* result = static_cast(alloc->allocate(sizeof(char_t) * result_size)); - assert(result); + if (!result) return xpath_string(); // make the number! char_t* s = result; @@ -7976,7 +8257,7 @@ PUGI__NS_BEGIN { while (exponent > 0) { - assert(*mantissa == 0 || static_cast(static_cast(*mantissa) - '0') <= 9); + assert(*mantissa == 0 || static_cast(*mantissa - '0') <= 9); *s++ = *mantissa ? *mantissa++ : '0'; exponent--; } @@ -8009,7 +8290,7 @@ PUGI__NS_BEGIN return xpath_string::from_heap_preallocated(result, s); } - + PUGI__FN bool check_string_to_number_format(const char_t* string) { // parse leading whitespace @@ -8076,7 +8357,7 @@ PUGI__NS_BEGIN return true; } - + PUGI__FN double round_nearest(double value) { return floor(value + 0.5); @@ -8088,17 +8369,17 @@ PUGI__NS_BEGIN // ceil is used to differentiate between +0 and -0 (we return -0 for [-0.5, -0] and +0 for +0) return (value >= -0.5 && value <= 0) ? ceil(value) : floor(value + 0.5); } - + PUGI__FN const char_t* qualified_name(const xpath_node& node) { return node.attribute() ? node.attribute().name() : node.node().name(); } - + PUGI__FN const char_t* local_name(const xpath_node& node) { const char_t* name = qualified_name(node); const char_t* p = find_char(name, ':'); - + return p ? p + 1 : name; } @@ -8128,39 +8409,39 @@ PUGI__NS_BEGIN PUGI__FN const char_t* namespace_uri(xml_node node) { namespace_uri_predicate pred = node.name(); - + xml_node p = node; - + while (p) { xml_attribute a = p.find_attribute(pred); - + if (a) return a.value(); - + p = p.parent(); } - + return PUGIXML_TEXT(""); } PUGI__FN const char_t* namespace_uri(xml_attribute attr, xml_node parent) { namespace_uri_predicate pred = attr.name(); - + // Default namespace does not apply to attributes if (!pred.prefix) return PUGIXML_TEXT(""); - + xml_node p = parent; - + while (p) { xml_attribute a = p.find_attribute(pred); - + if (a) return a.value(); - + p = p.parent(); } - + return PUGIXML_TEXT(""); } @@ -8243,12 +8524,10 @@ PUGI__NS_BEGIN if (!table[i]) table[i] = static_cast(i); - void* result = alloc->allocate_nothrow(sizeof(table)); + void* result = alloc->allocate(sizeof(table)); + if (!result) return 0; - if (result) - { - memcpy(result, table, sizeof(table)); - } + memcpy(result, table, sizeof(table)); return static_cast(result); } @@ -8335,7 +8614,7 @@ PUGI__NS_BEGIN static const xpath_node_set dummy_node_set; - PUGI__FN unsigned int hash_string(const char_t* str) + PUGI__FN PUGI__UNSIGNED_OVERFLOW unsigned int hash_string(const char_t* str) { // Jenkins one-at-a-time hash (http://en.wikipedia.org/wiki/Jenkins_hash_function#one-at-a-time) unsigned int result = 0; @@ -8346,11 +8625,11 @@ PUGI__NS_BEGIN result += result << 10; result ^= result >> 6; } - + result += result << 3; result ^= result >> 11; result += result << 15; - + return result; } @@ -8418,7 +8697,7 @@ PUGI__NS_BEGIN break; default: - assert(!"Invalid variable type"); + assert(false && "Invalid variable type"); // unreachable } } @@ -8439,7 +8718,7 @@ PUGI__NS_BEGIN return lhs->set(static_cast(rhs)->value); default: - assert(!"Invalid variable type"); + assert(false && "Invalid variable type"); // unreachable return false; } } @@ -8504,9 +8783,9 @@ PUGI__NS_BEGIN else type = sorted; } - + if (type != order) reverse(begin, end); - + return order; } @@ -8526,7 +8805,7 @@ PUGI__NS_BEGIN return *min_element(begin, end, document_order_comparator()); default: - assert(!"Invalid node set type"); + assert(false && "Invalid node set type"); // unreachable return xpath_node(); } } @@ -8591,7 +8870,7 @@ PUGI__NS_BEGIN { // reallocate the old array or allocate a new one xpath_node* data = static_cast(alloc->reallocate(_begin, capacity * sizeof(xpath_node), (size_ + count) * sizeof(xpath_node))); - assert(data); + if (!data) return; // finalize _begin = data; @@ -8615,12 +8894,42 @@ PUGI__NS_BEGIN _end = pos; } - void remove_duplicates() + void remove_duplicates(xpath_allocator* alloc) { - if (_type == xpath_node_set::type_unsorted) - sort(_begin, _end, duplicate_comparator()); - - _end = unique(_begin, _end); + if (_type == xpath_node_set::type_unsorted && _end - _begin > 2) + { + xpath_allocator_capture cr(alloc); + + size_t size_ = static_cast(_end - _begin); + + size_t hash_size = 1; + while (hash_size < size_ + size_ / 2) hash_size *= 2; + + const void** hash_data = static_cast(alloc->allocate(hash_size * sizeof(void**))); + if (!hash_data) return; + + memset(hash_data, 0, hash_size * sizeof(const void**)); + + xpath_node* write = _begin; + + for (xpath_node* it = _begin; it != _end; ++it) + { + const void* attr = it->attribute().internal_object(); + const void* node = it->node().internal_object(); + const void* key = attr ? attr : node; + + if (key && hash_insert(hash_data, hash_size, key)) + { + *write++ = *it; + } + } + + _end = write; + } + else + { + _end = unique(_begin, _end); + } } xpath_node_set::type_t type() const @@ -8643,7 +8952,7 @@ PUGI__NS_BEGIN // reallocate the old array or allocate a new one xpath_node* data = static_cast(alloc->reallocate(_begin, capacity * sizeof(xpath_node), new_capacity * sizeof(xpath_node))); - assert(data); + if (!data) return; // finalize _begin = data; @@ -8727,12 +9036,12 @@ PUGI__NS_BEGIN { next(); } - + const char_t* state() const { return _cur; } - + void next() { const char_t* cur = _cur; @@ -8747,7 +9056,7 @@ PUGI__NS_BEGIN case 0: _cur_lexeme = lex_eof; break; - + case '>': if (*(cur+1) == '=') { @@ -8791,7 +9100,7 @@ PUGI__NS_BEGIN _cur_lexeme = lex_equal; break; - + case '+': cur += 1; _cur_lexeme = lex_plus; @@ -8815,7 +9124,7 @@ PUGI__NS_BEGIN _cur_lexeme = lex_union; break; - + case '$': cur += 1; @@ -8833,7 +9142,7 @@ PUGI__NS_BEGIN } _cur_lexeme_contents.end = cur; - + _cur_lexeme = lex_var_ref; } else @@ -8854,7 +9163,7 @@ PUGI__NS_BEGIN _cur_lexeme = lex_close_brace; break; - + case '[': cur += 1; _cur_lexeme = lex_open_square_brace; @@ -8885,7 +9194,7 @@ PUGI__NS_BEGIN _cur_lexeme = lex_slash; } break; - + case '.': if (*(cur+1) == '.') { @@ -8901,7 +9210,7 @@ PUGI__NS_BEGIN while (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++; _cur_lexeme_contents.end = cur; - + _cur_lexeme = lex_number; } else @@ -8927,7 +9236,7 @@ PUGI__NS_BEGIN _cur_lexeme_contents.begin = cur; while (*cur && *cur != terminator) cur++; _cur_lexeme_contents.end = cur; - + if (!*cur) _cur_lexeme = lex_none; else @@ -8957,7 +9266,7 @@ PUGI__NS_BEGIN _cur_lexeme_contents.begin = cur; while (PUGI__IS_CHARTYPEX(*cur, ctx_digit)) cur++; - + if (*cur == '.') { cur++; @@ -8977,11 +9286,11 @@ PUGI__NS_BEGIN if (cur[0] == ':') { - if (cur[1] == '*') // namespace coreest ncname:* + if (cur[1] == '*') // namespace test ncname:* { cur += 2; // :* } - else if (PUGI__IS_CHARTYPEX(cur[1], ctx_symbol)) // namespace coreest qname + else if (PUGI__IS_CHARTYPEX(cur[1], ctx_symbol)) // namespace test qname { cur++; // : @@ -8990,7 +9299,7 @@ PUGI__NS_BEGIN } _cur_lexeme_contents.end = cur; - + _cur_lexeme = lex_string; } else @@ -9101,7 +9410,7 @@ PUGI__NS_BEGIN axis_preceding_sibling, axis_self }; - + enum nodetest_t { nodetest_none, @@ -9136,7 +9445,7 @@ PUGI__NS_BEGIN }; template const axis_t axis_to_type::axis = N; - + class xpath_ast_node { private: @@ -9256,7 +9565,7 @@ PUGI__NS_BEGIN } } - assert(!"Wrong types"); + assert(false && "Wrong types"); // unreachable return false; } @@ -9331,7 +9640,7 @@ PUGI__NS_BEGIN } else { - assert(!"Wrong types"); + assert(false && "Wrong types"); // unreachable return false; } } @@ -9455,7 +9764,7 @@ PUGI__NS_BEGIN return true; } break; - + case nodetest_type_node: case nodetest_all: if (is_xpath_attribute(name)) @@ -9464,7 +9773,7 @@ PUGI__NS_BEGIN return true; } break; - + case nodetest_all_in_namespace: if (starts_with(name, _data.nodetest) && is_xpath_attribute(name)) { @@ -9472,14 +9781,14 @@ PUGI__NS_BEGIN return true; } break; - + default: ; } return false; } - + bool step_push(xpath_node_set_raw& ns, xml_node_struct* n, xpath_allocator* alloc) { assert(n); @@ -9495,11 +9804,11 @@ PUGI__NS_BEGIN return true; } break; - + case nodetest_type_node: ns.push_back(xml_node(n), alloc); return true; - + case nodetest_type_comment: if (type == node_comment) { @@ -9507,7 +9816,7 @@ PUGI__NS_BEGIN return true; } break; - + case nodetest_type_text: if (type == node_pcdata || type == node_cdata) { @@ -9515,7 +9824,7 @@ PUGI__NS_BEGIN return true; } break; - + case nodetest_type_pi: if (type == node_pi) { @@ -9523,7 +9832,7 @@ PUGI__NS_BEGIN return true; } break; - + case nodetest_pi: if (type == node_pi && n->name && strequal(n->name, _data.nodetest)) { @@ -9531,7 +9840,7 @@ PUGI__NS_BEGIN return true; } break; - + case nodetest_all: if (type == node_element) { @@ -9539,7 +9848,7 @@ PUGI__NS_BEGIN return true; } break; - + case nodetest_all_in_namespace: if (type == node_element && n->name && starts_with(n->name, _data.nodetest)) { @@ -9549,7 +9858,7 @@ PUGI__NS_BEGIN break; default: - assert(!"Unknown axis"); + assert(false && "Unknown axis"); // unreachable } return false; @@ -9566,33 +9875,33 @@ PUGI__NS_BEGIN for (xml_attribute_struct* a = n->first_attribute; a; a = a->next_attribute) if (step_push(ns, a, n, alloc) & once) return; - + break; } - + case axis_child: { for (xml_node_struct* c = n->first_child; c; c = c->next_sibling) if (step_push(ns, c, alloc) & once) return; - + break; } - + case axis_descendant: case axis_descendant_or_self: { if (axis == axis_descendant_or_self) if (step_push(ns, n, alloc) & once) return; - + xml_node_struct* cur = n->first_child; - + while (cur) { if (step_push(ns, cur, alloc) & once) return; - + if (cur->first_child) cur = cur->first_child; else @@ -9603,32 +9912,32 @@ PUGI__NS_BEGIN if (cur == n) return; } - + cur = cur->next_sibling; } } - + break; } - + case axis_following_sibling: { for (xml_node_struct* c = n->next_sibling; c; c = c->next_sibling) if (step_push(ns, c, alloc) & once) return; - + break; } - + case axis_preceding_sibling: { for (xml_node_struct* c = n->prev_sibling_c; c->next_sibling; c = c->prev_sibling_c) if (step_push(ns, c, alloc) & once) return; - + break; } - + case axis_following: { xml_node_struct* cur = n; @@ -9707,7 +10016,7 @@ PUGI__NS_BEGIN break; } - + case axis_ancestor: case axis_ancestor_or_self: { @@ -9716,15 +10025,15 @@ PUGI__NS_BEGIN return; xml_node_struct* cur = n->parent; - + while (cur) { if (step_push(ns, cur, alloc) & once) return; - + cur = cur->parent; } - + break; } @@ -9742,12 +10051,12 @@ PUGI__NS_BEGIN break; } - + default: - assert(!"Unimplemented axis"); + assert(false && "Unimplemented axis"); // unreachable } } - + template void step_fill(xpath_node_set_raw& ns, xml_attribute_struct* a, xml_node_struct* p, xpath_allocator* alloc, bool once, T v) { const axis_t axis = T::axis; @@ -9762,15 +10071,15 @@ PUGI__NS_BEGIN return; xml_node_struct* cur = p; - + while (cur) { if (step_push(ns, cur, alloc) & once) return; - + cur = cur->parent; } - + break; } @@ -9786,7 +10095,7 @@ PUGI__NS_BEGIN case axis_following: { xml_node_struct* cur = p; - + while (cur) { if (cur->first_child) @@ -9823,9 +10132,9 @@ PUGI__NS_BEGIN step_fill(ns, p, alloc, once, v); break; } - + default: - assert(!"Unimplemented axis"); + assert(false && "Unimplemented axis"); // unreachable } } @@ -9849,6 +10158,7 @@ PUGI__NS_BEGIN bool once = (axis == axis_attribute && _test == nodetest_name) || (!_right && eval_once(axis_type, eval)) || + // coverity[mixed_enums] (_right && !_right->_next && _right->_test == predicate_constant_one); xpath_node_set_raw ns; @@ -9867,7 +10177,7 @@ PUGI__NS_BEGIN // in general, all axes generate elements in a particular order, but there is no order guarantee if axis is applied to two nodes if (axis != axis_self && size != 0) ns.set_type(xpath_node_set::type_unsorted); - + step_fill(ns, *it, stack.result, once, v); if (_right) apply_predicates(ns, size, stack, eval); } @@ -9881,11 +10191,11 @@ PUGI__NS_BEGIN // child, attribute and self axes always generate unique set of nodes // for other axis, if the set stayed sorted, it stayed unique because the traversal algorithms do not visit the same node twice if (axis != axis_child && axis != axis_attribute && axis != axis_self && ns.type() == xpath_node_set::type_unsorted) - ns.remove_duplicates(); + ns.remove_duplicates(stack.temp); return ns; } - + public: xpath_ast_node(ast_type_t type, xpath_value_type rettype_, const char_t* value): _type(static_cast(type)), _rettype(static_cast(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0) @@ -9900,14 +10210,14 @@ PUGI__NS_BEGIN assert(type == ast_number_constant); _data.number = value; } - + xpath_ast_node(ast_type_t type, xpath_value_type rettype_, xpath_variable* value): _type(static_cast(type)), _rettype(static_cast(rettype_)), _axis(0), _test(0), _left(0), _right(0), _next(0) { assert(type == ast_variable); _data.variable = value; } - + xpath_ast_node(ast_type_t type, xpath_value_type rettype_, xpath_ast_node* left = 0, xpath_ast_node* right = 0): _type(static_cast(type)), _rettype(static_cast(rettype_)), _axis(0), _test(0), _left(left), _right(right), _next(0) { @@ -9942,25 +10252,25 @@ PUGI__NS_BEGIN { case ast_op_or: return _left->eval_boolean(c, stack) || _right->eval_boolean(c, stack); - + case ast_op_and: return _left->eval_boolean(c, stack) && _right->eval_boolean(c, stack); - + case ast_op_equal: return compare_eq(_left, _right, c, stack, equal_to()); case ast_op_not_equal: return compare_eq(_left, _right, c, stack, not_equal_to()); - + case ast_op_less: return compare_rel(_left, _right, c, stack, less()); - + case ast_op_greater: return compare_rel(_right, _left, c, stack, less()); case ast_op_less_or_equal: return compare_rel(_left, _right, c, stack, less_equal()); - + case ast_op_greater_or_equal: return compare_rel(_right, _left, c, stack, less_equal()); @@ -9986,43 +10296,43 @@ PUGI__NS_BEGIN case ast_func_boolean: return _left->eval_boolean(c, stack); - + case ast_func_not: return !_left->eval_boolean(c, stack); - + case ast_func_true: return true; - + case ast_func_false: return false; case ast_func_lang: { if (c.n.attribute()) return false; - + xpath_allocator_capture cr(stack.result); xpath_string lang = _left->eval_string(c, stack); - + for (xml_node n = c.n.node(); n; n = n.parent()) { xml_attribute a = n.attribute(PUGIXML_TEXT("xml:lang")); - + if (a) { const char_t* value = a.value(); - + // strnicmp / strncasecmp is not portable for (const char_t* lit = lang.c_str(); *lit; ++lit) { if (tolower_ascii(*lit) != tolower_ascii(*value)) return false; ++value; } - + return *value == 0 || *value == '-'; } } - + return false; } @@ -10041,25 +10351,24 @@ PUGI__NS_BEGIN if (_rettype == xpath_type_boolean) return _data.variable->get_boolean(); - - // fallthrough to type conversion } + // fallthrough default: { switch (_rettype) { case xpath_type_number: return convert_number_to_boolean(eval_number(c, stack)); - + case xpath_type_string: { xpath_allocator_capture cr(stack.result); return !eval_string(c, stack).empty(); } - - case xpath_type_node_set: + + case xpath_type_node_set: { xpath_allocator_capture cr(stack.result); @@ -10067,7 +10376,7 @@ PUGI__NS_BEGIN } default: - assert(!"Wrong expression for return type boolean"); + assert(false && "Wrong expression for return type boolean"); // unreachable return false; } } @@ -10080,7 +10389,7 @@ PUGI__NS_BEGIN { case ast_op_add: return _left->eval_number(c, stack) + _right->eval_number(c, stack); - + case ast_op_subtract: return _left->eval_number(c, stack) - _right->eval_number(c, stack); @@ -10101,7 +10410,7 @@ PUGI__NS_BEGIN case ast_func_last: return static_cast(c.size); - + case ast_func_position: return static_cast(c.position); @@ -10111,28 +10420,28 @@ PUGI__NS_BEGIN return static_cast(_left->eval_node_set(c, stack, nodeset_eval_all).size()); } - + case ast_func_string_length_0: { xpath_allocator_capture cr(stack.result); return static_cast(string_value(c.n, stack.result).length()); } - + case ast_func_string_length_1: { xpath_allocator_capture cr(stack.result); return static_cast(_left->eval_string(c, stack).length()); } - + case ast_func_number_0: { xpath_allocator_capture cr(stack.result); return convert_string_to_number(string_value(c.n, stack.result).c_str()); } - + case ast_func_number_1: return _left->eval_number(c, stack); @@ -10141,76 +10450,75 @@ PUGI__NS_BEGIN xpath_allocator_capture cr(stack.result); double r = 0; - + xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_all); - + for (const xpath_node* it = ns.begin(); it != ns.end(); ++it) { xpath_allocator_capture cri(stack.result); r += convert_string_to_number(string_value(*it, stack.result).c_str()); } - + return r; } case ast_func_floor: { double r = _left->eval_number(c, stack); - + return r == r ? floor(r) : r; } case ast_func_ceiling: { double r = _left->eval_number(c, stack); - + return r == r ? ceil(r) : r; } case ast_func_round: return round_nearest_nzero(_left->eval_number(c, stack)); - + case ast_variable: { assert(_rettype == _data.variable->type()); if (_rettype == xpath_type_number) return _data.variable->get_number(); - - // fallthrough to type conversion } + // fallthrough default: { switch (_rettype) { case xpath_type_boolean: return eval_boolean(c, stack) ? 1 : 0; - + case xpath_type_string: { xpath_allocator_capture cr(stack.result); return convert_string_to_number(eval_string(c, stack).c_str()); } - + case xpath_type_node_set: { xpath_allocator_capture cr(stack.result); return convert_string_to_number(eval_string(c, stack).c_str()); } - + default: - assert(!"Wrong expression for return type number"); + assert(false && "Wrong expression for return type number"); // unreachable return 0; } - + } } } - + xpath_string eval_string_concat(const xpath_context& c, const xpath_stack& stack) { assert(_type == ast_func_concat); @@ -10221,16 +10529,9 @@ PUGI__NS_BEGIN size_t count = 1; for (xpath_ast_node* nc = _right; nc; nc = nc->_next) count++; - // gather all strings - xpath_string static_buffer[4]; - xpath_string* buffer = static_buffer; - - // allocate on-heap for large concats - if (count > sizeof(static_buffer) / sizeof(static_buffer[0])) - { - buffer = static_cast(stack.temp->allocate(count * sizeof(xpath_string))); - assert(buffer); - } + // allocate a buffer for temporary string objects + xpath_string* buffer = static_cast(stack.temp->allocate(count * sizeof(xpath_string))); + if (!buffer) return xpath_string(); // evaluate all strings to temporary stack xpath_stack swapped_stack = {stack.temp, stack.result}; @@ -10247,7 +10548,7 @@ PUGI__NS_BEGIN // create final string char_t* result = static_cast(stack.result->allocate((length + 1) * sizeof(char_t))); - assert(result); + if (!result) return xpath_string(); char_t* ri = result; @@ -10266,11 +10567,11 @@ PUGI__NS_BEGIN { case ast_string_constant: return xpath_string::from_const(_data.string); - + case ast_func_local_name_0: { xpath_node na = c.n; - + return xpath_string::from_const(local_name(na)); } @@ -10280,14 +10581,14 @@ PUGI__NS_BEGIN xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first); xpath_node na = ns.first(); - + return xpath_string::from_const(local_name(na)); } case ast_func_name_0: { xpath_node na = c.n; - + return xpath_string::from_const(qualified_name(na)); } @@ -10297,14 +10598,14 @@ PUGI__NS_BEGIN xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first); xpath_node na = ns.first(); - + return xpath_string::from_const(qualified_name(na)); } case ast_func_namespace_uri_0: { xpath_node na = c.n; - + return xpath_string::from_const(namespace_uri(na)); } @@ -10314,7 +10615,7 @@ PUGI__NS_BEGIN xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first); xpath_node na = ns.first(); - + return xpath_string::from_const(namespace_uri(na)); } @@ -10337,10 +10638,10 @@ PUGI__NS_BEGIN xpath_string p = _right->eval_string(c, swapped_stack); const char_t* pos = find_substring(s.c_str(), p.c_str()); - + return pos ? xpath_string::from_heap(s.c_str(), pos, stack.result) : xpath_string(); } - + case ast_func_substring_after: { xpath_allocator_capture cr(stack.temp); @@ -10349,7 +10650,7 @@ PUGI__NS_BEGIN xpath_string s = _left->eval_string(c, swapped_stack); xpath_string p = _right->eval_string(c, swapped_stack); - + const char_t* pos = find_substring(s.c_str(), p.c_str()); if (!pos) return xpath_string(); @@ -10369,19 +10670,19 @@ PUGI__NS_BEGIN size_t s_length = s.length(); double first = round_nearest(_right->eval_number(c, stack)); - + if (is_nan(first)) return xpath_string(); // NaN else if (first >= s_length + 1) return xpath_string(); - + size_t pos = first < 1 ? 1 : static_cast(first); assert(1 <= pos && pos <= s_length + 1); const char_t* rbegin = s.c_str() + (pos - 1); const char_t* rend = s.c_str() + s.length(); - + return s.uses_heap() ? xpath_string::from_heap(rbegin, rend, stack.result) : xpath_string::from_const(rbegin); } - + case ast_func_substring_3: { xpath_allocator_capture cr(stack.temp); @@ -10393,12 +10694,12 @@ PUGI__NS_BEGIN double first = round_nearest(_right->eval_number(c, stack)); double last = first + round_nearest(_right->_next->eval_number(c, stack)); - + if (is_nan(first) || is_nan(last)) return xpath_string(); else if (first >= s_length + 1) return xpath_string(); else if (first >= last) return xpath_string(); else if (last < 1) return xpath_string(); - + size_t pos = first < 1 ? 1 : static_cast(first); size_t end = last >= s_length + 1 ? s_length + 1 : static_cast(last); @@ -10414,6 +10715,8 @@ PUGI__NS_BEGIN xpath_string s = string_value(c.n, stack.result); char_t* begin = s.data(stack.result); + if (!begin) return xpath_string(); + char_t* end = normalize_space(begin); return xpath_string::from_heap_preallocated(begin, end); @@ -10424,8 +10727,10 @@ PUGI__NS_BEGIN xpath_string s = _left->eval_string(c, stack); char_t* begin = s.data(stack.result); + if (!begin) return xpath_string(); + char_t* end = normalize_space(begin); - + return xpath_string::from_heap_preallocated(begin, end); } @@ -10440,6 +10745,8 @@ PUGI__NS_BEGIN xpath_string to = _right->_next->eval_string(c, swapped_stack); char_t* begin = s.data(stack.result); + if (!begin) return xpath_string(); + char_t* end = translate(begin, from.c_str(), to.c_str(), to.length()); return xpath_string::from_heap_preallocated(begin, end); @@ -10450,6 +10757,8 @@ PUGI__NS_BEGIN xpath_string s = _left->eval_string(c, stack); char_t* begin = s.data(stack.result); + if (!begin) return xpath_string(); + char_t* end = translate_table(begin, _data.table); return xpath_string::from_heap_preallocated(begin, end); @@ -10461,20 +10770,19 @@ PUGI__NS_BEGIN if (_rettype == xpath_type_string) return xpath_string::from_const(_data.variable->get_string()); - - // fallthrough to type conversion } + // fallthrough default: { switch (_rettype) { case xpath_type_boolean: return xpath_string::from_const(eval_boolean(c, stack) ? PUGIXML_TEXT("true") : PUGIXML_TEXT("false")); - + case xpath_type_number: return convert_number_to_string(eval_number(c, stack), stack.result); - + case xpath_type_node_set: { xpath_allocator_capture cr(stack.temp); @@ -10484,9 +10792,9 @@ PUGI__NS_BEGIN xpath_node_set_raw ns = eval_node_set(c, swapped_stack, nodeset_eval_first); return ns.empty() ? xpath_string() : string_value(ns.first(), stack.result); } - + default: - assert(!"Wrong expression for return type string"); + assert(false && "Wrong expression for return type string"); // unreachable return xpath_string(); } } @@ -10503,16 +10811,16 @@ PUGI__NS_BEGIN xpath_stack swapped_stack = {stack.temp, stack.result}; - xpath_node_set_raw ls = _left->eval_node_set(c, swapped_stack, eval); - xpath_node_set_raw rs = _right->eval_node_set(c, stack, eval); + xpath_node_set_raw ls = _left->eval_node_set(c, stack, eval); + xpath_node_set_raw rs = _right->eval_node_set(c, swapped_stack, eval); // we can optimize merging two sorted sets, but this is a very rare operation, so don't bother - rs.set_type(xpath_node_set::type_unsorted); + ls.set_type(xpath_node_set::type_unsorted); - rs.append(ls.begin(), ls.end(), stack.result); - rs.remove_duplicates(); + ls.append(rs.begin(), rs.end(), stack.result); + ls.remove_duplicates(stack.temp); - return rs; + return ls; } case ast_filter: @@ -10525,20 +10833,20 @@ PUGI__NS_BEGIN bool once = eval_once(set.type(), eval); apply_predicate(set, 0, stack, once); - + return set; } - + case ast_func_id: return xpath_node_set_raw(); - + case ast_step: { switch (_axis) { case axis_ancestor: return step_do(c, stack, eval, axis_to_type()); - + case axis_ancestor_or_self: return step_do(c, stack, eval, axis_to_type()); @@ -10547,7 +10855,7 @@ PUGI__NS_BEGIN case axis_child: return step_do(c, stack, eval, axis_to_type()); - + case axis_descendant: return step_do(c, stack, eval, axis_to_type()); @@ -10556,28 +10864,28 @@ PUGI__NS_BEGIN case axis_following: return step_do(c, stack, eval, axis_to_type()); - + case axis_following_sibling: return step_do(c, stack, eval, axis_to_type()); - + case axis_namespace: // namespaced axis is not supported return xpath_node_set_raw(); - + case axis_parent: return step_do(c, stack, eval, axis_to_type()); - + case axis_preceding: return step_do(c, stack, eval, axis_to_type()); case axis_preceding_sibling: return step_do(c, stack, eval, axis_to_type()); - + case axis_self: return step_do(c, stack, eval, axis_to_type()); default: - assert(!"Unknown axis"); + assert(false && "Unknown axis"); // unreachable return xpath_node_set_raw(); } } @@ -10611,22 +10919,27 @@ PUGI__NS_BEGIN return ns; } - - // fallthrough to type conversion } + // fallthrough default: - assert(!"Wrong expression for return type node set"); + assert(false && "Wrong expression for return type node set"); // unreachable return xpath_node_set_raw(); } } void optimize(xpath_allocator* alloc) { - if (_left) _left->optimize(alloc); - if (_right) _right->optimize(alloc); - if (_next) _next->optimize(alloc); + if (_left) + _left->optimize(alloc); + + if (_right) + _right->optimize(alloc); + + if (_next) + _next->optimize(alloc); + // coverity[var_deref_model] optimize_self(alloc); } @@ -10635,13 +10948,14 @@ PUGI__NS_BEGIN // Rewrite [position()=expr] with [expr] // Note that this step has to go before classification to recognize [position()=1] if ((_type == ast_filter || _type == ast_predicate) && + _right && // workaround for clang static analyzer (_right is never null for ast_filter/ast_predicate) _right->_type == ast_op_equal && _right->_left->_type == ast_func_position && _right->_right->_rettype == xpath_type_number) { _right = _right->_right; } // Classify filter/predicate ops to perform various optimizations during evaluation - if (_type == ast_filter || _type == ast_predicate) + if ((_type == ast_filter || _type == ast_predicate) && _right) // workaround for clang static analyzer (_right is never null for ast_filter/ast_predicate) { assert(_test == predicate_default); @@ -10657,8 +10971,8 @@ PUGI__NS_BEGIN // The former is a full form of //foo, the latter is much faster since it executes the node test immediately // Do a similar kind of rewrite for self/descendant/descendant-or-self axes // Note that we only rewrite positionally invariant steps (//foo[1] != /descendant::foo[1]) - if (_type == ast_step && (_axis == axis_child || _axis == axis_self || _axis == axis_descendant || _axis == axis_descendant_or_self) && _left && - _left->_type == ast_step && _left->_axis == axis_descendant_or_self && _left->_test == nodetest_type_node && !_left->_right && + if (_type == ast_step && (_axis == axis_child || _axis == axis_self || _axis == axis_descendant || _axis == axis_descendant_or_self) && + _left && _left->_type == ast_step && _left->_axis == axis_descendant_or_self && _left->_test == nodetest_type_node && !_left->_right && is_posinv_step()) { if (_axis == axis_child || _axis == axis_descendant) @@ -10670,7 +10984,9 @@ PUGI__NS_BEGIN } // Use optimized lookup table implementation for translate() with constant arguments - if (_type == ast_func_translate && _right->_type == ast_string_constant && _right->_next->_type == ast_string_constant) + if (_type == ast_func_translate && + _right && // workaround for clang static analyzer (_right is never null for ast_func_translate) + _right->_type == ast_string_constant && _right->_next->_type == ast_string_constant) { unsigned char* table = translate_table_generate(alloc, _right->_data.string, _right->_next->_data.string); @@ -10683,13 +10999,15 @@ PUGI__NS_BEGIN // Use optimized path for @attr = 'value' or @attr = $value if (_type == ast_op_equal && + _left && _right && // workaround for clang static analyzer and Coverity (_left and _right are never null for ast_op_equal) + // coverity[mixed_enums] _left->_type == ast_step && _left->_axis == axis_attribute && _left->_test == nodetest_name && !_left->_left && !_left->_right && (_right->_type == ast_string_constant || (_right->_type == ast_variable && _right->_rettype == xpath_type_string))) { _type = ast_opt_compare_attribute; } } - + bool is_posinv_expr() const { switch (_type) @@ -10713,10 +11031,10 @@ PUGI__NS_BEGIN default: if (_left && !_left->is_posinv_expr()) return false; - + for (xpath_ast_node* n = _right; n; n = n->_next) if (!n->is_posinv_expr()) return false; - + return true; } } @@ -10754,65 +11072,77 @@ PUGI__NS_BEGIN char_t _scratch[32]; - #ifdef PUGIXML_NO_EXCEPTIONS - jmp_buf _error_handler; - #endif - - void throw_error(const char* message) + xpath_ast_node* error(const char* message) { _result->error = message; _result->offset = _lexer.current_pos() - _query; - #ifdef PUGIXML_NO_EXCEPTIONS - longjmp(_error_handler, 1); - #else - throw xpath_exception(*_result); - #endif + return 0; } - void throw_error_oom() + xpath_ast_node* error_oom() { - #ifdef PUGIXML_NO_EXCEPTIONS - throw_error("Out of memory"); - #else - throw std::bad_alloc(); - #endif + assert(_alloc->_error); + *_alloc->_error = true; + + return 0; } void* alloc_node() { - void* result = _alloc->allocate_nothrow(sizeof(xpath_ast_node)); + return _alloc->allocate(sizeof(xpath_ast_node)); + } - if (!result) throw_error_oom(); + xpath_ast_node* alloc_node(ast_type_t type, xpath_value_type rettype, const char_t* value) + { + void* memory = alloc_node(); + return memory ? new (memory) xpath_ast_node(type, rettype, value) : 0; + } - return result; + xpath_ast_node* alloc_node(ast_type_t type, xpath_value_type rettype, double value) + { + void* memory = alloc_node(); + return memory ? new (memory) xpath_ast_node(type, rettype, value) : 0; } - const char_t* alloc_string(const xpath_lexer_string& value) + xpath_ast_node* alloc_node(ast_type_t type, xpath_value_type rettype, xpath_variable* value) { - if (value.begin) - { - size_t length = static_cast(value.end - value.begin); + void* memory = alloc_node(); + return memory ? new (memory) xpath_ast_node(type, rettype, value) : 0; + } - char_t* c = static_cast(_alloc->allocate_nothrow((length + 1) * sizeof(char_t))); - if (!c) throw_error_oom(); - assert(c); // workaround for clang static analysis + xpath_ast_node* alloc_node(ast_type_t type, xpath_value_type rettype, xpath_ast_node* left = 0, xpath_ast_node* right = 0) + { + void* memory = alloc_node(); + return memory ? new (memory) xpath_ast_node(type, rettype, left, right) : 0; + } - memcpy(c, value.begin, length * sizeof(char_t)); - c[length] = 0; + xpath_ast_node* alloc_node(ast_type_t type, xpath_ast_node* left, axis_t axis, nodetest_t test, const char_t* contents) + { + void* memory = alloc_node(); + return memory ? new (memory) xpath_ast_node(type, left, axis, test, contents) : 0; + } - return c; - } - else return 0; + xpath_ast_node* alloc_node(ast_type_t type, xpath_ast_node* left, xpath_ast_node* right, predicate_t test) + { + void* memory = alloc_node(); + return memory ? new (memory) xpath_ast_node(type, left, right, test) : 0; } - xpath_ast_node* parse_function_helper(ast_type_t type0, ast_type_t type1, size_t argc, xpath_ast_node* args[2]) + const char_t* alloc_string(const xpath_lexer_string& value) { - assert(argc <= 1); + if (!value.begin) + return PUGIXML_TEXT(""); + + size_t length = static_cast(value.end - value.begin); - if (argc == 1 && args[0]->rettype() != xpath_type_node_set) throw_error("Function has to be applied to node set"); + char_t* c = static_cast(_alloc->allocate((length + 1) * sizeof(char_t))); + if (!c) return 0; - return new (alloc_node()) xpath_ast_node(argc == 0 ? type0 : type1, xpath_type_string, args[0]); + memcpy(c, value.begin, length * sizeof(char_t)); + c[length] = 0; + + return c; } xpath_ast_node* parse_function(const xpath_lexer_string& name, size_t argc, xpath_ast_node* args[2]) @@ -10821,111 +11151,118 @@ PUGI__NS_BEGIN { case 'b': if (name == PUGIXML_TEXT("boolean") && argc == 1) - return new (alloc_node()) xpath_ast_node(ast_func_boolean, xpath_type_boolean, args[0]); - + return alloc_node(ast_func_boolean, xpath_type_boolean, args[0]); + break; - + case 'c': if (name == PUGIXML_TEXT("count") && argc == 1) { - if (args[0]->rettype() != xpath_type_node_set) throw_error("Function has to be applied to node set"); - return new (alloc_node()) xpath_ast_node(ast_func_count, xpath_type_number, args[0]); + if (args[0]->rettype() != xpath_type_node_set) return error("Function has to be applied to node set"); + return alloc_node(ast_func_count, xpath_type_number, args[0]); } else if (name == PUGIXML_TEXT("contains") && argc == 2) - return new (alloc_node()) xpath_ast_node(ast_func_contains, xpath_type_boolean, args[0], args[1]); + return alloc_node(ast_func_contains, xpath_type_boolean, args[0], args[1]); else if (name == PUGIXML_TEXT("concat") && argc >= 2) - return new (alloc_node()) xpath_ast_node(ast_func_concat, xpath_type_string, args[0], args[1]); + return alloc_node(ast_func_concat, xpath_type_string, args[0], args[1]); else if (name == PUGIXML_TEXT("ceiling") && argc == 1) - return new (alloc_node()) xpath_ast_node(ast_func_ceiling, xpath_type_number, args[0]); - + return alloc_node(ast_func_ceiling, xpath_type_number, args[0]); + break; - + case 'f': if (name == PUGIXML_TEXT("false") && argc == 0) - return new (alloc_node()) xpath_ast_node(ast_func_false, xpath_type_boolean); + return alloc_node(ast_func_false, xpath_type_boolean); else if (name == PUGIXML_TEXT("floor") && argc == 1) - return new (alloc_node()) xpath_ast_node(ast_func_floor, xpath_type_number, args[0]); - + return alloc_node(ast_func_floor, xpath_type_number, args[0]); + break; - + case 'i': if (name == PUGIXML_TEXT("id") && argc == 1) - return new (alloc_node()) xpath_ast_node(ast_func_id, xpath_type_node_set, args[0]); - + return alloc_node(ast_func_id, xpath_type_node_set, args[0]); + break; - + case 'l': if (name == PUGIXML_TEXT("last") && argc == 0) - return new (alloc_node()) xpath_ast_node(ast_func_last, xpath_type_number); + return alloc_node(ast_func_last, xpath_type_number); else if (name == PUGIXML_TEXT("lang") && argc == 1) - return new (alloc_node()) xpath_ast_node(ast_func_lang, xpath_type_boolean, args[0]); + return alloc_node(ast_func_lang, xpath_type_boolean, args[0]); else if (name == PUGIXML_TEXT("local-name") && argc <= 1) - return parse_function_helper(ast_func_local_name_0, ast_func_local_name_1, argc, args); - + { + if (argc == 1 && args[0]->rettype() != xpath_type_node_set) return error("Function has to be applied to node set"); + return alloc_node(argc == 0 ? ast_func_local_name_0 : ast_func_local_name_1, xpath_type_string, args[0]); + } + break; - + case 'n': if (name == PUGIXML_TEXT("name") && argc <= 1) - return parse_function_helper(ast_func_name_0, ast_func_name_1, argc, args); + { + if (argc == 1 && args[0]->rettype() != xpath_type_node_set) return error("Function has to be applied to node set"); + return alloc_node(argc == 0 ? ast_func_name_0 : ast_func_name_1, xpath_type_string, args[0]); + } else if (name == PUGIXML_TEXT("namespace-uri") && argc <= 1) - return parse_function_helper(ast_func_namespace_uri_0, ast_func_namespace_uri_1, argc, args); + { + if (argc == 1 && args[0]->rettype() != xpath_type_node_set) return error("Function has to be applied to node set"); + return alloc_node(argc == 0 ? ast_func_namespace_uri_0 : ast_func_namespace_uri_1, xpath_type_string, args[0]); + } else if (name == PUGIXML_TEXT("normalize-space") && argc <= 1) - return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_normalize_space_0 : ast_func_normalize_space_1, xpath_type_string, args[0], args[1]); + return alloc_node(argc == 0 ? ast_func_normalize_space_0 : ast_func_normalize_space_1, xpath_type_string, args[0], args[1]); else if (name == PUGIXML_TEXT("not") && argc == 1) - return new (alloc_node()) xpath_ast_node(ast_func_not, xpath_type_boolean, args[0]); + return alloc_node(ast_func_not, xpath_type_boolean, args[0]); else if (name == PUGIXML_TEXT("number") && argc <= 1) - return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_number_0 : ast_func_number_1, xpath_type_number, args[0]); - + return alloc_node(argc == 0 ? ast_func_number_0 : ast_func_number_1, xpath_type_number, args[0]); + break; - + case 'p': if (name == PUGIXML_TEXT("position") && argc == 0) - return new (alloc_node()) xpath_ast_node(ast_func_position, xpath_type_number); - + return alloc_node(ast_func_position, xpath_type_number); + break; - + case 'r': if (name == PUGIXML_TEXT("round") && argc == 1) - return new (alloc_node()) xpath_ast_node(ast_func_round, xpath_type_number, args[0]); + return alloc_node(ast_func_round, xpath_type_number, args[0]); break; - + case 's': if (name == PUGIXML_TEXT("string") && argc <= 1) - return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_0 : ast_func_string_1, xpath_type_string, args[0]); + return alloc_node(argc == 0 ? ast_func_string_0 : ast_func_string_1, xpath_type_string, args[0]); else if (name == PUGIXML_TEXT("string-length") && argc <= 1) - return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_length_0 : ast_func_string_length_1, xpath_type_number, args[0]); + return alloc_node(argc == 0 ? ast_func_string_length_0 : ast_func_string_length_1, xpath_type_number, args[0]); else if (name == PUGIXML_TEXT("starts-with") && argc == 2) - return new (alloc_node()) xpath_ast_node(ast_func_starts_with, xpath_type_boolean, args[0], args[1]); + return alloc_node(ast_func_starts_with, xpath_type_boolean, args[0], args[1]); else if (name == PUGIXML_TEXT("substring-before") && argc == 2) - return new (alloc_node()) xpath_ast_node(ast_func_substring_before, xpath_type_string, args[0], args[1]); + return alloc_node(ast_func_substring_before, xpath_type_string, args[0], args[1]); else if (name == PUGIXML_TEXT("substring-after") && argc == 2) - return new (alloc_node()) xpath_ast_node(ast_func_substring_after, xpath_type_string, args[0], args[1]); + return alloc_node(ast_func_substring_after, xpath_type_string, args[0], args[1]); else if (name == PUGIXML_TEXT("substring") && (argc == 2 || argc == 3)) - return new (alloc_node()) xpath_ast_node(argc == 2 ? ast_func_substring_2 : ast_func_substring_3, xpath_type_string, args[0], args[1]); + return alloc_node(argc == 2 ? ast_func_substring_2 : ast_func_substring_3, xpath_type_string, args[0], args[1]); else if (name == PUGIXML_TEXT("sum") && argc == 1) { - if (args[0]->rettype() != xpath_type_node_set) throw_error("Function has to be applied to node set"); - return new (alloc_node()) xpath_ast_node(ast_func_sum, xpath_type_number, args[0]); + if (args[0]->rettype() != xpath_type_node_set) return error("Function has to be applied to node set"); + return alloc_node(ast_func_sum, xpath_type_number, args[0]); } break; - + case 't': if (name == PUGIXML_TEXT("translate") && argc == 3) - return new (alloc_node()) xpath_ast_node(ast_func_translate, xpath_type_string, args[0], args[1]); + return alloc_node(ast_func_translate, xpath_type_string, args[0], args[1]); else if (name == PUGIXML_TEXT("true") && argc == 0) - return new (alloc_node()) xpath_ast_node(ast_func_true, xpath_type_boolean); - + return alloc_node(ast_func_true, xpath_type_boolean); + break; default: break; } - throw_error("Unrecognized function or wrong parameter count"); - - return 0; + return error("Unrecognized function or wrong parameter count"); } axis_t parse_axis_name(const xpath_lexer_string& name, bool& specified) @@ -10941,37 +11278,37 @@ PUGI__NS_BEGIN return axis_ancestor_or_self; else if (name == PUGIXML_TEXT("attribute")) return axis_attribute; - + break; - + case 'c': if (name == PUGIXML_TEXT("child")) return axis_child; - + break; - + case 'd': if (name == PUGIXML_TEXT("descendant")) return axis_descendant; else if (name == PUGIXML_TEXT("descendant-or-self")) return axis_descendant_or_self; - + break; - + case 'f': if (name == PUGIXML_TEXT("following")) return axis_following; else if (name == PUGIXML_TEXT("following-sibling")) return axis_following_sibling; - + break; - + case 'n': if (name == PUGIXML_TEXT("namespace")) return axis_namespace; - + break; - + case 'p': if (name == PUGIXML_TEXT("parent")) return axis_parent; @@ -10979,13 +11316,13 @@ PUGI__NS_BEGIN return axis_preceding; else if (name == PUGIXML_TEXT("preceding-sibling")) return axis_preceding_sibling; - + break; - + case 's': if (name == PUGIXML_TEXT("self")) return axis_self; - + break; default: @@ -11023,7 +11360,7 @@ PUGI__NS_BEGIN return nodetest_type_text; break; - + default: break; } @@ -11041,18 +11378,18 @@ PUGI__NS_BEGIN xpath_lexer_string name = _lexer.contents(); if (!_variables) - throw_error("Unknown variable: variable set is not provided"); + return error("Unknown variable: variable set is not provided"); xpath_variable* var = 0; if (!get_variable_scratch(_scratch, _variables, name.begin, name.end, &var)) - throw_error_oom(); + return error_oom(); if (!var) - throw_error("Unknown variable: variable set does not contain the given name"); + return error("Unknown variable: variable set does not contain the given name"); _lexer.next(); - return new (alloc_node()) xpath_ast_node(ast_variable, var->type(), var); + return alloc_node(ast_variable, var->type(), var); } case lex_open_brace: @@ -11060,9 +11397,10 @@ PUGI__NS_BEGIN _lexer.next(); xpath_ast_node* n = parse_expression(); + if (!n) return 0; if (_lexer.current() != lex_close_brace) - throw_error("Unmatched braces"); + return error("Expected ')' to match an opening '('"); _lexer.next(); @@ -11072,11 +11410,11 @@ PUGI__NS_BEGIN case lex_quoted_string: { const char_t* value = alloc_string(_lexer.contents()); + if (!value) return 0; - xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_string_constant, xpath_type_string, value); _lexer.next(); - return n; + return alloc_node(ast_string_constant, xpath_type_string, value); } case lex_number: @@ -11084,84 +11422,86 @@ PUGI__NS_BEGIN double value = 0; if (!convert_string_to_number_scratch(_scratch, _lexer.contents().begin, _lexer.contents().end, &value)) - throw_error_oom(); + return error_oom(); - xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_number_constant, xpath_type_number, value); _lexer.next(); - return n; + return alloc_node(ast_number_constant, xpath_type_number, value); } case lex_string: { xpath_ast_node* args[2] = {0}; size_t argc = 0; - + xpath_lexer_string function = _lexer.contents(); _lexer.next(); - + xpath_ast_node* last_arg = 0; - + if (_lexer.current() != lex_open_brace) - throw_error("Unrecognized function call"); + return error("Unrecognized function call"); _lexer.next(); - if (_lexer.current() != lex_close_brace) - args[argc++] = parse_expression(); - while (_lexer.current() != lex_close_brace) { - if (_lexer.current() != lex_comma) - throw_error("No comma between function arguments"); - _lexer.next(); - + if (argc > 0) + { + if (_lexer.current() != lex_comma) + return error("No comma between function arguments"); + _lexer.next(); + } + xpath_ast_node* n = parse_expression(); - + if (!n) return 0; + if (argc < 2) args[argc] = n; else last_arg->set_next(n); argc++; last_arg = n; } - + _lexer.next(); return parse_function(function, argc, args); } default: - throw_error("Unrecognizable primary expression"); - - return 0; + return error("Unrecognizable primary expression"); } } - + // FilterExpr ::= PrimaryExpr | FilterExpr Predicate // Predicate ::= '[' PredicateExpr ']' // PredicateExpr ::= Expr xpath_ast_node* parse_filter_expression() { xpath_ast_node* n = parse_primary_expression(); + if (!n) return 0; while (_lexer.current() == lex_open_square_brace) { _lexer.next(); - xpath_ast_node* expr = parse_expression(); + if (n->rettype() != xpath_type_node_set) + return error("Predicate has to be applied to node set"); - if (n->rettype() != xpath_type_node_set) throw_error("Predicate has to be applied to node set"); + xpath_ast_node* expr = parse_expression(); + if (!expr) return 0; - n = new (alloc_node()) xpath_ast_node(ast_filter, n, expr, predicate_default); + n = alloc_node(ast_filter, n, expr, predicate_default); + if (!n) return 0; if (_lexer.current() != lex_close_square_brace) - throw_error("Unmatched square brace"); - + return error("Expected ']' to match an opening '['"); + _lexer.next(); } - + return n; } - + // Step ::= AxisSpecifier NodeTest Predicate* | AbbreviatedStep // AxisSpecifier ::= AxisName '::' | '@'? // NodeTest ::= NameTest | NodeType '(' ')' | 'processing-instruction' '(' Literal ')' @@ -11170,7 +11510,7 @@ PUGI__NS_BEGIN xpath_ast_node* parse_step(xpath_ast_node* set) { if (set && set->rettype() != xpath_type_node_set) - throw_error("Step has to be applied to node set"); + return error("Step has to be applied to node set"); bool axis_specified = false; axis_t axis = axis_child; // implied child axis @@ -11179,25 +11519,31 @@ PUGI__NS_BEGIN { axis = axis_attribute; axis_specified = true; - + _lexer.next(); } else if (_lexer.current() == lex_dot) { _lexer.next(); - - return new (alloc_node()) xpath_ast_node(ast_step, set, axis_self, nodetest_type_node, 0); + + if (_lexer.current() == lex_open_square_brace) + return error("Predicates are not allowed after an abbreviated step"); + + return alloc_node(ast_step, set, axis_self, nodetest_type_node, 0); } else if (_lexer.current() == lex_double_dot) { _lexer.next(); - - return new (alloc_node()) xpath_ast_node(ast_step, set, axis_parent, nodetest_type_node, 0); + + if (_lexer.current() == lex_open_square_brace) + return error("Predicates are not allowed after an abbreviated step"); + + return alloc_node(ast_step, set, axis_parent, nodetest_type_node, 0); } - + nodetest_t nt_type = nodetest_none; xpath_lexer_string nt_name; - + if (_lexer.current() == lex_string) { // node name test @@ -11208,11 +11554,13 @@ PUGI__NS_BEGIN if (_lexer.current() == lex_double_colon) { // parse axis name - if (axis_specified) throw_error("Two axis specifiers in one step"); + if (axis_specified) + return error("Two axis specifiers in one step"); axis = parse_axis_name(nt_name, axis_specified); - if (!axis_specified) throw_error("Unknown axis"); + if (!axis_specified) + return error("Unknown axis"); // read actual node test _lexer.next(); @@ -11228,42 +11576,47 @@ PUGI__NS_BEGIN nt_name = _lexer.contents(); _lexer.next(); } - else throw_error("Unrecognized node test"); + else + { + return error("Unrecognized node test"); + } } - + if (nt_type == nodetest_none) { // node type test or processing-instruction if (_lexer.current() == lex_open_brace) { _lexer.next(); - + if (_lexer.current() == lex_close_brace) { _lexer.next(); nt_type = parse_node_test_type(nt_name); - if (nt_type == nodetest_none) throw_error("Unrecognized node type"); - + if (nt_type == nodetest_none) + return error("Unrecognized node type"); + nt_name = xpath_lexer_string(); } else if (nt_name == PUGIXML_TEXT("processing-instruction")) { if (_lexer.current() != lex_quoted_string) - throw_error("Only literals are allowed as arguments to processing-instruction()"); - + return error("Only literals are allowed as arguments to processing-instruction()"); + nt_type = nodetest_pi; nt_name = _lexer.contents(); _lexer.next(); - + if (_lexer.current() != lex_close_brace) - throw_error("Unmatched brace near processing-instruction()"); + return error("Unmatched brace near processing-instruction()"); _lexer.next(); } else - throw_error("Unmatched brace near node type test"); - + { + return error("Unmatched brace near node type test"); + } } // QName or NCName:* else @@ -11271,10 +11624,13 @@ PUGI__NS_BEGIN if (nt_name.end - nt_name.begin > 2 && nt_name.end[-2] == ':' && nt_name.end[-1] == '*') // NCName:* { nt_name.end--; // erase * - + nt_type = nodetest_all_in_namespace; } - else nt_type = nodetest_name; + else + { + nt_type = nodetest_name; + } } } } @@ -11283,52 +11639,66 @@ PUGI__NS_BEGIN nt_type = nodetest_all; _lexer.next(); } - else throw_error("Unrecognized node test"); - - xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step, set, axis, nt_type, alloc_string(nt_name)); - + else + { + return error("Unrecognized node test"); + } + + const char_t* nt_name_copy = alloc_string(nt_name); + if (!nt_name_copy) return 0; + + xpath_ast_node* n = alloc_node(ast_step, set, axis, nt_type, nt_name_copy); + if (!n) return 0; + xpath_ast_node* last = 0; - + while (_lexer.current() == lex_open_square_brace) { _lexer.next(); - + xpath_ast_node* expr = parse_expression(); + if (!expr) return 0; + + xpath_ast_node* pred = alloc_node(ast_predicate, 0, expr, predicate_default); + if (!pred) return 0; - xpath_ast_node* pred = new (alloc_node()) xpath_ast_node(ast_predicate, 0, expr, predicate_default); - if (_lexer.current() != lex_close_square_brace) - throw_error("Unmatched square brace"); + return error("Expected ']' to match an opening '['"); _lexer.next(); - + if (last) last->set_next(pred); else n->set_right(pred); - + last = pred; } return n; } - + // RelativeLocationPath ::= Step | RelativeLocationPath '/' Step | RelativeLocationPath '//' Step xpath_ast_node* parse_relative_location_path(xpath_ast_node* set) { xpath_ast_node* n = parse_step(set); - + if (!n) return 0; + while (_lexer.current() == lex_slash || _lexer.current() == lex_double_slash) { lexeme_t l = _lexer.current(); _lexer.next(); if (l == lex_double_slash) - n = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0); - + { + n = alloc_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0); + if (!n) return 0; + } + n = parse_step(n); + if (!n) return 0; } - + return n; } - + // LocationPath ::= RelativeLocationPath | AbsoluteLocationPath // AbsoluteLocationPath ::= '/' RelativeLocationPath? | '//' RelativeLocationPath xpath_ast_node* parse_location_path() @@ -11336,8 +11706,9 @@ PUGI__NS_BEGIN if (_lexer.current() == lex_slash) { _lexer.next(); - - xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step_root, xpath_type_node_set); + + xpath_ast_node* n = alloc_node(ast_step_root, xpath_type_node_set); + if (!n) return 0; // relative location path can start from axis_attribute, dot, double_dot, multiply and string lexemes; any other lexeme means standalone root path lexeme_t l = _lexer.current(); @@ -11350,17 +11721,20 @@ PUGI__NS_BEGIN else if (_lexer.current() == lex_double_slash) { _lexer.next(); - - xpath_ast_node* n = new (alloc_node()) xpath_ast_node(ast_step_root, xpath_type_node_set); - n = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0); - + + xpath_ast_node* n = alloc_node(ast_step_root, xpath_type_node_set); + if (!n) return 0; + + n = alloc_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0); + if (!n) return 0; + return parse_relative_location_path(n); } // else clause moved outside of if because of bogus warning 'control may reach end of non-void function being inlined' in gcc 4.0.1 return parse_relative_location_path(0); } - + // PathExpr ::= LocationPath // | FilterExpr // | FilterExpr '/' RelativeLocationPath @@ -11375,8 +11749,7 @@ PUGI__NS_BEGIN // PrimaryExpr begins with '$' in case of it being a variable reference, // '(' in case of it being an expression, string literal, number constant or // function call. - - if (_lexer.current() == lex_var_ref || _lexer.current() == lex_open_brace || + if (_lexer.current() == lex_var_ref || _lexer.current() == lex_open_brace || _lexer.current() == lex_quoted_string || _lexer.current() == lex_number || _lexer.current() == lex_string) { @@ -11384,29 +11757,34 @@ PUGI__NS_BEGIN { // This is either a function call, or not - if not, we shall proceed with location path const char_t* state = _lexer.state(); - + while (PUGI__IS_CHARTYPE(*state, ct_space)) ++state; - - if (*state != '(') return parse_location_path(); + + if (*state != '(') + return parse_location_path(); // This looks like a function call; however this still can be a node-test. Check it. - if (parse_node_test_type(_lexer.contents()) != nodetest_none) return parse_location_path(); + if (parse_node_test_type(_lexer.contents()) != nodetest_none) + return parse_location_path(); } - + xpath_ast_node* n = parse_filter_expression(); + if (!n) return 0; if (_lexer.current() == lex_slash || _lexer.current() == lex_double_slash) { lexeme_t l = _lexer.current(); _lexer.next(); - + if (l == lex_double_slash) { - if (n->rettype() != xpath_type_node_set) throw_error("Step has to be applied to node set"); + if (n->rettype() != xpath_type_node_set) + return error("Step has to be applied to node set"); - n = new (alloc_node()) xpath_ast_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0); + n = alloc_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0); + if (!n) return 0; } - + // select from location path return parse_relative_location_path(n); } @@ -11418,12 +11796,15 @@ PUGI__NS_BEGIN _lexer.next(); // precedence 7+ - only parses union expressions - xpath_ast_node* expr = parse_expression_rec(parse_path_or_unary_expression(), 7); + xpath_ast_node* n = parse_expression(7); + if (!n) return 0; - return new (alloc_node()) xpath_ast_node(ast_op_negate, xpath_type_number, expr); + return alloc_node(ast_op_negate, xpath_type_number, n); } else + { return parse_location_path(); + } } struct binary_op_t @@ -11501,20 +11882,23 @@ PUGI__NS_BEGIN _lexer.next(); xpath_ast_node* rhs = parse_path_or_unary_expression(); + if (!rhs) return 0; binary_op_t nextop = binary_op_t::parse(_lexer); while (nextop.asttype != ast_unknown && nextop.precedence > op.precedence) { rhs = parse_expression_rec(rhs, nextop.precedence); + if (!rhs) return 0; nextop = binary_op_t::parse(_lexer); } if (op.asttype == ast_op_union && (lhs->rettype() != xpath_type_node_set || rhs->rettype() != xpath_type_node_set)) - throw_error("Union operator has to be applied to node sets"); + return error("Union operator has to be applied to node sets"); - lhs = new (alloc_node()) xpath_ast_node(op.asttype, op.rettype, lhs, rhs); + lhs = alloc_node(op.asttype, op.rettype, lhs, rhs); + if (!lhs) return 0; op = binary_op_t::parse(_lexer); } @@ -11540,9 +11924,12 @@ PUGI__NS_BEGIN // | MultiplicativeExpr '*' UnaryExpr // | MultiplicativeExpr 'div' UnaryExpr // | MultiplicativeExpr 'mod' UnaryExpr - xpath_ast_node* parse_expression() + xpath_ast_node* parse_expression(int limit = 0) { - return parse_expression_rec(parse_path_or_unary_expression(), 0); + xpath_ast_node* n = parse_path_or_unary_expression(); + if (!n) return 0; + + return parse_expression_rec(n, limit); } xpath_parser(const char_t* query, xpath_variable_set* variables, xpath_allocator* alloc, xpath_parse_result* result): _alloc(alloc), _lexer(query), _query(query), _variables(variables), _result(result) @@ -11551,28 +11938,21 @@ PUGI__NS_BEGIN xpath_ast_node* parse() { - xpath_ast_node* result = parse_expression(); - + xpath_ast_node* n = parse_expression(); + if (!n) return 0; + + // check if there are unparsed tokens left if (_lexer.current() != lex_eof) - { - // there are still unparsed tokens left, error - throw_error("Incorrect query"); - } - - return result; + return error("Incorrect query"); + + return n; } static xpath_ast_node* parse(const char_t* query, xpath_variable_set* variables, xpath_allocator* alloc, xpath_parse_result* result) { xpath_parser parser(query, variables, alloc, result); - #ifdef PUGIXML_NO_EXCEPTIONS - int error = setjmp(parser._error_handler); - - return (error == 0) ? parser.parse() : 0; - #else return parser.parse(); - #endif } }; @@ -11595,7 +11975,7 @@ PUGI__NS_BEGIN xml_memory::deallocate(impl); } - xpath_query_impl(): root(0), alloc(&block) + xpath_query_impl(): root(0), alloc(&block, &oom), oom(false) { block.next = 0; block.capacity = sizeof(block.data); @@ -11604,21 +11984,9 @@ PUGI__NS_BEGIN xpath_ast_node* root; xpath_allocator alloc; xpath_memory_block block; + bool oom; }; - PUGI__FN xpath_string evaluate_string_impl(xpath_query_impl* impl, const xpath_node& n, xpath_stack_data& sd) - { - if (!impl) return xpath_string(); - - #ifdef PUGIXML_NO_EXCEPTIONS - if (setjmp(sd.error_handler)) return xpath_string(); - #endif - - xpath_context c(n, 1, 1); - - return impl->root->eval_string(c, sd.stack); - } - PUGI__FN impl::xpath_ast_node* evaluate_node_set_prepare(xpath_query_impl* impl) { if (!impl) return 0; @@ -11646,7 +12014,7 @@ namespace pugi { assert(_result.error); } - + PUGI__FN const char* xpath_exception::what() const throw() { return _result.error; @@ -11657,15 +12025,15 @@ namespace pugi return _result; } #endif - + PUGI__FN xpath_node::xpath_node() { } - + PUGI__FN xpath_node::xpath_node(const xml_node& node_): _node(node_) { } - + PUGI__FN xpath_node::xpath_node(const xml_attribute& attribute_, const xml_node& parent_): _node(attribute_ ? parent_ : xml_node()), _attribute(attribute_) { } @@ -11674,12 +12042,12 @@ namespace pugi { return _attribute ? xml_node() : _node; } - + PUGI__FN xml_attribute xpath_node::attribute() const { return _attribute; } - + PUGI__FN xml_node xpath_node::parent() const { return _attribute ? _node : _node.parent(); @@ -11693,7 +12061,7 @@ namespace pugi { return (_node || _attribute) ? unspecified_bool_xpath_node : 0; } - + PUGI__FN bool xpath_node::operator!() const { return !(_node || _attribute); @@ -11703,7 +12071,7 @@ namespace pugi { return _node == n._node && _attribute == n._attribute; } - + PUGI__FN bool xpath_node::operator!=(const xpath_node& n) const { return _node != n._node || _attribute != n._attribute; @@ -11727,78 +12095,65 @@ namespace pugi size_t size_ = static_cast(end_ - begin_); - if (size_ <= 1) - { - // deallocate old buffer - if (_begin != &_storage) impl::xml_memory::deallocate(_begin); - - // use internal buffer - if (begin_ != end_) _storage = *begin_; + // use internal buffer for 0 or 1 elements, heap buffer otherwise + xpath_node* storage = (size_ <= 1) ? _storage : static_cast(impl::xml_memory::allocate(size_ * sizeof(xpath_node))); - _begin = &_storage; - _end = &_storage + size_; - _type = type_; - } - else + if (!storage) { - // make heap copy - xpath_node* storage = static_cast(impl::xml_memory::allocate(size_ * sizeof(xpath_node))); + #ifdef PUGIXML_NO_EXCEPTIONS + return; + #else + throw std::bad_alloc(); + #endif + } - if (!storage) - { - #ifdef PUGIXML_NO_EXCEPTIONS - return; - #else - throw std::bad_alloc(); - #endif - } + // deallocate old buffer + if (_begin != _storage) + impl::xml_memory::deallocate(_begin); + // size check is necessary because for begin_ = end_ = nullptr, memcpy is UB + if (size_) memcpy(storage, begin_, size_ * sizeof(xpath_node)); - - // deallocate old buffer - if (_begin != &_storage) impl::xml_memory::deallocate(_begin); - // finalize - _begin = storage; - _end = storage + size_; - _type = type_; - } + _begin = storage; + _end = storage + size_; + _type = type_; } -#if __cplusplus >= 201103 - PUGI__FN void xpath_node_set::_move(xpath_node_set& rhs) +#ifdef PUGIXML_HAS_MOVE + PUGI__FN void xpath_node_set::_move(xpath_node_set& rhs) PUGIXML_NOEXCEPT { _type = rhs._type; - _storage = rhs._storage; - _begin = (rhs._begin == &rhs._storage) ? &_storage : rhs._begin; + _storage[0] = rhs._storage[0]; + _begin = (rhs._begin == rhs._storage) ? _storage : rhs._begin; _end = _begin + (rhs._end - rhs._begin); rhs._type = type_unsorted; - rhs._begin = &rhs._storage; - rhs._end = rhs._begin; + rhs._begin = rhs._storage; + rhs._end = rhs._storage; } #endif - PUGI__FN xpath_node_set::xpath_node_set(): _type(type_unsorted), _begin(&_storage), _end(&_storage) + PUGI__FN xpath_node_set::xpath_node_set(): _type(type_unsorted), _begin(_storage), _end(_storage) { } - PUGI__FN xpath_node_set::xpath_node_set(const_iterator begin_, const_iterator end_, type_t type_): _type(type_unsorted), _begin(&_storage), _end(&_storage) + PUGI__FN xpath_node_set::xpath_node_set(const_iterator begin_, const_iterator end_, type_t type_): _type(type_unsorted), _begin(_storage), _end(_storage) { _assign(begin_, end_, type_); } PUGI__FN xpath_node_set::~xpath_node_set() { - if (_begin != &_storage) + if (_begin != _storage) impl::xml_memory::deallocate(_begin); } - - PUGI__FN xpath_node_set::xpath_node_set(const xpath_node_set& ns): _type(type_unsorted), _begin(&_storage), _end(&_storage) + + PUGI__FN xpath_node_set::xpath_node_set(const xpath_node_set& ns): _type(type_unsorted), _begin(_storage), _end(_storage) { _assign(ns._begin, ns._end, ns._type); } - + PUGI__FN xpath_node_set& xpath_node_set::operator=(const xpath_node_set& ns) { if (this == &ns) return *this; @@ -11808,17 +12163,17 @@ namespace pugi return *this; } -#if __cplusplus >= 201103 - PUGI__FN xpath_node_set::xpath_node_set(xpath_node_set&& rhs): _type(type_unsorted), _begin(&_storage), _end(&_storage) +#ifdef PUGIXML_HAS_MOVE + PUGI__FN xpath_node_set::xpath_node_set(xpath_node_set&& rhs) PUGIXML_NOEXCEPT: _type(type_unsorted), _begin(_storage), _end(_storage) { _move(rhs); } - PUGI__FN xpath_node_set& xpath_node_set::operator=(xpath_node_set&& rhs) + PUGI__FN xpath_node_set& xpath_node_set::operator=(xpath_node_set&& rhs) PUGIXML_NOEXCEPT { if (this == &rhs) return *this; - if (_begin != &_storage) + if (_begin != _storage) impl::xml_memory::deallocate(_begin); _move(rhs); @@ -11831,17 +12186,17 @@ namespace pugi { return _type; } - + PUGI__FN size_t xpath_node_set::size() const { return _end - _begin; } - + PUGI__FN bool xpath_node_set::empty() const { return _begin == _end; } - + PUGI__FN const xpath_node& xpath_node_set::operator[](size_t index) const { assert(index < size()); @@ -11852,12 +12207,12 @@ namespace pugi { return _begin; } - + PUGI__FN xpath_node_set::const_iterator xpath_node_set::end() const { return _end; } - + PUGI__FN void xpath_node_set::sort(bool reverse) { _type = impl::xpath_sort(_begin, _end, _type, reverse); @@ -11903,7 +12258,7 @@ namespace pugi return static_cast(this)->name; default: - assert(!"Invalid variable type"); + assert(false && "Invalid variable type"); // unreachable return 0; } } @@ -12008,8 +12363,8 @@ namespace pugi return *this; } -#if __cplusplus >= 201103 - PUGI__FN xpath_variable_set::xpath_variable_set(xpath_variable_set&& rhs) +#ifdef PUGIXML_HAS_MOVE + PUGI__FN xpath_variable_set::xpath_variable_set(xpath_variable_set&& rhs) PUGIXML_NOEXCEPT { for (size_t i = 0; i < sizeof(_data) / sizeof(_data[0]); ++i) { @@ -12018,7 +12373,7 @@ namespace pugi } } - PUGI__FN xpath_variable_set& xpath_variable_set::operator=(xpath_variable_set&& rhs) + PUGI__FN xpath_variable_set& xpath_variable_set::operator=(xpath_variable_set&& rhs) PUGIXML_NOEXCEPT { for (size_t i = 0; i < sizeof(_data) / sizeof(_data[0]); ++i) { @@ -12189,6 +12544,15 @@ namespace pugi _impl = impl.release(); _result.error = 0; } + else + { + #ifdef PUGIXML_NO_EXCEPTIONS + if (qimpl->oom) _result.error = "Out of memory"; + #else + if (qimpl->oom) throw std::bad_alloc(); + throw xpath_exception(_result); + #endif + } } } @@ -12202,8 +12566,8 @@ namespace pugi impl::xpath_query_impl::destroy(static_cast(_impl)); } -#if __cplusplus >= 201103 - PUGI__FN xpath_query::xpath_query(xpath_query&& rhs) +#ifdef PUGIXML_HAS_MOVE + PUGI__FN xpath_query::xpath_query(xpath_query&& rhs) PUGIXML_NOEXCEPT { _impl = rhs._impl; _result = rhs._result; @@ -12211,7 +12575,7 @@ namespace pugi rhs._result = xpath_parse_result(); } - PUGI__FN xpath_query& xpath_query::operator=(xpath_query&& rhs) + PUGI__FN xpath_query& xpath_query::operator=(xpath_query&& rhs) PUGIXML_NOEXCEPT { if (this == &rhs) return *this; @@ -12237,37 +12601,63 @@ namespace pugi PUGI__FN bool xpath_query::evaluate_boolean(const xpath_node& n) const { if (!_impl) return false; - + impl::xpath_context c(n, 1, 1); impl::xpath_stack_data sd; - #ifdef PUGIXML_NO_EXCEPTIONS - if (setjmp(sd.error_handler)) return false; - #endif - - return static_cast(_impl)->root->eval_boolean(c, sd.stack); + bool r = static_cast(_impl)->root->eval_boolean(c, sd.stack); + + if (sd.oom) + { + #ifdef PUGIXML_NO_EXCEPTIONS + return false; + #else + throw std::bad_alloc(); + #endif + } + + return r; } - + PUGI__FN double xpath_query::evaluate_number(const xpath_node& n) const { if (!_impl) return impl::gen_nan(); - + impl::xpath_context c(n, 1, 1); impl::xpath_stack_data sd; - #ifdef PUGIXML_NO_EXCEPTIONS - if (setjmp(sd.error_handler)) return impl::gen_nan(); - #endif + double r = static_cast(_impl)->root->eval_number(c, sd.stack); + + if (sd.oom) + { + #ifdef PUGIXML_NO_EXCEPTIONS + return impl::gen_nan(); + #else + throw std::bad_alloc(); + #endif + } - return static_cast(_impl)->root->eval_number(c, sd.stack); + return r; } #ifndef PUGIXML_NO_STL PUGI__FN string_t xpath_query::evaluate_string(const xpath_node& n) const { + if (!_impl) return string_t(); + + impl::xpath_context c(n, 1, 1); impl::xpath_stack_data sd; - impl::xpath_string r = impl::evaluate_string_impl(static_cast(_impl), n, sd); + impl::xpath_string r = static_cast(_impl)->root->eval_string(c, sd.stack); + + if (sd.oom) + { + #ifdef PUGIXML_NO_EXCEPTIONS + return string_t(); + #else + throw std::bad_alloc(); + #endif + } return string_t(r.c_str(), r.length()); } @@ -12275,12 +12665,22 @@ namespace pugi PUGI__FN size_t xpath_query::evaluate_string(char_t* buffer, size_t capacity, const xpath_node& n) const { + impl::xpath_context c(n, 1, 1); impl::xpath_stack_data sd; - impl::xpath_string r = impl::evaluate_string_impl(static_cast(_impl), n, sd); + impl::xpath_string r = _impl ? static_cast(_impl)->root->eval_string(c, sd.stack) : impl::xpath_string(); + + if (sd.oom) + { + #ifdef PUGIXML_NO_EXCEPTIONS + r = impl::xpath_string(); + #else + throw std::bad_alloc(); + #endif + } size_t full_size = r.length() + 1; - + if (capacity > 0) { size_t size = (full_size < capacity) ? full_size : capacity; @@ -12289,7 +12689,7 @@ namespace pugi memcpy(buffer, r.c_str(), (size - 1) * sizeof(char_t)); buffer[size - 1] = 0; } - + return full_size; } @@ -12301,12 +12701,17 @@ namespace pugi impl::xpath_context c(n, 1, 1); impl::xpath_stack_data sd; - #ifdef PUGIXML_NO_EXCEPTIONS - if (setjmp(sd.error_handler)) return xpath_node_set(); - #endif - impl::xpath_node_set_raw r = root->eval_node_set(c, sd.stack, impl::nodeset_eval_all); + if (sd.oom) + { + #ifdef PUGIXML_NO_EXCEPTIONS + return xpath_node_set(); + #else + throw std::bad_alloc(); + #endif + } + return xpath_node_set(r.begin(), r.end(), r.type()); } @@ -12318,12 +12723,17 @@ namespace pugi impl::xpath_context c(n, 1, 1); impl::xpath_stack_data sd; - #ifdef PUGIXML_NO_EXCEPTIONS - if (setjmp(sd.error_handler)) return xpath_node(); - #endif - impl::xpath_node_set_raw r = root->eval_node_set(c, sd.stack, impl::nodeset_eval_first); + if (sd.oom) + { + #ifdef PUGIXML_NO_EXCEPTIONS + return xpath_node(); + #else + throw std::bad_alloc(); + #endif + } + return r.first(); } @@ -12349,7 +12759,7 @@ namespace pugi PUGI__FN xpath_node xml_node::select_node(const char_t* query, xpath_variable_set* variables) const { xpath_query q(query, variables); - return select_node(q); + return q.evaluate_node(*this); } PUGI__FN xpath_node xml_node::select_node(const xpath_query& query) const @@ -12360,7 +12770,7 @@ namespace pugi PUGI__FN xpath_node_set xml_node::select_nodes(const char_t* query, xpath_variable_set* variables) const { xpath_query q(query, variables); - return select_nodes(q); + return q.evaluate_node_set(*this); } PUGI__FN xpath_node_set xml_node::select_nodes(const xpath_query& query) const @@ -12371,7 +12781,7 @@ namespace pugi PUGI__FN xpath_node xml_node::select_single_node(const char_t* query, xpath_variable_set* variables) const { xpath_query q(query, variables); - return select_single_node(q); + return q.evaluate_node(*this); } PUGI__FN xpath_node xml_node::select_single_node(const xpath_query& query) const @@ -12392,16 +12802,23 @@ namespace pugi # pragma warning(pop) #endif +#if defined(_MSC_VER) && defined(__c2__) +# pragma clang diagnostic pop +#endif + // Undefine all local macros (makes sure we're not leaking macros in header-only mode) #undef PUGI__NO_INLINE #undef PUGI__UNLIKELY #undef PUGI__STATIC_ASSERT #undef PUGI__DMC_VOLATILE +#undef PUGI__UNSIGNED_OVERFLOW #undef PUGI__MSVC_CRT_VERSION +#undef PUGI__SNPRINTF #undef PUGI__NS_BEGIN #undef PUGI__NS_END #undef PUGI__FN #undef PUGI__FN_NO_INLINE +#undef PUGI__GETHEADER_IMPL #undef PUGI__GETPAGE_IMPL #undef PUGI__GETPAGE #undef PUGI__NODETYPE @@ -12422,10 +12839,8 @@ namespace pugi #endif -#pragma clang diagnostic pop - /** - * Copyright (c) 2006-2015 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 @@ -12438,7 +12853,7 @@ namespace pugi * * 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 diff --git a/Sourcecode/private/mx/pugixml/pugixml.hpp b/Sourcecode/private/extern/ezxml/src/private/private/pugixml.hpp old mode 100755 new mode 100644 similarity index 91% rename from Sourcecode/private/mx/pugixml/pugixml.hpp rename to Sourcecode/private/extern/ezxml/src/private/private/pugixml.hpp index cd833c042..da8ff36c0 --- a/Sourcecode/private/mx/pugixml/pugixml.hpp +++ b/Sourcecode/private/extern/ezxml/src/private/private/pugixml.hpp @@ -1,8 +1,8 @@ /** - * pugixml parser - version 1.7 + * pugixml parser - version 1.10 * -------------------------------------------------------- - * Copyright (C) 2006-2015, 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,12 +12,13 @@ */ #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) -#include "mx/pugixml/pugiconfig.hpp" +#include "pugiconfig.hpp" #ifndef HEADER_PUGIXML_HPP #define HEADER_PUGIXML_HPP @@ -72,6 +73,44 @@ # 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 +#endif + // Character interface macros #ifdef PUGIXML_WCHAR_MODE # define PUGIXML_TEXT(t) L ## t @@ -133,13 +172,13 @@ namespace pugi // This flag determines if EOL characters are normalized (converted to #xA) during parsing. This flag is on by default. const unsigned int parse_eol = 0x0020; - + // This flag determines if attribute values are normalized using CDATA normalization rules during parsing. This flag is on by default. const unsigned int parse_wconv_attribute = 0x0040; // This flag determines if attribute values are normalized using NMTOKENS normalization rules during parsing. This flag is off by default. const unsigned int parse_wnorm_attribute = 0x0080; - + // This flag determines if document declaration (node_declaration) is added to the DOM tree. This flag is off by default. const unsigned int parse_declaration = 0x0100; @@ -158,6 +197,11 @@ namespace pugi // is a valid document. This flag is off by default. const unsigned int parse_fragment = 0x1000; + // This flag determines if plain character data is be stored in the parent element's value. This significantly changes the structure of + // the document; this flag is only recommended for parsing documents with many PCDATA nodes in memory-constrained environments. + // This flag is off by default. + const unsigned int parse_embed_pcdata = 0x2000; + // The default parsing mode. // Elements, PCDATA and CDATA sections are added to the DOM tree, character/reference entities are expanded, // End-of-Line characters are normalized, attribute values are normalized using CDATA normalization rules. @@ -184,16 +228,16 @@ namespace pugi }; // Formatting flags - + // Indent the nodes that are written to output stream with as many indentation strings as deep the node is in DOM tree. This flag is on by default. const unsigned int format_indent = 0x01; - + // Write encoding-specific BOM to the output stream. This flag is off by default. const unsigned int format_write_bom = 0x02; // Use raw output mode (no indentation and no line breaks are written). This flag is off by default. const unsigned int format_raw = 0x04; - + // Omit default XML declaration even if there is no declaration in the document. This flag is off by default. const unsigned int format_no_declaration = 0x08; @@ -206,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; @@ -225,7 +278,7 @@ namespace pugi class xml_node; class xml_text; - + #ifndef PUGIXML_NO_XPATH class xpath_node; class xpath_node_set; @@ -268,7 +321,7 @@ namespace pugi // Construct writer from a FILE* object; void* is used to avoid header dependencies on stdio xml_writer_file(void* file); - virtual void write(const void* data, size_t size); + virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE; private: void* file; @@ -283,7 +336,7 @@ namespace pugi xml_writer_stream(std::basic_ostream >& stream); xml_writer_stream(std::basic_ostream >& stream); - virtual void write(const void* data, size_t size); + virtual void write(const void* data, size_t size) PUGIXML_OVERRIDE; private: std::basic_ostream >* narrow_stream; @@ -299,13 +352,13 @@ namespace pugi private: xml_attribute_struct* _attr; - + typedef void (*unspecified_bool_type)(xml_attribute***); public: // Default constructor. Constructs an empty attribute. xml_attribute(); - + // Constructs attribute from internal pointer explicit xml_attribute(xml_attribute_struct* attr); @@ -354,6 +407,8 @@ namespace pugi // Set attribute value with type conversion (numbers are converted to strings, boolean is converted to "true"/"false") bool set_value(int rhs); bool set_value(unsigned int rhs); + bool set_value(long rhs); + bool set_value(unsigned long rhs); bool set_value(double rhs); bool set_value(float rhs); bool set_value(bool rhs); @@ -367,6 +422,8 @@ namespace pugi xml_attribute& operator=(const char_t* rhs); xml_attribute& operator=(int rhs); xml_attribute& operator=(unsigned int rhs); + xml_attribute& operator=(long rhs); + xml_attribute& operator=(unsigned long rhs); xml_attribute& operator=(double rhs); xml_attribute& operator=(float rhs); xml_attribute& operator=(bool rhs); @@ -417,7 +474,7 @@ namespace pugi // Borland C++ workaround bool operator!() const; - + // Comparison operators (compares wrapped node pointers) bool operator==(const xml_node& r) const; bool operator!=(const xml_node& r) const; @@ -438,7 +495,7 @@ namespace pugi // Get node value, or "" if node is empty or it has no value // Note: For text node.value() does not return "text"! Use child_value() or text() methods to access text inside nodes. const char_t* value() const; - + // Get attribute list xml_attribute first_attribute() const; xml_attribute last_attribute() const; @@ -450,7 +507,7 @@ namespace pugi // Get next/previous sibling in the children list of the parent node xml_node next_sibling() const; xml_node previous_sibling() const; - + // Get parent node xml_node parent() const; @@ -478,7 +535,7 @@ namespace pugi // Set node name/value (returns false if node is empty, there is not enough memory, or node can not have name/value) bool set_name(const char_t* rhs); bool set_value(const char_t* rhs); - + // Add attribute with specified name. Returns added attribute, or empty attribute on errors. xml_attribute append_attribute(const char_t* name); xml_attribute prepend_attribute(const char_t* name); @@ -532,11 +589,11 @@ namespace pugi template xml_attribute find_attribute(Predicate pred) const { if (!_root) return xml_attribute(); - + for (xml_attribute attrib = first_attribute(); attrib; attrib = attrib.next_attribute()) if (pred(attrib)) return attrib; - + return xml_attribute(); } @@ -544,11 +601,11 @@ namespace pugi template xml_node find_child(Predicate pred) const { if (!_root) return xml_node(); - + for (xml_node node = first_child(); node; node = node.next_sibling()) if (pred(node)) return node; - + return xml_node(); } @@ -558,7 +615,7 @@ namespace pugi if (!_root) return xml_node(); xml_node cur = first_child(); - + while (cur._root && cur._root != _root) { if (pred(cur)) return cur; @@ -590,7 +647,7 @@ namespace pugi // Recursively traverse subtree with xml_tree_walker bool traverse(xml_tree_walker& walker); - + #ifndef PUGIXML_NO_XPATH // Select single node by evaluating XPath query. Returns first node from the resulting node set. xpath_node select_node(const char_t* query, xpath_variable_set* variables = 0) const; @@ -601,11 +658,11 @@ 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 - + // Print subtree using a writer object void print(xml_writer& writer, const char_t* indent = PUGIXML_TEXT("\t"), unsigned int flags = format_default, xml_encoding encoding = encoding_auto, unsigned int depth = 0) const; @@ -701,6 +758,8 @@ namespace pugi // Set text with type conversion (numbers are converted to strings, boolean is converted to "true"/"false") bool set(int rhs); bool set(unsigned int rhs); + bool set(long rhs); + bool set(unsigned long rhs); bool set(double rhs); bool set(float rhs); bool set(bool rhs); @@ -714,6 +773,8 @@ namespace pugi xml_text& operator=(const char_t* rhs); xml_text& operator=(int rhs); xml_text& operator=(unsigned int rhs); + xml_text& operator=(long rhs); + xml_text& operator=(unsigned long rhs); xml_text& operator=(double rhs); xml_text& operator=(float rhs); xml_text& operator=(bool rhs); @@ -867,11 +928,11 @@ namespace pugi private: int _depth; - + protected: // Get current traversal depth int depth() const; - + public: xml_tree_walker(); virtual ~xml_tree_walker(); @@ -942,13 +1003,14 @@ namespace pugi char_t* _buffer; char _memory[192]; - + // Non-copyable semantics 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 @@ -957,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(); @@ -970,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); @@ -1051,7 +1119,7 @@ namespace pugi // Non-copyable semantics xpath_variable(const xpath_variable&); xpath_variable& operator=(const xpath_variable&); - + public: // Get variable name const char_t* name() const; @@ -1095,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 @@ -1139,29 +1207,29 @@ 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 xpath_value_type return_type() const; - + // Evaluate expression as boolean value in the specified context; performs type conversion if necessary. // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors. bool evaluate_boolean(const xpath_node& n) const; - + // Evaluate expression as double value in the specified context; performs type conversion if necessary. // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors. double evaluate_number(const xpath_node& n) const; - + #ifndef PUGIXML_NO_STL // Evaluate expression as string value in the specified context; performs type conversion if necessary. // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors. string_t evaluate_string(const xpath_node& n) const; #endif - + // Evaluate expression as string value in the specified context; performs type conversion if necessary. // At most capacity characters are written to the destination buffer, full result size is returned (includes terminating zero). // If PUGIXML_NO_EXCEPTIONS is not defined, throws std::bad_alloc on out of memory errors. @@ -1188,8 +1256,14 @@ namespace pugi // Borland C++ workaround bool operator!() const; }; - + #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 { @@ -1201,26 +1275,29 @@ namespace pugi explicit xpath_exception(const xpath_parse_result& result); // Get error message - virtual const char* what() const throw(); + virtual const char* what() const throw() PUGIXML_OVERRIDE; // 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) class PUGIXML_CLASS xpath_node { private: xml_node _node; xml_attribute _attribute; - + typedef void (*unspecified_bool_type)(xpath_node***); public: // Default constructor; constructs empty XPath node xpath_node(); - + // Construct XPath node from XML node/attribute xpath_node(const xml_node& node); xpath_node(const xml_attribute& attribute, const xml_node& parent); @@ -1228,13 +1305,13 @@ namespace pugi // Get node/attribute, if any xml_node node() const; xml_attribute attribute() const; - + // Get parent of contained node/attribute xml_node parent() const; // Safe bool conversion operator operator unspecified_bool_type() const; - + // Borland C++ workaround bool operator!() const; @@ -1260,13 +1337,13 @@ namespace pugi type_sorted, // Sorted by document order (ascending) type_sorted_reverse // Sorted by document order (descending) }; - + // Constant iterator type typedef const xpath_node* const_iterator; // We define non-constant iterator to be the same as constant iterator so that various generic algorithms (i.e. boost foreach) work typedef const xpath_node* iterator; - + // Default constructor. Constructs empty set. xpath_node_set(); @@ -1275,49 +1352,49 @@ namespace pugi // Destructor ~xpath_node_set(); - + // Copy constructor/assignment operator 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 type_t type() const; - + // Get collection size size_t size() const; // Indexing operator const xpath_node& operator[](size_t index) const; - + // Collection iterators const_iterator begin() const; const_iterator end() const; // Sort the collection in ascending/descending order by document order void sort(bool reverse = false); - + // Get first node in the collection by document order xpath_node first() const; - + // Check if collection is empty bool empty() const; - + 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 @@ -1325,7 +1402,7 @@ namespace pugi // Convert wide string to UTF8 std::basic_string, std::allocator > PUGIXML_FUNCTION as_utf8(const wchar_t* str); std::basic_string, std::allocator > PUGIXML_FUNCTION as_utf8(const std::basic_string, std::allocator >& str); - + // Convert UTF8 to wide string std::basic_string, std::allocator > PUGIXML_FUNCTION as_wide(const char* str); std::basic_string, std::allocator > PUGIXML_FUNCTION as_wide(const std::basic_string, std::allocator >& str); @@ -1333,13 +1410,13 @@ namespace pugi // Memory allocation function interface; returns pointer to allocated memory or NULL on failure typedef void* (*allocation_function)(size_t size); - + // Memory deallocation function interface typedef void (*deallocation_function)(void* ptr); // Override default memory management functions. All subsequent allocations/deallocations will be performed via supplied functions. void PUGIXML_FUNCTION set_memory_management_functions(allocation_function allocate, deallocation_function deallocate); - + // Get current memory management functions allocation_function PUGIXML_FUNCTION get_memory_allocation_function(); deallocation_function PUGIXML_FUNCTION get_memory_deallocation_function(); @@ -1375,7 +1452,7 @@ namespace std #endif /** - * Copyright (c) 2006-2015 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 @@ -1388,7 +1465,7 @@ namespace std * * 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 diff --git a/Sourcecode/private/extern/ezxml/src/test/Catch.h b/Sourcecode/private/extern/ezxml/src/test/Catch.h new file mode 100644 index 000000000..de29e996c --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/test/Catch.h @@ -0,0 +1,14995 @@ +/* + * Catch v2.7.1 + * Generated: 2019-04-05 18:22:37.720122 + * ---------------------------------------------------------- + * This file has been merged from multiple headers. Please don't edit it directly + * Copyright (c) 2019 Two Blue Cubes Ltd. All rights reserved. + * + * Distributed under the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + */ +#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED + #define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED +// start catch.hpp + + + #define CATCH_VERSION_MAJOR 2 + #define CATCH_VERSION_MINOR 7 + #define CATCH_VERSION_PATCH 1 + + #ifdef __clang__ + # pragma clang system_header + #elif defined __GNUC__ + # pragma GCC system_header + #endif + +// start catch_suppress_warnings.h + + #ifdef __clang__ + # ifdef __ICC // icpc defines the __clang__ macro + # pragma warning(push) + # pragma warning(disable: 161 1682) + # else // __ICC + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wpadded" + # pragma clang diagnostic ignored "-Wswitch-enum" + # pragma clang diagnostic ignored "-Wcovered-switch-default" + # endif + #elif defined __GNUC__ +// Because REQUIREs trigger GCC's -Wparentheses, and because still +// supported version of g++ have only buggy support for _Pragmas, +// Wparentheses have to be suppressed globally. + # pragma GCC diagnostic ignored "-Wparentheses" // See #674 for details + + # pragma GCC diagnostic push + # pragma GCC diagnostic ignored "-Wunused-variable" + # pragma GCC diagnostic ignored "-Wpadded" + #endif +// end catch_suppress_warnings.h + #if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER) + # define CATCH_IMPL + # define CATCH_CONFIG_ALL_PARTS + #endif + +// In the impl file, we want to have access to all parts of the headers +// Can also be used to sanely support PCHs + #if defined(CATCH_CONFIG_ALL_PARTS) + # define CATCH_CONFIG_EXTERNAL_INTERFACES + # if defined(CATCH_CONFIG_DISABLE_MATCHERS) + # undef CATCH_CONFIG_DISABLE_MATCHERS + # endif + # if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER) + # define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER + # endif + #endif + + #if !defined(CATCH_CONFIG_IMPL_ONLY) +// start catch_platform.h + + #ifdef __APPLE__ + # include + # if TARGET_OS_OSX == 1 + # define CATCH_PLATFORM_MAC + # elif TARGET_OS_IPHONE == 1 + # define CATCH_PLATFORM_IPHONE + # endif + + #elif defined(linux) || defined(__linux) || defined(__linux__) + # define CATCH_PLATFORM_LINUX + + #elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__) + # define CATCH_PLATFORM_WINDOWS + #endif + +// end catch_platform.h + + #ifdef CATCH_IMPL + # ifndef CLARA_CONFIG_MAIN + # define CLARA_CONFIG_MAIN_NOT_DEFINED + # define CLARA_CONFIG_MAIN + # endif + #endif + +// start catch_user_interfaces.h + +namespace Catch { +unsigned int rngSeed(); +} + +// end catch_user_interfaces.h +// start catch_tag_alias_autoregistrar.h + +// start catch_common.h + +// start catch_compiler_capabilities.h + +// Detect a number of compiler features - by compiler +// The following features are defined: +// +// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported? +// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported? +// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported? +// CATCH_CONFIG_DISABLE_EXCEPTIONS : Are exceptions enabled? +// **************** +// Note to maintainers: if new toggles are added please document them +// in configuration.md, too +// **************** + +// In general each macro has a _NO_ form +// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature. +// Many features, at point of detection, define an _INTERNAL_ macro, so they +// can be combined, en-mass, with the _NO_ forms later. + + #ifdef __cplusplus + + # if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) + # define CATCH_CPP14_OR_GREATER + # endif + + # if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) + # define CATCH_CPP17_OR_GREATER + # endif + + #endif + + #if defined(CATCH_CPP17_OR_GREATER) + # define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS + #endif + + #ifdef __clang__ + + # define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \ + _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"") + # define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ + _Pragma( "clang diagnostic pop" ) + + # define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wparentheses\"" ) + # define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \ + _Pragma( "clang diagnostic pop" ) + + # define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \ + _Pragma( "clang diagnostic push" ) \ + _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" ) + # define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS \ + _Pragma( "clang diagnostic pop" ) + + #endif // __clang__ + +//////////////////////////////////////////////////////////////////////////////// +// Assume that non-Windows platforms support posix signals by default + #if !defined(CATCH_PLATFORM_WINDOWS) + #define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS + #endif + +//////////////////////////////////////////////////////////////////////////////// +// We know some environments not to support full POSIX signals + #if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__) + #define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS + #endif + + #ifdef __OS400__ + # define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS + # define CATCH_CONFIG_COLOUR_NONE + #endif + +//////////////////////////////////////////////////////////////////////////////// +// Android somehow still does not support std::to_string + #if defined(__ANDROID__) + # define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING + #endif + +//////////////////////////////////////////////////////////////////////////////// +// Not all Windows environments support SEH properly + #if defined(__MINGW32__) + # define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH + #endif + +//////////////////////////////////////////////////////////////////////////////// +// PS4 + #if defined(__ORBIS__) + # define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE + #endif + +//////////////////////////////////////////////////////////////////////////////// +// Cygwin + #ifdef __CYGWIN__ + +// Required for some versions of Cygwin to declare gettimeofday +// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin + # define _BSD_SOURCE +// some versions of cygwin (most) do not support std::to_string. Use the libstd check. +// https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813 + # if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ + && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) + + # define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING + + # endif + #endif // __CYGWIN__ + +//////////////////////////////////////////////////////////////////////////////// +// Visual C++ + #ifdef _MSC_VER + + # if _MSC_VER >= 1900 // Visual Studio 2015 or newer + # define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS + # endif + +// Universal Windows platform does not support SEH +// Or console colours (or console at all...) + # if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) + # define CATCH_CONFIG_COLOUR_NONE + # else + # define CATCH_INTERNAL_CONFIG_WINDOWS_SEH + # endif + +// MSVC traditional preprocessor needs some workaround for __VA_ARGS__ +// _MSVC_TRADITIONAL == 0 means new conformant preprocessor +// _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor + # if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) + # define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR + # endif + + #endif // _MSC_VER + +//////////////////////////////////////////////////////////////////////////////// +// Check if we are compiled with -fno-exceptions or equivalent + #if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) + # define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED + #endif + +//////////////////////////////////////////////////////////////////////////////// +// DJGPP + #ifdef __DJGPP__ + # define CATCH_INTERNAL_CONFIG_NO_WCHAR + #endif // __DJGPP__ + +//////////////////////////////////////////////////////////////////////////////// +// Embarcadero C++Build + #if defined(__BORLANDC__) + #define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN + #endif + +//////////////////////////////////////////////////////////////////////////////// + +// Use of __COUNTER__ is suppressed during code analysis in +// CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly +// handled by it. +// Otherwise all supported compilers support COUNTER macro, +// but user still might want to turn it off + #if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) + #define CATCH_INTERNAL_CONFIG_COUNTER + #endif + +//////////////////////////////////////////////////////////////////////////////// +// Check if string_view is available and usable +// The check is split apart to work around v140 (VS2015) preprocessor issue... + #if defined(__has_include) + #if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW + #endif + #endif + +//////////////////////////////////////////////////////////////////////////////// +// Check if optional is available and usable + #if defined(__has_include) + # if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL + # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) + #endif // __has_include + +//////////////////////////////////////////////////////////////////////////////// +// Check if variant is available and usable + #if defined(__has_include) + # if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # if defined(__clang__) && (__clang_major__ < 8) +// work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852 +// fix should be in clang 8, workaround in libstdc++ 8.2 + # include + # if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) + # define CATCH_CONFIG_NO_CPP17_VARIANT + # else + # define CATCH_INTERNAL_CONFIG_CPP17_VARIANT + # endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) + # else + # define CATCH_INTERNAL_CONFIG_CPP17_VARIANT + # endif // defined(__clang__) && (__clang_major__ < 8) + # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) + #endif // __has_include + + #if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) + # define CATCH_CONFIG_COUNTER + #endif + #if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH) + # define CATCH_CONFIG_WINDOWS_SEH + #endif +// This is set by default, because we assume that unix compilers are posix-signal-compatible by default. + #if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS) + # define CATCH_CONFIG_POSIX_SIGNALS + #endif +// This is set by default, because we assume that compilers with no wchar_t support are just rare exceptions. + #if !defined(CATCH_INTERNAL_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_WCHAR) + # define CATCH_CONFIG_WCHAR + #endif + + #if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING) + # define CATCH_CONFIG_CPP11_TO_STRING + #endif + + #if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL) + # define CATCH_CONFIG_CPP17_OPTIONAL + #endif + + #if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) + # define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS + #endif + + #if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW) + # define CATCH_CONFIG_CPP17_STRING_VIEW + #endif + + #if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT) + # define CATCH_CONFIG_CPP17_VARIANT + #endif + + #if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT) + # define CATCH_INTERNAL_CONFIG_NEW_CAPTURE + #endif + + #if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE) + # define CATCH_CONFIG_NEW_CAPTURE + #endif + + #if !defined(CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) + # define CATCH_CONFIG_DISABLE_EXCEPTIONS + #endif + + #if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN) + # define CATCH_CONFIG_POLYFILL_ISNAN + #endif + + #if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) + # define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS + # define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS + #endif + #if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS) + # define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS + # define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS + #endif + #if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS) + # define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS + # define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS + #endif + + #if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) + #define CATCH_TRY if ((true)) + #define CATCH_CATCH_ALL if ((false)) + #define CATCH_CATCH_ANON(type) if ((false)) + #else + #define CATCH_TRY try + #define CATCH_CATCH_ALL catch (...) + #define CATCH_CATCH_ANON(type) catch (type) + #endif + + #if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) + #define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR + #endif + +// end catch_compiler_capabilities.h + #define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line + #define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) + #ifdef CATCH_CONFIG_COUNTER + # define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) + #else + # define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) + #endif + + #include + #include + #include + +// We need a dummy global operator<< so we can bring it into Catch namespace later +struct Catch_global_namespace_dummy {}; +std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy); + +namespace Catch { + +struct CaseSensitive { enum Choice { +Yes, +No +}; }; + +class NonCopyable { +NonCopyable( NonCopyable const& ) = delete; +NonCopyable( NonCopyable && ) = delete; +NonCopyable& operator = ( NonCopyable const& ) = delete; +NonCopyable& operator = ( NonCopyable && ) = delete; + +protected: +NonCopyable(); +virtual ~NonCopyable(); +}; + +struct SourceLineInfo { + +SourceLineInfo() = delete; +SourceLineInfo( char const* _file, std::size_t _line ) noexcept +: file( _file ), +line( _line ) +{} + +SourceLineInfo( SourceLineInfo const& other ) = default; +SourceLineInfo& operator = ( SourceLineInfo const& ) = default; +SourceLineInfo( SourceLineInfo&& ) noexcept = default; +SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default; + +bool empty() const noexcept; +bool operator == ( SourceLineInfo const& other ) const noexcept; +bool operator < ( SourceLineInfo const& other ) const noexcept; + +char const* file; +std::size_t line; +}; + +std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); + +// Bring in operator<< from global namespace into Catch namespace +// This is necessary because the overload of operator<< above makes +// lookup stop at namespace Catch +using ::operator<<; + +// Use this in variadic streaming macros to allow +// >> +StreamEndStop +// as well as +// >> stuff +StreamEndStop +struct StreamEndStop { +std::string operator+() const; +}; +template +T const& operator + ( T const& value, StreamEndStop ) { +return value; +} +} + + #define CATCH_INTERNAL_LINEINFO \ + ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) ) + +// end catch_common.h +namespace Catch { + +struct RegistrarForTagAliases { +RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ); +}; + +} // end namespace Catch + + #define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \ + CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS + +// end catch_tag_alias_autoregistrar.h +// start catch_test_registry.h + +// start catch_interfaces_testcase.h + + #include + +namespace Catch { + +class TestSpec; + +struct ITestInvoker { +virtual void invoke () const = 0; +virtual ~ITestInvoker(); +}; + +class TestCase; +struct IConfig; + +struct ITestCaseRegistry { +virtual ~ITestCaseRegistry(); +virtual std::vector const& getAllTests() const = 0; +virtual std::vector const& getAllTestsSorted( IConfig const& config ) const = 0; +}; + +bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); +std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); +std::vector const& getAllTestCasesSorted( IConfig const& config ); + +} + +// end catch_interfaces_testcase.h +// start catch_stringref.h + + #include + #include + #include + +namespace Catch { + +/// A non-owning string class (similar to the forthcoming std::string_view) +/// Note that, because a StringRef may be a substring of another string, +/// it may not be null terminated. c_str() must return a null terminated +/// string, however, and so the StringRef will internally take ownership +/// (taking a copy), if necessary. In theory this ownership is not externally +/// visible - but it does mean (substring) StringRefs should not be shared between +/// threads. +class StringRef { +public: +using size_type = std::size_t; + +private: +friend struct StringRefTestAccess; + +char const* m_start; +size_type m_size; + +char* m_data = nullptr; + +void takeOwnership(); + +static constexpr char const* const s_empty = ""; + +public: // construction/ assignment +StringRef() noexcept +: StringRef( s_empty, 0 ) +{} + +StringRef( StringRef const& other ) noexcept +: m_start( other.m_start ), +m_size( other.m_size ) +{} + +StringRef( StringRef&& other ) noexcept +: m_start( other.m_start ), +m_size( other.m_size ), +m_data( other.m_data ) +{ +other.m_data = nullptr; +} + +StringRef( char const* rawChars ) noexcept; + +StringRef( char const* rawChars, size_type size ) noexcept +: m_start( rawChars ), +m_size( size ) +{} + +StringRef( std::string const& stdString ) noexcept +: m_start( stdString.c_str() ), +m_size( stdString.size() ) +{} + +~StringRef() noexcept { +delete[] m_data; +} + +auto operator = ( StringRef const &other ) noexcept -> StringRef& { +delete[] m_data; +m_data = nullptr; +m_start = other.m_start; +m_size = other.m_size; +return *this; +} + +operator std::string() const; + +void swap( StringRef& other ) noexcept; + +public: // operators +auto operator == ( StringRef const& other ) const noexcept -> bool; +auto operator != ( StringRef const& other ) const noexcept -> bool; + +auto operator[] ( size_type index ) const noexcept -> char; + +public: // named queries +auto empty() const noexcept -> bool { +return m_size == 0; +} +auto size() const noexcept -> size_type { +return m_size; +} + +auto numberOfCharacters() const noexcept -> size_type; +auto c_str() const -> char const*; + +public: // substrings and searches +auto substr( size_type start, size_type size ) const noexcept -> StringRef; + +// Returns the current start pointer. +// Note that the pointer can change when if the StringRef is a substring +auto currentData() const noexcept -> char const*; + +private: // ownership queries - may not be consistent between calls +auto isOwned() const noexcept -> bool; +auto isSubstring() const noexcept -> bool; +}; + +auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string; +auto operator + ( StringRef const& lhs, char const* rhs ) -> std::string; +auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string; + +auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&; +auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&; + +inline auto operator "" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef { +return StringRef( rawChars, size ); +} + +} // namespace Catch + +inline auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef { +return Catch::StringRef( rawChars, size ); +} + +// end catch_stringref.h +// start catch_type_traits.hpp + + + #include + +namespace Catch{ + + #ifdef CATCH_CPP17_OR_GREATER +template +inline constexpr auto is_unique = std::true_type{}; + +template +inline constexpr auto is_unique = std::bool_constant< +(!std::is_same_v && ...) && is_unique +>{}; + #else + +template +struct is_unique : std::true_type{}; + +template +struct is_unique : std::integral_constant +::value +&& is_unique::value +&& is_unique::value +>{}; + + #endif +} + +// end catch_type_traits.hpp +// start catch_preprocessor.hpp + + + #define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__ + #define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__))) + #define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__))) + #define CATCH_RECURSION_LEVEL3(...) CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(__VA_ARGS__))) + #define CATCH_RECURSION_LEVEL4(...) CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(__VA_ARGS__))) + #define CATCH_RECURSION_LEVEL5(...) CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(__VA_ARGS__))) + + #ifdef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR + #define INTERNAL_CATCH_EXPAND_VARGS(...) __VA_ARGS__ +// MSVC needs more evaluations + #define CATCH_RECURSION_LEVEL6(...) CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(__VA_ARGS__))) + #define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL6(CATCH_RECURSION_LEVEL6(__VA_ARGS__)) + #else + #define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL5(__VA_ARGS__) + #endif + + #define CATCH_REC_END(...) + #define CATCH_REC_OUT + + #define CATCH_EMPTY() + #define CATCH_DEFER(id) id CATCH_EMPTY() + + #define CATCH_REC_GET_END2() 0, CATCH_REC_END + #define CATCH_REC_GET_END1(...) CATCH_REC_GET_END2 + #define CATCH_REC_GET_END(...) CATCH_REC_GET_END1 + #define CATCH_REC_NEXT0(test, next, ...) next CATCH_REC_OUT + #define CATCH_REC_NEXT1(test, next) CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0) + #define CATCH_REC_NEXT(test, next) CATCH_REC_NEXT1(CATCH_REC_GET_END test, next) + + #define CATCH_REC_LIST0(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) + #define CATCH_REC_LIST1(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ ) + #define CATCH_REC_LIST2(f, x, peek, ...) f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) + + #define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) + #define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ ) + #define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...) f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) + +// Applies the function macro `f` to each of the remaining parameters, inserts commas between the results, +// and passes userdata as the first parameter to each invocation, +// e.g. CATCH_REC_LIST_UD(f, x, a, b, c) evaluates to f(x, a), f(x, b), f(x, c) + #define CATCH_REC_LIST_UD(f, userdata, ...) CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) + + #define CATCH_REC_LIST(f, ...) CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) + + #define INTERNAL_CATCH_EXPAND1(param) INTERNAL_CATCH_EXPAND2(param) + #define INTERNAL_CATCH_EXPAND2(...) INTERNAL_CATCH_NO## __VA_ARGS__ + #define INTERNAL_CATCH_DEF(...) INTERNAL_CATCH_DEF __VA_ARGS__ + #define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF + #define INTERNAL_CATCH_STRINGIZE(...) INTERNAL_CATCH_STRINGIZE2(__VA_ARGS__) + #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR + #define INTERNAL_CATCH_STRINGIZE2(...) #__VA_ARGS__ + #define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + #else +// MSVC is adding extra space and needs another indirection to expand INTERNAL_CATCH_NOINTERNAL_CATCH_DEF + #define INTERNAL_CATCH_STRINGIZE2(...) INTERNAL_CATCH_STRINGIZE3(__VA_ARGS__) + #define INTERNAL_CATCH_STRINGIZE3(...) #__VA_ARGS__ + #define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1) + #endif + + #define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__) + + #define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME2(Name, ...) INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME3(Name, __VA_ARGS__) + #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR + #define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME3(Name,...) Name " - " #__VA_ARGS__ + #define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME(Name,...) INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME2(Name, INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)) + #else +// MSVC is adding extra space and needs more calls to properly remove () + #define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME3(Name,...) Name " -" #__VA_ARGS__ + #define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME1(Name, ...) INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME2(Name, __VA_ARGS__) + #define INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME(Name, ...) INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME1(Name, INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))) + #endif + + #define INTERNAL_CATCH_MAKE_TYPE_LIST(types) Catch::TypeList + + #define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(types)\ + CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,INTERNAL_CATCH_REMOVE_PARENS(types)) + +// end catch_preprocessor.hpp +// start catch_meta.hpp + + + #include + +namespace Catch { +template< typename... > +struct TypeList {}; + +template< typename... > +struct append; + +template< template class L1 +, typename...E1 +, template class L2 +, typename...E2 +> +struct append< L1, L2 > { +using type = L1; +}; + +template< template class L1 +, typename...E1 +, template class L2 +, typename...E2 +, typename...Rest +> +struct append< L1, L2, Rest...> { +using type = typename append< L1, Rest... >::type; +}; + +template< template class +, typename... +> +struct rewrap; + +template< template class Container +, template class List +, typename...elems +> +struct rewrap> { +using type = TypeList< Container< elems... > >; +}; + +template< template class Container +, template class List +, class...Elems +, typename...Elements> +struct rewrap, Elements...> { +using type = typename append>, typename rewrap::type>::type; +}; + +template< template class...Containers > +struct combine { +template< typename...Types > +struct with_types { +template< template class Final > +struct into { +using type = typename append, typename rewrap::type...>::type; +}; +}; +}; + +template +struct always_false : std::false_type {}; + +} // namespace Catch + +// end catch_meta.hpp +namespace Catch { + +template +class TestInvokerAsMethod : public ITestInvoker { +void (C::*m_testAsMethod)(); +public: +TestInvokerAsMethod( void (C::*testAsMethod)() ) noexcept : m_testAsMethod( testAsMethod ) {} + +void invoke() const override { +C obj; +(obj.*m_testAsMethod)(); +} +}; + +auto makeTestInvoker( void(*testAsFunction)() ) noexcept -> ITestInvoker*; + +template +auto makeTestInvoker( void (C::*testAsMethod)() ) noexcept -> ITestInvoker* { +return new(std::nothrow) TestInvokerAsMethod( testAsMethod ); +} + +struct NameAndTags { +NameAndTags( StringRef const& name_ = StringRef(), StringRef const& tags_ = StringRef() ) noexcept; +StringRef name; +StringRef tags; +}; + +struct AutoReg : NonCopyable { +AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef const& classOrMethod, NameAndTags const& nameAndTags ) noexcept; +~AutoReg(); +}; + +} // end namespace Catch + + #if defined(CATCH_CONFIG_DISABLE) + #define INTERNAL_CATCH_TESTCASE_NO_REGISTRATION( TestName, ... ) \ + static void TestName() + #define INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION( TestName, ClassName, ... ) \ + namespace{ \ + struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \ + void test(); \ + }; \ + } \ + void TestName::test() + #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION( TestName, ... ) \ + template \ + static void TestName() + #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION( TestName, ClassName, ... ) \ + namespace{ \ + template \ + struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName ) { \ + void test(); \ + }; \ + } \ + template \ + void TestName::test() + #endif + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_TESTCASE2( TestName, ... ) \ + static void TestName(); \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \ + CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ + static void TestName() + #define INTERNAL_CATCH_TESTCASE( ... ) \ + INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), __VA_ARGS__ ) + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, "&" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \ + CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + namespace{ \ + struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName) { \ + void test(); \ + }; \ + Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \ + } \ + CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ + void TestName::test() + #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \ + INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), ClassName, __VA_ARGS__ ) + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \ + CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(TestName, TestFunc, Name, Tags, ... )\ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + template \ + static void TestFunc();\ + namespace {\ + template \ + struct TestName{\ + template \ + TestName(Ts...names){\ + CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \ + using expander = int[];\ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFunc ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \ + }\ + };\ + INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, __VA_ARGS__) \ + }\ + CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ + template \ + static void TestFunc() + + #if defined(CATCH_CPP17_OR_GREATER) + #define CATCH_INTERNAL_CHECK_UNIQUE_TYPES(...) static_assert(Catch::is_unique<__VA_ARGS__>,"Duplicate type detected in declaration of template test case"); + #else + #define CATCH_INTERNAL_CHECK_UNIQUE_TYPES(...) static_assert(Catch::is_unique<__VA_ARGS__>::value,"Duplicate type detected in declaration of template test case"); + #endif + + #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR + #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \ + INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, __VA_ARGS__ ) + #else + #define INTERNAL_CATCH_TEMPLATE_TEST_CASE(Name, Tags, ...) \ + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, __VA_ARGS__ ) ) + #endif + + #define INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestName, Name, ...)\ + static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\ + TestName(CATCH_REC_LIST_UD(INTERNAL_CATCH_TEMPLATE_UNIQUE_NAME,Name, __VA_ARGS__));\ + return 0;\ + }(); + + #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(TestName, TestFuncName, Name, Tags, TmplTypes, TypesList) \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + template static void TestFuncName(); \ + namespace { \ + template \ + struct TestName { \ + TestName() { \ + CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...) \ + int index = 0; \ + using expander = int[]; \ + constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\ + constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\ + constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestFuncName ), CATCH_INTERNAL_LINEINFO, Catch::StringRef(), Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++, 0)... };/* NOLINT */\ + } \ + }; \ + static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){ \ + using TestInit = Catch::combine \ + ::with_types::into::type; \ + TestInit(); \ + return 0; \ + }(); \ + } \ + CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ + template \ + static void TestFuncName() + + #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR + #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\ + INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ),Name,Tags,__VA_ARGS__) + #else + #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE(Name, Tags, ...)\ + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), Name, Tags, __VA_ARGS__ ) ) + #endif + + #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( TestNameClass, TestName, ClassName, Name, Tags, ... ) \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + namespace{ \ + template \ + struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName ) { \ + void test();\ + };\ + template \ + struct TestNameClass{\ + template \ + TestNameClass(Ts...names){\ + CATCH_INTERNAL_CHECK_UNIQUE_TYPES(CATCH_REC_LIST(INTERNAL_CATCH_REMOVE_PARENS, __VA_ARGS__)) \ + using expander = int[];\ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ names, Tags } ), 0)... };/* NOLINT */ \ + }\ + };\ + INTERNAL_CATCH_TEMPLATE_REGISTRY_INITIATE(TestNameClass, Name, __VA_ARGS__)\ + }\ + CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS\ + template \ + void TestName::test() + + #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR + #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \ + INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, __VA_ARGS__ ) + #else + #define INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( ClassName, Name, Tags,... ) \ + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____C_L_A_S_S____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) , ClassName, Name, Tags, __VA_ARGS__ ) ) + #endif + + #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2(TestNameClass, TestName, ClassName, Name, Tags, TmplTypes, TypesList)\ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + template \ + struct TestName : INTERNAL_CATCH_REMOVE_PARENS(ClassName ) { \ + void test();\ + };\ + namespace {\ + template\ + struct TestNameClass{\ + TestNameClass(){\ + CATCH_INTERNAL_CHECK_UNIQUE_TYPES(Types...)\ + int index = 0;\ + using expander = int[];\ + constexpr char const* tmpl_types[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TmplTypes))};\ + constexpr char const* types_list[] = {CATCH_REC_LIST(INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS, INTERNAL_CATCH_REMOVE_PARENS(TypesList))};\ + constexpr auto num_types = sizeof(types_list) / sizeof(types_list[0]);\ + (void)expander{(Catch::AutoReg( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ Name " - " + std::string(tmpl_types[index / num_types]) + "<" + std::string(types_list[index % num_types]) + ">", Tags } ), index++, 0)... };/* NOLINT */ \ + }\ + };\ + static int INTERNAL_CATCH_UNIQUE_NAME( globalRegistrar ) = [](){\ + using TestInit = Catch::combine\ + ::with_types::into::type;\ + TestInit();\ + return 0;\ + }(); \ + }\ + CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ + template \ + void TestName::test() + + #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR + #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\ + INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, __VA_ARGS__ ) + #else + #define INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( ClassName, Name, Tags, ... )\ + INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD_2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____F_U_N_C____ ), ClassName, Name, Tags, __VA_ARGS__ ) ) + #endif + +// end catch_test_registry.h +// start catch_capture.hpp + +// start catch_assertionhandler.h + +// start catch_assertioninfo.h + +// start catch_result_type.h + +namespace Catch { + +// ResultWas::OfType enum +struct ResultWas { enum OfType { +Unknown = -1, +Ok = 0, +Info = 1, +Warning = 2, + +FailureBit = 0x10, + +ExpressionFailed = FailureBit | 1, +ExplicitFailure = FailureBit | 2, + +Exception = 0x100 | FailureBit, + +ThrewException = Exception | 1, +DidntThrowException = Exception | 2, + +FatalErrorCondition = 0x200 | FailureBit + +}; }; + +bool isOk( ResultWas::OfType resultType ); +bool isJustInfo( int flags ); + +// ResultDisposition::Flags enum +struct ResultDisposition { enum Flags { +Normal = 0x01, + +ContinueOnFailure = 0x02, // Failures fail test, but execution continues +FalseTest = 0x04, // Prefix expression with ! +SuppressFail = 0x08 // Failures are reported but do not fail the test +}; }; + +ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs ); + +bool shouldContinueOnFailure( int flags ); +inline bool isFalseTest( int flags ) { return ( flags & ResultDisposition::FalseTest ) != 0; } +bool shouldSuppressFailure( int flags ); + +} // end namespace Catch + +// end catch_result_type.h +namespace Catch { + +struct AssertionInfo +{ +StringRef macroName; +SourceLineInfo lineInfo; +StringRef capturedExpression; +ResultDisposition::Flags resultDisposition; + +// We want to delete this constructor but a compiler bug in 4.8 means +// the struct is then treated as non-aggregate +//AssertionInfo() = delete; +}; + +} // end namespace Catch + +// end catch_assertioninfo.h +// start catch_decomposer.h + +// start catch_tostring.h + + #include + #include + #include + #include +// start catch_stream.h + + #include + #include + #include + +namespace Catch { + +std::ostream& cout(); +std::ostream& cerr(); +std::ostream& clog(); + +class StringRef; + +struct IStream { +virtual ~IStream(); +virtual std::ostream& stream() const = 0; +}; + +auto makeStream( StringRef const &filename ) -> IStream const*; + +class ReusableStringStream { +std::size_t m_index; +std::ostream* m_oss; +public: +ReusableStringStream(); +~ReusableStringStream(); + +auto str() const -> std::string; + +template +auto operator << ( T const& value ) -> ReusableStringStream& { +*m_oss << value; +return *this; +} +auto get() -> std::ostream& { return *m_oss; } +}; +} + +// end catch_stream.h + + #ifdef CATCH_CONFIG_CPP17_STRING_VIEW + #include + #endif + + #ifdef __OBJC__ +// start catch_objc_arc.hpp + + #import + + #ifdef __has_feature + #define CATCH_ARC_ENABLED __has_feature(objc_arc) + #else + #define CATCH_ARC_ENABLED 0 + #endif + +void arcSafeRelease( NSObject* obj ); +id performOptionalSelector( id obj, SEL sel ); + + #if !CATCH_ARC_ENABLED +inline void arcSafeRelease( NSObject* obj ) { +[obj release]; +} +inline id performOptionalSelector( id obj, SEL sel ) { +if( [obj respondsToSelector: sel] ) +return [obj performSelector: sel]; +return nil; +} + #define CATCH_UNSAFE_UNRETAINED + #define CATCH_ARC_STRONG + #else +inline void arcSafeRelease( NSObject* ){} +inline id performOptionalSelector( id obj, SEL sel ) { + #ifdef __clang__ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Warc-performSelector-leaks" + #endif +if( [obj respondsToSelector: sel] ) +return [obj performSelector: sel]; + #ifdef __clang__ + #pragma clang diagnostic pop + #endif +return nil; +} + #define CATCH_UNSAFE_UNRETAINED __unsafe_unretained + #define CATCH_ARC_STRONG __strong + #endif + +// end catch_objc_arc.hpp + #endif + + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable:4180) // We attempt to stream a function (address) by const&, which MSVC complains about but is harmless + #endif + +namespace Catch { +namespace Detail { + +extern const std::string unprintableString; + +std::string rawMemoryToString( const void *object, std::size_t size ); + +template +std::string rawMemoryToString( const T& object ) { +return rawMemoryToString( &object, sizeof(object) ); +} + +template +class IsStreamInsertable { +template +static auto test(int) +-> decltype(std::declval() << std::declval(), std::true_type()); + +template +static auto test(...)->std::false_type; + +public: +static const bool value = decltype(test(0))::value; +}; + +template +std::string convertUnknownEnumToString( E e ); + +template +typename std::enable_if< +!std::is_enum::value && !std::is_base_of::value, +std::string>::type convertUnstreamable( T const& ) { +return Detail::unprintableString; +} +template +typename std::enable_if< +!std::is_enum::value && std::is_base_of::value, +std::string>::type convertUnstreamable(T const& ex) { +return ex.what(); +} + +template +typename std::enable_if< +std::is_enum::value +, std::string>::type convertUnstreamable( T const& value ) { +return convertUnknownEnumToString( value ); +} + + #if defined(_MANAGED) +//! Convert a CLR string to a utf8 std::string +template +std::string clrReferenceToString( T^ ref ) { +if (ref == nullptr) +return std::string("null"); +auto bytes = System::Text::Encoding::UTF8->GetBytes(ref->ToString()); +cli::pin_ptr p = &bytes[0]; +return std::string(reinterpret_cast(p), bytes->Length); +} + #endif + +} // namespace Detail + +// If we decide for C++14, change these to enable_if_ts +template +struct StringMaker { +template +static +typename std::enable_if<::Catch::Detail::IsStreamInsertable::value, std::string>::type +convert(const Fake& value) { +ReusableStringStream rss; +// NB: call using the function-like syntax to avoid ambiguity with +// user-defined templated operator<< under clang. +rss.operator<<(value); +return rss.str(); +} + +template +static +typename std::enable_if::value, std::string>::type +convert( const Fake& value ) { + #if !defined(CATCH_CONFIG_FALLBACK_STRINGIFIER) +return Detail::convertUnstreamable(value); + #else +return CATCH_CONFIG_FALLBACK_STRINGIFIER(value); + #endif +} +}; + +namespace Detail { + +// This function dispatches all stringification requests inside of Catch. +// Should be preferably called fully qualified, like ::Catch::Detail::stringify +template +std::string stringify(const T& e) { +return ::Catch::StringMaker::type>::type>::convert(e); +} + +template +std::string convertUnknownEnumToString( E e ) { +return ::Catch::Detail::stringify(static_cast::type>(e)); +} + + #if defined(_MANAGED) +template +std::string stringify( T^ e ) { +return ::Catch::StringMaker::convert(e); +} + #endif + +} // namespace Detail + +// Some predefined specializations + +template<> +struct StringMaker { +static std::string convert(const std::string& str); +}; + + #ifdef CATCH_CONFIG_CPP17_STRING_VIEW +template<> +struct StringMaker { +static std::string convert(std::string_view str); +}; + #endif + +template<> +struct StringMaker { +static std::string convert(char const * str); +}; +template<> +struct StringMaker { +static std::string convert(char * str); +}; + + #ifdef CATCH_CONFIG_WCHAR +template<> +struct StringMaker { +static std::string convert(const std::wstring& wstr); +}; + + # ifdef CATCH_CONFIG_CPP17_STRING_VIEW +template<> +struct StringMaker { +static std::string convert(std::wstring_view str); +}; + # endif + +template<> +struct StringMaker { +static std::string convert(wchar_t const * str); +}; +template<> +struct StringMaker { +static std::string convert(wchar_t * str); +}; + #endif + +// TBD: Should we use `strnlen` to ensure that we don't go out of the buffer, +// while keeping string semantics? +template +struct StringMaker { +static std::string convert(char const* str) { +return ::Catch::Detail::stringify(std::string{ str }); +} +}; +template +struct StringMaker { +static std::string convert(signed char const* str) { +return ::Catch::Detail::stringify(std::string{ reinterpret_cast(str) }); +} +}; +template +struct StringMaker { +static std::string convert(unsigned char const* str) { +return ::Catch::Detail::stringify(std::string{ reinterpret_cast(str) }); +} +}; + +template<> +struct StringMaker { +static std::string convert(int value); +}; +template<> +struct StringMaker { +static std::string convert(long value); +}; +template<> +struct StringMaker { +static std::string convert(long long value); +}; +template<> +struct StringMaker { +static std::string convert(unsigned int value); +}; +template<> +struct StringMaker { +static std::string convert(unsigned long value); +}; +template<> +struct StringMaker { +static std::string convert(unsigned long long value); +}; + +template<> +struct StringMaker { +static std::string convert(bool b); +}; + +template<> +struct StringMaker { +static std::string convert(char c); +}; +template<> +struct StringMaker { +static std::string convert(signed char c); +}; +template<> +struct StringMaker { +static std::string convert(unsigned char c); +}; + +template<> +struct StringMaker { +static std::string convert(std::nullptr_t); +}; + +template<> +struct StringMaker { +static std::string convert(float value); +}; +template<> +struct StringMaker { +static std::string convert(double value); +}; + +template +struct StringMaker { +template +static std::string convert(U* p) { +if (p) { +return ::Catch::Detail::rawMemoryToString(p); +} else { +return "nullptr"; +} +} +}; + +template +struct StringMaker { +static std::string convert(R C::* p) { +if (p) { +return ::Catch::Detail::rawMemoryToString(p); +} else { +return "nullptr"; +} +} +}; + + #if defined(_MANAGED) +template +struct StringMaker { +static std::string convert( T^ ref ) { +return ::Catch::Detail::clrReferenceToString(ref); +} +}; + #endif + +namespace Detail { +template +std::string rangeToString(InputIterator first, InputIterator last) { +ReusableStringStream rss; +rss << "{ "; +if (first != last) { +rss << ::Catch::Detail::stringify(*first); +for (++first; first != last; ++first) +rss << ", " << ::Catch::Detail::stringify(*first); +} +rss << " }"; +return rss.str(); +} +} + + #ifdef __OBJC__ +template<> +struct StringMaker { +static std::string convert(NSString * nsstring) { +if (!nsstring) +return "nil"; +return std::string("@") + [nsstring UTF8String]; +} +}; +template<> +struct StringMaker { +static std::string convert(NSObject* nsObject) { +return ::Catch::Detail::stringify([nsObject description]); +} + +}; +namespace Detail { +inline std::string stringify( NSString* nsstring ) { +return StringMaker::convert( nsstring ); +} + +} // namespace Detail + #endif // __OBJC__ + +} // namespace Catch + +////////////////////////////////////////////////////// +// Separate std-lib types stringification, so it can be selectively enabled +// This means that we do not bring in + + #if defined(CATCH_CONFIG_ENABLE_ALL_STRINGMAKERS) + # define CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER + # define CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER + # define CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER + # define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER + # define CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER + #endif + +// Separate std::pair specialization + #if defined(CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER) + #include +namespace Catch { +template +struct StringMaker > { +static std::string convert(const std::pair& pair) { +ReusableStringStream rss; +rss << "{ " +<< ::Catch::Detail::stringify(pair.first) +<< ", " +<< ::Catch::Detail::stringify(pair.second) +<< " }"; +return rss.str(); +} +}; +} + #endif // CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER + + #if defined(CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER) && defined(CATCH_CONFIG_CPP17_OPTIONAL) + #include +namespace Catch { +template +struct StringMaker > { +static std::string convert(const std::optional& optional) { +ReusableStringStream rss; +if (optional.has_value()) { +rss << ::Catch::Detail::stringify(*optional); +} else { +rss << "{ }"; +} +return rss.str(); +} +}; +} + #endif // CATCH_CONFIG_ENABLE_OPTIONAL_STRINGMAKER + +// Separate std::tuple specialization + #if defined(CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER) + #include +namespace Catch { +namespace Detail { +template< +typename Tuple, +std::size_t N = 0, +bool = (N < std::tuple_size::value) +> +struct TupleElementPrinter { +static void print(const Tuple& tuple, std::ostream& os) { +os << (N ? ", " : " ") +<< ::Catch::Detail::stringify(std::get(tuple)); +TupleElementPrinter::print(tuple, os); +} +}; + +template< +typename Tuple, +std::size_t N +> +struct TupleElementPrinter { +static void print(const Tuple&, std::ostream&) {} +}; + +} + +template +struct StringMaker> { +static std::string convert(const std::tuple& tuple) { +ReusableStringStream rss; +rss << '{'; +Detail::TupleElementPrinter>::print(tuple, rss.get()); +rss << " }"; +return rss.str(); +} +}; +} + #endif // CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER + + #if defined(CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER) && defined(CATCH_CONFIG_CPP17_VARIANT) + #include +namespace Catch { +template<> +struct StringMaker { +static std::string convert(const std::monostate&) { +return "{ }"; +} +}; + +template +struct StringMaker> { +static std::string convert(const std::variant& variant) { +if (variant.valueless_by_exception()) { +return "{valueless variant}"; +} else { +return std::visit( +[](const auto& value) { +return ::Catch::Detail::stringify(value); +}, +variant +); +} +} +}; +} + #endif // CATCH_CONFIG_ENABLE_VARIANT_STRINGMAKER + +namespace Catch { +struct not_this_one {}; // Tag type for detecting which begin/ end are being selected + +// Import begin/ end from std here so they are considered alongside the fallback (...) overloads in this namespace +using std::begin; +using std::end; + +not_this_one begin( ... ); +not_this_one end( ... ); + +template +struct is_range { +static const bool value = +!std::is_same())), not_this_one>::value && +!std::is_same())), not_this_one>::value; +}; + + #if defined(_MANAGED) // Managed types are never ranges +template +struct is_range { +static const bool value = false; +}; + #endif + +template +std::string rangeToString( Range const& range ) { +return ::Catch::Detail::rangeToString( begin( range ), end( range ) ); +} + +// Handle vector specially +template +std::string rangeToString( std::vector const& v ) { +ReusableStringStream rss; +rss << "{ "; +bool first = true; +for( bool b : v ) { +if( first ) +first = false; +else +rss << ", "; +rss << ::Catch::Detail::stringify( b ); +} +rss << " }"; +return rss.str(); +} + +template +struct StringMaker::value && !::Catch::Detail::IsStreamInsertable::value>::type> { +static std::string convert( R const& range ) { +return rangeToString( range ); +} +}; + +template +struct StringMaker { +static std::string convert(T const(&arr)[SZ]) { +return rangeToString(arr); +} +}; + +} // namespace Catch + +// Separate std::chrono::duration specialization + #if defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER) + #include + #include + #include + +namespace Catch { + +template +struct ratio_string { +static std::string symbol(); +}; + +template +std::string ratio_string::symbol() { +Catch::ReusableStringStream rss; +rss << '[' << Ratio::num << '/' +<< Ratio::den << ']'; +return rss.str(); +} +template <> +struct ratio_string { +static std::string symbol(); +}; +template <> +struct ratio_string { +static std::string symbol(); +}; +template <> +struct ratio_string { +static std::string symbol(); +}; +template <> +struct ratio_string { +static std::string symbol(); +}; +template <> +struct ratio_string { +static std::string symbol(); +}; +template <> +struct ratio_string { +static std::string symbol(); +}; + +//////////// +// std::chrono::duration specializations +template +struct StringMaker> { +static std::string convert(std::chrono::duration const& duration) { +ReusableStringStream rss; +rss << duration.count() << ' ' << ratio_string::symbol() << 's'; +return rss.str(); +} +}; +template +struct StringMaker>> { +static std::string convert(std::chrono::duration> const& duration) { +ReusableStringStream rss; +rss << duration.count() << " s"; +return rss.str(); +} +}; +template +struct StringMaker>> { +static std::string convert(std::chrono::duration> const& duration) { +ReusableStringStream rss; +rss << duration.count() << " m"; +return rss.str(); +} +}; +template +struct StringMaker>> { +static std::string convert(std::chrono::duration> const& duration) { +ReusableStringStream rss; +rss << duration.count() << " h"; +return rss.str(); +} +}; + +//////////// +// std::chrono::time_point specialization +// Generic time_point cannot be specialized, only std::chrono::time_point +template +struct StringMaker> { +static std::string convert(std::chrono::time_point const& time_point) { +return ::Catch::Detail::stringify(time_point.time_since_epoch()) + " since epoch"; +} +}; +// std::chrono::time_point specialization +template +struct StringMaker> { +static std::string convert(std::chrono::time_point const& time_point) { +auto converted = std::chrono::system_clock::to_time_t(time_point); + + #ifdef _MSC_VER +std::tm timeInfo = {}; +gmtime_s(&timeInfo, &converted); + #else +std::tm* timeInfo = std::gmtime(&converted); + #endif + +auto const timeStampSize = sizeof("2017-01-16T17:06:45Z"); +char timeStamp[timeStampSize]; +const char * const fmt = "%Y-%m-%dT%H:%M:%SZ"; + + #ifdef _MSC_VER +std::strftime(timeStamp, timeStampSize, fmt, &timeInfo); + #else +std::strftime(timeStamp, timeStampSize, fmt, timeInfo); + #endif +return std::string(timeStamp); +} +}; +} + #endif // CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER + + #ifdef _MSC_VER + #pragma warning(pop) + #endif + +// end catch_tostring.h + #include + + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable:4389) // '==' : signed/unsigned mismatch + #pragma warning(disable:4018) // more "signed/unsigned mismatch" + #pragma warning(disable:4312) // Converting int to T* using reinterpret_cast (issue on x64 platform) + #pragma warning(disable:4180) // qualifier applied to function type has no meaning + #pragma warning(disable:4800) // Forcing result to true or false + #endif + +namespace Catch { + +struct ITransientExpression { +auto isBinaryExpression() const -> bool { return m_isBinaryExpression; } +auto getResult() const -> bool { return m_result; } +virtual void streamReconstructedExpression( std::ostream &os ) const = 0; + +ITransientExpression( bool isBinaryExpression, bool result ) +: m_isBinaryExpression( isBinaryExpression ), +m_result( result ) +{} + +// We don't actually need a virtual destructor, but many static analysers +// complain if it's not here :-( +virtual ~ITransientExpression(); + +bool m_isBinaryExpression; +bool m_result; + +}; + +void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ); + +template +class BinaryExpr : public ITransientExpression { +LhsT m_lhs; +StringRef m_op; +RhsT m_rhs; + +void streamReconstructedExpression( std::ostream &os ) const override { +formatReconstructedExpression +( os, Catch::Detail::stringify( m_lhs ), m_op, Catch::Detail::stringify( m_rhs ) ); +} + +public: +BinaryExpr( bool comparisonResult, LhsT lhs, StringRef op, RhsT rhs ) +: ITransientExpression{ true, comparisonResult }, +m_lhs( lhs ), +m_op( op ), +m_rhs( rhs ) +{} + +template +auto operator && ( T ) const -> BinaryExpr const { +static_assert(always_false::value, +"chained comparisons are not supported inside assertions, " +"wrap the expression inside parentheses, or decompose it"); +} + +template +auto operator || ( T ) const -> BinaryExpr const { +static_assert(always_false::value, +"chained comparisons are not supported inside assertions, " +"wrap the expression inside parentheses, or decompose it"); +} + +template +auto operator == ( T ) const -> BinaryExpr const { +static_assert(always_false::value, +"chained comparisons are not supported inside assertions, " +"wrap the expression inside parentheses, or decompose it"); +} + +template +auto operator != ( T ) const -> BinaryExpr const { +static_assert(always_false::value, +"chained comparisons are not supported inside assertions, " +"wrap the expression inside parentheses, or decompose it"); +} + +template +auto operator > ( T ) const -> BinaryExpr const { +static_assert(always_false::value, +"chained comparisons are not supported inside assertions, " +"wrap the expression inside parentheses, or decompose it"); +} + +template +auto operator < ( T ) const -> BinaryExpr const { +static_assert(always_false::value, +"chained comparisons are not supported inside assertions, " +"wrap the expression inside parentheses, or decompose it"); +} + +template +auto operator >= ( T ) const -> BinaryExpr const { +static_assert(always_false::value, +"chained comparisons are not supported inside assertions, " +"wrap the expression inside parentheses, or decompose it"); +} + +template +auto operator <= ( T ) const -> BinaryExpr const { +static_assert(always_false::value, +"chained comparisons are not supported inside assertions, " +"wrap the expression inside parentheses, or decompose it"); +} +}; + +template +class UnaryExpr : public ITransientExpression { +LhsT m_lhs; + +void streamReconstructedExpression( std::ostream &os ) const override { +os << Catch::Detail::stringify( m_lhs ); +} + +public: +explicit UnaryExpr( LhsT lhs ) +: ITransientExpression{ false, static_cast(lhs) }, +m_lhs( lhs ) +{} +}; + +// Specialised comparison functions to handle equality comparisons between ints and pointers (NULL deduces as an int) +template +auto compareEqual( LhsT const& lhs, RhsT const& rhs ) -> bool { return static_cast(lhs == rhs); } +template +auto compareEqual( T* const& lhs, int rhs ) -> bool { return lhs == reinterpret_cast( rhs ); } +template +auto compareEqual( T* const& lhs, long rhs ) -> bool { return lhs == reinterpret_cast( rhs ); } +template +auto compareEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) == rhs; } +template +auto compareEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) == rhs; } + +template +auto compareNotEqual( LhsT const& lhs, RhsT&& rhs ) -> bool { return static_cast(lhs != rhs); } +template +auto compareNotEqual( T* const& lhs, int rhs ) -> bool { return lhs != reinterpret_cast( rhs ); } +template +auto compareNotEqual( T* const& lhs, long rhs ) -> bool { return lhs != reinterpret_cast( rhs ); } +template +auto compareNotEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) != rhs; } +template +auto compareNotEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) != rhs; } + +template +class ExprLhs { +LhsT m_lhs; +public: +explicit ExprLhs( LhsT lhs ) : m_lhs( lhs ) {} + +template +auto operator == ( RhsT const& rhs ) -> BinaryExpr const { +return { compareEqual( m_lhs, rhs ), m_lhs, "==", rhs }; +} +auto operator == ( bool rhs ) -> BinaryExpr const { +return { m_lhs == rhs, m_lhs, "==", rhs }; +} + +template +auto operator != ( RhsT const& rhs ) -> BinaryExpr const { +return { compareNotEqual( m_lhs, rhs ), m_lhs, "!=", rhs }; +} +auto operator != ( bool rhs ) -> BinaryExpr const { +return { m_lhs != rhs, m_lhs, "!=", rhs }; +} + +template +auto operator > ( RhsT const& rhs ) -> BinaryExpr const { +return { static_cast(m_lhs > rhs), m_lhs, ">", rhs }; +} +template +auto operator < ( RhsT const& rhs ) -> BinaryExpr const { +return { static_cast(m_lhs < rhs), m_lhs, "<", rhs }; +} +template +auto operator >= ( RhsT const& rhs ) -> BinaryExpr const { +return { static_cast(m_lhs >= rhs), m_lhs, ">=", rhs }; +} +template +auto operator <= ( RhsT const& rhs ) -> BinaryExpr const { +return { static_cast(m_lhs <= rhs), m_lhs, "<=", rhs }; +} + +template +auto operator && ( RhsT const& ) -> BinaryExpr const { +static_assert(always_false::value, +"operator&& is not supported inside assertions, " +"wrap the expression inside parentheses, or decompose it"); +} + +template +auto operator || ( RhsT const& ) -> BinaryExpr const { +static_assert(always_false::value, +"operator|| is not supported inside assertions, " +"wrap the expression inside parentheses, or decompose it"); +} + +auto makeUnaryExpr() const -> UnaryExpr { +return UnaryExpr{ m_lhs }; +} +}; + +void handleExpression( ITransientExpression const& expr ); + +template +void handleExpression( ExprLhs const& expr ) { +handleExpression( expr.makeUnaryExpr() ); +} + +struct Decomposer { +template +auto operator <= ( T const& lhs ) -> ExprLhs { +return ExprLhs{ lhs }; +} + +auto operator <=( bool value ) -> ExprLhs { +return ExprLhs{ value }; +} +}; + +} // end namespace Catch + + #ifdef _MSC_VER + #pragma warning(pop) + #endif + +// end catch_decomposer.h +// start catch_interfaces_capture.h + + #include + +namespace Catch { + +class AssertionResult; +struct AssertionInfo; +struct SectionInfo; +struct SectionEndInfo; +struct MessageInfo; +struct MessageBuilder; +struct Counts; +struct BenchmarkInfo; +struct BenchmarkStats; +struct AssertionReaction; +struct SourceLineInfo; + +struct ITransientExpression; +struct IGeneratorTracker; + +struct IResultCapture { + +virtual ~IResultCapture(); + +virtual bool sectionStarted( SectionInfo const& sectionInfo, +Counts& assertions ) = 0; +virtual void sectionEnded( SectionEndInfo const& endInfo ) = 0; +virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0; + +virtual auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& = 0; + +virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0; +virtual void benchmarkEnded( BenchmarkStats const& stats ) = 0; + +virtual void pushScopedMessage( MessageInfo const& message ) = 0; +virtual void popScopedMessage( MessageInfo const& message ) = 0; + +virtual void emplaceUnscopedMessage( MessageBuilder const& builder ) = 0; + +virtual void handleFatalErrorCondition( StringRef message ) = 0; + +virtual void handleExpr +( AssertionInfo const& info, +ITransientExpression const& expr, +AssertionReaction& reaction ) = 0; +virtual void handleMessage +( AssertionInfo const& info, +ResultWas::OfType resultType, +StringRef const& message, +AssertionReaction& reaction ) = 0; +virtual void handleUnexpectedExceptionNotThrown +( AssertionInfo const& info, +AssertionReaction& reaction ) = 0; +virtual void handleUnexpectedInflightException +( AssertionInfo const& info, +std::string const& message, +AssertionReaction& reaction ) = 0; +virtual void handleIncomplete +( AssertionInfo const& info ) = 0; +virtual void handleNonExpr +( AssertionInfo const &info, +ResultWas::OfType resultType, +AssertionReaction &reaction ) = 0; + +virtual bool lastAssertionPassed() = 0; +virtual void assertionPassed() = 0; + +// Deprecated, do not use: +virtual std::string getCurrentTestName() const = 0; +virtual const AssertionResult* getLastResult() const = 0; +virtual void exceptionEarlyReported() = 0; +}; + +IResultCapture& getResultCapture(); +} + +// end catch_interfaces_capture.h +namespace Catch { + +struct TestFailureException{}; +struct AssertionResultData; +struct IResultCapture; +class RunContext; + +class LazyExpression { +friend class AssertionHandler; +friend struct AssertionStats; +friend class RunContext; + +ITransientExpression const* m_transientExpression = nullptr; +bool m_isNegated; +public: +LazyExpression( bool isNegated ); +LazyExpression( LazyExpression const& other ); +LazyExpression& operator = ( LazyExpression const& ) = delete; + +explicit operator bool() const; + +friend auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream&; +}; + +struct AssertionReaction { +bool shouldDebugBreak = false; +bool shouldThrow = false; +}; + +class AssertionHandler { +AssertionInfo m_assertionInfo; +AssertionReaction m_reaction; +bool m_completed = false; +IResultCapture& m_resultCapture; + +public: +AssertionHandler +( StringRef const& macroName, +SourceLineInfo const& lineInfo, +StringRef capturedExpression, +ResultDisposition::Flags resultDisposition ); +~AssertionHandler() { +if ( !m_completed ) { +m_resultCapture.handleIncomplete( m_assertionInfo ); +} +} + +template +void handleExpr( ExprLhs const& expr ) { +handleExpr( expr.makeUnaryExpr() ); +} +void handleExpr( ITransientExpression const& expr ); + +void handleMessage(ResultWas::OfType resultType, StringRef const& message); + +void handleExceptionThrownAsExpected(); +void handleUnexpectedExceptionNotThrown(); +void handleExceptionNotThrownAsExpected(); +void handleThrowingCallSkipped(); +void handleUnexpectedInflightException(); + +void complete(); +void setCompleted(); + +// query +auto allowThrows() const -> bool; +}; + +void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef const& matcherString ); + +} // namespace Catch + +// end catch_assertionhandler.h +// start catch_message.h + + #include + #include + +namespace Catch { + +struct MessageInfo { +MessageInfo( StringRef const& _macroName, +SourceLineInfo const& _lineInfo, +ResultWas::OfType _type ); + +StringRef macroName; +std::string message; +SourceLineInfo lineInfo; +ResultWas::OfType type; +unsigned int sequence; + +bool operator == ( MessageInfo const& other ) const; +bool operator < ( MessageInfo const& other ) const; +private: +static unsigned int globalCount; +}; + +struct MessageStream { + +template +MessageStream& operator << ( T const& value ) { +m_stream << value; +return *this; +} + +ReusableStringStream m_stream; +}; + +struct MessageBuilder : MessageStream { +MessageBuilder( StringRef const& macroName, +SourceLineInfo const& lineInfo, +ResultWas::OfType type ); + +template +MessageBuilder& operator << ( T const& value ) { +m_stream << value; +return *this; +} + +MessageInfo m_info; +}; + +class ScopedMessage { +public: +explicit ScopedMessage( MessageBuilder const& builder ); +ScopedMessage( ScopedMessage& duplicate ) = delete; +ScopedMessage( ScopedMessage&& old ); +~ScopedMessage(); + +MessageInfo m_info; +bool m_moved; +}; + +class Capturer { +std::vector m_messages; +IResultCapture& m_resultCapture = getResultCapture(); +size_t m_captured = 0; +public: +Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ); +~Capturer(); + +void captureValue( size_t index, std::string const& value ); + +template +void captureValues( size_t index, T const& value ) { +captureValue( index, Catch::Detail::stringify( value ) ); +} + +template +void captureValues( size_t index, T const& value, Ts const&... values ) { +captureValue( index, Catch::Detail::stringify(value) ); +captureValues( index+1, values... ); +} +}; + +} // end namespace Catch + +// end catch_message.h + #if !defined(CATCH_CONFIG_DISABLE) + + #if !defined(CATCH_CONFIG_DISABLE_STRINGIFICATION) + #define CATCH_INTERNAL_STRINGIFY(...) #__VA_ARGS__ + #else + #define CATCH_INTERNAL_STRINGIFY(...) "Disabled by CATCH_CONFIG_DISABLE_STRINGIFICATION" + #endif + + #if defined(CATCH_CONFIG_FAST_COMPILE) || defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) + +/////////////////////////////////////////////////////////////////////////////// +// Another way to speed-up compilation is to omit local try-catch for REQUIRE* +// macros. + #define INTERNAL_CATCH_TRY + #define INTERNAL_CATCH_CATCH( capturer ) + + #else // CATCH_CONFIG_FAST_COMPILE + + #define INTERNAL_CATCH_TRY try + #define INTERNAL_CATCH_CATCH( handler ) catch(...) { handler.handleUnexpectedInflightException(); } + + #endif + + #define INTERNAL_CATCH_REACT( handler ) handler.complete(); + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_TEST( macroName, resultDisposition, ... ) \ + do { \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \ + INTERNAL_CATCH_TRY { \ + CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ + catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); \ + CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \ + } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( (void)0, (false) && static_cast( !!(__VA_ARGS__) ) ) // the expression here is never evaluated at runtime but it forces the compiler to give it a look +// The double negation silences MSVC's C4800 warning, the static_cast forces short-circuit evaluation if the type has overloaded &&. + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_IF( macroName, resultDisposition, ... ) \ + INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \ + if( Catch::getResultCapture().lastAssertionPassed() ) + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_ELSE( macroName, resultDisposition, ... ) \ + INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \ + if( !Catch::getResultCapture().lastAssertionPassed() ) + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_NO_THROW( macroName, resultDisposition, ... ) \ + do { \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \ + try { \ + static_cast(__VA_ARGS__); \ + catchAssertionHandler.handleExceptionNotThrownAsExpected(); \ + } \ + catch( ... ) { \ + catchAssertionHandler.handleUnexpectedInflightException(); \ + } \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( false ) + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_THROWS( macroName, resultDisposition, ... ) \ + do { \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition); \ + if( catchAssertionHandler.allowThrows() ) \ + try { \ + static_cast(__VA_ARGS__); \ + catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ + } \ + catch( ... ) { \ + catchAssertionHandler.handleExceptionThrownAsExpected(); \ + } \ + else \ + catchAssertionHandler.handleThrowingCallSkipped(); \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( false ) + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_THROWS_AS( macroName, exceptionType, resultDisposition, expr ) \ + do { \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(expr) ", " CATCH_INTERNAL_STRINGIFY(exceptionType), resultDisposition ); \ + if( catchAssertionHandler.allowThrows() ) \ + try { \ + static_cast(expr); \ + catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ + } \ + catch( exceptionType const& ) { \ + catchAssertionHandler.handleExceptionThrownAsExpected(); \ + } \ + catch( ... ) { \ + catchAssertionHandler.handleUnexpectedInflightException(); \ + } \ + else \ + catchAssertionHandler.handleThrowingCallSkipped(); \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( false ) + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_MSG( macroName, messageType, resultDisposition, ... ) \ + do { \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::StringRef(), resultDisposition ); \ + catchAssertionHandler.handleMessage( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catch::StreamEndStop() ).m_stream.str() ); \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( false ) + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_CAPTURE( varName, macroName, ... ) \ + auto varName = Catch::Capturer( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info, #__VA_ARGS__ ); \ + varName.captureValues( 0, __VA_ARGS__ ) + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_INFO( macroName, log ) \ + Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log ); + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_UNSCOPED_INFO( macroName, log ) \ + Catch::getResultCapture().emplaceUnscopedMessage( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log ) + +/////////////////////////////////////////////////////////////////////////////// +// Although this is matcher-based, it can be used with just a string + #define INTERNAL_CATCH_THROWS_STR_MATCHES( macroName, resultDisposition, matcher, ... ) \ + do { \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \ + if( catchAssertionHandler.allowThrows() ) \ + try { \ + static_cast(__VA_ARGS__); \ + catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ + } \ + catch( ... ) { \ + Catch::handleExceptionMatchExpr( catchAssertionHandler, matcher, #matcher##_catch_sr ); \ + } \ + else \ + catchAssertionHandler.handleThrowingCallSkipped(); \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( false ) + + #endif // CATCH_CONFIG_DISABLE + +// end catch_capture.hpp +// start catch_section.h + +// start catch_section_info.h + +// start catch_totals.h + + #include + +namespace Catch { + +struct Counts { +Counts operator - ( Counts const& other ) const; +Counts& operator += ( Counts const& other ); + +std::size_t total() const; +bool allPassed() const; +bool allOk() const; + +std::size_t passed = 0; +std::size_t failed = 0; +std::size_t failedButOk = 0; +}; + +struct Totals { + +Totals operator - ( Totals const& other ) const; +Totals& operator += ( Totals const& other ); + +Totals delta( Totals const& prevTotals ) const; + +int error = 0; +Counts assertions; +Counts testCases; +}; +} + +// end catch_totals.h + #include + +namespace Catch { + +struct SectionInfo { +SectionInfo +( SourceLineInfo const& _lineInfo, +std::string const& _name ); + +// Deprecated +SectionInfo +( SourceLineInfo const& _lineInfo, +std::string const& _name, +std::string const& ) : SectionInfo( _lineInfo, _name ) {} + +std::string name; +std::string description; // !Deprecated: this will always be empty +SourceLineInfo lineInfo; +}; + +struct SectionEndInfo { +SectionInfo sectionInfo; +Counts prevAssertions; +double durationInSeconds; +}; + +} // end namespace Catch + +// end catch_section_info.h +// start catch_timer.h + + #include + +namespace Catch { + +auto getCurrentNanosecondsSinceEpoch() -> uint64_t; +auto getEstimatedClockResolution() -> uint64_t; + +class Timer { +uint64_t m_nanoseconds = 0; +public: +void start(); +auto getElapsedNanoseconds() const -> uint64_t; +auto getElapsedMicroseconds() const -> uint64_t; +auto getElapsedMilliseconds() const -> unsigned int; +auto getElapsedSeconds() const -> double; +}; + +} // namespace Catch + +// end catch_timer.h + #include + +namespace Catch { + +class Section : NonCopyable { +public: +Section( SectionInfo const& info ); +~Section(); + +// This indicates whether the section should be executed or not +explicit operator bool() const; + +private: +SectionInfo m_info; + +std::string m_name; +Counts m_assertions; +bool m_sectionIncluded; +Timer m_timer; +}; + +} // end namespace Catch + + #define INTERNAL_CATCH_SECTION( ... ) \ + CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \ + if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) \ + CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS + + #define INTERNAL_CATCH_DYNAMIC_SECTION( ... ) \ + CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \ + if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, (Catch::ReusableStringStream() << __VA_ARGS__).str() ) ) \ + CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS + +// end catch_section.h +// start catch_benchmark.h + + #include + #include + +namespace Catch { + +class BenchmarkLooper { + +std::string m_name; +std::size_t m_count = 0; +std::size_t m_iterationsToRun = 1; +uint64_t m_resolution; +Timer m_timer; + +static auto getResolution() -> uint64_t; +public: +// Keep most of this inline as it's on the code path that is being timed +BenchmarkLooper( StringRef name ) +: m_name( name ), +m_resolution( getResolution() ) +{ +reportStart(); +m_timer.start(); +} + +explicit operator bool() { +if( m_count < m_iterationsToRun ) +return true; +return needsMoreIterations(); +} + +void increment() { +++m_count; +} + +void reportStart(); +auto needsMoreIterations() -> bool; +}; + +} // end namespace Catch + + #define BENCHMARK( name ) \ + for( Catch::BenchmarkLooper looper( name ); looper; looper.increment() ) + +// end catch_benchmark.h +// start catch_interfaces_exception.h + +// start catch_interfaces_registry_hub.h + + #include + #include + +namespace Catch { + +class TestCase; +struct ITestCaseRegistry; +struct IExceptionTranslatorRegistry; +struct IExceptionTranslator; +struct IReporterRegistry; +struct IReporterFactory; +struct ITagAliasRegistry; +class StartupExceptionRegistry; + +using IReporterFactoryPtr = std::shared_ptr; + +struct IRegistryHub { +virtual ~IRegistryHub(); + +virtual IReporterRegistry const& getReporterRegistry() const = 0; +virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0; +virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0; + +virtual IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const = 0; + +virtual StartupExceptionRegistry const& getStartupExceptionRegistry() const = 0; +}; + +struct IMutableRegistryHub { +virtual ~IMutableRegistryHub(); +virtual void registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) = 0; +virtual void registerListener( IReporterFactoryPtr const& factory ) = 0; +virtual void registerTest( TestCase const& testInfo ) = 0; +virtual void registerTranslator( const IExceptionTranslator* translator ) = 0; +virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0; +virtual void registerStartupException() noexcept = 0; +}; + +IRegistryHub const& getRegistryHub(); +IMutableRegistryHub& getMutableRegistryHub(); +void cleanUp(); +std::string translateActiveException(); + +} + +// end catch_interfaces_registry_hub.h + #if defined(CATCH_CONFIG_DISABLE) + #define INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( translatorName, signature) \ + static std::string translatorName( signature ) + #endif + + #include + #include + #include + +namespace Catch { +using exceptionTranslateFunction = std::string(*)(); + +struct IExceptionTranslator; +using ExceptionTranslators = std::vector>; + +struct IExceptionTranslator { +virtual ~IExceptionTranslator(); +virtual std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const = 0; +}; + +struct IExceptionTranslatorRegistry { +virtual ~IExceptionTranslatorRegistry(); + +virtual std::string translateActiveException() const = 0; +}; + +class ExceptionTranslatorRegistrar { +template +class ExceptionTranslator : public IExceptionTranslator { +public: + +ExceptionTranslator( std::string(*translateFunction)( T& ) ) +: m_translateFunction( translateFunction ) +{} + +std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override { +try { +if( it == itEnd ) +std::rethrow_exception(std::current_exception()); +else +return (*it)->translate( it+1, itEnd ); +} +catch( T& ex ) { +return m_translateFunction( ex ); +} +} + +protected: +std::string(*m_translateFunction)( T& ); +}; + +public: +template +ExceptionTranslatorRegistrar( std::string(*translateFunction)( T& ) ) { +getMutableRegistryHub().registerTranslator +( new ExceptionTranslator( translateFunction ) ); +} +}; +} + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_TRANSLATE_EXCEPTION2( translatorName, signature ) \ + static std::string translatorName( signature ); \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + namespace{ Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); } \ + CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ + static std::string translatorName( signature ) + + #define INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION2( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature ) + +// end catch_interfaces_exception.h +// start catch_approx.h + + #include + +namespace Catch { +namespace Detail { + +class Approx { +private: +bool equalityComparisonImpl(double other) const; +// Validates the new margin (margin >= 0) +// out-of-line to avoid including stdexcept in the header +void setMargin(double margin); +// Validates the new epsilon (0 < epsilon < 1) +// out-of-line to avoid including stdexcept in the header +void setEpsilon(double epsilon); + +public: +explicit Approx ( double value ); + +static Approx custom(); + +Approx operator-() const; + +template ::value>::type> +Approx operator()( T const& value ) { +Approx approx( static_cast(value) ); +approx.m_epsilon = m_epsilon; +approx.m_margin = m_margin; +approx.m_scale = m_scale; +return approx; +} + +template ::value>::type> +explicit Approx( T const& value ): Approx(static_cast(value)) +{} + +template ::value>::type> +friend bool operator == ( const T& lhs, Approx const& rhs ) { +auto lhs_v = static_cast(lhs); +return rhs.equalityComparisonImpl(lhs_v); +} + +template ::value>::type> +friend bool operator == ( Approx const& lhs, const T& rhs ) { +return operator==( rhs, lhs ); +} + +template ::value>::type> +friend bool operator != ( T const& lhs, Approx const& rhs ) { +return !operator==( lhs, rhs ); +} + +template ::value>::type> +friend bool operator != ( Approx const& lhs, T const& rhs ) { +return !operator==( rhs, lhs ); +} + +template ::value>::type> +friend bool operator <= ( T const& lhs, Approx const& rhs ) { +return static_cast(lhs) < rhs.m_value || lhs == rhs; +} + +template ::value>::type> +friend bool operator <= ( Approx const& lhs, T const& rhs ) { +return lhs.m_value < static_cast(rhs) || lhs == rhs; +} + +template ::value>::type> +friend bool operator >= ( T const& lhs, Approx const& rhs ) { +return static_cast(lhs) > rhs.m_value || lhs == rhs; +} + +template ::value>::type> +friend bool operator >= ( Approx const& lhs, T const& rhs ) { +return lhs.m_value > static_cast(rhs) || lhs == rhs; +} + +template ::value>::type> +Approx& epsilon( T const& newEpsilon ) { +double epsilonAsDouble = static_cast(newEpsilon); +setEpsilon(epsilonAsDouble); +return *this; +} + +template ::value>::type> +Approx& margin( T const& newMargin ) { +double marginAsDouble = static_cast(newMargin); +setMargin(marginAsDouble); +return *this; +} + +template ::value>::type> +Approx& scale( T const& newScale ) { +m_scale = static_cast(newScale); +return *this; +} + +std::string toString() const; + +private: +double m_epsilon; +double m_margin; +double m_scale; +double m_value; +}; +} // end namespace Detail + +namespace literals { +Detail::Approx operator "" _a(long double val); +Detail::Approx operator "" _a(unsigned long long val); +} // end namespace literals + +template<> +struct StringMaker { +static std::string convert(Catch::Detail::Approx const& value); +}; + +} // end namespace Catch + +// end catch_approx.h +// start catch_string_manip.h + + #include + #include + +namespace Catch { + +bool startsWith( std::string const& s, std::string const& prefix ); +bool startsWith( std::string const& s, char prefix ); +bool endsWith( std::string const& s, std::string const& suffix ); +bool endsWith( std::string const& s, char suffix ); +bool contains( std::string const& s, std::string const& infix ); +void toLowerInPlace( std::string& s ); +std::string toLower( std::string const& s ); +std::string trim( std::string const& str ); +bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ); + +struct pluralise { +pluralise( std::size_t count, std::string const& label ); + +friend std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser ); + +std::size_t m_count; +std::string m_label; +}; +} + +// end catch_string_manip.h + #ifndef CATCH_CONFIG_DISABLE_MATCHERS +// start catch_capture_matchers.h + +// start catch_matchers.h + + #include + #include + +namespace Catch { +namespace Matchers { +namespace Impl { + +template struct MatchAllOf; +template struct MatchAnyOf; +template struct MatchNotOf; + +class MatcherUntypedBase { +public: +MatcherUntypedBase() = default; +MatcherUntypedBase ( MatcherUntypedBase const& ) = default; +MatcherUntypedBase& operator = ( MatcherUntypedBase const& ) = delete; +std::string toString() const; + +protected: +virtual ~MatcherUntypedBase(); +virtual std::string describe() const = 0; +mutable std::string m_cachedToString; +}; + + #ifdef __clang__ + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wnon-virtual-dtor" + #endif + +template +struct MatcherMethod { +virtual bool match( ObjectT const& arg ) const = 0; +}; + + #ifdef __clang__ + # pragma clang diagnostic pop + #endif + +template +struct MatcherBase : MatcherUntypedBase, MatcherMethod { + +MatchAllOf operator && ( MatcherBase const& other ) const; +MatchAnyOf operator || ( MatcherBase const& other ) const; +MatchNotOf operator ! () const; +}; + +template +struct MatchAllOf : MatcherBase { +bool match( ArgT const& arg ) const override { +for( auto matcher : m_matchers ) { +if (!matcher->match(arg)) +return false; +} +return true; +} +std::string describe() const override { +std::string description; +description.reserve( 4 + m_matchers.size()*32 ); +description += "( "; +bool first = true; +for( auto matcher : m_matchers ) { +if( first ) +first = false; +else +description += " and "; +description += matcher->toString(); +} +description += " )"; +return description; +} + +MatchAllOf& operator && ( MatcherBase const& other ) { +m_matchers.push_back( &other ); +return *this; +} + +std::vector const*> m_matchers; +}; +template +struct MatchAnyOf : MatcherBase { + +bool match( ArgT const& arg ) const override { +for( auto matcher : m_matchers ) { +if (matcher->match(arg)) +return true; +} +return false; +} +std::string describe() const override { +std::string description; +description.reserve( 4 + m_matchers.size()*32 ); +description += "( "; +bool first = true; +for( auto matcher : m_matchers ) { +if( first ) +first = false; +else +description += " or "; +description += matcher->toString(); +} +description += " )"; +return description; +} + +MatchAnyOf& operator || ( MatcherBase const& other ) { +m_matchers.push_back( &other ); +return *this; +} + +std::vector const*> m_matchers; +}; + +template +struct MatchNotOf : MatcherBase { + +MatchNotOf( MatcherBase const& underlyingMatcher ) : m_underlyingMatcher( underlyingMatcher ) {} + +bool match( ArgT const& arg ) const override { +return !m_underlyingMatcher.match( arg ); +} + +std::string describe() const override { +return "not " + m_underlyingMatcher.toString(); +} +MatcherBase const& m_underlyingMatcher; +}; + +template +MatchAllOf MatcherBase::operator && ( MatcherBase const& other ) const { +return MatchAllOf() && *this && other; +} +template +MatchAnyOf MatcherBase::operator || ( MatcherBase const& other ) const { +return MatchAnyOf() || *this || other; +} +template +MatchNotOf MatcherBase::operator ! () const { +return MatchNotOf( *this ); +} + +} // namespace Impl + +} // namespace Matchers + +using namespace Matchers; +using Matchers::Impl::MatcherBase; + +} // namespace Catch + +// end catch_matchers.h +// start catch_matchers_floating.h + + #include + #include + +namespace Catch { +namespace Matchers { + +namespace Floating { + +enum class FloatingPointKind : uint8_t; + +struct WithinAbsMatcher : MatcherBase { +WithinAbsMatcher(double target, double margin); +bool match(double const& matchee) const override; +std::string describe() const override; +private: +double m_target; +double m_margin; +}; + +struct WithinUlpsMatcher : MatcherBase { +WithinUlpsMatcher(double target, int ulps, FloatingPointKind baseType); +bool match(double const& matchee) const override; +std::string describe() const override; +private: +double m_target; +int m_ulps; +FloatingPointKind m_type; +}; + +} // namespace Floating + +// The following functions create the actual matcher objects. +// This allows the types to be inferred +Floating::WithinUlpsMatcher WithinULP(double target, int maxUlpDiff); +Floating::WithinUlpsMatcher WithinULP(float target, int maxUlpDiff); +Floating::WithinAbsMatcher WithinAbs(double target, double margin); + +} // namespace Matchers +} // namespace Catch + +// end catch_matchers_floating.h +// start catch_matchers_generic.hpp + + #include + #include + +namespace Catch { +namespace Matchers { +namespace Generic { + +namespace Detail { +std::string finalizeDescription(const std::string& desc); +} + +template +class PredicateMatcher : public MatcherBase { +std::function m_predicate; +std::string m_description; +public: + +PredicateMatcher(std::function const& elem, std::string const& descr) +:m_predicate(std::move(elem)), +m_description(Detail::finalizeDescription(descr)) +{} + +bool match( T const& item ) const override { +return m_predicate(item); +} + +std::string describe() const override { +return m_description; +} +}; + +} // namespace Generic + +// The following functions create the actual matcher objects. +// The user has to explicitly specify type to the function, because +// infering std::function is hard (but possible) and +// requires a lot of TMP. +template +Generic::PredicateMatcher Predicate(std::function const& predicate, std::string const& description = "") { +return Generic::PredicateMatcher(predicate, description); +} + +} // namespace Matchers +} // namespace Catch + +// end catch_matchers_generic.hpp +// start catch_matchers_string.h + + #include + +namespace Catch { +namespace Matchers { + +namespace StdString { + +struct CasedString +{ +CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity ); +std::string adjustString( std::string const& str ) const; +std::string caseSensitivitySuffix() const; + +CaseSensitive::Choice m_caseSensitivity; +std::string m_str; +}; + +struct StringMatcherBase : MatcherBase { +StringMatcherBase( std::string const& operation, CasedString const& comparator ); +std::string describe() const override; + +CasedString m_comparator; +std::string m_operation; +}; + +struct EqualsMatcher : StringMatcherBase { +EqualsMatcher( CasedString const& comparator ); +bool match( std::string const& source ) const override; +}; +struct ContainsMatcher : StringMatcherBase { +ContainsMatcher( CasedString const& comparator ); +bool match( std::string const& source ) const override; +}; +struct StartsWithMatcher : StringMatcherBase { +StartsWithMatcher( CasedString const& comparator ); +bool match( std::string const& source ) const override; +}; +struct EndsWithMatcher : StringMatcherBase { +EndsWithMatcher( CasedString const& comparator ); +bool match( std::string const& source ) const override; +}; + +struct RegexMatcher : MatcherBase { +RegexMatcher( std::string regex, CaseSensitive::Choice caseSensitivity ); +bool match( std::string const& matchee ) const override; +std::string describe() const override; + +private: +std::string m_regex; +CaseSensitive::Choice m_caseSensitivity; +}; + +} // namespace StdString + +// The following functions create the actual matcher objects. +// This allows the types to be inferred + +StdString::EqualsMatcher Equals( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); +StdString::ContainsMatcher Contains( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); +StdString::EndsWithMatcher EndsWith( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); +StdString::StartsWithMatcher StartsWith( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); +StdString::RegexMatcher Matches( std::string const& regex, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); + +} // namespace Matchers +} // namespace Catch + +// end catch_matchers_string.h +// start catch_matchers_vector.h + + #include + +namespace Catch { +namespace Matchers { + +namespace Vector { +namespace Detail { +template +size_t count(InputIterator first, InputIterator last, T const& item) { +size_t cnt = 0; +for (; first != last; ++first) { +if (*first == item) { +++cnt; +} +} +return cnt; +} +template +bool contains(InputIterator first, InputIterator last, T const& item) { +for (; first != last; ++first) { +if (*first == item) { +return true; +} +} +return false; +} +} + +template +struct ContainsElementMatcher : MatcherBase> { + +ContainsElementMatcher(T const &comparator) : m_comparator( comparator) {} + +bool match(std::vector const &v) const override { +for (auto const& el : v) { +if (el == m_comparator) { +return true; +} +} +return false; +} + +std::string describe() const override { +return "Contains: " + ::Catch::Detail::stringify( m_comparator ); +} + +T const& m_comparator; +}; + +template +struct ContainsMatcher : MatcherBase> { + +ContainsMatcher(std::vector const &comparator) : m_comparator( comparator ) {} + +bool match(std::vector const &v) const override { +// !TBD: see note in EqualsMatcher +if (m_comparator.size() > v.size()) +return false; +for (auto const& comparator : m_comparator) { +auto present = false; +for (const auto& el : v) { +if (el == comparator) { +present = true; +break; +} +} +if (!present) { +return false; +} +} +return true; +} +std::string describe() const override { +return "Contains: " + ::Catch::Detail::stringify( m_comparator ); +} + +std::vector const& m_comparator; +}; + +template +struct EqualsMatcher : MatcherBase> { + +EqualsMatcher(std::vector const &comparator) : m_comparator( comparator ) {} + +bool match(std::vector const &v) const override { +// !TBD: This currently works if all elements can be compared using != +// - a more general approach would be via a compare template that defaults +// to using !=. but could be specialised for, e.g. std::vector etc +// - then just call that directly +if (m_comparator.size() != v.size()) +return false; +for (std::size_t i = 0; i < v.size(); ++i) +if (m_comparator[i] != v[i]) +return false; +return true; +} +std::string describe() const override { +return "Equals: " + ::Catch::Detail::stringify( m_comparator ); +} +std::vector const& m_comparator; +}; + +template +struct UnorderedEqualsMatcher : MatcherBase> { +UnorderedEqualsMatcher(std::vector const& target) : m_target(target) {} +bool match(std::vector const& vec) const override { +// Note: This is a reimplementation of std::is_permutation, +// because I don't want to include inside the common path +if (m_target.size() != vec.size()) { +return false; +} +auto lfirst = m_target.begin(), llast = m_target.end(); +auto rfirst = vec.begin(), rlast = vec.end(); +// Cut common prefix to optimize checking of permuted parts +while (lfirst != llast && *lfirst == *rfirst) { +++lfirst; ++rfirst; +} +if (lfirst == llast) { +return true; +} + +for (auto mid = lfirst; mid != llast; ++mid) { +// Skip already counted items +if (Detail::contains(lfirst, mid, *mid)) { +continue; +} +size_t num_vec = Detail::count(rfirst, rlast, *mid); +if (num_vec == 0 || Detail::count(lfirst, llast, *mid) != num_vec) { +return false; +} +} + +return true; +} + +std::string describe() const override { +return "UnorderedEquals: " + ::Catch::Detail::stringify(m_target); +} +private: +std::vector const& m_target; +}; + +} // namespace Vector + +// The following functions create the actual matcher objects. +// This allows the types to be inferred + +template +Vector::ContainsMatcher Contains( std::vector const& comparator ) { +return Vector::ContainsMatcher( comparator ); +} + +template +Vector::ContainsElementMatcher VectorContains( T const& comparator ) { +return Vector::ContainsElementMatcher( comparator ); +} + +template +Vector::EqualsMatcher Equals( std::vector const& comparator ) { +return Vector::EqualsMatcher( comparator ); +} + +template +Vector::UnorderedEqualsMatcher UnorderedEquals(std::vector const& target) { +return Vector::UnorderedEqualsMatcher(target); +} + +} // namespace Matchers +} // namespace Catch + +// end catch_matchers_vector.h +namespace Catch { + +template +class MatchExpr : public ITransientExpression { +ArgT const& m_arg; +MatcherT m_matcher; +StringRef m_matcherString; +public: +MatchExpr( ArgT const& arg, MatcherT const& matcher, StringRef const& matcherString ) +: ITransientExpression{ true, matcher.match( arg ) }, +m_arg( arg ), +m_matcher( matcher ), +m_matcherString( matcherString ) +{} + +void streamReconstructedExpression( std::ostream &os ) const override { +auto matcherAsString = m_matcher.toString(); +os << Catch::Detail::stringify( m_arg ) << ' '; +if( matcherAsString == Detail::unprintableString ) +os << m_matcherString; +else +os << matcherAsString; +} +}; + +using StringMatcher = Matchers::Impl::MatcherBase; + +void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef const& matcherString ); + +template +auto makeMatchExpr( ArgT const& arg, MatcherT const& matcher, StringRef const& matcherString ) -> MatchExpr { +return MatchExpr( arg, matcher, matcherString ); +} + +} // namespace Catch + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CHECK_THAT( macroName, matcher, resultDisposition, arg ) \ + do { \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \ + INTERNAL_CATCH_TRY { \ + catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher##_catch_sr ) ); \ + } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( false ) + +/////////////////////////////////////////////////////////////////////////////// + #define INTERNAL_CATCH_THROWS_MATCHES( macroName, exceptionType, resultDisposition, matcher, ... ) \ + do { \ + Catch::AssertionHandler catchAssertionHandler( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(exceptionType) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \ + if( catchAssertionHandler.allowThrows() ) \ + try { \ + static_cast(__VA_ARGS__ ); \ + catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ + } \ + catch( exceptionType const& ex ) { \ + catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher, #matcher##_catch_sr ) ); \ + } \ + catch( ... ) { \ + catchAssertionHandler.handleUnexpectedInflightException(); \ + } \ + else \ + catchAssertionHandler.handleThrowingCallSkipped(); \ + INTERNAL_CATCH_REACT( catchAssertionHandler ) \ + } while( false ) + +// end catch_capture_matchers.h + #endif +// start catch_generators.hpp + +// start catch_interfaces_generatortracker.h + + + #include + +namespace Catch { + +namespace Generators { +class GeneratorUntypedBase { +public: +GeneratorUntypedBase() = default; +virtual ~GeneratorUntypedBase(); +// Attempts to move the generator to the next element +// +// Returns true iff the move succeeded (and a valid element +// can be retrieved). +virtual bool next() = 0; +}; +using GeneratorBasePtr = std::unique_ptr; + +} // namespace Generators + +struct IGeneratorTracker { +virtual ~IGeneratorTracker(); +virtual auto hasGenerator() const -> bool = 0; +virtual auto getGenerator() const -> Generators::GeneratorBasePtr const& = 0; +virtual void setGenerator( Generators::GeneratorBasePtr&& generator ) = 0; +}; + +} // namespace Catch + +// end catch_interfaces_generatortracker.h +// start catch_enforce.h + + #include + +namespace Catch { + #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +template +[[noreturn]] +void throw_exception(Ex const& e) { +throw e; +} + #else // ^^ Exceptions are enabled // Exceptions are disabled vv +[[noreturn]] +void throw_exception(std::exception const& e); + #endif +} // namespace Catch; + + #define CATCH_PREPARE_EXCEPTION( type, msg ) \ + type( ( Catch::ReusableStringStream() << msg ).str() ) + #define CATCH_INTERNAL_ERROR( msg ) \ + Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::logic_error, CATCH_INTERNAL_LINEINFO << ": Internal Catch error: " << msg)) + #define CATCH_ERROR( msg ) \ + Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::domain_error, msg )) + #define CATCH_RUNTIME_ERROR( msg ) \ + Catch::throw_exception(CATCH_PREPARE_EXCEPTION( std::runtime_error, msg )) + #define CATCH_ENFORCE( condition, msg ) \ + do{ if( !(condition) ) CATCH_ERROR( msg ); } while(false) + +// end catch_enforce.h + #include + #include + #include + + #include + #include + +namespace Catch { + +class GeneratorException : public std::exception { +const char* const m_msg = ""; + +public: +GeneratorException(const char* msg): +m_msg(msg) +{} + +const char* what() const noexcept override final; +}; + +namespace Generators { + +// !TBD move this into its own location? +namespace pf{ +template +std::unique_ptr make_unique( Args&&... args ) { +return std::unique_ptr(new T(std::forward(args)...)); +} +} + +template +struct IGenerator : GeneratorUntypedBase { +virtual ~IGenerator() = default; + +// Returns the current element of the generator +// +// \Precondition The generator is either freshly constructed, +// or the last call to `next()` returned true +virtual T const& get() const = 0; +using type = T; +}; + +template +class SingleValueGenerator final : public IGenerator { +T m_value; +public: +SingleValueGenerator(T const& value) : m_value( value ) {} +SingleValueGenerator(T&& value) : m_value(std::move(value)) {} + +T const& get() const override { +return m_value; +} +bool next() override { +return false; +} +}; + +template +class FixedValuesGenerator final : public IGenerator { +std::vector m_values; +size_t m_idx = 0; +public: +FixedValuesGenerator( std::initializer_list values ) : m_values( values ) {} + +T const& get() const override { +return m_values[m_idx]; +} +bool next() override { +++m_idx; +return m_idx < m_values.size(); +} +}; + +template +class GeneratorWrapper final { +std::unique_ptr> m_generator; +public: +GeneratorWrapper(std::unique_ptr> generator): +m_generator(std::move(generator)) +{} +T const& get() const { +return m_generator->get(); +} +bool next() { +return m_generator->next(); +} +}; + +template +GeneratorWrapper value(T&& value) { +return GeneratorWrapper(pf::make_unique>(std::forward(value))); +} +template +GeneratorWrapper values(std::initializer_list values) { +return GeneratorWrapper(pf::make_unique>(values)); +} + +template +class Generators : public IGenerator { +std::vector> m_generators; +size_t m_current = 0; + +void populate(GeneratorWrapper&& generator) { +m_generators.emplace_back(std::move(generator)); +} +void populate(T&& val) { +m_generators.emplace_back(value(std::move(val))); +} +template +void populate(U&& val) { +populate(T(std::move(val))); +} +template +void populate(U&& valueOrGenerator, Gs... moreGenerators) { +populate(std::forward(valueOrGenerator)); +populate(std::forward(moreGenerators)...); +} + +public: +template +Generators(Gs... moreGenerators) { +m_generators.reserve(sizeof...(Gs)); +populate(std::forward(moreGenerators)...); +} + +T const& get() const override { +return m_generators[m_current].get(); +} + +bool next() override { +if (m_current >= m_generators.size()) { +return false; +} +const bool current_status = m_generators[m_current].next(); +if (!current_status) { +++m_current; +} +return m_current < m_generators.size(); +} +}; + +template +GeneratorWrapper> table( std::initializer_list::type...>> tuples ) { +return values>( tuples ); +} + +// Tag type to signal that a generator sequence should convert arguments to a specific type +template +struct as {}; + +template +auto makeGenerators( GeneratorWrapper&& generator, Gs... moreGenerators ) -> Generators { +return Generators(std::move(generator), std::forward(moreGenerators)...); +} +template +auto makeGenerators( GeneratorWrapper&& generator ) -> Generators { +return Generators(std::move(generator)); +} +template +auto makeGenerators( T&& val, Gs... moreGenerators ) -> Generators { +return makeGenerators( value( std::forward( val ) ), std::forward( moreGenerators )... ); +} +template +auto makeGenerators( as, U&& val, Gs... moreGenerators ) -> Generators { +return makeGenerators( value( T( std::forward( val ) ) ), std::forward( moreGenerators )... ); +} + +auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker&; + +template +// Note: The type after -> is weird, because VS2015 cannot parse +// the expression used in the typedef inside, when it is in +// return type. Yeah. +auto generate( SourceLineInfo const& lineInfo, L const& generatorExpression ) -> decltype(std::declval().get()) { +using UnderlyingType = typename decltype(generatorExpression())::type; + +IGeneratorTracker& tracker = acquireGeneratorTracker( lineInfo ); +if (!tracker.hasGenerator()) { +tracker.setGenerator(pf::make_unique>(generatorExpression())); +} + +auto const& generator = static_cast const&>( *tracker.getGenerator() ); +return generator.get(); +} + +} // namespace Generators +} // namespace Catch + + #define GENERATE( ... ) \ + Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [ ]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) + #define GENERATE_COPY( ... ) \ + Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [=]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) + #define GENERATE_REF( ... ) \ + Catch::Generators::generate( CATCH_INTERNAL_LINEINFO, [&]{ using namespace Catch::Generators; return makeGenerators( __VA_ARGS__ ); } ) + +// end catch_generators.hpp +// start catch_generators_generic.hpp + +namespace Catch { +namespace Generators { + +template +class TakeGenerator : public IGenerator { +GeneratorWrapper m_generator; +size_t m_returned = 0; +size_t m_target; +public: +TakeGenerator(size_t target, GeneratorWrapper&& generator): +m_generator(std::move(generator)), +m_target(target) +{ +assert(target != 0 && "Empty generators are not allowed"); +} +T const& get() const override { +return m_generator.get(); +} +bool next() override { +++m_returned; +if (m_returned >= m_target) { +return false; +} + +const auto success = m_generator.next(); +// If the underlying generator does not contain enough values +// then we cut short as well +if (!success) { +m_returned = m_target; +} +return success; +} +}; + +template +GeneratorWrapper take(size_t target, GeneratorWrapper&& generator) { +return GeneratorWrapper(pf::make_unique>(target, std::move(generator))); +} + +template +class FilterGenerator : public IGenerator { +GeneratorWrapper m_generator; +Predicate m_predicate; +public: +template +FilterGenerator(P&& pred, GeneratorWrapper&& generator): +m_generator(std::move(generator)), +m_predicate(std::forward

(pred)) +{ +if (!m_predicate(m_generator.get())) { +// It might happen that there are no values that pass the +// filter. In that case we throw an exception. +auto has_initial_value = next(); +if (!has_initial_value) { +Catch::throw_exception(GeneratorException("No valid value found in filtered generator")); +} +} +} + +T const& get() const override { +return m_generator.get(); +} + +bool next() override { +bool success = m_generator.next(); +if (!success) { +return false; +} +while (!m_predicate(m_generator.get()) && (success = m_generator.next()) == true); +return success; +} +}; + +template +GeneratorWrapper filter(Predicate&& pred, GeneratorWrapper&& generator) { +return GeneratorWrapper(std::unique_ptr>(pf::make_unique>(std::forward(pred), std::move(generator)))); +} + +template +class RepeatGenerator : public IGenerator { +GeneratorWrapper m_generator; +mutable std::vector m_returned; +size_t m_target_repeats; +size_t m_current_repeat = 0; +size_t m_repeat_index = 0; +public: +RepeatGenerator(size_t repeats, GeneratorWrapper&& generator): +m_generator(std::move(generator)), +m_target_repeats(repeats) +{ +assert(m_target_repeats > 0 && "Repeat generator must repeat at least once"); +} + +T const& get() const override { +if (m_current_repeat == 0) { +m_returned.push_back(m_generator.get()); +return m_returned.back(); +} +return m_returned[m_repeat_index]; +} + +bool next() override { +// There are 2 basic cases: +// 1) We are still reading the generator +// 2) We are reading our own cache + +// In the first case, we need to poke the underlying generator. +// If it happily moves, we are left in that state, otherwise it is time to start reading from our cache +if (m_current_repeat == 0) { +const auto success = m_generator.next(); +if (!success) { +++m_current_repeat; +} +return m_current_repeat < m_target_repeats; +} + +// In the second case, we need to move indices forward and check that we haven't run up against the end +++m_repeat_index; +if (m_repeat_index == m_returned.size()) { +m_repeat_index = 0; +++m_current_repeat; +} +return m_current_repeat < m_target_repeats; +} +}; + +template +GeneratorWrapper repeat(size_t repeats, GeneratorWrapper&& generator) { +return GeneratorWrapper(pf::make_unique>(repeats, std::move(generator))); +} + +template +class MapGenerator : public IGenerator { +// TBD: provide static assert for mapping function, for friendly error message +GeneratorWrapper m_generator; +Func m_function; +// To avoid returning dangling reference, we have to save the values +T m_cache; +public: +template +MapGenerator(F2&& function, GeneratorWrapper&& generator) : +m_generator(std::move(generator)), +m_function(std::forward(function)), +m_cache(m_function(m_generator.get())) +{} + +T const& get() const override { +return m_cache; +} +bool next() override { +const auto success = m_generator.next(); +if (success) { +m_cache = m_function(m_generator.get()); +} +return success; +} +}; + + #if defined(__cpp_lib_is_invocable) && __cpp_lib_is_invocable >= 201703 +// std::result_of is deprecated in C++17 and removed in C++20. Hence, it is +// replaced with std::invoke_result here. Also *_t format is preferred over +// typename *::type format. +template +using MapFunctionReturnType = std::remove_reference_t>>; + #else +template +using MapFunctionReturnType = typename std::remove_reference::type>::type>::type; + #endif + +template > +GeneratorWrapper map(Func&& function, GeneratorWrapper&& generator) { +return GeneratorWrapper( +pf::make_unique>(std::forward(function), std::move(generator)) +); +} + +template +GeneratorWrapper map(Func&& function, GeneratorWrapper&& generator) { +return GeneratorWrapper( +pf::make_unique>(std::forward(function), std::move(generator)) +); +} + +template +class ChunkGenerator final : public IGenerator> { +std::vector m_chunk; +size_t m_chunk_size; +GeneratorWrapper m_generator; +bool m_used_up = false; +public: +ChunkGenerator(size_t size, GeneratorWrapper generator) : +m_chunk_size(size), m_generator(std::move(generator)) +{ +m_chunk.reserve(m_chunk_size); +m_chunk.push_back(m_generator.get()); +for (size_t i = 1; i < m_chunk_size; ++i) { +if (!m_generator.next()) { +Catch::throw_exception(GeneratorException("Not enough values to initialize the first chunk")); +} +m_chunk.push_back(m_generator.get()); +} +} +std::vector const& get() const override { +return m_chunk; +} +bool next() override { +m_chunk.clear(); +for (size_t idx = 0; idx < m_chunk_size; ++idx) { +if (!m_generator.next()) { +return false; +} +m_chunk.push_back(m_generator.get()); +} +return true; +} +}; + +template +GeneratorWrapper> chunk(size_t size, GeneratorWrapper&& generator) { +return GeneratorWrapper>( +pf::make_unique>(size, std::move(generator)) +); +} + +} // namespace Generators +} // namespace Catch + +// end catch_generators_generic.hpp +// start catch_generators_specific.hpp + +// start catch_context.h + + #include + +namespace Catch { + +struct IResultCapture; +struct IRunner; +struct IConfig; +struct IMutableContext; + +using IConfigPtr = std::shared_ptr; + +struct IContext +{ +virtual ~IContext(); + +virtual IResultCapture* getResultCapture() = 0; +virtual IRunner* getRunner() = 0; +virtual IConfigPtr const& getConfig() const = 0; +}; + +struct IMutableContext : IContext +{ +virtual ~IMutableContext(); +virtual void setResultCapture( IResultCapture* resultCapture ) = 0; +virtual void setRunner( IRunner* runner ) = 0; +virtual void setConfig( IConfigPtr const& config ) = 0; + +private: +static IMutableContext *currentContext; +friend IMutableContext& getCurrentMutableContext(); +friend void cleanUpContext(); +static void createContext(); +}; + +inline IMutableContext& getCurrentMutableContext() +{ +if( !IMutableContext::currentContext ) +IMutableContext::createContext(); +return *IMutableContext::currentContext; +} + +inline IContext& getCurrentContext() +{ +return getCurrentMutableContext(); +} + +void cleanUpContext(); +} + +// end catch_context.h +// start catch_interfaces_config.h + + #include + #include + #include + #include + +namespace Catch { + +enum class Verbosity { +Quiet = 0, +Normal, +High +}; + +struct WarnAbout { enum What { +Nothing = 0x00, +NoAssertions = 0x01, +NoTests = 0x02 +}; }; + +struct ShowDurations { enum OrNot { +DefaultForReporter, +Always, +Never +}; }; +struct RunTests { enum InWhatOrder { +InDeclarationOrder, +InLexicographicalOrder, +InRandomOrder +}; }; +struct UseColour { enum YesOrNo { +Auto, +Yes, +No +}; }; +struct WaitForKeypress { enum When { +Never, +BeforeStart = 1, +BeforeExit = 2, +BeforeStartAndExit = BeforeStart | BeforeExit +}; }; + +class TestSpec; + +struct IConfig : NonCopyable { + +virtual ~IConfig(); + +virtual bool allowThrows() const = 0; +virtual std::ostream& stream() const = 0; +virtual std::string name() const = 0; +virtual bool includeSuccessfulResults() const = 0; +virtual bool shouldDebugBreak() const = 0; +virtual bool warnAboutMissingAssertions() const = 0; +virtual bool warnAboutNoTests() const = 0; +virtual int abortAfter() const = 0; +virtual bool showInvisibles() const = 0; +virtual ShowDurations::OrNot showDurations() const = 0; +virtual TestSpec const& testSpec() const = 0; +virtual bool hasTestFilters() const = 0; +virtual std::vector const& getTestsOrTags() const = 0; +virtual RunTests::InWhatOrder runOrder() const = 0; +virtual unsigned int rngSeed() const = 0; +virtual int benchmarkResolutionMultiple() const = 0; +virtual UseColour::YesOrNo useColour() const = 0; +virtual std::vector const& getSectionsToRun() const = 0; +virtual Verbosity verbosity() const = 0; +}; + +using IConfigPtr = std::shared_ptr; +} + +// end catch_interfaces_config.h + #include + +namespace Catch { +namespace Generators { + +template +class RandomFloatingGenerator final : public IGenerator { +// FIXME: What is the right seed? +std::minstd_rand m_rand; +std::uniform_real_distribution m_dist; +Float m_current_number; +public: + +RandomFloatingGenerator(Float a, Float b): +m_rand(getCurrentContext().getConfig()->rngSeed()), +m_dist(a, b) { +static_cast(next()); +} + +Float const& get() const override { +return m_current_number; +} +bool next() override { +m_current_number = m_dist(m_rand); +return true; +} +}; + +template +class RandomIntegerGenerator final : public IGenerator { +std::minstd_rand m_rand; +std::uniform_int_distribution m_dist; +Integer m_current_number; +public: + +RandomIntegerGenerator(Integer a, Integer b): +m_rand(getCurrentContext().getConfig()->rngSeed()), +m_dist(a, b) { +static_cast(next()); +} + +Integer const& get() const override { +return m_current_number; +} +bool next() override { +m_current_number = m_dist(m_rand); +return true; +} +}; + +// TODO: Ideally this would be also constrained against the various char types, +// but I don't expect users to run into that in practice. +template +typename std::enable_if::value && !std::is_same::value, +GeneratorWrapper>::type +random(T a, T b) { +return GeneratorWrapper( +pf::make_unique>(a, b) +); +} + +template +typename std::enable_if::value, +GeneratorWrapper>::type +random(T a, T b) { +return GeneratorWrapper( +pf::make_unique>(a, b) +); +} + +template +class RangeGenerator final : public IGenerator { +T m_current; +T m_end; +T m_step; +bool m_positive; + +public: +RangeGenerator(T const& start, T const& end, T const& step): +m_current(start), +m_end(end), +m_step(step), +m_positive(m_step > T(0)) +{ +assert(m_current != m_end && "Range start and end cannot be equal"); +assert(m_step != T(0) && "Step size cannot be zero"); +assert(((m_positive && m_current <= m_end) || (!m_positive && m_current >= m_end)) && "Step moves away from end"); +} + +RangeGenerator(T const& start, T const& end): +RangeGenerator(start, end, (start < end) ? T(1) : T(-1)) +{} + +T const& get() const override { +return m_current; +} + +bool next() override { +m_current += m_step; +return (m_positive) ? (m_current < m_end) : (m_current > m_end); +} +}; + +template +GeneratorWrapper range(T const& start, T const& end, T const& step) { +static_assert(std::is_integral::value && !std::is_same::value, "Type must be an integer"); +return GeneratorWrapper(pf::make_unique>(start, end, step)); +} + +template +GeneratorWrapper range(T const& start, T const& end) { +static_assert(std::is_integral::value && !std::is_same::value, "Type must be an integer"); +return GeneratorWrapper(pf::make_unique>(start, end)); +} + +} // namespace Generators +} // namespace Catch + +// end catch_generators_specific.hpp + +// These files are included here so the single_include script doesn't put them +// in the conditionally compiled sections +// start catch_test_case_info.h + + #include + #include + #include + + #ifdef __clang__ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpadded" + #endif + +namespace Catch { + +struct ITestInvoker; + +struct TestCaseInfo { +enum SpecialProperties{ +None = 0, +IsHidden = 1 << 1, +ShouldFail = 1 << 2, +MayFail = 1 << 3, +Throws = 1 << 4, +NonPortable = 1 << 5, +Benchmark = 1 << 6 +}; + +TestCaseInfo( std::string const& _name, +std::string const& _className, +std::string const& _description, +std::vector const& _tags, +SourceLineInfo const& _lineInfo ); + +friend void setTags( TestCaseInfo& testCaseInfo, std::vector tags ); + +bool isHidden() const; +bool throws() const; +bool okToFail() const; +bool expectedToFail() const; + +std::string tagsAsString() const; + +std::string name; +std::string className; +std::string description; +std::vector tags; +std::vector lcaseTags; +SourceLineInfo lineInfo; +SpecialProperties properties; +}; + +class TestCase : public TestCaseInfo { +public: + +TestCase( ITestInvoker* testCase, TestCaseInfo&& info ); + +TestCase withName( std::string const& _newName ) const; + +void invoke() const; + +TestCaseInfo const& getTestCaseInfo() const; + +bool operator == ( TestCase const& other ) const; +bool operator < ( TestCase const& other ) const; + +private: +std::shared_ptr test; +}; + +TestCase makeTestCase( ITestInvoker* testCase, +std::string const& className, +NameAndTags const& nameAndTags, +SourceLineInfo const& lineInfo ); +} + + #ifdef __clang__ + #pragma clang diagnostic pop + #endif + +// end catch_test_case_info.h +// start catch_interfaces_runner.h + +namespace Catch { + +struct IRunner { +virtual ~IRunner(); +virtual bool aborting() const = 0; +}; +} + +// end catch_interfaces_runner.h + + #ifdef __OBJC__ +// start catch_objc.hpp + + #import + + #include + +// NB. Any general catch headers included here must be included +// in catch.hpp first to make sure they are included by the single +// header for non obj-usage + +/////////////////////////////////////////////////////////////////////////////// +// This protocol is really only here for (self) documenting purposes, since +// all its methods are optional. +@protocol OcFixture + +@optional + +-(void) setUp; +-(void) tearDown; + +@end + +namespace Catch { + +class OcMethod : public ITestInvoker { + +public: +OcMethod( Class cls, SEL sel ) : m_cls( cls ), m_sel( sel ) {} + +virtual void invoke() const { +id obj = [[m_cls alloc] init]; + +performOptionalSelector( obj, @selector(setUp) ); +performOptionalSelector( obj, m_sel ); +performOptionalSelector( obj, @selector(tearDown) ); + +arcSafeRelease( obj ); +} +private: +virtual ~OcMethod() {} + +Class m_cls; +SEL m_sel; +}; + +namespace Detail{ + +inline std::string getAnnotation( Class cls, +std::string const& annotationName, +std::string const& testCaseName ) { +NSString* selStr = [[NSString alloc] initWithFormat:@"Catch_%s_%s", annotationName.c_str(), testCaseName.c_str()]; +SEL sel = NSSelectorFromString( selStr ); +arcSafeRelease( selStr ); +id value = performOptionalSelector( cls, sel ); +if( value ) +return [(NSString*)value UTF8String]; +return ""; +} +} + +inline std::size_t registerTestMethods() { +std::size_t noTestMethods = 0; +int noClasses = objc_getClassList( nullptr, 0 ); + +Class* classes = (CATCH_UNSAFE_UNRETAINED Class *)malloc( sizeof(Class) * noClasses); +objc_getClassList( classes, noClasses ); + +for( int c = 0; c < noClasses; c++ ) { +Class cls = classes[c]; +{ +u_int count; +Method* methods = class_copyMethodList( cls, &count ); +for( u_int m = 0; m < count ; m++ ) { +SEL selector = method_getName(methods[m]); +std::string methodName = sel_getName(selector); +if( startsWith( methodName, "Catch_TestCase_" ) ) { +std::string testCaseName = methodName.substr( 15 ); +std::string name = Detail::getAnnotation( cls, "Name", testCaseName ); +std::string desc = Detail::getAnnotation( cls, "Description", testCaseName ); +const char* className = class_getName( cls ); + +getMutableRegistryHub().registerTest( makeTestCase( new OcMethod( cls, selector ), className, NameAndTags( name.c_str(), desc.c_str() ), SourceLineInfo("",0) ) ); +noTestMethods++; +} +} +free(methods); +} +} +return noTestMethods; +} + + #if !defined(CATCH_CONFIG_DISABLE_MATCHERS) + +namespace Matchers { +namespace Impl { +namespace NSStringMatchers { + +struct StringHolder : MatcherBase{ +StringHolder( NSString* substr ) : m_substr( [substr copy] ){} +StringHolder( StringHolder const& other ) : m_substr( [other.m_substr copy] ){} +StringHolder() { +arcSafeRelease( m_substr ); +} + +bool match( NSString* const& str ) const override { +return false; +} + +NSString* CATCH_ARC_STRONG m_substr; +}; + +struct Equals : StringHolder { +Equals( NSString* substr ) : StringHolder( substr ){} + +bool match( NSString* const& str ) const override { +return (str != nil || m_substr == nil ) && +[str isEqualToString:m_substr]; +} + +std::string describe() const override { +return "equals string: " + Catch::Detail::stringify( m_substr ); +} +}; + +struct Contains : StringHolder { +Contains( NSString* substr ) : StringHolder( substr ){} + +bool match( NSString* const& str ) const override { +return (str != nil || m_substr == nil ) && +[str rangeOfString:m_substr].location != NSNotFound; +} + +std::string describe() const override { +return "contains string: " + Catch::Detail::stringify( m_substr ); +} +}; + +struct StartsWith : StringHolder { +StartsWith( NSString* substr ) : StringHolder( substr ){} + +bool match( NSString* const& str ) const override { +return (str != nil || m_substr == nil ) && +[str rangeOfString:m_substr].location == 0; +} + +std::string describe() const override { +return "starts with: " + Catch::Detail::stringify( m_substr ); +} +}; +struct EndsWith : StringHolder { +EndsWith( NSString* substr ) : StringHolder( substr ){} + +bool match( NSString* const& str ) const override { +return (str != nil || m_substr == nil ) && +[str rangeOfString:m_substr].location == [str length] - [m_substr length]; +} + +std::string describe() const override { +return "ends with: " + Catch::Detail::stringify( m_substr ); +} +}; + +} // namespace NSStringMatchers +} // namespace Impl + +inline Impl::NSStringMatchers::Equals +Equals( NSString* substr ){ return Impl::NSStringMatchers::Equals( substr ); } + +inline Impl::NSStringMatchers::Contains +Contains( NSString* substr ){ return Impl::NSStringMatchers::Contains( substr ); } + +inline Impl::NSStringMatchers::StartsWith +StartsWith( NSString* substr ){ return Impl::NSStringMatchers::StartsWith( substr ); } + +inline Impl::NSStringMatchers::EndsWith +EndsWith( NSString* substr ){ return Impl::NSStringMatchers::EndsWith( substr ); } + +} // namespace Matchers + +using namespace Matchers; + + #endif // CATCH_CONFIG_DISABLE_MATCHERS + +} // namespace Catch + +/////////////////////////////////////////////////////////////////////////////// + #define OC_MAKE_UNIQUE_NAME( root, uniqueSuffix ) root##uniqueSuffix + #define OC_TEST_CASE2( name, desc, uniqueSuffix ) \ ++(NSString*) OC_MAKE_UNIQUE_NAME( Catch_Name_test_, uniqueSuffix ) \ +{ \ +return @ name; \ +} \ ++(NSString*) OC_MAKE_UNIQUE_NAME( Catch_Description_test_, uniqueSuffix ) \ +{ \ +return @ desc; \ +} \ +-(void) OC_MAKE_UNIQUE_NAME( Catch_TestCase_test_, uniqueSuffix ) + + #define OC_TEST_CASE( name, desc ) OC_TEST_CASE2( name, desc, __LINE__ ) + +// end catch_objc.hpp + #endif + + #ifdef CATCH_CONFIG_EXTERNAL_INTERFACES +// start catch_external_interfaces.h + +// start catch_reporter_bases.hpp + +// start catch_interfaces_reporter.h + +// start catch_config.hpp + +// start catch_test_spec_parser.h + + #ifdef __clang__ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpadded" + #endif + +// start catch_test_spec.h + + #ifdef __clang__ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wpadded" + #endif + +// start catch_wildcard_pattern.h + +namespace Catch +{ +class WildcardPattern { +enum WildcardPosition { +NoWildcard = 0, +WildcardAtStart = 1, +WildcardAtEnd = 2, +WildcardAtBothEnds = WildcardAtStart | WildcardAtEnd +}; + +public: + +WildcardPattern( std::string const& pattern, CaseSensitive::Choice caseSensitivity ); +virtual ~WildcardPattern() = default; +virtual bool matches( std::string const& str ) const; + +private: +std::string adjustCase( std::string const& str ) const; +CaseSensitive::Choice m_caseSensitivity; +WildcardPosition m_wildcard = NoWildcard; +std::string m_pattern; +}; +} + +// end catch_wildcard_pattern.h + #include + #include + #include + +namespace Catch { + +class TestSpec { +struct Pattern { +virtual ~Pattern(); +virtual bool matches( TestCaseInfo const& testCase ) const = 0; +}; +using PatternPtr = std::shared_ptr; + +class NamePattern : public Pattern { +public: +NamePattern( std::string const& name ); +virtual ~NamePattern(); +virtual bool matches( TestCaseInfo const& testCase ) const override; +private: +WildcardPattern m_wildcardPattern; +}; + +class TagPattern : public Pattern { +public: +TagPattern( std::string const& tag ); +virtual ~TagPattern(); +virtual bool matches( TestCaseInfo const& testCase ) const override; +private: +std::string m_tag; +}; + +class ExcludedPattern : public Pattern { +public: +ExcludedPattern( PatternPtr const& underlyingPattern ); +virtual ~ExcludedPattern(); +virtual bool matches( TestCaseInfo const& testCase ) const override; +private: +PatternPtr m_underlyingPattern; +}; + +struct Filter { +std::vector m_patterns; + +bool matches( TestCaseInfo const& testCase ) const; +}; + +public: +bool hasFilters() const; +bool matches( TestCaseInfo const& testCase ) const; + +private: +std::vector m_filters; + +friend class TestSpecParser; +}; +} + + #ifdef __clang__ + #pragma clang diagnostic pop + #endif + +// end catch_test_spec.h +// start catch_interfaces_tag_alias_registry.h + + #include + +namespace Catch { + +struct TagAlias; + +struct ITagAliasRegistry { +virtual ~ITagAliasRegistry(); +// Nullptr if not present +virtual TagAlias const* find( std::string const& alias ) const = 0; +virtual std::string expandAliases( std::string const& unexpandedTestSpec ) const = 0; + +static ITagAliasRegistry const& get(); +}; + +} // end namespace Catch + +// end catch_interfaces_tag_alias_registry.h +namespace Catch { + +class TestSpecParser { +enum Mode{ None, Name, QuotedName, Tag, EscapedName }; +Mode m_mode = None; +bool m_exclusion = false; +std::size_t m_start = std::string::npos, m_pos = 0; +std::string m_arg; +std::vector m_escapeChars; +TestSpec::Filter m_currentFilter; +TestSpec m_testSpec; +ITagAliasRegistry const* m_tagAliases = nullptr; + +public: +TestSpecParser( ITagAliasRegistry const& tagAliases ); + +TestSpecParser& parse( std::string const& arg ); +TestSpec testSpec(); + +private: +void visitChar( char c ); +void startNewMode( Mode mode, std::size_t start ); +void escape(); +std::string subString() const; + +template +void addPattern() { +std::string token = subString(); +for( std::size_t i = 0; i < m_escapeChars.size(); ++i ) +token = token.substr( 0, m_escapeChars[i]-m_start-i ) + token.substr( m_escapeChars[i]-m_start-i+1 ); +m_escapeChars.clear(); +if( startsWith( token, "exclude:" ) ) { +m_exclusion = true; +token = token.substr( 8 ); +} +if( !token.empty() ) { +TestSpec::PatternPtr pattern = std::make_shared( token ); +if( m_exclusion ) +pattern = std::make_shared( pattern ); +m_currentFilter.m_patterns.push_back( pattern ); +} +m_exclusion = false; +m_mode = None; +} + +void addFilter(); +}; +TestSpec parseTestSpec( std::string const& arg ); + +} // namespace Catch + + #ifdef __clang__ + #pragma clang diagnostic pop + #endif + +// end catch_test_spec_parser.h +// Libstdc++ doesn't like incomplete classes for unique_ptr + + #include + #include + #include + + #ifndef CATCH_CONFIG_CONSOLE_WIDTH + #define CATCH_CONFIG_CONSOLE_WIDTH 80 + #endif + +namespace Catch { + +struct IStream; + +struct ConfigData { +bool listTests = false; +bool listTags = false; +bool listReporters = false; +bool listTestNamesOnly = false; + +bool showSuccessfulTests = false; +bool shouldDebugBreak = false; +bool noThrow = false; +bool showHelp = false; +bool showInvisibles = false; +bool filenamesAsTags = false; +bool libIdentify = false; + +int abortAfter = -1; +unsigned int rngSeed = 0; +int benchmarkResolutionMultiple = 100; + +Verbosity verbosity = Verbosity::Normal; +WarnAbout::What warnings = WarnAbout::Nothing; +ShowDurations::OrNot showDurations = ShowDurations::DefaultForReporter; +RunTests::InWhatOrder runOrder = RunTests::InDeclarationOrder; +UseColour::YesOrNo useColour = UseColour::Auto; +WaitForKeypress::When waitForKeypress = WaitForKeypress::Never; + +std::string outputFilename; +std::string name; +std::string processName; + #ifndef CATCH_CONFIG_DEFAULT_REPORTER + #define CATCH_CONFIG_DEFAULT_REPORTER "console" + #endif +std::string reporterName = CATCH_CONFIG_DEFAULT_REPORTER; + #undef CATCH_CONFIG_DEFAULT_REPORTER + +std::vector testsOrTags; +std::vector sectionsToRun; +}; + +class Config : public IConfig { +public: + +Config() = default; +Config( ConfigData const& data ); +virtual ~Config() = default; + +std::string const& getFilename() const; + +bool listTests() const; +bool listTestNamesOnly() const; +bool listTags() const; +bool listReporters() const; + +std::string getProcessName() const; +std::string const& getReporterName() const; + +std::vector const& getTestsOrTags() const override; +std::vector const& getSectionsToRun() const override; + +virtual TestSpec const& testSpec() const override; +bool hasTestFilters() const override; + +bool showHelp() const; + +// IConfig interface +bool allowThrows() const override; +std::ostream& stream() const override; +std::string name() const override; +bool includeSuccessfulResults() const override; +bool warnAboutMissingAssertions() const override; +bool warnAboutNoTests() const override; +ShowDurations::OrNot showDurations() const override; +RunTests::InWhatOrder runOrder() const override; +unsigned int rngSeed() const override; +int benchmarkResolutionMultiple() const override; +UseColour::YesOrNo useColour() const override; +bool shouldDebugBreak() const override; +int abortAfter() const override; +bool showInvisibles() const override; +Verbosity verbosity() const override; + +private: + +IStream const* openStream(); +ConfigData m_data; + +std::unique_ptr m_stream; +TestSpec m_testSpec; +bool m_hasTestFilters = false; +}; + +} // end namespace Catch + +// end catch_config.hpp +// start catch_assertionresult.h + + #include + +namespace Catch { + +struct AssertionResultData +{ +AssertionResultData() = delete; + +AssertionResultData( ResultWas::OfType _resultType, LazyExpression const& _lazyExpression ); + +std::string message; +mutable std::string reconstructedExpression; +LazyExpression lazyExpression; +ResultWas::OfType resultType; + +std::string reconstructExpression() const; +}; + +class AssertionResult { +public: +AssertionResult() = delete; +AssertionResult( AssertionInfo const& info, AssertionResultData const& data ); + +bool isOk() const; +bool succeeded() const; +ResultWas::OfType getResultType() const; +bool hasExpression() const; +bool hasMessage() const; +std::string getExpression() const; +std::string getExpressionInMacro() const; +bool hasExpandedExpression() const; +std::string getExpandedExpression() const; +std::string getMessage() const; +SourceLineInfo getSourceInfo() const; +StringRef getTestMacroName() const; + +//protected: +AssertionInfo m_info; +AssertionResultData m_resultData; +}; + +} // end namespace Catch + +// end catch_assertionresult.h +// start catch_option.hpp + +namespace Catch { + +// An optional type +template +class Option { +public: +Option() : nullableValue( nullptr ) {} +Option( T const& _value ) +: nullableValue( new( storage ) T( _value ) ) +{} +Option( Option const& _other ) +: nullableValue( _other ? new( storage ) T( *_other ) : nullptr ) +{} + +~Option() { +reset(); +} + +Option& operator= ( Option const& _other ) { +if( &_other != this ) { +reset(); +if( _other ) +nullableValue = new( storage ) T( *_other ); +} +return *this; +} +Option& operator = ( T const& _value ) { +reset(); +nullableValue = new( storage ) T( _value ); +return *this; +} + +void reset() { +if( nullableValue ) +nullableValue->~T(); +nullableValue = nullptr; +} + +T& operator*() { return *nullableValue; } +T const& operator*() const { return *nullableValue; } +T* operator->() { return nullableValue; } +const T* operator->() const { return nullableValue; } + +T valueOr( T const& defaultValue ) const { +return nullableValue ? *nullableValue : defaultValue; +} + +bool some() const { return nullableValue != nullptr; } +bool none() const { return nullableValue == nullptr; } + +bool operator !() const { return nullableValue == nullptr; } +explicit operator bool() const { +return some(); +} + +private: +T *nullableValue; +alignas(alignof(T)) char storage[sizeof(T)]; +}; + +} // end namespace Catch + +// end catch_option.hpp + #include + #include + #include + #include + #include + +namespace Catch { + +struct ReporterConfig { +explicit ReporterConfig( IConfigPtr const& _fullConfig ); + +ReporterConfig( IConfigPtr const& _fullConfig, std::ostream& _stream ); + +std::ostream& stream() const; +IConfigPtr fullConfig() const; + +private: +std::ostream* m_stream; +IConfigPtr m_fullConfig; +}; + +struct ReporterPreferences { +bool shouldRedirectStdOut = false; +bool shouldReportAllAssertions = false; +}; + +template +struct LazyStat : Option { +LazyStat& operator=( T const& _value ) { +Option::operator=( _value ); +used = false; +return *this; +} +void reset() { +Option::reset(); +used = false; +} +bool used = false; +}; + +struct TestRunInfo { +TestRunInfo( std::string const& _name ); +std::string name; +}; +struct GroupInfo { +GroupInfo( std::string const& _name, +std::size_t _groupIndex, +std::size_t _groupsCount ); + +std::string name; +std::size_t groupIndex; +std::size_t groupsCounts; +}; + +struct AssertionStats { +AssertionStats( AssertionResult const& _assertionResult, +std::vector const& _infoMessages, +Totals const& _totals ); + +AssertionStats( AssertionStats const& ) = default; +AssertionStats( AssertionStats && ) = default; +AssertionStats& operator = ( AssertionStats const& ) = delete; +AssertionStats& operator = ( AssertionStats && ) = delete; +virtual ~AssertionStats(); + +AssertionResult assertionResult; +std::vector infoMessages; +Totals totals; +}; + +struct SectionStats { +SectionStats( SectionInfo const& _sectionInfo, +Counts const& _assertions, +double _durationInSeconds, +bool _missingAssertions ); +SectionStats( SectionStats const& ) = default; +SectionStats( SectionStats && ) = default; +SectionStats& operator = ( SectionStats const& ) = default; +SectionStats& operator = ( SectionStats && ) = default; +virtual ~SectionStats(); + +SectionInfo sectionInfo; +Counts assertions; +double durationInSeconds; +bool missingAssertions; +}; + +struct TestCaseStats { +TestCaseStats( TestCaseInfo const& _testInfo, +Totals const& _totals, +std::string const& _stdOut, +std::string const& _stdErr, +bool _aborting ); + +TestCaseStats( TestCaseStats const& ) = default; +TestCaseStats( TestCaseStats && ) = default; +TestCaseStats& operator = ( TestCaseStats const& ) = default; +TestCaseStats& operator = ( TestCaseStats && ) = default; +virtual ~TestCaseStats(); + +TestCaseInfo testInfo; +Totals totals; +std::string stdOut; +std::string stdErr; +bool aborting; +}; + +struct TestGroupStats { +TestGroupStats( GroupInfo const& _groupInfo, +Totals const& _totals, +bool _aborting ); +TestGroupStats( GroupInfo const& _groupInfo ); + +TestGroupStats( TestGroupStats const& ) = default; +TestGroupStats( TestGroupStats && ) = default; +TestGroupStats& operator = ( TestGroupStats const& ) = default; +TestGroupStats& operator = ( TestGroupStats && ) = default; +virtual ~TestGroupStats(); + +GroupInfo groupInfo; +Totals totals; +bool aborting; +}; + +struct TestRunStats { +TestRunStats( TestRunInfo const& _runInfo, +Totals const& _totals, +bool _aborting ); + +TestRunStats( TestRunStats const& ) = default; +TestRunStats( TestRunStats && ) = default; +TestRunStats& operator = ( TestRunStats const& ) = default; +TestRunStats& operator = ( TestRunStats && ) = default; +virtual ~TestRunStats(); + +TestRunInfo runInfo; +Totals totals; +bool aborting; +}; + +struct BenchmarkInfo { +std::string name; +}; +struct BenchmarkStats { +BenchmarkInfo info; +std::size_t iterations; +uint64_t elapsedTimeInNanoseconds; +}; + +struct IStreamingReporter { +virtual ~IStreamingReporter() = default; + +// Implementing class must also provide the following static methods: +// static std::string getDescription(); +// static std::set getSupportedVerbosities() + +virtual ReporterPreferences getPreferences() const = 0; + +virtual void noMatchingTestCases( std::string const& spec ) = 0; + +virtual void testRunStarting( TestRunInfo const& testRunInfo ) = 0; +virtual void testGroupStarting( GroupInfo const& groupInfo ) = 0; + +virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0; +virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0; + +// *** experimental *** +virtual void benchmarkStarting( BenchmarkInfo const& ) {} + +virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0; + +// The return value indicates if the messages buffer should be cleared: +virtual bool assertionEnded( AssertionStats const& assertionStats ) = 0; + +// *** experimental *** +virtual void benchmarkEnded( BenchmarkStats const& ) {} + +virtual void sectionEnded( SectionStats const& sectionStats ) = 0; +virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0; +virtual void testGroupEnded( TestGroupStats const& testGroupStats ) = 0; +virtual void testRunEnded( TestRunStats const& testRunStats ) = 0; + +virtual void skipTest( TestCaseInfo const& testInfo ) = 0; + +// Default empty implementation provided +virtual void fatalErrorEncountered( StringRef name ); + +virtual bool isMulti() const; +}; +using IStreamingReporterPtr = std::unique_ptr; + +struct IReporterFactory { +virtual ~IReporterFactory(); +virtual IStreamingReporterPtr create( ReporterConfig const& config ) const = 0; +virtual std::string getDescription() const = 0; +}; +using IReporterFactoryPtr = std::shared_ptr; + +struct IReporterRegistry { +using FactoryMap = std::map; +using Listeners = std::vector; + +virtual ~IReporterRegistry(); +virtual IStreamingReporterPtr create( std::string const& name, IConfigPtr const& config ) const = 0; +virtual FactoryMap const& getFactories() const = 0; +virtual Listeners const& getListeners() const = 0; +}; + +} // end namespace Catch + +// end catch_interfaces_reporter.h + #include + #include + #include + #include + #include + #include + #include + +namespace Catch { +void prepareExpandedExpression(AssertionResult& result); + +// Returns double formatted as %.3f (format expected on output) +std::string getFormattedDuration( double duration ); + +std::string serializeFilters( std::vector const& container ); + +template +struct StreamingReporterBase : IStreamingReporter { + +StreamingReporterBase( ReporterConfig const& _config ) +: m_config( _config.fullConfig() ), +stream( _config.stream() ) +{ +m_reporterPrefs.shouldRedirectStdOut = false; +if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) ) +CATCH_ERROR( "Verbosity level not supported by this reporter" ); +} + +ReporterPreferences getPreferences() const override { +return m_reporterPrefs; +} + +static std::set getSupportedVerbosities() { +return { Verbosity::Normal }; +} + +~StreamingReporterBase() override = default; + +void noMatchingTestCases(std::string const&) override {} + +void testRunStarting(TestRunInfo const& _testRunInfo) override { +currentTestRunInfo = _testRunInfo; +} + +void testGroupStarting(GroupInfo const& _groupInfo) override { +currentGroupInfo = _groupInfo; +} + +void testCaseStarting(TestCaseInfo const& _testInfo) override { +currentTestCaseInfo = _testInfo; +} +void sectionStarting(SectionInfo const& _sectionInfo) override { +m_sectionStack.push_back(_sectionInfo); +} + +void sectionEnded(SectionStats const& /* _sectionStats */) override { +m_sectionStack.pop_back(); +} +void testCaseEnded(TestCaseStats const& /* _testCaseStats */) override { +currentTestCaseInfo.reset(); +} +void testGroupEnded(TestGroupStats const& /* _testGroupStats */) override { +currentGroupInfo.reset(); +} +void testRunEnded(TestRunStats const& /* _testRunStats */) override { +currentTestCaseInfo.reset(); +currentGroupInfo.reset(); +currentTestRunInfo.reset(); +} + +void skipTest(TestCaseInfo const&) override { +// Don't do anything with this by default. +// It can optionally be overridden in the derived class. +} + +IConfigPtr m_config; +std::ostream& stream; + +LazyStat currentTestRunInfo; +LazyStat currentGroupInfo; +LazyStat currentTestCaseInfo; + +std::vector m_sectionStack; +ReporterPreferences m_reporterPrefs; +}; + +template +struct CumulativeReporterBase : IStreamingReporter { +template +struct Node { +explicit Node( T const& _value ) : value( _value ) {} +virtual ~Node() {} + +using ChildNodes = std::vector>; +T value; +ChildNodes children; +}; +struct SectionNode { +explicit SectionNode(SectionStats const& _stats) : stats(_stats) {} +virtual ~SectionNode() = default; + +bool operator == (SectionNode const& other) const { +return stats.sectionInfo.lineInfo == other.stats.sectionInfo.lineInfo; +} +bool operator == (std::shared_ptr const& other) const { +return operator==(*other); +} + +SectionStats stats; +using ChildSections = std::vector>; +using Assertions = std::vector; +ChildSections childSections; +Assertions assertions; +std::string stdOut; +std::string stdErr; +}; + +struct BySectionInfo { +BySectionInfo( SectionInfo const& other ) : m_other( other ) {} +BySectionInfo( BySectionInfo const& other ) : m_other( other.m_other ) {} +bool operator() (std::shared_ptr const& node) const { +return ((node->stats.sectionInfo.name == m_other.name) && +(node->stats.sectionInfo.lineInfo == m_other.lineInfo)); +} +void operator=(BySectionInfo const&) = delete; + +private: +SectionInfo const& m_other; +}; + +using TestCaseNode = Node; +using TestGroupNode = Node; +using TestRunNode = Node; + +CumulativeReporterBase( ReporterConfig const& _config ) +: m_config( _config.fullConfig() ), +stream( _config.stream() ) +{ +m_reporterPrefs.shouldRedirectStdOut = false; +if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) ) +CATCH_ERROR( "Verbosity level not supported by this reporter" ); +} +~CumulativeReporterBase() override = default; + +ReporterPreferences getPreferences() const override { +return m_reporterPrefs; +} + +static std::set getSupportedVerbosities() { +return { Verbosity::Normal }; +} + +void testRunStarting( TestRunInfo const& ) override {} +void testGroupStarting( GroupInfo const& ) override {} + +void testCaseStarting( TestCaseInfo const& ) override {} + +void sectionStarting( SectionInfo const& sectionInfo ) override { +SectionStats incompleteStats( sectionInfo, Counts(), 0, false ); +std::shared_ptr node; +if( m_sectionStack.empty() ) { +if( !m_rootSection ) +m_rootSection = std::make_shared( incompleteStats ); +node = m_rootSection; +} +else { +SectionNode& parentNode = *m_sectionStack.back(); +auto it = +std::find_if( parentNode.childSections.begin(), +parentNode.childSections.end(), +BySectionInfo( sectionInfo ) ); +if( it == parentNode.childSections.end() ) { +node = std::make_shared( incompleteStats ); +parentNode.childSections.push_back( node ); +} +else +node = *it; +} +m_sectionStack.push_back( node ); +m_deepestSection = std::move(node); +} + +void assertionStarting(AssertionInfo const&) override {} + +bool assertionEnded(AssertionStats const& assertionStats) override { +assert(!m_sectionStack.empty()); +// AssertionResult holds a pointer to a temporary DecomposedExpression, +// which getExpandedExpression() calls to build the expression string. +// Our section stack copy of the assertionResult will likely outlive the +// temporary, so it must be expanded or discarded now to avoid calling +// a destroyed object later. +prepareExpandedExpression(const_cast( assertionStats.assertionResult ) ); +SectionNode& sectionNode = *m_sectionStack.back(); +sectionNode.assertions.push_back(assertionStats); +return true; +} +void sectionEnded(SectionStats const& sectionStats) override { +assert(!m_sectionStack.empty()); +SectionNode& node = *m_sectionStack.back(); +node.stats = sectionStats; +m_sectionStack.pop_back(); +} +void testCaseEnded(TestCaseStats const& testCaseStats) override { +auto node = std::make_shared(testCaseStats); +assert(m_sectionStack.size() == 0); +node->children.push_back(m_rootSection); +m_testCases.push_back(node); +m_rootSection.reset(); + +assert(m_deepestSection); +m_deepestSection->stdOut = testCaseStats.stdOut; +m_deepestSection->stdErr = testCaseStats.stdErr; +} +void testGroupEnded(TestGroupStats const& testGroupStats) override { +auto node = std::make_shared(testGroupStats); +node->children.swap(m_testCases); +m_testGroups.push_back(node); +} +void testRunEnded(TestRunStats const& testRunStats) override { +auto node = std::make_shared(testRunStats); +node->children.swap(m_testGroups); +m_testRuns.push_back(node); +testRunEndedCumulative(); +} +virtual void testRunEndedCumulative() = 0; + +void skipTest(TestCaseInfo const&) override {} + +IConfigPtr m_config; +std::ostream& stream; +std::vector m_assertions; +std::vector>> m_sections; +std::vector> m_testCases; +std::vector> m_testGroups; + +std::vector> m_testRuns; + +std::shared_ptr m_rootSection; +std::shared_ptr m_deepestSection; +std::vector> m_sectionStack; +ReporterPreferences m_reporterPrefs; +}; + +template +char const* getLineOfChars() { +static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0}; +if( !*line ) { +std::memset( line, C, CATCH_CONFIG_CONSOLE_WIDTH-1 ); +line[CATCH_CONFIG_CONSOLE_WIDTH-1] = 0; +} +return line; +} + +struct TestEventListenerBase : StreamingReporterBase { +TestEventListenerBase( ReporterConfig const& _config ); + +static std::set getSupportedVerbosities(); + +void assertionStarting(AssertionInfo const&) override; +bool assertionEnded(AssertionStats const&) override; +}; + +} // end namespace Catch + +// end catch_reporter_bases.hpp +// start catch_console_colour.h + +namespace Catch { + +struct Colour { +enum Code { +None = 0, + +White, +Red, +Green, +Blue, +Cyan, +Yellow, +Grey, + +Bright = 0x10, + +BrightRed = Bright | Red, +BrightGreen = Bright | Green, +LightGrey = Bright | Grey, +BrightWhite = Bright | White, +BrightYellow = Bright | Yellow, + +// By intention +FileName = LightGrey, +Warning = BrightYellow, +ResultError = BrightRed, +ResultSuccess = BrightGreen, +ResultExpectedFailure = Warning, + +Error = BrightRed, +Success = Green, + +OriginalExpression = Cyan, +ReconstructedExpression = BrightYellow, + +SecondaryText = LightGrey, +Headers = White +}; + +// Use constructed object for RAII guard +Colour( Code _colourCode ); +Colour( Colour&& other ) noexcept; +Colour& operator=( Colour&& other ) noexcept; +~Colour(); + +// Use static method for one-shot changes +static void use( Code _colourCode ); + +private: +bool m_moved = false; +}; + +std::ostream& operator << ( std::ostream& os, Colour const& ); + +} // end namespace Catch + +// end catch_console_colour.h +// start catch_reporter_registrars.hpp + + +namespace Catch { + +template +class ReporterRegistrar { + +class ReporterFactory : public IReporterFactory { + +virtual IStreamingReporterPtr create( ReporterConfig const& config ) const override { +return std::unique_ptr( new T( config ) ); +} + +virtual std::string getDescription() const override { +return T::getDescription(); +} +}; + +public: + +explicit ReporterRegistrar( std::string const& name ) { +getMutableRegistryHub().registerReporter( name, std::make_shared() ); +} +}; + +template +class ListenerRegistrar { + +class ListenerFactory : public IReporterFactory { + +virtual IStreamingReporterPtr create( ReporterConfig const& config ) const override { +return std::unique_ptr( new T( config ) ); +} +virtual std::string getDescription() const override { +return std::string(); +} +}; + +public: + +ListenerRegistrar() { +getMutableRegistryHub().registerListener( std::make_shared() ); +} +}; +} + + #if !defined(CATCH_CONFIG_DISABLE) + + #define CATCH_REGISTER_REPORTER( name, reporterType ) \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + namespace{ Catch::ReporterRegistrar catch_internal_RegistrarFor##reporterType( name ); } \ + CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS + + #define CATCH_REGISTER_LISTENER( listenerType ) \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + namespace{ Catch::ListenerRegistrar catch_internal_RegistrarFor##listenerType; } \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS + #else // CATCH_CONFIG_DISABLE + + #define CATCH_REGISTER_REPORTER(name, reporterType) + #define CATCH_REGISTER_LISTENER(listenerType) + + #endif // CATCH_CONFIG_DISABLE + +// end catch_reporter_registrars.hpp +// Allow users to base their work off existing reporters +// start catch_reporter_compact.h + +namespace Catch { + +struct CompactReporter : StreamingReporterBase { + +using StreamingReporterBase::StreamingReporterBase; + +~CompactReporter() override; + +static std::string getDescription(); + +ReporterPreferences getPreferences() const override; + +void noMatchingTestCases(std::string const& spec) override; + +void assertionStarting(AssertionInfo const&) override; + +bool assertionEnded(AssertionStats const& _assertionStats) override; + +void sectionEnded(SectionStats const& _sectionStats) override; + +void testRunEnded(TestRunStats const& _testRunStats) override; + +}; + +} // end namespace Catch + +// end catch_reporter_compact.h +// start catch_reporter_console.h + + #if defined(_MSC_VER) + #pragma warning(push) + #pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch +// Note that 4062 (not all labels are handled +// and default is missing) is enabled + #endif + +namespace Catch { +// Fwd decls +struct SummaryColumn; +class TablePrinter; + +struct ConsoleReporter : StreamingReporterBase { +std::unique_ptr m_tablePrinter; + +ConsoleReporter(ReporterConfig const& config); +~ConsoleReporter() override; +static std::string getDescription(); + +void noMatchingTestCases(std::string const& spec) override; + +void assertionStarting(AssertionInfo const&) override; + +bool assertionEnded(AssertionStats const& _assertionStats) override; + +void sectionStarting(SectionInfo const& _sectionInfo) override; +void sectionEnded(SectionStats const& _sectionStats) override; + +void benchmarkStarting(BenchmarkInfo const& info) override; +void benchmarkEnded(BenchmarkStats const& stats) override; + +void testCaseEnded(TestCaseStats const& _testCaseStats) override; +void testGroupEnded(TestGroupStats const& _testGroupStats) override; +void testRunEnded(TestRunStats const& _testRunStats) override; +void testRunStarting(TestRunInfo const& _testRunInfo) override; +private: + +void lazyPrint(); + +void lazyPrintWithoutClosingBenchmarkTable(); +void lazyPrintRunInfo(); +void lazyPrintGroupInfo(); +void printTestCaseAndSectionHeader(); + +void printClosedHeader(std::string const& _name); +void printOpenHeader(std::string const& _name); + +// if string has a : in first line will set indent to follow it on +// subsequent lines +void printHeaderString(std::string const& _string, std::size_t indent = 0); + +void printTotals(Totals const& totals); +void printSummaryRow(std::string const& label, std::vector const& cols, std::size_t row); + +void printTotalsDivider(Totals const& totals); +void printSummaryDivider(); +void printTestFilters(); + +private: +bool m_headerPrinted = false; +}; + +} // end namespace Catch + + #if defined(_MSC_VER) + #pragma warning(pop) + #endif + +// end catch_reporter_console.h +// start catch_reporter_junit.h + +// start catch_xmlwriter.h + + #include + +namespace Catch { + +class XmlEncode { +public: +enum ForWhat { ForTextNodes, ForAttributes }; + +XmlEncode( std::string const& str, ForWhat forWhat = ForTextNodes ); + +void encodeTo( std::ostream& os ) const; + +friend std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ); + +private: +std::string m_str; +ForWhat m_forWhat; +}; + +class XmlWriter { +public: + +class ScopedElement { +public: +ScopedElement( XmlWriter* writer ); + +ScopedElement( ScopedElement&& other ) noexcept; +ScopedElement& operator=( ScopedElement&& other ) noexcept; + +~ScopedElement(); + +ScopedElement& writeText( std::string const& text, bool indent = true ); + +template +ScopedElement& writeAttribute( std::string const& name, T const& attribute ) { +m_writer->writeAttribute( name, attribute ); +return *this; +} + +private: +mutable XmlWriter* m_writer = nullptr; +}; + +XmlWriter( std::ostream& os = Catch::cout() ); +~XmlWriter(); + +XmlWriter( XmlWriter const& ) = delete; +XmlWriter& operator=( XmlWriter const& ) = delete; + +XmlWriter& startElement( std::string const& name ); + +ScopedElement scopedElement( std::string const& name ); + +XmlWriter& endElement(); + +XmlWriter& writeAttribute( std::string const& name, std::string const& attribute ); + +XmlWriter& writeAttribute( std::string const& name, bool attribute ); + +template +XmlWriter& writeAttribute( std::string const& name, T const& attribute ) { +ReusableStringStream rss; +rss << attribute; +return writeAttribute( name, rss.str() ); +} + +XmlWriter& writeText( std::string const& text, bool indent = true ); + +XmlWriter& writeComment( std::string const& text ); + +void writeStylesheetRef( std::string const& url ); + +XmlWriter& writeBlankLine(); + +void ensureTagClosed(); + +private: + +void writeDeclaration(); + +void newlineIfNecessary(); + +bool m_tagIsOpen = false; +bool m_needsNewline = false; +std::vector m_tags; +std::string m_indent; +std::ostream& m_os; +}; + +} + +// end catch_xmlwriter.h +namespace Catch { + +class JunitReporter : public CumulativeReporterBase { +public: +JunitReporter(ReporterConfig const& _config); + +~JunitReporter() override; + +static std::string getDescription(); + +void noMatchingTestCases(std::string const& /*spec*/) override; + +void testRunStarting(TestRunInfo const& runInfo) override; + +void testGroupStarting(GroupInfo const& groupInfo) override; + +void testCaseStarting(TestCaseInfo const& testCaseInfo) override; +bool assertionEnded(AssertionStats const& assertionStats) override; + +void testCaseEnded(TestCaseStats const& testCaseStats) override; + +void testGroupEnded(TestGroupStats const& testGroupStats) override; + +void testRunEndedCumulative() override; + +void writeGroup(TestGroupNode const& groupNode, double suiteTime); + +void writeTestCase(TestCaseNode const& testCaseNode); + +void writeSection(std::string const& className, +std::string const& rootName, +SectionNode const& sectionNode); + +void writeAssertions(SectionNode const& sectionNode); +void writeAssertion(AssertionStats const& stats); + +XmlWriter xml; +Timer suiteTimer; +std::string stdOutForSuite; +std::string stdErrForSuite; +unsigned int unexpectedExceptions = 0; +bool m_okToFail = false; +}; + +} // end namespace Catch + +// end catch_reporter_junit.h +// start catch_reporter_xml.h + +namespace Catch { +class XmlReporter : public StreamingReporterBase { +public: +XmlReporter(ReporterConfig const& _config); + +~XmlReporter() override; + +static std::string getDescription(); + +virtual std::string getStylesheetRef() const; + +void writeSourceInfo(SourceLineInfo const& sourceInfo); + +public: // StreamingReporterBase + +void noMatchingTestCases(std::string const& s) override; + +void testRunStarting(TestRunInfo const& testInfo) override; + +void testGroupStarting(GroupInfo const& groupInfo) override; + +void testCaseStarting(TestCaseInfo const& testInfo) override; + +void sectionStarting(SectionInfo const& sectionInfo) override; + +void assertionStarting(AssertionInfo const&) override; + +bool assertionEnded(AssertionStats const& assertionStats) override; + +void sectionEnded(SectionStats const& sectionStats) override; + +void testCaseEnded(TestCaseStats const& testCaseStats) override; + +void testGroupEnded(TestGroupStats const& testGroupStats) override; + +void testRunEnded(TestRunStats const& testRunStats) override; + +private: +Timer m_testCaseTimer; +XmlWriter m_xml; +int m_sectionDepth = 0; +}; + +} // end namespace Catch + +// end catch_reporter_xml.h + +// end catch_external_interfaces.h + #endif + + #endif // ! CATCH_CONFIG_IMPL_ONLY + + #ifdef CATCH_IMPL +// start catch_impl.hpp + + #ifdef __clang__ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wweak-vtables" + #endif + +// Keep these here for external reporters +// start catch_test_case_tracker.h + + #include + #include + #include + +namespace Catch { +namespace TestCaseTracking { + +struct NameAndLocation { +std::string name; +SourceLineInfo location; + +NameAndLocation( std::string const& _name, SourceLineInfo const& _location ); +}; + +struct ITracker; + +using ITrackerPtr = std::shared_ptr; + +struct ITracker { +virtual ~ITracker(); + +// static queries +virtual NameAndLocation const& nameAndLocation() const = 0; + +// dynamic queries +virtual bool isComplete() const = 0; // Successfully completed or failed +virtual bool isSuccessfullyCompleted() const = 0; +virtual bool isOpen() const = 0; // Started but not complete +virtual bool hasChildren() const = 0; + +virtual ITracker& parent() = 0; + +// actions +virtual void close() = 0; // Successfully complete +virtual void fail() = 0; +virtual void markAsNeedingAnotherRun() = 0; + +virtual void addChild( ITrackerPtr const& child ) = 0; +virtual ITrackerPtr findChild( NameAndLocation const& nameAndLocation ) = 0; +virtual void openChild() = 0; + +// Debug/ checking +virtual bool isSectionTracker() const = 0; +virtual bool isGeneratorTracker() const = 0; +}; + +class TrackerContext { + +enum RunState { +NotStarted, +Executing, +CompletedCycle +}; + +ITrackerPtr m_rootTracker; +ITracker* m_currentTracker = nullptr; +RunState m_runState = NotStarted; + +public: + +static TrackerContext& instance(); + +ITracker& startRun(); +void endRun(); + +void startCycle(); +void completeCycle(); + +bool completedCycle() const; +ITracker& currentTracker(); +void setCurrentTracker( ITracker* tracker ); +}; + +class TrackerBase : public ITracker { +protected: +enum CycleState { +NotStarted, +Executing, +ExecutingChildren, +NeedsAnotherRun, +CompletedSuccessfully, +Failed +}; + +using Children = std::vector; +NameAndLocation m_nameAndLocation; +TrackerContext& m_ctx; +ITracker* m_parent; +Children m_children; +CycleState m_runState = NotStarted; + +public: +TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ); + +NameAndLocation const& nameAndLocation() const override; +bool isComplete() const override; +bool isSuccessfullyCompleted() const override; +bool isOpen() const override; +bool hasChildren() const override; + +void addChild( ITrackerPtr const& child ) override; + +ITrackerPtr findChild( NameAndLocation const& nameAndLocation ) override; +ITracker& parent() override; + +void openChild() override; + +bool isSectionTracker() const override; +bool isGeneratorTracker() const override; + +void open(); + +void close() override; +void fail() override; +void markAsNeedingAnotherRun() override; + +private: +void moveToParent(); +void moveToThis(); +}; + +class SectionTracker : public TrackerBase { +std::vector m_filters; +public: +SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ); + +bool isSectionTracker() const override; + +bool isComplete() const override; + +static SectionTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ); + +void tryOpen(); + +void addInitialFilters( std::vector const& filters ); +void addNextFilters( std::vector const& filters ); +}; + +} // namespace TestCaseTracking + +using TestCaseTracking::ITracker; +using TestCaseTracking::TrackerContext; +using TestCaseTracking::SectionTracker; + +} // namespace Catch + +// end catch_test_case_tracker.h + +// start catch_leak_detector.h + +namespace Catch { + +struct LeakDetector { +LeakDetector(); +~LeakDetector(); +}; + +} +// end catch_leak_detector.h +// Cpp files will be included in the single-header file here +// start catch_approx.cpp + + #include + #include + +namespace { + +// Performs equivalent check of std::fabs(lhs - rhs) <= margin +// But without the subtraction to allow for INFINITY in comparison +bool marginComparison(double lhs, double rhs, double margin) { +return (lhs + margin >= rhs) && (rhs + margin >= lhs); +} + +} + +namespace Catch { +namespace Detail { + +Approx::Approx ( double value ) +: m_epsilon( std::numeric_limits::epsilon()*100 ), +m_margin( 0.0 ), +m_scale( 0.0 ), +m_value( value ) +{} + +Approx Approx::custom() { +return Approx( 0 ); +} + +Approx Approx::operator-() const { +auto temp(*this); +temp.m_value = -temp.m_value; +return temp; +} + +std::string Approx::toString() const { +ReusableStringStream rss; +rss << "Approx( " << ::Catch::Detail::stringify( m_value ) << " )"; +return rss.str(); +} + +bool Approx::equalityComparisonImpl(const double other) const { +// First try with fixed margin, then compute margin based on epsilon, scale and Approx's value +// Thanks to Richard Harris for his help refining the scaled margin value +return marginComparison(m_value, other, m_margin) || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(m_value))); +} + +void Approx::setMargin(double margin) { +CATCH_ENFORCE(margin >= 0, +"Invalid Approx::margin: " << margin << '.' +<< " Approx::Margin has to be non-negative."); +m_margin = margin; +} + +void Approx::setEpsilon(double epsilon) { +CATCH_ENFORCE(epsilon >= 0 && epsilon <= 1.0, +"Invalid Approx::epsilon: " << epsilon << '.' +<< " Approx::epsilon has to be in [0, 1]"); +m_epsilon = epsilon; +} + +} // end namespace Detail + +namespace literals { +Detail::Approx operator "" _a(long double val) { +return Detail::Approx(val); +} +Detail::Approx operator "" _a(unsigned long long val) { +return Detail::Approx(val); +} +} // end namespace literals + +std::string StringMaker::convert(Catch::Detail::Approx const& value) { +return value.toString(); +} + +} // end namespace Catch +// end catch_approx.cpp +// start catch_assertionhandler.cpp + +// start catch_debugger.h + +namespace Catch { +bool isDebuggerActive(); +} + + #ifdef CATCH_PLATFORM_MAC + + #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */ + + #elif defined(CATCH_PLATFORM_LINUX) +// If we can use inline assembler, do it because this allows us to break +// directly at the location of the failing check instead of breaking inside +// raise() called from it, i.e. one stack frame below. + #if defined(__GNUC__) && (defined(__i386) || defined(__x86_64)) + #define CATCH_TRAP() asm volatile ("int $3") /* NOLINT */ + #else // Fall back to the generic way. + #include + + #define CATCH_TRAP() raise(SIGTRAP) + #endif + #elif defined(_MSC_VER) + #define CATCH_TRAP() __debugbreak() + #elif defined(__MINGW32__) +extern "C" __declspec(dllimport) void __stdcall DebugBreak(); + #define CATCH_TRAP() DebugBreak() + #endif + + #ifdef CATCH_TRAP + #define CATCH_BREAK_INTO_DEBUGGER() []{ if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } }() + #else + #define CATCH_BREAK_INTO_DEBUGGER() []{}() + #endif + +// end catch_debugger.h +// start catch_run_context.h + +// start catch_fatal_condition.h + +// start catch_windows_h_proxy.h + + + #if defined(CATCH_PLATFORM_WINDOWS) + + #if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX) + # define CATCH_DEFINED_NOMINMAX + # define NOMINMAX + #endif + #if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN) + # define CATCH_DEFINED_WIN32_LEAN_AND_MEAN + # define WIN32_LEAN_AND_MEAN + #endif + + #ifdef __AFXDLL + #include + #else + #include + #endif + + #ifdef CATCH_DEFINED_NOMINMAX + # undef NOMINMAX + #endif + #ifdef CATCH_DEFINED_WIN32_LEAN_AND_MEAN + # undef WIN32_LEAN_AND_MEAN + #endif + + #endif // defined(CATCH_PLATFORM_WINDOWS) + +// end catch_windows_h_proxy.h + #if defined( CATCH_CONFIG_WINDOWS_SEH ) + +namespace Catch { + +struct FatalConditionHandler { + +static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo); +FatalConditionHandler(); +static void reset(); +~FatalConditionHandler(); + +private: +static bool isSet; +static ULONG guaranteeSize; +static PVOID exceptionHandlerHandle; +}; + +} // namespace Catch + + #elif defined ( CATCH_CONFIG_POSIX_SIGNALS ) + + #include + +namespace Catch { + +struct FatalConditionHandler { + +static bool isSet; +static struct sigaction oldSigActions[]; +static stack_t oldSigStack; +static char altStackMem[]; + +static void handleSignal( int sig ); + +FatalConditionHandler(); +~FatalConditionHandler(); +static void reset(); +}; + +} // namespace Catch + + #else + +namespace Catch { +struct FatalConditionHandler { +void reset(); +}; +} + + #endif + +// end catch_fatal_condition.h + #include + +namespace Catch { + +struct IMutableContext; + +/////////////////////////////////////////////////////////////////////////// + +class RunContext : public IResultCapture, public IRunner { + +public: +RunContext( RunContext const& ) = delete; +RunContext& operator =( RunContext const& ) = delete; + +explicit RunContext( IConfigPtr const& _config, IStreamingReporterPtr&& reporter ); + +~RunContext() override; + +void testGroupStarting( std::string const& testSpec, std::size_t groupIndex, std::size_t groupsCount ); +void testGroupEnded( std::string const& testSpec, Totals const& totals, std::size_t groupIndex, std::size_t groupsCount ); + +Totals runTest(TestCase const& testCase); + +IConfigPtr config() const; +IStreamingReporter& reporter() const; + +public: // IResultCapture + +// Assertion handlers +void handleExpr +( AssertionInfo const& info, +ITransientExpression const& expr, +AssertionReaction& reaction ) override; +void handleMessage +( AssertionInfo const& info, +ResultWas::OfType resultType, +StringRef const& message, +AssertionReaction& reaction ) override; +void handleUnexpectedExceptionNotThrown +( AssertionInfo const& info, +AssertionReaction& reaction ) override; +void handleUnexpectedInflightException +( AssertionInfo const& info, +std::string const& message, +AssertionReaction& reaction ) override; +void handleIncomplete +( AssertionInfo const& info ) override; +void handleNonExpr +( AssertionInfo const &info, +ResultWas::OfType resultType, +AssertionReaction &reaction ) override; + +bool sectionStarted( SectionInfo const& sectionInfo, Counts& assertions ) override; + +void sectionEnded( SectionEndInfo const& endInfo ) override; +void sectionEndedEarly( SectionEndInfo const& endInfo ) override; + +auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& override; + +void benchmarkStarting( BenchmarkInfo const& info ) override; +void benchmarkEnded( BenchmarkStats const& stats ) override; + +void pushScopedMessage( MessageInfo const& message ) override; +void popScopedMessage( MessageInfo const& message ) override; + +void emplaceUnscopedMessage( MessageBuilder const& builder ) override; + +std::string getCurrentTestName() const override; + +const AssertionResult* getLastResult() const override; + +void exceptionEarlyReported() override; + +void handleFatalErrorCondition( StringRef message ) override; + +bool lastAssertionPassed() override; + +void assertionPassed() override; + +public: +// !TBD We need to do this another way! +bool aborting() const final; + +private: + +void runCurrentTest( std::string& redirectedCout, std::string& redirectedCerr ); +void invokeActiveTestCase(); + +void resetAssertionInfo(); +bool testForMissingAssertions( Counts& assertions ); + +void assertionEnded( AssertionResult const& result ); +void reportExpr +( AssertionInfo const &info, +ResultWas::OfType resultType, +ITransientExpression const *expr, +bool negated ); + +void populateReaction( AssertionReaction& reaction ); + +private: + +void handleUnfinishedSections(); + +TestRunInfo m_runInfo; +IMutableContext& m_context; +TestCase const* m_activeTestCase = nullptr; +ITracker* m_testCaseTracker = nullptr; +Option m_lastResult; + +IConfigPtr m_config; +Totals m_totals; +IStreamingReporterPtr m_reporter; +std::vector m_messages; +std::vector m_messageScopes; /* Keeps owners of so-called unscoped messages. */ +AssertionInfo m_lastAssertionInfo; +std::vector m_unfinishedSections; +std::vector m_activeSections; +TrackerContext m_trackerContext; +bool m_lastAssertionPassed = false; +bool m_shouldReportUnexpected = true; +bool m_includeSuccessfulResults; +}; + +} // end namespace Catch + +// end catch_run_context.h +namespace Catch { + +namespace { +auto operator <<( std::ostream& os, ITransientExpression const& expr ) -> std::ostream& { +expr.streamReconstructedExpression( os ); +return os; +} +} + +LazyExpression::LazyExpression( bool isNegated ) +: m_isNegated( isNegated ) +{} + +LazyExpression::LazyExpression( LazyExpression const& other ) : m_isNegated( other.m_isNegated ) {} + +LazyExpression::operator bool() const { +return m_transientExpression != nullptr; +} + +auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream& { +if( lazyExpr.m_isNegated ) +os << "!"; + +if( lazyExpr ) { +if( lazyExpr.m_isNegated && lazyExpr.m_transientExpression->isBinaryExpression() ) +os << "(" << *lazyExpr.m_transientExpression << ")"; +else +os << *lazyExpr.m_transientExpression; +} +else { +os << "{** error - unchecked empty expression requested **}"; +} +return os; +} + +AssertionHandler::AssertionHandler +( StringRef const& macroName, +SourceLineInfo const& lineInfo, +StringRef capturedExpression, +ResultDisposition::Flags resultDisposition ) +: m_assertionInfo{ macroName, lineInfo, capturedExpression, resultDisposition }, +m_resultCapture( getResultCapture() ) +{} + +void AssertionHandler::handleExpr( ITransientExpression const& expr ) { +m_resultCapture.handleExpr( m_assertionInfo, expr, m_reaction ); +} +void AssertionHandler::handleMessage(ResultWas::OfType resultType, StringRef const& message) { +m_resultCapture.handleMessage( m_assertionInfo, resultType, message, m_reaction ); +} + +auto AssertionHandler::allowThrows() const -> bool { +return getCurrentContext().getConfig()->allowThrows(); +} + +void AssertionHandler::complete() { +setCompleted(); +if( m_reaction.shouldDebugBreak ) { + +// If you find your debugger stopping you here then go one level up on the +// call-stack for the code that caused it (typically a failed assertion) + +// (To go back to the test and change execution, jump over the throw, next) +CATCH_BREAK_INTO_DEBUGGER(); +} +if (m_reaction.shouldThrow) { + #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +throw Catch::TestFailureException(); + #else +CATCH_ERROR( "Test failure requires aborting test!" ); + #endif +} +} +void AssertionHandler::setCompleted() { +m_completed = true; +} + +void AssertionHandler::handleUnexpectedInflightException() { +m_resultCapture.handleUnexpectedInflightException( m_assertionInfo, Catch::translateActiveException(), m_reaction ); +} + +void AssertionHandler::handleExceptionThrownAsExpected() { +m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction); +} +void AssertionHandler::handleExceptionNotThrownAsExpected() { +m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction); +} + +void AssertionHandler::handleUnexpectedExceptionNotThrown() { +m_resultCapture.handleUnexpectedExceptionNotThrown( m_assertionInfo, m_reaction ); +} + +void AssertionHandler::handleThrowingCallSkipped() { +m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction); +} + +// This is the overload that takes a string and infers the Equals matcher from it +// The more general overload, that takes any string matcher, is in catch_capture_matchers.cpp +void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef const& matcherString ) { +handleExceptionMatchExpr( handler, Matchers::Equals( str ), matcherString ); +} + +} // namespace Catch +// end catch_assertionhandler.cpp +// start catch_assertionresult.cpp + +namespace Catch { +AssertionResultData::AssertionResultData(ResultWas::OfType _resultType, LazyExpression const & _lazyExpression): +lazyExpression(_lazyExpression), +resultType(_resultType) {} + +std::string AssertionResultData::reconstructExpression() const { + +if( reconstructedExpression.empty() ) { +if( lazyExpression ) { +ReusableStringStream rss; +rss << lazyExpression; +reconstructedExpression = rss.str(); +} +} +return reconstructedExpression; +} + +AssertionResult::AssertionResult( AssertionInfo const& info, AssertionResultData const& data ) +: m_info( info ), +m_resultData( data ) +{} + +// Result was a success +bool AssertionResult::succeeded() const { +return Catch::isOk( m_resultData.resultType ); +} + +// Result was a success, or failure is suppressed +bool AssertionResult::isOk() const { +return Catch::isOk( m_resultData.resultType ) || shouldSuppressFailure( m_info.resultDisposition ); +} + +ResultWas::OfType AssertionResult::getResultType() const { +return m_resultData.resultType; +} + +bool AssertionResult::hasExpression() const { +return m_info.capturedExpression[0] != 0; +} + +bool AssertionResult::hasMessage() const { +return !m_resultData.message.empty(); +} + +std::string AssertionResult::getExpression() const { +if( isFalseTest( m_info.resultDisposition ) ) +return "!(" + m_info.capturedExpression + ")"; +else +return m_info.capturedExpression; +} + +std::string AssertionResult::getExpressionInMacro() const { +std::string expr; +if( m_info.macroName[0] == 0 ) +expr = m_info.capturedExpression; +else { +expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 ); +expr += m_info.macroName; +expr += "( "; +expr += m_info.capturedExpression; +expr += " )"; +} +return expr; +} + +bool AssertionResult::hasExpandedExpression() const { +return hasExpression() && getExpandedExpression() != getExpression(); +} + +std::string AssertionResult::getExpandedExpression() const { +std::string expr = m_resultData.reconstructExpression(); +return expr.empty() +? getExpression() +: expr; +} + +std::string AssertionResult::getMessage() const { +return m_resultData.message; +} +SourceLineInfo AssertionResult::getSourceInfo() const { +return m_info.lineInfo; +} + +StringRef AssertionResult::getTestMacroName() const { +return m_info.macroName; +} + +} // end namespace Catch +// end catch_assertionresult.cpp +// start catch_benchmark.cpp + +namespace Catch { + +auto BenchmarkLooper::getResolution() -> uint64_t { +return getEstimatedClockResolution() * getCurrentContext().getConfig()->benchmarkResolutionMultiple(); +} + +void BenchmarkLooper::reportStart() { +getResultCapture().benchmarkStarting( { m_name } ); +} +auto BenchmarkLooper::needsMoreIterations() -> bool { +auto elapsed = m_timer.getElapsedNanoseconds(); + +// Exponentially increasing iterations until we're confident in our timer resolution +if( elapsed < m_resolution ) { +m_iterationsToRun *= 10; +return true; +} + +getResultCapture().benchmarkEnded( { { m_name }, m_count, elapsed } ); +return false; +} + +} // end namespace Catch +// end catch_benchmark.cpp +// start catch_capture_matchers.cpp + +namespace Catch { + +using StringMatcher = Matchers::Impl::MatcherBase; + +// This is the general overload that takes a any string matcher +// There is another overload, in catch_assertionhandler.h/.cpp, that only takes a string and infers +// the Equals matcher (so the header does not mention matchers) +void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef const& matcherString ) { +std::string exceptionMessage = Catch::translateActiveException(); +MatchExpr expr( exceptionMessage, matcher, matcherString ); +handler.handleExpr( expr ); +} + +} // namespace Catch +// end catch_capture_matchers.cpp +// start catch_commandline.cpp + +// start catch_commandline.h + +// start catch_clara.h + +// Use Catch's value for console width (store Clara's off to the side, if present) + #ifdef CLARA_CONFIG_CONSOLE_WIDTH + #define CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH + #undef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH + #endif + #define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH-1 + + #ifdef __clang__ + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wweak-vtables" + #pragma clang diagnostic ignored "-Wexit-time-destructors" + #pragma clang diagnostic ignored "-Wshadow" + #endif + +// start clara.hpp +// Copyright 2017 Two Blue Cubes Ltd. All rights reserved. +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// See https://github.com/philsquared/Clara for more details + +// Clara v1.1.5 + + + #ifndef CATCH_CLARA_CONFIG_CONSOLE_WIDTH + #define CATCH_CLARA_CONFIG_CONSOLE_WIDTH 80 + #endif + + #ifndef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH + #define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CLARA_CONFIG_CONSOLE_WIDTH + #endif + + #ifndef CLARA_CONFIG_OPTIONAL_TYPE + #ifdef __has_include + #if __has_include() && __cplusplus >= 201703L + #include + #define CLARA_CONFIG_OPTIONAL_TYPE std::optional + #endif + #endif + #endif + +// ----------- #included from clara_textflow.hpp ----------- + +// TextFlowCpp +// +// A single-header library for wrapping and laying out basic text, by Phil Nash +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// This project is hosted at https://github.com/philsquared/textflowcpp + + + #include + #include + #include + #include + + #ifndef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH + #define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH 80 + #endif + +namespace Catch { +namespace clara { +namespace TextFlow { + +inline auto isWhitespace(char c) -> bool { +static std::string chars = " \t\n\r"; +return chars.find(c) != std::string::npos; +} +inline auto isBreakableBefore(char c) -> bool { +static std::string chars = "[({<|"; +return chars.find(c) != std::string::npos; +} +inline auto isBreakableAfter(char c) -> bool { +static std::string chars = "])}>.,:;*+-=&/\\"; +return chars.find(c) != std::string::npos; +} + +class Columns; + +class Column { +std::vector m_strings; +size_t m_width = CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH; +size_t m_indent = 0; +size_t m_initialIndent = std::string::npos; + +public: +class iterator { +friend Column; + +Column const& m_column; +size_t m_stringIndex = 0; +size_t m_pos = 0; + +size_t m_len = 0; +size_t m_end = 0; +bool m_suffix = false; + +iterator(Column const& column, size_t stringIndex) +: m_column(column), +m_stringIndex(stringIndex) {} + +auto line() const -> std::string const& { return m_column.m_strings[m_stringIndex]; } + +auto isBoundary(size_t at) const -> bool { +assert(at > 0); +assert(at <= line().size()); + +return at == line().size() || +(isWhitespace(line()[at]) && !isWhitespace(line()[at - 1])) || +isBreakableBefore(line()[at]) || +isBreakableAfter(line()[at - 1]); +} + +void calcLength() { +assert(m_stringIndex < m_column.m_strings.size()); + +m_suffix = false; +auto width = m_column.m_width - indent(); +m_end = m_pos; +while (m_end < line().size() && line()[m_end] != '\n') +++m_end; + +if (m_end < m_pos + width) { +m_len = m_end - m_pos; +} else { +size_t len = width; +while (len > 0 && !isBoundary(m_pos + len)) +--len; +while (len > 0 && isWhitespace(line()[m_pos + len - 1])) +--len; + +if (len > 0) { +m_len = len; +} else { +m_suffix = true; +m_len = width - 1; +} +} +} + +auto indent() const -> size_t { +auto initial = m_pos == 0 && m_stringIndex == 0 ? m_column.m_initialIndent : std::string::npos; +return initial == std::string::npos ? m_column.m_indent : initial; +} + +auto addIndentAndSuffix(std::string const &plain) const -> std::string { +return std::string(indent(), ' ') + (m_suffix ? plain + "-" : plain); +} + +public: +using difference_type = std::ptrdiff_t; +using value_type = std::string; +using pointer = value_type * ; +using reference = value_type & ; +using iterator_category = std::forward_iterator_tag; + +explicit iterator(Column const& column) : m_column(column) { +assert(m_column.m_width > m_column.m_indent); +assert(m_column.m_initialIndent == std::string::npos || m_column.m_width > m_column.m_initialIndent); +calcLength(); +if (m_len == 0) +m_stringIndex++; // Empty string +} + +auto operator *() const -> std::string { +assert(m_stringIndex < m_column.m_strings.size()); +assert(m_pos <= m_end); +return addIndentAndSuffix(line().substr(m_pos, m_len)); +} + +auto operator ++() -> iterator& { +m_pos += m_len; +if (m_pos < line().size() && line()[m_pos] == '\n') +m_pos += 1; +else +while (m_pos < line().size() && isWhitespace(line()[m_pos])) +++m_pos; + +if (m_pos == line().size()) { +m_pos = 0; +++m_stringIndex; +} +if (m_stringIndex < m_column.m_strings.size()) +calcLength(); +return *this; +} +auto operator ++(int) -> iterator { +iterator prev(*this); +operator++(); +return prev; +} + +auto operator ==(iterator const& other) const -> bool { +return +m_pos == other.m_pos && +m_stringIndex == other.m_stringIndex && +&m_column == &other.m_column; +} +auto operator !=(iterator const& other) const -> bool { +return !operator==(other); +} +}; +using const_iterator = iterator; + +explicit Column(std::string const& text) { m_strings.push_back(text); } + +auto width(size_t newWidth) -> Column& { +assert(newWidth > 0); +m_width = newWidth; +return *this; +} +auto indent(size_t newIndent) -> Column& { +m_indent = newIndent; +return *this; +} +auto initialIndent(size_t newIndent) -> Column& { +m_initialIndent = newIndent; +return *this; +} + +auto width() const -> size_t { return m_width; } +auto begin() const -> iterator { return iterator(*this); } +auto end() const -> iterator { return { *this, m_strings.size() }; } + +inline friend std::ostream& operator << (std::ostream& os, Column const& col) { +bool first = true; +for (auto line : col) { +if (first) +first = false; +else +os << "\n"; +os << line; +} +return os; +} + +auto operator + (Column const& other)->Columns; + +auto toString() const -> std::string { +std::ostringstream oss; +oss << *this; +return oss.str(); +} +}; + +class Spacer : public Column { + +public: +explicit Spacer(size_t spaceWidth) : Column("") { +width(spaceWidth); +} +}; + +class Columns { +std::vector m_columns; + +public: + +class iterator { +friend Columns; +struct EndTag {}; + +std::vector const& m_columns; +std::vector m_iterators; +size_t m_activeIterators; + +iterator(Columns const& columns, EndTag) +: m_columns(columns.m_columns), +m_activeIterators(0) { +m_iterators.reserve(m_columns.size()); + +for (auto const& col : m_columns) +m_iterators.push_back(col.end()); +} + +public: +using difference_type = std::ptrdiff_t; +using value_type = std::string; +using pointer = value_type * ; +using reference = value_type & ; +using iterator_category = std::forward_iterator_tag; + +explicit iterator(Columns const& columns) +: m_columns(columns.m_columns), +m_activeIterators(m_columns.size()) { +m_iterators.reserve(m_columns.size()); + +for (auto const& col : m_columns) +m_iterators.push_back(col.begin()); +} + +auto operator ==(iterator const& other) const -> bool { +return m_iterators == other.m_iterators; +} +auto operator !=(iterator const& other) const -> bool { +return m_iterators != other.m_iterators; +} +auto operator *() const -> std::string { +std::string row, padding; + +for (size_t i = 0; i < m_columns.size(); ++i) { +auto width = m_columns[i].width(); +if (m_iterators[i] != m_columns[i].end()) { +std::string col = *m_iterators[i]; +row += padding + col; +if (col.size() < width) +padding = std::string(width - col.size(), ' '); +else +padding = ""; +} else { +padding += std::string(width, ' '); +} +} +return row; +} +auto operator ++() -> iterator& { +for (size_t i = 0; i < m_columns.size(); ++i) { +if (m_iterators[i] != m_columns[i].end()) +++m_iterators[i]; +} +return *this; +} +auto operator ++(int) -> iterator { +iterator prev(*this); +operator++(); +return prev; +} +}; +using const_iterator = iterator; + +auto begin() const -> iterator { return iterator(*this); } +auto end() const -> iterator { return { *this, iterator::EndTag() }; } + +auto operator += (Column const& col) -> Columns& { +m_columns.push_back(col); +return *this; +} +auto operator + (Column const& col) -> Columns { +Columns combined = *this; +combined += col; +return combined; +} + +inline friend std::ostream& operator << (std::ostream& os, Columns const& cols) { + +bool first = true; +for (auto line : cols) { +if (first) +first = false; +else +os << "\n"; +os << line; +} +return os; +} + +auto toString() const -> std::string { +std::ostringstream oss; +oss << *this; +return oss.str(); +} +}; + +inline auto Column::operator + (Column const& other) -> Columns { +Columns cols; +cols += *this; +cols += other; +return cols; +} +} + +} +} + +// ----------- end of #include from clara_textflow.hpp ----------- +// ........... back in clara.hpp + + #include + #include + #include + #include + #include + + #if !defined(CATCH_PLATFORM_WINDOWS) && ( defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) ) + #define CATCH_PLATFORM_WINDOWS + #endif + +namespace Catch { namespace clara { +namespace detail { + +// Traits for extracting arg and return type of lambdas (for single argument lambdas) +template +struct UnaryLambdaTraits : UnaryLambdaTraits {}; + +template +struct UnaryLambdaTraits { +static const bool isValid = false; +}; + +template +struct UnaryLambdaTraits { +static const bool isValid = true; +using ArgType = typename std::remove_const::type>::type; +using ReturnType = ReturnT; +}; + +class TokenStream; + +// Transport for raw args (copied from main args, or supplied via init list for testing) +class Args { +friend TokenStream; +std::string m_exeName; +std::vector m_args; + +public: +Args( int argc, char const* const* argv ) +: m_exeName(argv[0]), +m_args(argv + 1, argv + argc) {} + +Args( std::initializer_list args ) +: m_exeName( *args.begin() ), +m_args( args.begin()+1, args.end() ) +{} + +auto exeName() const -> std::string { +return m_exeName; +} +}; + +// Wraps a token coming from a token stream. These may not directly correspond to strings as a single string +// may encode an option + its argument if the : or = form is used +enum class TokenType { +Option, Argument +}; +struct Token { +TokenType type; +std::string token; +}; + +inline auto isOptPrefix( char c ) -> bool { +return c == '-' + #ifdef CATCH_PLATFORM_WINDOWS +|| c == '/' + #endif +; +} + +// Abstracts iterators into args as a stream of tokens, with option arguments uniformly handled +class TokenStream { +using Iterator = std::vector::const_iterator; +Iterator it; +Iterator itEnd; +std::vector m_tokenBuffer; + +void loadBuffer() { +m_tokenBuffer.resize( 0 ); + +// Skip any empty strings +while( it != itEnd && it->empty() ) +++it; + +if( it != itEnd ) { +auto const &next = *it; +if( isOptPrefix( next[0] ) ) { +auto delimiterPos = next.find_first_of( " :=" ); +if( delimiterPos != std::string::npos ) { +m_tokenBuffer.push_back( { TokenType::Option, next.substr( 0, delimiterPos ) } ); +m_tokenBuffer.push_back( { TokenType::Argument, next.substr( delimiterPos + 1 ) } ); +} else { +if( next[1] != '-' && next.size() > 2 ) { +std::string opt = "- "; +for( size_t i = 1; i < next.size(); ++i ) { +opt[1] = next[i]; +m_tokenBuffer.push_back( { TokenType::Option, opt } ); +} +} else { +m_tokenBuffer.push_back( { TokenType::Option, next } ); +} +} +} else { +m_tokenBuffer.push_back( { TokenType::Argument, next } ); +} +} +} + +public: +explicit TokenStream( Args const &args ) : TokenStream( args.m_args.begin(), args.m_args.end() ) {} + +TokenStream( Iterator it, Iterator itEnd ) : it( it ), itEnd( itEnd ) { +loadBuffer(); +} + +explicit operator bool() const { +return !m_tokenBuffer.empty() || it != itEnd; +} + +auto count() const -> size_t { return m_tokenBuffer.size() + (itEnd - it); } + +auto operator*() const -> Token { +assert( !m_tokenBuffer.empty() ); +return m_tokenBuffer.front(); +} + +auto operator->() const -> Token const * { +assert( !m_tokenBuffer.empty() ); +return &m_tokenBuffer.front(); +} + +auto operator++() -> TokenStream & { +if( m_tokenBuffer.size() >= 2 ) { +m_tokenBuffer.erase( m_tokenBuffer.begin() ); +} else { +if( it != itEnd ) +++it; +loadBuffer(); +} +return *this; +} +}; + +class ResultBase { +public: +enum Type { +Ok, LogicError, RuntimeError +}; + +protected: +ResultBase( Type type ) : m_type( type ) {} +virtual ~ResultBase() = default; + +virtual void enforceOk() const = 0; + +Type m_type; +}; + +template +class ResultValueBase : public ResultBase { +public: +auto value() const -> T const & { +enforceOk(); +return m_value; +} + +protected: +ResultValueBase( Type type ) : ResultBase( type ) {} + +ResultValueBase( ResultValueBase const &other ) : ResultBase( other ) { +if( m_type == ResultBase::Ok ) +new( &m_value ) T( other.m_value ); +} + +ResultValueBase( Type, T const &value ) : ResultBase( Ok ) { +new( &m_value ) T( value ); +} + +auto operator=( ResultValueBase const &other ) -> ResultValueBase & { +if( m_type == ResultBase::Ok ) +m_value.~T(); +ResultBase::operator=(other); +if( m_type == ResultBase::Ok ) +new( &m_value ) T( other.m_value ); +return *this; +} + +~ResultValueBase() override { +if( m_type == Ok ) +m_value.~T(); +} + +union { +T m_value; +}; +}; + +template<> +class ResultValueBase : public ResultBase { +protected: +using ResultBase::ResultBase; +}; + +template +class BasicResult : public ResultValueBase { +public: +template +explicit BasicResult( BasicResult const &other ) +: ResultValueBase( other.type() ), +m_errorMessage( other.errorMessage() ) +{ +assert( type() != ResultBase::Ok ); +} + +template +static auto ok( U const &value ) -> BasicResult { return { ResultBase::Ok, value }; } +static auto ok() -> BasicResult { return { ResultBase::Ok }; } +static auto logicError( std::string const &message ) -> BasicResult { return { ResultBase::LogicError, message }; } +static auto runtimeError( std::string const &message ) -> BasicResult { return { ResultBase::RuntimeError, message }; } + +explicit operator bool() const { return m_type == ResultBase::Ok; } +auto type() const -> ResultBase::Type { return m_type; } +auto errorMessage() const -> std::string { return m_errorMessage; } + +protected: +void enforceOk() const override { + +// Errors shouldn't reach this point, but if they do +// the actual error message will be in m_errorMessage +assert( m_type != ResultBase::LogicError ); +assert( m_type != ResultBase::RuntimeError ); +if( m_type != ResultBase::Ok ) +std::abort(); +} + +std::string m_errorMessage; // Only populated if resultType is an error + +BasicResult( ResultBase::Type type, std::string const &message ) +: ResultValueBase(type), +m_errorMessage(message) +{ +assert( m_type != ResultBase::Ok ); +} + +using ResultValueBase::ResultValueBase; +using ResultBase::m_type; +}; + +enum class ParseResultType { +Matched, NoMatch, ShortCircuitAll, ShortCircuitSame +}; + +class ParseState { +public: + +ParseState( ParseResultType type, TokenStream const &remainingTokens ) +: m_type(type), +m_remainingTokens( remainingTokens ) +{} + +auto type() const -> ParseResultType { return m_type; } +auto remainingTokens() const -> TokenStream { return m_remainingTokens; } + +private: +ParseResultType m_type; +TokenStream m_remainingTokens; +}; + +using Result = BasicResult; +using ParserResult = BasicResult; +using InternalParseResult = BasicResult; + +struct HelpColumns { +std::string left; +std::string right; +}; + +template +inline auto convertInto( std::string const &source, T& target ) -> ParserResult { +std::stringstream ss; +ss << source; +ss >> target; +if( ss.fail() ) +return ParserResult::runtimeError( "Unable to convert '" + source + "' to destination type" ); +else +return ParserResult::ok( ParseResultType::Matched ); +} +inline auto convertInto( std::string const &source, std::string& target ) -> ParserResult { +target = source; +return ParserResult::ok( ParseResultType::Matched ); +} +inline auto convertInto( std::string const &source, bool &target ) -> ParserResult { +std::string srcLC = source; +std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( char c ) { return static_cast( std::tolower(c) ); } ); +if (srcLC == "y" || srcLC == "1" || srcLC == "true" || srcLC == "yes" || srcLC == "on") +target = true; +else if (srcLC == "n" || srcLC == "0" || srcLC == "false" || srcLC == "no" || srcLC == "off") +target = false; +else +return ParserResult::runtimeError( "Expected a boolean value but did not recognise: '" + source + "'" ); +return ParserResult::ok( ParseResultType::Matched ); +} + #ifdef CLARA_CONFIG_OPTIONAL_TYPE +template +inline auto convertInto( std::string const &source, CLARA_CONFIG_OPTIONAL_TYPE& target ) -> ParserResult { +T temp; +auto result = convertInto( source, temp ); +if( result ) +target = std::move(temp); +return result; +} + #endif // CLARA_CONFIG_OPTIONAL_TYPE + +struct NonCopyable { +NonCopyable() = default; +NonCopyable( NonCopyable const & ) = delete; +NonCopyable( NonCopyable && ) = delete; +NonCopyable &operator=( NonCopyable const & ) = delete; +NonCopyable &operator=( NonCopyable && ) = delete; +}; + +struct BoundRef : NonCopyable { +virtual ~BoundRef() = default; +virtual auto isContainer() const -> bool { return false; } +virtual auto isFlag() const -> bool { return false; } +}; +struct BoundValueRefBase : BoundRef { +virtual auto setValue( std::string const &arg ) -> ParserResult = 0; +}; +struct BoundFlagRefBase : BoundRef { +virtual auto setFlag( bool flag ) -> ParserResult = 0; +virtual auto isFlag() const -> bool { return true; } +}; + +template +struct BoundValueRef : BoundValueRefBase { +T &m_ref; + +explicit BoundValueRef( T &ref ) : m_ref( ref ) {} + +auto setValue( std::string const &arg ) -> ParserResult override { +return convertInto( arg, m_ref ); +} +}; + +template +struct BoundValueRef> : BoundValueRefBase { +std::vector &m_ref; + +explicit BoundValueRef( std::vector &ref ) : m_ref( ref ) {} + +auto isContainer() const -> bool override { return true; } + +auto setValue( std::string const &arg ) -> ParserResult override { +T temp; +auto result = convertInto( arg, temp ); +if( result ) +m_ref.push_back( temp ); +return result; +} +}; + +struct BoundFlagRef : BoundFlagRefBase { +bool &m_ref; + +explicit BoundFlagRef( bool &ref ) : m_ref( ref ) {} + +auto setFlag( bool flag ) -> ParserResult override { +m_ref = flag; +return ParserResult::ok( ParseResultType::Matched ); +} +}; + +template +struct LambdaInvoker { +static_assert( std::is_same::value, "Lambda must return void or clara::ParserResult" ); + +template +static auto invoke( L const &lambda, ArgType const &arg ) -> ParserResult { +return lambda( arg ); +} +}; + +template<> +struct LambdaInvoker { +template +static auto invoke( L const &lambda, ArgType const &arg ) -> ParserResult { +lambda( arg ); +return ParserResult::ok( ParseResultType::Matched ); +} +}; + +template +inline auto invokeLambda( L const &lambda, std::string const &arg ) -> ParserResult { +ArgType temp{}; +auto result = convertInto( arg, temp ); +return !result +? result +: LambdaInvoker::ReturnType>::invoke( lambda, temp ); +} + +template +struct BoundLambda : BoundValueRefBase { +L m_lambda; + +static_assert( UnaryLambdaTraits::isValid, "Supplied lambda must take exactly one argument" ); +explicit BoundLambda( L const &lambda ) : m_lambda( lambda ) {} + +auto setValue( std::string const &arg ) -> ParserResult override { +return invokeLambda::ArgType>( m_lambda, arg ); +} +}; + +template +struct BoundFlagLambda : BoundFlagRefBase { +L m_lambda; + +static_assert( UnaryLambdaTraits::isValid, "Supplied lambda must take exactly one argument" ); +static_assert( std::is_same::ArgType, bool>::value, "flags must be boolean" ); + +explicit BoundFlagLambda( L const &lambda ) : m_lambda( lambda ) {} + +auto setFlag( bool flag ) -> ParserResult override { +return LambdaInvoker::ReturnType>::invoke( m_lambda, flag ); +} +}; + +enum class Optionality { Optional, Required }; + +struct Parser; + +class ParserBase { +public: +virtual ~ParserBase() = default; +virtual auto validate() const -> Result { return Result::ok(); } +virtual auto parse( std::string const& exeName, TokenStream const &tokens) const -> InternalParseResult = 0; +virtual auto cardinality() const -> size_t { return 1; } + +auto parse( Args const &args ) const -> InternalParseResult { +return parse( args.exeName(), TokenStream( args ) ); +} +}; + +template +class ComposableParserImpl : public ParserBase { +public: +template +auto operator|( T const &other ) const -> Parser; + +template +auto operator+( T const &other ) const -> Parser; +}; + +// Common code and state for Args and Opts +template +class ParserRefImpl : public ComposableParserImpl { +protected: +Optionality m_optionality = Optionality::Optional; +std::shared_ptr m_ref; +std::string m_hint; +std::string m_description; + +explicit ParserRefImpl( std::shared_ptr const &ref ) : m_ref( ref ) {} + +public: +template +ParserRefImpl( T &ref, std::string const &hint ) +: m_ref( std::make_shared>( ref ) ), +m_hint( hint ) +{} + +template +ParserRefImpl( LambdaT const &ref, std::string const &hint ) +: m_ref( std::make_shared>( ref ) ), +m_hint(hint) +{} + +auto operator()( std::string const &description ) -> DerivedT & { +m_description = description; +return static_cast( *this ); +} + +auto optional() -> DerivedT & { +m_optionality = Optionality::Optional; +return static_cast( *this ); +}; + +auto required() -> DerivedT & { +m_optionality = Optionality::Required; +return static_cast( *this ); +}; + +auto isOptional() const -> bool { +return m_optionality == Optionality::Optional; +} + +auto cardinality() const -> size_t override { +if( m_ref->isContainer() ) +return 0; +else +return 1; +} + +auto hint() const -> std::string { return m_hint; } +}; + +class ExeName : public ComposableParserImpl { +std::shared_ptr m_name; +std::shared_ptr m_ref; + +template +static auto makeRef(LambdaT const &lambda) -> std::shared_ptr { +return std::make_shared>( lambda) ; +} + +public: +ExeName() : m_name( std::make_shared( "" ) ) {} + +explicit ExeName( std::string &ref ) : ExeName() { +m_ref = std::make_shared>( ref ); +} + +template +explicit ExeName( LambdaT const& lambda ) : ExeName() { +m_ref = std::make_shared>( lambda ); +} + +// The exe name is not parsed out of the normal tokens, but is handled specially +auto parse( std::string const&, TokenStream const &tokens ) const -> InternalParseResult override { +return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) ); +} + +auto name() const -> std::string { return *m_name; } +auto set( std::string const& newName ) -> ParserResult { + +auto lastSlash = newName.find_last_of( "\\/" ); +auto filename = ( lastSlash == std::string::npos ) +? newName +: newName.substr( lastSlash+1 ); + +*m_name = filename; +if( m_ref ) +return m_ref->setValue( filename ); +else +return ParserResult::ok( ParseResultType::Matched ); +} +}; + +class Arg : public ParserRefImpl { +public: +using ParserRefImpl::ParserRefImpl; + +auto parse( std::string const &, TokenStream const &tokens ) const -> InternalParseResult override { +auto validationResult = validate(); +if( !validationResult ) +return InternalParseResult( validationResult ); + +auto remainingTokens = tokens; +auto const &token = *remainingTokens; +if( token.type != TokenType::Argument ) +return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, remainingTokens ) ); + +assert( !m_ref->isFlag() ); +auto valueRef = static_cast( m_ref.get() ); + +auto result = valueRef->setValue( remainingTokens->token ); +if( !result ) +return InternalParseResult( result ); +else +return InternalParseResult::ok( ParseState( ParseResultType::Matched, ++remainingTokens ) ); +} +}; + +inline auto normaliseOpt( std::string const &optName ) -> std::string { + #ifdef CATCH_PLATFORM_WINDOWS +if( optName[0] == '/' ) +return "-" + optName.substr( 1 ); +else + #endif +return optName; +} + +class Opt : public ParserRefImpl { +protected: +std::vector m_optNames; + +public: +template +explicit Opt( LambdaT const &ref ) : ParserRefImpl( std::make_shared>( ref ) ) {} + +explicit Opt( bool &ref ) : ParserRefImpl( std::make_shared( ref ) ) {} + +template +Opt( LambdaT const &ref, std::string const &hint ) : ParserRefImpl( ref, hint ) {} + +template +Opt( T &ref, std::string const &hint ) : ParserRefImpl( ref, hint ) {} + +auto operator[]( std::string const &optName ) -> Opt & { +m_optNames.push_back( optName ); +return *this; +} + +auto getHelpColumns() const -> std::vector { +std::ostringstream oss; +bool first = true; +for( auto const &opt : m_optNames ) { +if (first) +first = false; +else +oss << ", "; +oss << opt; +} +if( !m_hint.empty() ) +oss << " <" << m_hint << ">"; +return { { oss.str(), m_description } }; +} + +auto isMatch( std::string const &optToken ) const -> bool { +auto normalisedToken = normaliseOpt( optToken ); +for( auto const &name : m_optNames ) { +if( normaliseOpt( name ) == normalisedToken ) +return true; +} +return false; +} + +using ParserBase::parse; + +auto parse( std::string const&, TokenStream const &tokens ) const -> InternalParseResult override { +auto validationResult = validate(); +if( !validationResult ) +return InternalParseResult( validationResult ); + +auto remainingTokens = tokens; +if( remainingTokens && remainingTokens->type == TokenType::Option ) { +auto const &token = *remainingTokens; +if( isMatch(token.token ) ) { +if( m_ref->isFlag() ) { +auto flagRef = static_cast( m_ref.get() ); +auto result = flagRef->setFlag( true ); +if( !result ) +return InternalParseResult( result ); +if( result.value() == ParseResultType::ShortCircuitAll ) +return InternalParseResult::ok( ParseState( result.value(), remainingTokens ) ); +} else { +auto valueRef = static_cast( m_ref.get() ); +++remainingTokens; +if( !remainingTokens ) +return InternalParseResult::runtimeError( "Expected argument following " + token.token ); +auto const &argToken = *remainingTokens; +if( argToken.type != TokenType::Argument ) +return InternalParseResult::runtimeError( "Expected argument following " + token.token ); +auto result = valueRef->setValue( argToken.token ); +if( !result ) +return InternalParseResult( result ); +if( result.value() == ParseResultType::ShortCircuitAll ) +return InternalParseResult::ok( ParseState( result.value(), remainingTokens ) ); +} +return InternalParseResult::ok( ParseState( ParseResultType::Matched, ++remainingTokens ) ); +} +} +return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, remainingTokens ) ); +} + +auto validate() const -> Result override { +if( m_optNames.empty() ) +return Result::logicError( "No options supplied to Opt" ); +for( auto const &name : m_optNames ) { +if( name.empty() ) +return Result::logicError( "Option name cannot be empty" ); + #ifdef CATCH_PLATFORM_WINDOWS +if( name[0] != '-' && name[0] != '/' ) +return Result::logicError( "Option name must begin with '-' or '/'" ); + #else +if( name[0] != '-' ) +return Result::logicError( "Option name must begin with '-'" ); + #endif +} +return ParserRefImpl::validate(); +} +}; + +struct Help : Opt { +Help( bool &showHelpFlag ) +: Opt([&]( bool flag ) { +showHelpFlag = flag; +return ParserResult::ok( ParseResultType::ShortCircuitAll ); +}) +{ +static_cast( *this ) +("display usage information") +["-?"]["-h"]["--help"] +.optional(); +} +}; + +struct Parser : ParserBase { + +mutable ExeName m_exeName; +std::vector m_options; +std::vector m_args; + +auto operator|=( ExeName const &exeName ) -> Parser & { +m_exeName = exeName; +return *this; +} + +auto operator|=( Arg const &arg ) -> Parser & { +m_args.push_back(arg); +return *this; +} + +auto operator|=( Opt const &opt ) -> Parser & { +m_options.push_back(opt); +return *this; +} + +auto operator|=( Parser const &other ) -> Parser & { +m_options.insert(m_options.end(), other.m_options.begin(), other.m_options.end()); +m_args.insert(m_args.end(), other.m_args.begin(), other.m_args.end()); +return *this; +} + +template +auto operator|( T const &other ) const -> Parser { +return Parser( *this ) |= other; +} + +// Forward deprecated interface with '+' instead of '|' +template +auto operator+=( T const &other ) -> Parser & { return operator|=( other ); } +template +auto operator+( T const &other ) const -> Parser { return operator|( other ); } + +auto getHelpColumns() const -> std::vector { +std::vector cols; +for (auto const &o : m_options) { +auto childCols = o.getHelpColumns(); +cols.insert( cols.end(), childCols.begin(), childCols.end() ); +} +return cols; +} + +void writeToStream( std::ostream &os ) const { +if (!m_exeName.name().empty()) { +os << "usage:\n" << " " << m_exeName.name() << " "; +bool required = true, first = true; +for( auto const &arg : m_args ) { +if (first) +first = false; +else +os << " "; +if( arg.isOptional() && required ) { +os << "["; +required = false; +} +os << "<" << arg.hint() << ">"; +if( arg.cardinality() == 0 ) +os << " ... "; +} +if( !required ) +os << "]"; +if( !m_options.empty() ) +os << " options"; +os << "\n\nwhere options are:" << std::endl; +} + +auto rows = getHelpColumns(); +size_t consoleWidth = CATCH_CLARA_CONFIG_CONSOLE_WIDTH; +size_t optWidth = 0; +for( auto const &cols : rows ) +optWidth = (std::max)(optWidth, cols.left.size() + 2); + +optWidth = (std::min)(optWidth, consoleWidth/2); + +for( auto const &cols : rows ) { +auto row = +TextFlow::Column( cols.left ).width( optWidth ).indent( 2 ) + +TextFlow::Spacer(4) + +TextFlow::Column( cols.right ).width( consoleWidth - 7 - optWidth ); +os << row << std::endl; +} +} + +friend auto operator<<( std::ostream &os, Parser const &parser ) -> std::ostream& { +parser.writeToStream( os ); +return os; +} + +auto validate() const -> Result override { +for( auto const &opt : m_options ) { +auto result = opt.validate(); +if( !result ) +return result; +} +for( auto const &arg : m_args ) { +auto result = arg.validate(); +if( !result ) +return result; +} +return Result::ok(); +} + +using ParserBase::parse; + +auto parse( std::string const& exeName, TokenStream const &tokens ) const -> InternalParseResult override { + +struct ParserInfo { +ParserBase const* parser = nullptr; +size_t count = 0; +}; +const size_t totalParsers = m_options.size() + m_args.size(); +assert( totalParsers < 512 ); +// ParserInfo parseInfos[totalParsers]; // <-- this is what we really want to do +ParserInfo parseInfos[512]; + +{ +size_t i = 0; +for (auto const &opt : m_options) parseInfos[i++].parser = &opt; +for (auto const &arg : m_args) parseInfos[i++].parser = &arg; +} + +m_exeName.set( exeName ); + +auto result = InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) ); +while( result.value().remainingTokens() ) { +bool tokenParsed = false; + +for( size_t i = 0; i < totalParsers; ++i ) { +auto& parseInfo = parseInfos[i]; +if( parseInfo.parser->cardinality() == 0 || parseInfo.count < parseInfo.parser->cardinality() ) { +result = parseInfo.parser->parse(exeName, result.value().remainingTokens()); +if (!result) +return result; +if (result.value().type() != ParseResultType::NoMatch) { +tokenParsed = true; +++parseInfo.count; +break; +} +} +} + +if( result.value().type() == ParseResultType::ShortCircuitAll ) +return result; +if( !tokenParsed ) +return InternalParseResult::runtimeError( "Unrecognised token: " + result.value().remainingTokens()->token ); +} +// !TBD Check missing required options +return result; +} +}; + +template +template +auto ComposableParserImpl::operator|( T const &other ) const -> Parser { +return Parser() | static_cast( *this ) | other; +} +} // namespace detail + +// A Combined parser +using detail::Parser; + +// A parser for options +using detail::Opt; + +// A parser for arguments +using detail::Arg; + +// Wrapper for argc, argv from main() +using detail::Args; + +// Specifies the name of the executable +using detail::ExeName; + +// Convenience wrapper for option parser that specifies the help option +using detail::Help; + +// enum of result types from a parse +using detail::ParseResultType; + +// Result type for parser operation +using detail::ParserResult; + +}} // namespace Catch::clara + +// end clara.hpp + #ifdef __clang__ + #pragma clang diagnostic pop + #endif + +// Restore Clara's value for console width, if present + #ifdef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH + #define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH + #undef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH + #endif + +// end catch_clara.h +namespace Catch { + +clara::Parser makeCommandLineParser( ConfigData& config ); + +} // end namespace Catch + +// end catch_commandline.h + #include + #include + +namespace Catch { + +clara::Parser makeCommandLineParser( ConfigData& config ) { + +using namespace clara; + +auto const setWarning = [&]( std::string const& warning ) { +auto warningSet = [&]() { +if( warning == "NoAssertions" ) +return WarnAbout::NoAssertions; + +if ( warning == "NoTests" ) +return WarnAbout::NoTests; + +return WarnAbout::Nothing; +}(); + +if (warningSet == WarnAbout::Nothing) +return ParserResult::runtimeError( "Unrecognised warning: '" + warning + "'" ); +config.warnings = static_cast( config.warnings | warningSet ); +return ParserResult::ok( ParseResultType::Matched ); +}; +auto const loadTestNamesFromFile = [&]( std::string const& filename ) { +std::ifstream f( filename.c_str() ); +if( !f.is_open() ) +return ParserResult::runtimeError( "Unable to load input file: '" + filename + "'" ); + +std::string line; +while( std::getline( f, line ) ) { +line = trim(line); +if( !line.empty() && !startsWith( line, '#' ) ) { +if( !startsWith( line, '"' ) ) +line = '"' + line + '"'; +config.testsOrTags.push_back( line + ',' ); +} +} +return ParserResult::ok( ParseResultType::Matched ); +}; +auto const setTestOrder = [&]( std::string const& order ) { +if( startsWith( "declared", order ) ) +config.runOrder = RunTests::InDeclarationOrder; +else if( startsWith( "lexical", order ) ) +config.runOrder = RunTests::InLexicographicalOrder; +else if( startsWith( "random", order ) ) +config.runOrder = RunTests::InRandomOrder; +else +return clara::ParserResult::runtimeError( "Unrecognised ordering: '" + order + "'" ); +return ParserResult::ok( ParseResultType::Matched ); +}; +auto const setRngSeed = [&]( std::string const& seed ) { +if( seed != "time" ) +return clara::detail::convertInto( seed, config.rngSeed ); +config.rngSeed = static_cast( std::time(nullptr) ); +return ParserResult::ok( ParseResultType::Matched ); +}; +auto const setColourUsage = [&]( std::string const& useColour ) { +auto mode = toLower( useColour ); + +if( mode == "yes" ) +config.useColour = UseColour::Yes; +else if( mode == "no" ) +config.useColour = UseColour::No; +else if( mode == "auto" ) +config.useColour = UseColour::Auto; +else +return ParserResult::runtimeError( "colour mode must be one of: auto, yes or no. '" + useColour + "' not recognised" ); +return ParserResult::ok( ParseResultType::Matched ); +}; +auto const setWaitForKeypress = [&]( std::string const& keypress ) { +auto keypressLc = toLower( keypress ); +if( keypressLc == "start" ) +config.waitForKeypress = WaitForKeypress::BeforeStart; +else if( keypressLc == "exit" ) +config.waitForKeypress = WaitForKeypress::BeforeExit; +else if( keypressLc == "both" ) +config.waitForKeypress = WaitForKeypress::BeforeStartAndExit; +else +return ParserResult::runtimeError( "keypress argument must be one of: start, exit or both. '" + keypress + "' not recognised" ); +return ParserResult::ok( ParseResultType::Matched ); +}; +auto const setVerbosity = [&]( std::string const& verbosity ) { +auto lcVerbosity = toLower( verbosity ); +if( lcVerbosity == "quiet" ) +config.verbosity = Verbosity::Quiet; +else if( lcVerbosity == "normal" ) +config.verbosity = Verbosity::Normal; +else if( lcVerbosity == "high" ) +config.verbosity = Verbosity::High; +else +return ParserResult::runtimeError( "Unrecognised verbosity, '" + verbosity + "'" ); +return ParserResult::ok( ParseResultType::Matched ); +}; +auto const setReporter = [&]( std::string const& reporter ) { +IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories(); + +auto lcReporter = toLower( reporter ); +auto result = factories.find( lcReporter ); + +if( factories.end() != result ) +config.reporterName = lcReporter; +else +return ParserResult::runtimeError( "Unrecognized reporter, '" + reporter + "'. Check available with --list-reporters" ); +return ParserResult::ok( ParseResultType::Matched ); +}; + +auto cli += ExeName( config.processName ) +| Help( config.showHelp ) +| Opt( config.listTests ) +["-l"]["--list-tests"] +( "list all/matching test cases" ) +| Opt( config.listTags ) +["-t"]["--list-tags"] +( "list all/matching tags" ) +| Opt( config.showSuccessfulTests ) +["-s"]["--success"] +( "include successful tests in output" ) +| Opt( config.shouldDebugBreak ) +["-b"]["--break"] +( "break into debugger on failure" ) +| Opt( config.noThrow ) +["-e"]["--nothrow"] +( "skip exception tests" ) +| Opt( config.showInvisibles ) +["-i"]["--invisibles"] +( "show invisibles (tabs, newlines)" ) +| Opt( config.outputFilename, "filename" ) +["-o"]["--out"] +( "output filename" ) +| Opt( setReporter, "name" ) +["-r"]["--reporter"] +( "reporter to use (defaults to console)" ) +| Opt( config.name, "name" ) +["-n"]["--name"] +( "suite name" ) +| Opt( [&]( bool ){ config.abortAfter = 1; } ) +["-a"]["--abort"] +( "abort at first failure" ) +| Opt( [&]( int x ){ config.abortAfter = x; }, "no. failures" ) +["-x"]["--abortx"] +( "abort after x failures" ) +| Opt( setWarning, "warning name" ) +["-w"]["--warn"] +( "enable warnings" ) +| Opt( [&]( bool flag ) { config.showDurations = flag ? ShowDurations::Always : ShowDurations::Never; }, "yes|no" ) +["-d"]["--durations"] +( "show test durations" ) +| Opt( loadTestNamesFromFile, "filename" ) +["-f"]["--input-file"] +( "load test names to run from a file" ) +| Opt( config.filenamesAsTags ) +["-#"]["--filenames-as-tags"] +( "adds a tag for the filename" ) +| Opt( config.sectionsToRun, "section name" ) +["-c"]["--section"] +( "specify section to run" ) +| Opt( setVerbosity, "quiet|normal|high" ) +["-v"]["--verbosity"] +( "set output verbosity" ) +| Opt( config.listTestNamesOnly ) +["--list-test-names-only"] +( "list all/matching test cases names only" ) +| Opt( config.listReporters ) +["--list-reporters"] +( "list all reporters" ) +| Opt( setTestOrder, "decl|lex|rand" ) +["--order"] +( "test case order (defaults to decl)" ) +| Opt( setRngSeed, "'time'|number" ) +["--rng-seed"] +( "set a specific seed for random numbers" ) +| Opt( setColourUsage, "yes|no" ) +["--use-colour"] +( "should output be colourised" ) +| Opt( config.libIdentify ) +["--libidentify"] +( "report name and version according to libidentify standard" ) +| Opt( setWaitForKeypress, "start|exit|both" ) +["--wait-for-keypress"] +( "waits for a keypress before exiting" ) +| Opt( config.benchmarkResolutionMultiple, "multiplier" ) +["--benchmark-resolution-multiple"] +( "multiple of clock resolution to run benchmarks" ) + +| Arg( config.testsOrTags, "test name|pattern|tags" ) +( "which test or tests to use" ); + +return cli; +} + +} // end namespace Catch +// end catch_commandline.cpp +// start catch_common.cpp + + #include + #include + +namespace Catch { + +bool SourceLineInfo::empty() const noexcept { +return file[0] == '\0'; +} +bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const noexcept { +return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0); +} +bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const noexcept { +// We can assume that the same file will usually have the same pointer. +// Thus, if the pointers are the same, there is no point in calling the strcmp +return line < other.line || ( line == other.line && file != other.file && (std::strcmp(file, other.file) < 0)); +} + +std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ) { + #ifndef __GNUG__ +os << info.file << '(' << info.line << ')'; + #else +os << info.file << ':' << info.line; + #endif +return os; +} + +std::string StreamEndStop::operator+() const { +return std::string(); +} + +NonCopyable::NonCopyable() = default; +NonCopyable::~NonCopyable() = default; + +} +// end catch_common.cpp +// start catch_config.cpp + +namespace Catch { + +Config::Config( ConfigData const& data ) +: m_data( data ), +m_stream( openStream() ) +{ +TestSpecParser parser(ITagAliasRegistry::get()); +if (data.testsOrTags.empty()) { +parser.parse("~[.]"); // All not hidden tests +} +else { +m_hasTestFilters = true; +for( auto const& testOrTags : data.testsOrTags ) +parser.parse( testOrTags ); +} +m_testSpec = parser.testSpec(); +} + +std::string const& Config::getFilename() const { +return m_data.outputFilename ; +} + +bool Config::listTests() const { return m_data.listTests; } +bool Config::listTestNamesOnly() const { return m_data.listTestNamesOnly; } +bool Config::listTags() const { return m_data.listTags; } +bool Config::listReporters() const { return m_data.listReporters; } + +std::string Config::getProcessName() const { return m_data.processName; } +std::string const& Config::getReporterName() const { return m_data.reporterName; } + +std::vector const& Config::getTestsOrTags() const { return m_data.testsOrTags; } +std::vector const& Config::getSectionsToRun() const { return m_data.sectionsToRun; } + +TestSpec const& Config::testSpec() const { return m_testSpec; } +bool Config::hasTestFilters() const { return m_hasTestFilters; } + +bool Config::showHelp() const { return m_data.showHelp; } + +// IConfig interface +bool Config::allowThrows() const { return !m_data.noThrow; } +std::ostream& Config::stream() const { return m_stream->stream(); } +std::string Config::name() const { return m_data.name.empty() ? m_data.processName : m_data.name; } +bool Config::includeSuccessfulResults() const { return m_data.showSuccessfulTests; } +bool Config::warnAboutMissingAssertions() const { return !!(m_data.warnings & WarnAbout::NoAssertions); } +bool Config::warnAboutNoTests() const { return !!(m_data.warnings & WarnAbout::NoTests); } +ShowDurations::OrNot Config::showDurations() const { return m_data.showDurations; } +RunTests::InWhatOrder Config::runOrder() const { return m_data.runOrder; } +unsigned int Config::rngSeed() const { return m_data.rngSeed; } +int Config::benchmarkResolutionMultiple() const { return m_data.benchmarkResolutionMultiple; } +UseColour::YesOrNo Config::useColour() const { return m_data.useColour; } +bool Config::shouldDebugBreak() const { return m_data.shouldDebugBreak; } +int Config::abortAfter() const { return m_data.abortAfter; } +bool Config::showInvisibles() const { return m_data.showInvisibles; } +Verbosity Config::verbosity() const { return m_data.verbosity; } + +IStream const* Config::openStream() { +return Catch::makeStream(m_data.outputFilename); +} + +} // end namespace Catch +// end catch_config.cpp +// start catch_console_colour.cpp + + #if defined(__clang__) + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wexit-time-destructors" + #endif + +// start catch_errno_guard.h + +namespace Catch { + +class ErrnoGuard { +public: +ErrnoGuard(); +~ErrnoGuard(); +private: +int m_oldErrno; +}; + +} + +// end catch_errno_guard.h + #include + +namespace Catch { +namespace { + +struct IColourImpl { +virtual ~IColourImpl() = default; +virtual void use( Colour::Code _colourCode ) = 0; +}; + +struct NoColourImpl : IColourImpl { +void use( Colour::Code ) {} + +static IColourImpl* instance() { +static NoColourImpl s_instance; +return &s_instance; +} +}; + +} // anon namespace +} // namespace Catch + + #if !defined( CATCH_CONFIG_COLOUR_NONE ) && !defined( CATCH_CONFIG_COLOUR_WINDOWS ) && !defined( CATCH_CONFIG_COLOUR_ANSI ) + # ifdef CATCH_PLATFORM_WINDOWS + # define CATCH_CONFIG_COLOUR_WINDOWS + # else + # define CATCH_CONFIG_COLOUR_ANSI + # endif + #endif + + #if defined ( CATCH_CONFIG_COLOUR_WINDOWS ) ///////////////////////////////////////// + +namespace Catch { +namespace { + +class Win32ColourImpl : public IColourImpl { +public: +Win32ColourImpl() : stdoutHandle( GetStdHandle(STD_OUTPUT_HANDLE) ) +{ +CONSOLE_SCREEN_BUFFER_INFO csbiInfo; +GetConsoleScreenBufferInfo( stdoutHandle, &csbiInfo ); +originalForegroundAttributes = csbiInfo.wAttributes & ~( BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY ); +originalBackgroundAttributes = csbiInfo.wAttributes & ~( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY ); +} + +virtual void use( Colour::Code _colourCode ) override { +switch( _colourCode ) { +case Colour::None: return setTextAttribute( originalForegroundAttributes ); +case Colour::White: return setTextAttribute( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE ); +case Colour::Red: return setTextAttribute( FOREGROUND_RED ); +case Colour::Green: return setTextAttribute( FOREGROUND_GREEN ); +case Colour::Blue: return setTextAttribute( FOREGROUND_BLUE ); +case Colour::Cyan: return setTextAttribute( FOREGROUND_BLUE | FOREGROUND_GREEN ); +case Colour::Yellow: return setTextAttribute( FOREGROUND_RED | FOREGROUND_GREEN ); +case Colour::Grey: return setTextAttribute( 0 ); + +case Colour::LightGrey: return setTextAttribute( FOREGROUND_INTENSITY ); +case Colour::BrightRed: return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_RED ); +case Colour::BrightGreen: return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_GREEN ); +case Colour::BrightWhite: return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE ); +case Colour::BrightYellow: return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN ); + +case Colour::Bright: CATCH_INTERNAL_ERROR( "not a colour" ); + +default: +CATCH_ERROR( "Unknown colour requested" ); +} +} + +private: +void setTextAttribute( WORD _textAttribute ) { +SetConsoleTextAttribute( stdoutHandle, _textAttribute | originalBackgroundAttributes ); +} +HANDLE stdoutHandle; +WORD originalForegroundAttributes; +WORD originalBackgroundAttributes; +}; + +IColourImpl* platformColourInstance() { +static Win32ColourImpl s_instance; + +IConfigPtr config = getCurrentContext().getConfig(); +UseColour::YesOrNo colourMode = config +? config->useColour() +: UseColour::Auto; +if( colourMode == UseColour::Auto ) +colourMode = UseColour::Yes; +return colourMode == UseColour::Yes +? &s_instance +: NoColourImpl::instance(); +} + +} // end anon namespace +} // end namespace Catch + + #elif defined( CATCH_CONFIG_COLOUR_ANSI ) ////////////////////////////////////// + + #include + +namespace Catch { +namespace { + +// use POSIX/ ANSI console terminal codes +// Thanks to Adam Strzelecki for original contribution +// (http://github.com/nanoant) +// https://github.com/philsquared/Catch/pull/131 +class PosixColourImpl : public IColourImpl { +public: +virtual void use( Colour::Code _colourCode ) override { +switch( _colourCode ) { +case Colour::None: +case Colour::White: return setColour( "[0m" ); +case Colour::Red: return setColour( "[0;31m" ); +case Colour::Green: return setColour( "[0;32m" ); +case Colour::Blue: return setColour( "[0;34m" ); +case Colour::Cyan: return setColour( "[0;36m" ); +case Colour::Yellow: return setColour( "[0;33m" ); +case Colour::Grey: return setColour( "[1;30m" ); + +case Colour::LightGrey: return setColour( "[0;37m" ); +case Colour::BrightRed: return setColour( "[1;31m" ); +case Colour::BrightGreen: return setColour( "[1;32m" ); +case Colour::BrightWhite: return setColour( "[1;37m" ); +case Colour::BrightYellow: return setColour( "[1;33m" ); + +case Colour::Bright: CATCH_INTERNAL_ERROR( "not a colour" ); +default: CATCH_INTERNAL_ERROR( "Unknown colour requested" ); +} +} +static IColourImpl* instance() { +static PosixColourImpl s_instance; +return &s_instance; +} + +private: +void setColour( const char* _escapeCode ) { +getCurrentContext().getConfig()->stream() +<< '\033' << _escapeCode; +} +}; + +bool useColourOnPlatform() { +return + #ifdef CATCH_PLATFORM_MAC +!isDebuggerActive() && + #endif + #if !(defined(__DJGPP__) && defined(__STRICT_ANSI__)) +isatty(STDOUT_FILENO) + #else +false + #endif +; +} +IColourImpl* platformColourInstance() { +ErrnoGuard guard; +IConfigPtr config = getCurrentContext().getConfig(); +UseColour::YesOrNo colourMode = config +? config->useColour() +: UseColour::Auto; +if( colourMode == UseColour::Auto ) +colourMode = useColourOnPlatform() +? UseColour::Yes +: UseColour::No; +return colourMode == UseColour::Yes +? PosixColourImpl::instance() +: NoColourImpl::instance(); +} + +} // end anon namespace +} // end namespace Catch + + #else // not Windows or ANSI /////////////////////////////////////////////// + +namespace Catch { + +static IColourImpl* platformColourInstance() { return NoColourImpl::instance(); } + +} // end namespace Catch + + #endif // Windows/ ANSI/ None + +namespace Catch { + +Colour::Colour( Code _colourCode ) { use( _colourCode ); } +Colour::Colour( Colour&& rhs ) noexcept { +m_moved = rhs.m_moved; +rhs.m_moved = true; +} +Colour& Colour::operator=( Colour&& rhs ) noexcept { +m_moved = rhs.m_moved; +rhs.m_moved = true; +return *this; +} + +Colour::~Colour(){ if( !m_moved ) use( None ); } + +void Colour::use( Code _colourCode ) { +static IColourImpl* impl = platformColourInstance(); +impl->use( _colourCode ); +} + +std::ostream& operator << ( std::ostream& os, Colour const& ) { +return os; +} + +} // end namespace Catch + + #if defined(__clang__) + # pragma clang diagnostic pop + #endif + +// end catch_console_colour.cpp +// start catch_context.cpp + +namespace Catch { + +class Context : public IMutableContext, NonCopyable { + +public: // IContext +virtual IResultCapture* getResultCapture() override { +return m_resultCapture; +} +virtual IRunner* getRunner() override { +return m_runner; +} + +virtual IConfigPtr const& getConfig() const override { +return m_config; +} + +virtual ~Context() override; + +public: // IMutableContext +virtual void setResultCapture( IResultCapture* resultCapture ) override { +m_resultCapture = resultCapture; +} +virtual void setRunner( IRunner* runner ) override { +m_runner = runner; +} +virtual void setConfig( IConfigPtr const& config ) override { +m_config = config; +} + +friend IMutableContext& getCurrentMutableContext(); + +private: +IConfigPtr m_config; +IRunner* m_runner = nullptr; +IResultCapture* m_resultCapture = nullptr; +}; + +IMutableContext *IMutableContext::currentContext = nullptr; + +void IMutableContext::createContext() +{ +currentContext = new Context(); +} + +void cleanUpContext() { +delete IMutableContext::currentContext; +IMutableContext::currentContext = nullptr; +} +IContext::~IContext() = default; +IMutableContext::~IMutableContext() = default; +Context::~Context() = default; +} +// end catch_context.cpp +// start catch_debug_console.cpp + +// start catch_debug_console.h + + #include + +namespace Catch { +void writeToDebugConsole( std::string const& text ); +} + +// end catch_debug_console.h + #ifdef CATCH_PLATFORM_WINDOWS + +namespace Catch { +void writeToDebugConsole( std::string const& text ) { +::OutputDebugStringA( text.c_str() ); +} +} + + #else + +namespace Catch { +void writeToDebugConsole( std::string const& text ) { +// !TBD: Need a version for Mac/ XCode and other IDEs +Catch::cout() << text; +} +} + + #endif // Platform +// end catch_debug_console.cpp +// start catch_debugger.cpp + + #ifdef CATCH_PLATFORM_MAC + + # include + # include + # include + # include + # include + # include + # include + +namespace Catch { + +// The following function is taken directly from the following technical note: +// http://developer.apple.com/library/mac/#qa/qa2004/qa1361.html + +// Returns true if the current process is being debugged (either +// running under the debugger or has a debugger attached post facto). +bool isDebuggerActive(){ + +int mib[4]; +struct kinfo_proc info; +std::size_t size; + +// Initialize the flags so that, if sysctl fails for some bizarre +// reason, we get a predictable result. + +info.kp_proc.p_flag = 0; + +// Initialize mib, which tells sysctl the info we want, in this case +// we're looking for information about a specific process ID. + +mib[0] = CTL_KERN; +mib[1] = KERN_PROC; +mib[2] = KERN_PROC_PID; +mib[3] = getpid(); + +// Call sysctl. + +size = sizeof(info); +if( sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, nullptr, 0) != 0 ) { +Catch::cerr() << "\n** Call to sysctl failed - unable to determine if debugger is active **\n" << std::endl; +return false; +} + +// We're being debugged if the P_TRACED flag is set. + +return ( (info.kp_proc.p_flag & P_TRACED) != 0 ); +} +} // namespace Catch + + #elif defined(CATCH_PLATFORM_LINUX) + #include + #include + +namespace Catch{ +// The standard POSIX way of detecting a debugger is to attempt to +// ptrace() the process, but this needs to be done from a child and not +// this process itself to still allow attaching to this process later +// if wanted, so is rather heavy. Under Linux we have the PID of the +// "debugger" (which doesn't need to be gdb, of course, it could also +// be strace, for example) in /proc/$PID/status, so just get it from +// there instead. +bool isDebuggerActive(){ +// Libstdc++ has a bug, where std::ifstream sets errno to 0 +// This way our users can properly assert over errno values +ErrnoGuard guard; +std::ifstream in("/proc/self/status"); +for( std::string line; std::getline(in, line); ) { +static const int PREFIX_LEN = 11; +if( line.compare(0, PREFIX_LEN, "TracerPid:\t") == 0 ) { +// We're traced if the PID is not 0 and no other PID starts +// with 0 digit, so it's enough to check for just a single +// character. +return line.length() > PREFIX_LEN && line[PREFIX_LEN] != '0'; +} +} + +return false; +} +} // namespace Catch + #elif defined(_MSC_VER) +extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent(); +namespace Catch { +bool isDebuggerActive() { +return IsDebuggerPresent() != 0; +} +} + #elif defined(__MINGW32__) +extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent(); +namespace Catch { +bool isDebuggerActive() { +return IsDebuggerPresent() != 0; +} +} + #else +namespace Catch { +bool isDebuggerActive() { return false; } +} + #endif // Platform +// end catch_debugger.cpp +// start catch_decomposer.cpp + +namespace Catch { + +ITransientExpression::~ITransientExpression() = default; + +void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ) { +if( lhs.size() + rhs.size() < 40 && +lhs.find('\n') == std::string::npos && +rhs.find('\n') == std::string::npos ) +os << lhs << " " << op << " " << rhs; +else +os << lhs << "\n" << op << "\n" << rhs; +} +} +// end catch_decomposer.cpp +// start catch_enforce.cpp + +namespace Catch { + #if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS_CUSTOM_HANDLER) +[[noreturn]] +void throw_exception(std::exception const& e) { +Catch::cerr() << "Catch will terminate because it needed to throw an exception.\n" +<< "The message was: " << e.what() << '\n'; +std::terminate(); +} + #endif +} // namespace Catch; +// end catch_enforce.cpp +// start catch_errno_guard.cpp + + #include + +namespace Catch { +ErrnoGuard::ErrnoGuard():m_oldErrno(errno){} +ErrnoGuard::~ErrnoGuard() { errno = m_oldErrno; } +} +// end catch_errno_guard.cpp +// start catch_exception_translator_registry.cpp + +// start catch_exception_translator_registry.h + + #include + #include + #include + +namespace Catch { + +class ExceptionTranslatorRegistry : public IExceptionTranslatorRegistry { +public: +~ExceptionTranslatorRegistry(); +virtual void registerTranslator( const IExceptionTranslator* translator ); +virtual std::string translateActiveException() const override; +std::string tryTranslators() const; + +private: +std::vector> m_translators; +}; +} + +// end catch_exception_translator_registry.h + #ifdef __OBJC__ + #import "Foundation/Foundation.h" + #endif + +namespace Catch { + +ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() { +} + +void ExceptionTranslatorRegistry::registerTranslator( const IExceptionTranslator* translator ) { +m_translators.push_back( std::unique_ptr( translator ) ); +} + + #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +std::string ExceptionTranslatorRegistry::translateActiveException() const { +try { + #ifdef __OBJC__ +// In Objective-C try objective-c exceptions first +@try { +return tryTranslators(); +} +@catch (NSException *exception) { +return Catch::Detail::stringify( [exception description] ); +} + #else +// Compiling a mixed mode project with MSVC means that CLR +// exceptions will be caught in (...) as well. However, these +// do not fill-in std::current_exception and thus lead to crash +// when attempting rethrow. +// /EHa switch also causes structured exceptions to be caught +// here, but they fill-in current_exception properly, so +// at worst the output should be a little weird, instead of +// causing a crash. +if (std::current_exception() == nullptr) { +return "Non C++ exception. Possibly a CLR exception."; +} +return tryTranslators(); + #endif +} +catch( TestFailureException& ) { +std::rethrow_exception(std::current_exception()); +} +catch( std::exception& ex ) { +return ex.what(); +} +catch( std::string& msg ) { +return msg; +} +catch( const char* msg ) { +return msg; +} +catch(...) { +return "Unknown exception"; +} +} + +std::string ExceptionTranslatorRegistry::tryTranslators() const { +if (m_translators.empty()) { +std::rethrow_exception(std::current_exception()); +} else { +return m_translators[0]->translate(m_translators.begin() + 1, m_translators.end()); +} +} + + #else // ^^ Exceptions are enabled // Exceptions are disabled vv +std::string ExceptionTranslatorRegistry::translateActiveException() const { +CATCH_INTERNAL_ERROR("Attempted to translate active exception under CATCH_CONFIG_DISABLE_EXCEPTIONS!"); +} + +std::string ExceptionTranslatorRegistry::tryTranslators() const { +CATCH_INTERNAL_ERROR("Attempted to use exception translators under CATCH_CONFIG_DISABLE_EXCEPTIONS!"); +} + #endif + +} +// end catch_exception_translator_registry.cpp +// start catch_fatal_condition.cpp + + #if defined(__GNUC__) + # pragma GCC diagnostic push + # pragma GCC diagnostic ignored "-Wmissing-field-initializers" + #endif + + #if defined( CATCH_CONFIG_WINDOWS_SEH ) || defined( CATCH_CONFIG_POSIX_SIGNALS ) + +namespace { +// Report the error condition +void reportFatal( char const * const message ) { +Catch::getCurrentContext().getResultCapture()->handleFatalErrorCondition( message ); +} +} + + #endif // signals/SEH handling + + #if defined( CATCH_CONFIG_WINDOWS_SEH ) + +namespace Catch { +struct SignalDefs { DWORD id; const char* name; }; + +// There is no 1-1 mapping between signals and windows exceptions. +// Windows can easily distinguish between SO and SigSegV, +// but SigInt, SigTerm, etc are handled differently. +static SignalDefs signalDefs[] = { +{ static_cast(EXCEPTION_ILLEGAL_INSTRUCTION), "SIGILL - Illegal instruction signal" }, +{ static_cast(EXCEPTION_STACK_OVERFLOW), "SIGSEGV - Stack overflow" }, +{ static_cast(EXCEPTION_ACCESS_VIOLATION), "SIGSEGV - Segmentation violation signal" }, +{ static_cast(EXCEPTION_INT_DIVIDE_BY_ZERO), "Divide by zero error" }, +}; + +LONG CALLBACK FatalConditionHandler::handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) { +for (auto const& def : signalDefs) { +if (ExceptionInfo->ExceptionRecord->ExceptionCode == def.id) { +reportFatal(def.name); +} +} +// If its not an exception we care about, pass it along. +// This stops us from eating debugger breaks etc. +return EXCEPTION_CONTINUE_SEARCH; +} + +FatalConditionHandler::FatalConditionHandler() { +isSet = true; +// 32k seems enough for Catch to handle stack overflow, +// but the value was found experimentally, so there is no strong guarantee +guaranteeSize = 32 * 1024; +exceptionHandlerHandle = nullptr; +// Register as first handler in current chain +exceptionHandlerHandle = AddVectoredExceptionHandler(1, handleVectoredException); +// Pass in guarantee size to be filled +SetThreadStackGuarantee(&guaranteeSize); +} + +void FatalConditionHandler::reset() { +if (isSet) { +RemoveVectoredExceptionHandler(exceptionHandlerHandle); +SetThreadStackGuarantee(&guaranteeSize); +exceptionHandlerHandle = nullptr; +isSet = false; +} +} + +FatalConditionHandler::~FatalConditionHandler() { +reset(); +} + +bool FatalConditionHandler::isSet = false; +ULONG FatalConditionHandler::guaranteeSize = 0; +PVOID FatalConditionHandler::exceptionHandlerHandle = nullptr; + +} // namespace Catch + + #elif defined( CATCH_CONFIG_POSIX_SIGNALS ) + +namespace Catch { + +struct SignalDefs { +int id; +const char* name; +}; + +// 32kb for the alternate stack seems to be sufficient. However, this value +// is experimentally determined, so that's not guaranteed. +constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ; + +static SignalDefs signalDefs[] = { +{ SIGINT, "SIGINT - Terminal interrupt signal" }, +{ SIGILL, "SIGILL - Illegal instruction signal" }, +{ SIGFPE, "SIGFPE - Floating point error signal" }, +{ SIGSEGV, "SIGSEGV - Segmentation violation signal" }, +{ SIGTERM, "SIGTERM - Termination request signal" }, +{ SIGABRT, "SIGABRT - Abort (abnormal termination) signal" } +}; + +void FatalConditionHandler::handleSignal( int sig ) { +char const * name = ""; +for (auto const& def : signalDefs) { +if (sig == def.id) { +name = def.name; +break; +} +} +reset(); +reportFatal(name); +raise( sig ); +} + +FatalConditionHandler::FatalConditionHandler() { +isSet = true; +stack_t sigStack; +sigStack.ss_sp = altStackMem; +sigStack.ss_size = sigStackSize; +sigStack.ss_flags = 0; +sigaltstack(&sigStack, &oldSigStack); +struct sigaction sa = { }; + +sa.sa_handler = handleSignal; +sa.sa_flags = SA_ONSTACK; +for (std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i) { +sigaction(signalDefs[i].id, &sa, &oldSigActions[i]); +} +} + +FatalConditionHandler::~FatalConditionHandler() { +reset(); +} + +void FatalConditionHandler::reset() { +if( isSet ) { +// Set signals back to previous values -- hopefully nobody overwrote them in the meantime +for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i ) { +sigaction(signalDefs[i].id, &oldSigActions[i], nullptr); +} +// Return the old stack +sigaltstack(&oldSigStack, nullptr); +isSet = false; +} +} + +bool FatalConditionHandler::isSet = false; +struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {}; +stack_t FatalConditionHandler::oldSigStack = {}; +char FatalConditionHandler::altStackMem[sigStackSize] = {}; + +} // namespace Catch + + #else + +namespace Catch { +void FatalConditionHandler::reset() {} +} + + #endif // signals/SEH handling + + #if defined(__GNUC__) + # pragma GCC diagnostic pop + #endif +// end catch_fatal_condition.cpp +// start catch_generators.cpp + +// start catch_random_number_generator.h + + #include + #include + +namespace Catch { + +struct IConfig; + +std::mt19937& rng(); +void seedRng( IConfig const& config ); +unsigned int rngSeed(); + +} + +// end catch_random_number_generator.h + #include + #include + +namespace Catch { + +IGeneratorTracker::~IGeneratorTracker() {} + +const char* GeneratorException::what() const noexcept { +return m_msg; +} + +namespace Generators { + +GeneratorUntypedBase::~GeneratorUntypedBase() {} + +auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { +return getResultCapture().acquireGeneratorTracker( lineInfo ); +} + +} // namespace Generators +} // namespace Catch +// end catch_generators.cpp +// start catch_interfaces_capture.cpp + +namespace Catch { +IResultCapture::~IResultCapture() = default; +} +// end catch_interfaces_capture.cpp +// start catch_interfaces_config.cpp + +namespace Catch { +IConfig::~IConfig() = default; +} +// end catch_interfaces_config.cpp +// start catch_interfaces_exception.cpp + +namespace Catch { +IExceptionTranslator::~IExceptionTranslator() = default; +IExceptionTranslatorRegistry::~IExceptionTranslatorRegistry() = default; +} +// end catch_interfaces_exception.cpp +// start catch_interfaces_registry_hub.cpp + +namespace Catch { +IRegistryHub::~IRegistryHub() = default; +IMutableRegistryHub::~IMutableRegistryHub() = default; +} +// end catch_interfaces_registry_hub.cpp +// start catch_interfaces_reporter.cpp + +// start catch_reporter_listening.h + +namespace Catch { + +class ListeningReporter : public IStreamingReporter { +using Reporters = std::vector; +Reporters m_listeners; +IStreamingReporterPtr m_reporter = nullptr; +ReporterPreferences m_preferences; + +public: +ListeningReporter(); + +void addListener( IStreamingReporterPtr&& listener ); +void addReporter( IStreamingReporterPtr&& reporter ); + +public: // IStreamingReporter + +ReporterPreferences getPreferences() const override; + +void noMatchingTestCases( std::string const& spec ) override; + +static std::set getSupportedVerbosities(); + +void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) override; +void benchmarkEnded( BenchmarkStats const& benchmarkStats ) override; + +void testRunStarting( TestRunInfo const& testRunInfo ) override; +void testGroupStarting( GroupInfo const& groupInfo ) override; +void testCaseStarting( TestCaseInfo const& testInfo ) override; +void sectionStarting( SectionInfo const& sectionInfo ) override; +void assertionStarting( AssertionInfo const& assertionInfo ) override; + +// The return value indicates if the messages buffer should be cleared: +bool assertionEnded( AssertionStats const& assertionStats ) override; +void sectionEnded( SectionStats const& sectionStats ) override; +void testCaseEnded( TestCaseStats const& testCaseStats ) override; +void testGroupEnded( TestGroupStats const& testGroupStats ) override; +void testRunEnded( TestRunStats const& testRunStats ) override; + +void skipTest( TestCaseInfo const& testInfo ) override; +bool isMulti() const override; + +}; + +} // end namespace Catch + +// end catch_reporter_listening.h +namespace Catch { + +ReporterConfig::ReporterConfig( IConfigPtr const& _fullConfig ) +: m_stream( &_fullConfig->stream() ), m_fullConfig( _fullConfig ) {} + +ReporterConfig::ReporterConfig( IConfigPtr const& _fullConfig, std::ostream& _stream ) +: m_stream( &_stream ), m_fullConfig( _fullConfig ) {} + +std::ostream& ReporterConfig::stream() const { return *m_stream; } +IConfigPtr ReporterConfig::fullConfig() const { return m_fullConfig; } + +TestRunInfo::TestRunInfo( std::string const& _name ) : name( _name ) {} + +GroupInfo::GroupInfo( std::string const& _name, +std::size_t _groupIndex, +std::size_t _groupsCount ) +: name( _name ), +groupIndex( _groupIndex ), +groupsCounts( _groupsCount ) +{} + +AssertionStats::AssertionStats( AssertionResult const& _assertionResult, +std::vector const& _infoMessages, +Totals const& _totals ) +: assertionResult( _assertionResult ), +infoMessages( _infoMessages ), +totals( _totals ) +{ +assertionResult.m_resultData.lazyExpression.m_transientExpression = _assertionResult.m_resultData.lazyExpression.m_transientExpression; + +if( assertionResult.hasMessage() ) { +// Copy message into messages list. +// !TBD This should have been done earlier, somewhere +MessageBuilder builder( assertionResult.getTestMacroName(), assertionResult.getSourceInfo(), assertionResult.getResultType() ); +builder << assertionResult.getMessage(); +builder.m_info.message = builder.m_stream.str(); + +infoMessages.push_back( builder.m_info ); +} +} + +AssertionStats::~AssertionStats() = default; + +SectionStats::SectionStats( SectionInfo const& _sectionInfo, +Counts const& _assertions, +double _durationInSeconds, +bool _missingAssertions ) +: sectionInfo( _sectionInfo ), +assertions( _assertions ), +durationInSeconds( _durationInSeconds ), +missingAssertions( _missingAssertions ) +{} + +SectionStats::~SectionStats() = default; + +TestCaseStats::TestCaseStats( TestCaseInfo const& _testInfo, +Totals const& _totals, +std::string const& _stdOut, +std::string const& _stdErr, +bool _aborting ) +: testInfo( _testInfo ), +totals( _totals ), +stdOut( _stdOut ), +stdErr( _stdErr ), +aborting( _aborting ) +{} + +TestCaseStats::~TestCaseStats() = default; + +TestGroupStats::TestGroupStats( GroupInfo const& _groupInfo, +Totals const& _totals, +bool _aborting ) +: groupInfo( _groupInfo ), +totals( _totals ), +aborting( _aborting ) +{} + +TestGroupStats::TestGroupStats( GroupInfo const& _groupInfo ) +: groupInfo( _groupInfo ), +aborting( false ) +{} + +TestGroupStats::~TestGroupStats() = default; + +TestRunStats::TestRunStats( TestRunInfo const& _runInfo, +Totals const& _totals, +bool _aborting ) +: runInfo( _runInfo ), +totals( _totals ), +aborting( _aborting ) +{} + +TestRunStats::~TestRunStats() = default; + +void IStreamingReporter::fatalErrorEncountered( StringRef ) {} +bool IStreamingReporter::isMulti() const { return false; } + +IReporterFactory::~IReporterFactory() = default; +IReporterRegistry::~IReporterRegistry() = default; + +} // end namespace Catch +// end catch_interfaces_reporter.cpp +// start catch_interfaces_runner.cpp + +namespace Catch { +IRunner::~IRunner() = default; +} +// end catch_interfaces_runner.cpp +// start catch_interfaces_testcase.cpp + +namespace Catch { +ITestInvoker::~ITestInvoker() = default; +ITestCaseRegistry::~ITestCaseRegistry() = default; +} +// end catch_interfaces_testcase.cpp +// start catch_leak_detector.cpp + + #ifdef CATCH_CONFIG_WINDOWS_CRTDBG + #include + +namespace Catch { + +LeakDetector::LeakDetector() { +int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); +flag |= _CRTDBG_LEAK_CHECK_DF; +flag |= _CRTDBG_ALLOC_MEM_DF; +_CrtSetDbgFlag(flag); +_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); +_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); +// Change this to leaking allocation's number to break there +_CrtSetBreakAlloc(-1); +} +} + + #else + +Catch::LeakDetector::LeakDetector() {} + + #endif + +Catch::LeakDetector::~LeakDetector() { +Catch::cleanUp(); +} +// end catch_leak_detector.cpp +// start catch_list.cpp + +// start catch_list.h + + #include + +namespace Catch { + +std::size_t listTests( Config const& config ); + +std::size_t listTestsNamesOnly( Config const& config ); + +struct TagInfo { +void add( std::string const& spelling ); +std::string all() const; + +std::set spellings; +std::size_t count = 0; +}; + +std::size_t listTags( Config const& config ); + +std::size_t listReporters(); + +Option list( std::shared_ptr const& config ); + +} // end namespace Catch + +// end catch_list.h +// start catch_text.h + +namespace Catch { +using namespace clara::TextFlow; +} + +// end catch_text.h + #include + #include + #include + +namespace Catch { + +std::size_t listTests( Config const& config ) { +TestSpec testSpec = config.testSpec(); +if( config.hasTestFilters() ) +Catch::cout() << "Matching test cases:\n"; +else { +Catch::cout() << "All available test cases:\n"; +} + +auto matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config ); +for( auto const& testCaseInfo : matchedTestCases ) { +Colour::Code colour = testCaseInfo.isHidden() +? Colour::SecondaryText +: Colour::None; +Colour colourGuard( colour ); + +Catch::cout() << Column( testCaseInfo.name ).initialIndent( 2 ).indent( 4 ) << "\n"; +if( config.verbosity() >= Verbosity::High ) { +Catch::cout() << Column( Catch::Detail::stringify( testCaseInfo.lineInfo ) ).indent(4) << std::endl; +std::string description = testCaseInfo.description; +if( description.empty() ) +description = "(NO DESCRIPTION)"; +Catch::cout() << Column( description ).indent(4) << std::endl; +} +if( !testCaseInfo.tags.empty() ) +Catch::cout() << Column( testCaseInfo.tagsAsString() ).indent( 6 ) << "\n"; +} + +if( !config.hasTestFilters() ) +Catch::cout() << pluralise( matchedTestCases.size(), "test case" ) << '\n' << std::endl; +else +Catch::cout() << pluralise( matchedTestCases.size(), "matching test case" ) << '\n' << std::endl; +return matchedTestCases.size(); +} + +std::size_t listTestsNamesOnly( Config const& config ) { +TestSpec testSpec = config.testSpec(); +std::size_t matchedTests = 0; +std::vector matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config ); +for( auto const& testCaseInfo : matchedTestCases ) { +matchedTests++; +if( startsWith( testCaseInfo.name, '#' ) ) +Catch::cout() << '"' << testCaseInfo.name << '"'; +else +Catch::cout() << testCaseInfo.name; +if ( config.verbosity() >= Verbosity::High ) +Catch::cout() << "\t@" << testCaseInfo.lineInfo; +Catch::cout() << std::endl; +} +return matchedTests; +} + +void TagInfo::add( std::string const& spelling ) { +++count; +spellings.insert( spelling ); +} + +std::string TagInfo::all() const { +std::string out; +for( auto const& spelling : spellings ) +out += "[" + spelling + "]"; +return out; +} + +std::size_t listTags( Config const& config ) { +TestSpec testSpec = config.testSpec(); +if( config.hasTestFilters() ) +Catch::cout() << "Tags for matching test cases:\n"; +else { +Catch::cout() << "All available tags:\n"; +} + +std::map tagCounts; + +std::vector matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config ); +for( auto const& testCase : matchedTestCases ) { +for( auto const& tagName : testCase.getTestCaseInfo().tags ) { +std::string lcaseTagName = toLower( tagName ); +auto countIt = tagCounts.find( lcaseTagName ); +if( countIt == tagCounts.end() ) +countIt = tagCounts.insert( std::make_pair( lcaseTagName, TagInfo() ) ).first; +countIt->second.add( tagName ); +} +} + +for( auto const& tagCount : tagCounts ) { +ReusableStringStream rss; +rss << " " << std::setw(2) << tagCount.second.count << " "; +auto str = rss.str(); +auto wrapper = Column( tagCount.second.all() ) +.initialIndent( 0 ) +.indent( str.size() ) +.width( CATCH_CONFIG_CONSOLE_WIDTH-10 ); +Catch::cout() << str << wrapper << '\n'; +} +Catch::cout() << pluralise( tagCounts.size(), "tag" ) << '\n' << std::endl; +return tagCounts.size(); +} + +std::size_t listReporters() { +Catch::cout() << "Available reporters:\n"; +IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories(); +std::size_t maxNameLen = 0; +for( auto const& factoryKvp : factories ) +maxNameLen = (std::max)( maxNameLen, factoryKvp.first.size() ); + +for( auto const& factoryKvp : factories ) { +Catch::cout() +<< Column( factoryKvp.first + ":" ) +.indent(2) +.width( 5+maxNameLen ) ++ Column( factoryKvp.second->getDescription() ) +.initialIndent(0) +.indent(2) +.width( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 ) +<< "\n"; +} +Catch::cout() << std::endl; +return factories.size(); +} + +Option list( std::shared_ptr const& config ) { +Option listedCount; +getCurrentMutableContext().setConfig( config ); +if( config->listTests() ) +listedCount = listedCount.valueOr(0) + listTests( *config ); +if( config->listTestNamesOnly() ) +listedCount = listedCount.valueOr(0) + listTestsNamesOnly( *config ); +if( config->listTags() ) +listedCount = listedCount.valueOr(0) + listTags( *config ); +if( config->listReporters() ) +listedCount = listedCount.valueOr(0) + listReporters(); +return listedCount; +} + +} // end namespace Catch +// end catch_list.cpp +// start catch_matchers.cpp + +namespace Catch { +namespace Matchers { +namespace Impl { + +std::string MatcherUntypedBase::toString() const { +if( m_cachedToString.empty() ) +m_cachedToString = describe(); +return m_cachedToString; +} + +MatcherUntypedBase::~MatcherUntypedBase() = default; + +} // namespace Impl +} // namespace Matchers + +using namespace Matchers; +using Matchers::Impl::MatcherBase; + +} // namespace Catch +// end catch_matchers.cpp +// start catch_matchers_floating.cpp + +// start catch_polyfills.hpp + +namespace Catch { +bool isnan(float f); +bool isnan(double d); +} + +// end catch_polyfills.hpp +// start catch_to_string.hpp + + #include + +namespace Catch { +template +std::string to_string(T const& t) { + #if defined(CATCH_CONFIG_CPP11_TO_STRING) +return std::to_string(t); + #else +ReusableStringStream rss; +rss << t; +return rss.str(); + #endif +} +} // end namespace Catch + +// end catch_to_string.hpp + #include + #include + #include + +namespace Catch { +namespace Matchers { +namespace Floating { +enum class FloatingPointKind : uint8_t { +Float, +Double +}; +} +} +} + +namespace { + +template +struct Converter; + +template <> +struct Converter { +static_assert(sizeof(float) == sizeof(int32_t), "Important ULP matcher assumption violated"); +Converter(float f) { +std::memcpy(&i, &f, sizeof(f)); +} +int32_t i; +}; + +template <> +struct Converter { +static_assert(sizeof(double) == sizeof(int64_t), "Important ULP matcher assumption violated"); +Converter(double d) { +std::memcpy(&i, &d, sizeof(d)); +} +int64_t i; +}; + +template +auto convert(T t) -> Converter { +return Converter(t); +} + +template +bool almostEqualUlps(FP lhs, FP rhs, int maxUlpDiff) { +// Comparison with NaN should always be false. +// This way we can rule it out before getting into the ugly details +if (Catch::isnan(lhs) || Catch::isnan(rhs)) { +return false; +} + +auto lc = convert(lhs); +auto rc = convert(rhs); + +if ((lc.i < 0) != (rc.i < 0)) { +// Potentially we can have +0 and -0 +return lhs == rhs; +} + +auto ulpDiff = std::abs(lc.i - rc.i); +return ulpDiff <= maxUlpDiff; +} + +} + +namespace Catch { +namespace Matchers { +namespace Floating { +WithinAbsMatcher::WithinAbsMatcher(double target, double margin) +:m_target{ target }, m_margin{ margin } { +CATCH_ENFORCE(margin >= 0, "Invalid margin: " << margin << '.' +<< " Margin has to be non-negative."); +} + +// Performs equivalent check of std::fabs(lhs - rhs) <= margin +// But without the subtraction to allow for INFINITY in comparison +bool WithinAbsMatcher::match(double const& matchee) const { +return (matchee + m_margin >= m_target) && (m_target + m_margin >= matchee); +} + +std::string WithinAbsMatcher::describe() const { +return "is within " + ::Catch::Detail::stringify(m_margin) + " of " + ::Catch::Detail::stringify(m_target); +} + +WithinUlpsMatcher::WithinUlpsMatcher(double target, int ulps, FloatingPointKind baseType) +:m_target{ target }, m_ulps{ ulps }, m_type{ baseType } { +CATCH_ENFORCE(ulps >= 0, "Invalid ULP setting: " << ulps << '.' +<< " ULPs have to be non-negative."); +} + + #if defined(__clang__) + #pragma clang diagnostic push +// Clang <3.5 reports on the default branch in the switch below + #pragma clang diagnostic ignored "-Wunreachable-code" + #endif + +bool WithinUlpsMatcher::match(double const& matchee) const { +switch (m_type) { +case FloatingPointKind::Float: +return almostEqualUlps(static_cast(matchee), static_cast(m_target), m_ulps); +case FloatingPointKind::Double: +return almostEqualUlps(matchee, m_target, m_ulps); +default: +CATCH_INTERNAL_ERROR( "Unknown FloatingPointKind value" ); +} +} + + #if defined(__clang__) + #pragma clang diagnostic pop + #endif + +std::string WithinUlpsMatcher::describe() const { +return "is within " + Catch::to_string(m_ulps) + " ULPs of " + ::Catch::Detail::stringify(m_target) + ((m_type == FloatingPointKind::Float)? "f" : ""); +} + +}// namespace Floating + +Floating::WithinUlpsMatcher WithinULP(double target, int maxUlpDiff) { +return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Double); +} + +Floating::WithinUlpsMatcher WithinULP(float target, int maxUlpDiff) { +return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Float); +} + +Floating::WithinAbsMatcher WithinAbs(double target, double margin) { +return Floating::WithinAbsMatcher(target, margin); +} + +} // namespace Matchers +} // namespace Catch + +// end catch_matchers_floating.cpp +// start catch_matchers_generic.cpp + +std::string Catch::Matchers::Generic::Detail::finalizeDescription(const std::string& desc) { +if (desc.empty()) { +return "matches undescribed predicate"; +} else { +return "matches predicate: \"" + desc + '"'; +} +} +// end catch_matchers_generic.cpp +// start catch_matchers_string.cpp + + #include + +namespace Catch { +namespace Matchers { + +namespace StdString { + +CasedString::CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity ) +: m_caseSensitivity( caseSensitivity ), +m_str( adjustString( str ) ) +{} +std::string CasedString::adjustString( std::string const& str ) const { +return m_caseSensitivity == CaseSensitive::No +? toLower( str ) +: str; +} +std::string CasedString::caseSensitivitySuffix() const { +return m_caseSensitivity == CaseSensitive::No +? " (case insensitive)" +: std::string(); +} + +StringMatcherBase::StringMatcherBase( std::string const& operation, CasedString const& comparator ) +: m_comparator( comparator ), +m_operation( operation ) { +} + +std::string StringMatcherBase::describe() const { +std::string description; +description.reserve(5 + m_operation.size() + m_comparator.m_str.size() + +m_comparator.caseSensitivitySuffix().size()); +description += m_operation; +description += ": \""; +description += m_comparator.m_str; +description += "\""; +description += m_comparator.caseSensitivitySuffix(); +return description; +} + +EqualsMatcher::EqualsMatcher( CasedString const& comparator ) : StringMatcherBase( "equals", comparator ) {} + +bool EqualsMatcher::match( std::string const& source ) const { +return m_comparator.adjustString( source ) == m_comparator.m_str; +} + +ContainsMatcher::ContainsMatcher( CasedString const& comparator ) : StringMatcherBase( "contains", comparator ) {} + +bool ContainsMatcher::match( std::string const& source ) const { +return contains( m_comparator.adjustString( source ), m_comparator.m_str ); +} + +StartsWithMatcher::StartsWithMatcher( CasedString const& comparator ) : StringMatcherBase( "starts with", comparator ) {} + +bool StartsWithMatcher::match( std::string const& source ) const { +return startsWith( m_comparator.adjustString( source ), m_comparator.m_str ); +} + +EndsWithMatcher::EndsWithMatcher( CasedString const& comparator ) : StringMatcherBase( "ends with", comparator ) {} + +bool EndsWithMatcher::match( std::string const& source ) const { +return endsWith( m_comparator.adjustString( source ), m_comparator.m_str ); +} + +RegexMatcher::RegexMatcher(std::string regex, CaseSensitive::Choice caseSensitivity): m_regex(std::move(regex)), m_caseSensitivity(caseSensitivity) {} + +bool RegexMatcher::match(std::string const& matchee) const { +auto flags = std::regex::ECMAScript; // ECMAScript is the default syntax option anyway +if (m_caseSensitivity == CaseSensitive::Choice::No) { +flags |= std::regex::icase; +} +auto reg = std::regex(m_regex, flags); +return std::regex_match(matchee, reg); +} + +std::string RegexMatcher::describe() const { +return "matches " + ::Catch::Detail::stringify(m_regex) + ((m_caseSensitivity == CaseSensitive::Choice::Yes)? " case sensitively" : " case insensitively"); +} + +} // namespace StdString + +StdString::EqualsMatcher Equals( std::string const& str, CaseSensitive::Choice caseSensitivity ) { +return StdString::EqualsMatcher( StdString::CasedString( str, caseSensitivity) ); +} +StdString::ContainsMatcher Contains( std::string const& str, CaseSensitive::Choice caseSensitivity ) { +return StdString::ContainsMatcher( StdString::CasedString( str, caseSensitivity) ); +} +StdString::EndsWithMatcher EndsWith( std::string const& str, CaseSensitive::Choice caseSensitivity ) { +return StdString::EndsWithMatcher( StdString::CasedString( str, caseSensitivity) ); +} +StdString::StartsWithMatcher StartsWith( std::string const& str, CaseSensitive::Choice caseSensitivity ) { +return StdString::StartsWithMatcher( StdString::CasedString( str, caseSensitivity) ); +} + +StdString::RegexMatcher Matches(std::string const& regex, CaseSensitive::Choice caseSensitivity) { +return StdString::RegexMatcher(regex, caseSensitivity); +} + +} // namespace Matchers +} // namespace Catch +// end catch_matchers_string.cpp +// start catch_message.cpp + +// start catch_uncaught_exceptions.h + +namespace Catch { +bool uncaught_exceptions(); +} // end namespace Catch + +// end catch_uncaught_exceptions.h + #include + #include + +namespace Catch { + +MessageInfo::MessageInfo( StringRef const& _macroName, +SourceLineInfo const& _lineInfo, +ResultWas::OfType _type ) +: macroName( _macroName ), +lineInfo( _lineInfo ), +type( _type ), +sequence( ++globalCount ) +{} + +bool MessageInfo::operator==( MessageInfo const& other ) const { +return sequence == other.sequence; +} + +bool MessageInfo::operator<( MessageInfo const& other ) const { +return sequence < other.sequence; +} + +// This may need protecting if threading support is added +unsigned int MessageInfo::globalCount = 0; + +//////////////////////////////////////////////////////////////////////////// + +Catch::MessageBuilder::MessageBuilder( StringRef const& macroName, +SourceLineInfo const& lineInfo, +ResultWas::OfType type ) +:m_info(macroName, lineInfo, type) {} + +//////////////////////////////////////////////////////////////////////////// + +ScopedMessage::ScopedMessage( MessageBuilder const& builder ) +: m_info( builder.m_info ), m_moved() +{ +m_info.message = builder.m_stream.str(); +getResultCapture().pushScopedMessage( m_info ); +} + +ScopedMessage::ScopedMessage( ScopedMessage&& old ) +: m_info( old.m_info ), m_moved() +{ +old.m_moved = true; +} + +ScopedMessage::~ScopedMessage() { +if ( !uncaught_exceptions() && !m_moved ){ +getResultCapture().popScopedMessage(m_info); +} +} + +Capturer::Capturer( StringRef macroName, SourceLineInfo const& lineInfo, ResultWas::OfType resultType, StringRef names ) { +auto trimmed = [&] (size_t start, size_t end) { +while (names[start] == ',' || isspace(names[start])) { +++start; +} +while (names[end] == ',' || isspace(names[end])) { +--end; +} +return names.substr(start, end - start + 1); +}; + +size_t start = 0; +std::stack openings; +for (size_t pos = 0; pos < names.size(); ++pos) { +char c = names[pos]; +switch (c) { +case '[': +case '{': +case '(': +// It is basically impossible to disambiguate between +// comparison and start of template args in this context +// case '<': +openings.push(c); +break; +case ']': +case '}': +case ')': +// case '>': +openings.pop(); +break; +case ',': +if (start != pos && openings.size() == 0) { +m_messages.emplace_back(macroName, lineInfo, resultType); +m_messages.back().message = trimmed(start, pos); +m_messages.back().message += " := "; +start = pos; +} +} +} +assert(openings.size() == 0 && "Mismatched openings"); +m_messages.emplace_back(macroName, lineInfo, resultType); +m_messages.back().message = trimmed(start, names.size() - 1); +m_messages.back().message += " := "; +} +Capturer::~Capturer() { +if ( !uncaught_exceptions() ){ +assert( m_captured == m_messages.size() ); +for( size_t i = 0; i < m_captured; ++i ) +m_resultCapture.popScopedMessage( m_messages[i] ); +} +} + +void Capturer::captureValue( size_t index, std::string const& value ) { +assert( index < m_messages.size() ); +m_messages[index].message += value; +m_resultCapture.pushScopedMessage( m_messages[index] ); +m_captured++; +} + +} // end namespace Catch +// end catch_message.cpp +// start catch_output_redirect.cpp + +// start catch_output_redirect.h + #ifndef TWOBLUECUBES_CATCH_OUTPUT_REDIRECT_H + #define TWOBLUECUBES_CATCH_OUTPUT_REDIRECT_H + + #include + #include + #include + +namespace Catch { + +class RedirectedStream { +std::ostream& m_originalStream; +std::ostream& m_redirectionStream; +std::streambuf* m_prevBuf; + +public: +RedirectedStream( std::ostream& originalStream, std::ostream& redirectionStream ); +~RedirectedStream(); +}; + +class RedirectedStdOut { +ReusableStringStream m_rss; +RedirectedStream m_cout; +public: +RedirectedStdOut(); +auto str() const -> std::string; +}; + +// StdErr has two constituent streams in C++, std::cerr and std::clog +// This means that we need to redirect 2 streams into 1 to keep proper +// order of writes +class RedirectedStdErr { +ReusableStringStream m_rss; +RedirectedStream m_cerr; +RedirectedStream m_clog; +public: +RedirectedStdErr(); +auto str() const -> std::string; +}; + +class RedirectedStreams { +public: +RedirectedStreams(RedirectedStreams const&) = delete; +RedirectedStreams& operator=(RedirectedStreams const&) = delete; +RedirectedStreams(RedirectedStreams&&) = delete; +RedirectedStreams& operator=(RedirectedStreams&&) = delete; + +RedirectedStreams(std::string& redirectedCout, std::string& redirectedCerr); +~RedirectedStreams(); +private: +std::string& m_redirectedCout; +std::string& m_redirectedCerr; +RedirectedStdOut m_redirectedStdOut; +RedirectedStdErr m_redirectedStdErr; +}; + + #if defined(CATCH_CONFIG_NEW_CAPTURE) + +// Windows's implementation of std::tmpfile is terrible (it tries +// to create a file inside system folder, thus requiring elevated +// privileges for the binary), so we have to use tmpnam(_s) and +// create the file ourselves there. +class TempFile { +public: +TempFile(TempFile const&) = delete; +TempFile& operator=(TempFile const&) = delete; +TempFile(TempFile&&) = delete; +TempFile& operator=(TempFile&&) = delete; + +TempFile(); +~TempFile(); + +std::FILE* getFile(); +std::string getContents(); + +private: +std::FILE* m_file = nullptr; + #if defined(_MSC_VER) +char m_buffer[L_tmpnam] = { 0 }; + #endif +}; + +class OutputRedirect { +public: +OutputRedirect(OutputRedirect const&) = delete; +OutputRedirect& operator=(OutputRedirect const&) = delete; +OutputRedirect(OutputRedirect&&) = delete; +OutputRedirect& operator=(OutputRedirect&&) = delete; + +OutputRedirect(std::string& stdout_dest, std::string& stderr_dest); +~OutputRedirect(); + +private: +int m_originalStdout = -1; +int m_originalStderr = -1; +TempFile m_stdoutFile; +TempFile m_stderrFile; +std::string& m_stdoutDest; +std::string& m_stderrDest; +}; + + #endif + +} // end namespace Catch + + #endif // TWOBLUECUBES_CATCH_OUTPUT_REDIRECT_H +// end catch_output_redirect.h + #include + #include + #include + #include + #include + + #if defined(CATCH_CONFIG_NEW_CAPTURE) + #if defined(_MSC_VER) + #include //_dup and _dup2 + #define dup _dup + #define dup2 _dup2 + #define fileno _fileno + #else + #include // dup and dup2 + #endif + #endif + +namespace Catch { + +RedirectedStream::RedirectedStream( std::ostream& originalStream, std::ostream& redirectionStream ) +: m_originalStream( originalStream ), +m_redirectionStream( redirectionStream ), +m_prevBuf( m_originalStream.rdbuf() ) +{ +m_originalStream.rdbuf( m_redirectionStream.rdbuf() ); +} + +RedirectedStream::~RedirectedStream() { +m_originalStream.rdbuf( m_prevBuf ); +} + +RedirectedStdOut::RedirectedStdOut() : m_cout( Catch::cout(), m_rss.get() ) {} +auto RedirectedStdOut::str() const -> std::string { return m_rss.str(); } + +RedirectedStdErr::RedirectedStdErr() +: m_cerr( Catch::cerr(), m_rss.get() ), +m_clog( Catch::clog(), m_rss.get() ) +{} +auto RedirectedStdErr::str() const -> std::string { return m_rss.str(); } + +RedirectedStreams::RedirectedStreams(std::string& redirectedCout, std::string& redirectedCerr) +: m_redirectedCout(redirectedCout), +m_redirectedCerr(redirectedCerr) +{} + +RedirectedStreams::~RedirectedStreams() { +m_redirectedCout += m_redirectedStdOut.str(); +m_redirectedCerr += m_redirectedStdErr.str(); +} + + #if defined(CATCH_CONFIG_NEW_CAPTURE) + + #if defined(_MSC_VER) +TempFile::TempFile() { +if (tmpnam_s(m_buffer)) { +CATCH_RUNTIME_ERROR("Could not get a temp filename"); +} +if (fopen_s(&m_file, m_buffer, "w")) { +char buffer[100]; +if (strerror_s(buffer, errno)) { +CATCH_RUNTIME_ERROR("Could not translate errno to a string"); +} +CATCH_RUNTIME_ERROR("Coul dnot open the temp file: '" << m_buffer << "' because: " << buffer); +} +} + #else +TempFile::TempFile() { +m_file = std::tmpfile(); +if (!m_file) { +CATCH_RUNTIME_ERROR("Could not create a temp file."); +} +} + + #endif + +TempFile::~TempFile() { +// TBD: What to do about errors here? +std::fclose(m_file); +// We manually create the file on Windows only, on Linux +// it will be autodeleted + #if defined(_MSC_VER) +std::remove(m_buffer); + #endif +} + +FILE* TempFile::getFile() { +return m_file; +} + +std::string TempFile::getContents() { +std::stringstream sstr; +char buffer[100] = {}; +std::rewind(m_file); +while (std::fgets(buffer, sizeof(buffer), m_file)) { +sstr << buffer; +} +return sstr.str(); +} + +OutputRedirect::OutputRedirect(std::string& stdout_dest, std::string& stderr_dest) : +m_originalStdout(dup(1)), +m_originalStderr(dup(2)), +m_stdoutDest(stdout_dest), +m_stderrDest(stderr_dest) { +dup2(fileno(m_stdoutFile.getFile()), 1); +dup2(fileno(m_stderrFile.getFile()), 2); +} + +OutputRedirect::~OutputRedirect() { +Catch::cout() << std::flush; +fflush(stdout); +// Since we support overriding these streams, we flush cerr +// even though std::cerr is unbuffered +Catch::cerr() << std::flush; +Catch::clog() << std::flush; +fflush(stderr); + +dup2(m_originalStdout, 1); +dup2(m_originalStderr, 2); + +m_stdoutDest += m_stdoutFile.getContents(); +m_stderrDest += m_stderrFile.getContents(); +} + + #endif // CATCH_CONFIG_NEW_CAPTURE + +} // namespace Catch + + #if defined(CATCH_CONFIG_NEW_CAPTURE) + #if defined(_MSC_VER) + #undef dup + #undef dup2 + #undef fileno + #endif + #endif +// end catch_output_redirect.cpp +// start catch_polyfills.cpp + + #include + +namespace Catch { + + #if !defined(CATCH_CONFIG_POLYFILL_ISNAN) +bool isnan(float f) { +return std::isnan(f); +} +bool isnan(double d) { +return std::isnan(d); +} + #else +// For now we only use this for embarcadero +bool isnan(float f) { +return std::_isnan(f); +} +bool isnan(double d) { +return std::_isnan(d); +} + #endif + +} // end namespace Catch +// end catch_polyfills.cpp +// start catch_random_number_generator.cpp + +namespace Catch { + +std::mt19937& rng() { +static std::mt19937 s_rng; +return s_rng; +} + +void seedRng( IConfig const& config ) { +if( config.rngSeed() != 0 ) { +std::srand( config.rngSeed() ); +rng().seed( config.rngSeed() ); +} +} + +unsigned int rngSeed() { +return getCurrentContext().getConfig()->rngSeed(); +} +} +// end catch_random_number_generator.cpp +// start catch_registry_hub.cpp + +// start catch_test_case_registry_impl.h + + #include + #include + #include + #include + +namespace Catch { + +class TestCase; +struct IConfig; + +std::vector sortTests( IConfig const& config, std::vector const& unsortedTestCases ); +bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); + +void enforceNoDuplicateTestCases( std::vector const& functions ); + +std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); +std::vector const& getAllTestCasesSorted( IConfig const& config ); + +class TestRegistry : public ITestCaseRegistry { +public: +virtual ~TestRegistry() = default; + +virtual void registerTest( TestCase const& testCase ); + +std::vector const& getAllTests() const override; +std::vector const& getAllTestsSorted( IConfig const& config ) const override; + +private: +std::vector m_functions; +mutable RunTests::InWhatOrder m_currentSortOrder = RunTests::InDeclarationOrder; +mutable std::vector m_sortedFunctions; +std::size_t m_unnamedCount = 0; +std::ios_base::Init m_ostreamInit; // Forces cout/ cerr to be initialised +}; + +/////////////////////////////////////////////////////////////////////////// + +class TestInvokerAsFunction : public ITestInvoker { +void(*m_testAsFunction)(); +public: +TestInvokerAsFunction( void(*testAsFunction)() ) noexcept; + +void invoke() const override; +}; + +std::string extractClassName( StringRef const& classOrQualifiedMethodName ); + +/////////////////////////////////////////////////////////////////////////// + +} // end namespace Catch + +// end catch_test_case_registry_impl.h +// start catch_reporter_registry.h + + #include + +namespace Catch { + +class ReporterRegistry : public IReporterRegistry { + +public: + +~ReporterRegistry() override; + +IStreamingReporterPtr create( std::string const& name, IConfigPtr const& config ) const override; + +void registerReporter( std::string const& name, IReporterFactoryPtr const& factory ); +void registerListener( IReporterFactoryPtr const& factory ); + +FactoryMap const& getFactories() const override; +Listeners const& getListeners() const override; + +private: +FactoryMap m_factories; +Listeners m_listeners; +}; +} + +// end catch_reporter_registry.h +// start catch_tag_alias_registry.h + +// start catch_tag_alias.h + + #include + +namespace Catch { + +struct TagAlias { +TagAlias(std::string const& _tag, SourceLineInfo _lineInfo); + +std::string tag; +SourceLineInfo lineInfo; +}; + +} // end namespace Catch + +// end catch_tag_alias.h + #include + +namespace Catch { + +class TagAliasRegistry : public ITagAliasRegistry { +public: +~TagAliasRegistry() override; +TagAlias const* find( std::string const& alias ) const override; +std::string expandAliases( std::string const& unexpandedTestSpec ) const override; +void add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ); + +private: +std::map m_registry; +}; + +} // end namespace Catch + +// end catch_tag_alias_registry.h +// start catch_startup_exception_registry.h + + #include + #include + +namespace Catch { + +class StartupExceptionRegistry { +public: +void add(std::exception_ptr const& exception) noexcept; +std::vector const& getExceptions() const noexcept; +private: +std::vector m_exceptions; +}; + +} // end namespace Catch + +// end catch_startup_exception_registry.h +// start catch_singletons.hpp + +namespace Catch { + +struct ISingleton { +virtual ~ISingleton(); +}; + +void addSingleton( ISingleton* singleton ); +void cleanupSingletons(); + +template +class Singleton : SingletonImplT, public ISingleton { + +static auto getInternal() -> Singleton* { +static Singleton* s_instance = nullptr; +if( !s_instance ) { +s_instance = new Singleton; +addSingleton( s_instance ); +} +return s_instance; +} + +public: +static auto get() -> InterfaceT const& { +return *getInternal(); +} +static auto getMutable() -> MutableInterfaceT& { +return *getInternal(); +} +}; + +} // namespace Catch + +// end catch_singletons.hpp +namespace Catch { + +namespace { + +class RegistryHub : public IRegistryHub, public IMutableRegistryHub, +private NonCopyable { + +public: // IRegistryHub +RegistryHub() = default; +IReporterRegistry const& getReporterRegistry() const override { +return m_reporterRegistry; +} +ITestCaseRegistry const& getTestCaseRegistry() const override { +return m_testCaseRegistry; +} +IExceptionTranslatorRegistry const& getExceptionTranslatorRegistry() const override { +return m_exceptionTranslatorRegistry; +} +ITagAliasRegistry const& getTagAliasRegistry() const override { +return m_tagAliasRegistry; +} +StartupExceptionRegistry const& getStartupExceptionRegistry() const override { +return m_exceptionRegistry; +} + +public: // IMutableRegistryHub +void registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) override { +m_reporterRegistry.registerReporter( name, factory ); +} +void registerListener( IReporterFactoryPtr const& factory ) override { +m_reporterRegistry.registerListener( factory ); +} +void registerTest( TestCase const& testInfo ) override { +m_testCaseRegistry.registerTest( testInfo ); +} +void registerTranslator( const IExceptionTranslator* translator ) override { +m_exceptionTranslatorRegistry.registerTranslator( translator ); +} +void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) override { +m_tagAliasRegistry.add( alias, tag, lineInfo ); +} +void registerStartupException() noexcept override { +m_exceptionRegistry.add(std::current_exception()); +} + +private: +TestRegistry m_testCaseRegistry; +ReporterRegistry m_reporterRegistry; +ExceptionTranslatorRegistry m_exceptionTranslatorRegistry; +TagAliasRegistry m_tagAliasRegistry; +StartupExceptionRegistry m_exceptionRegistry; +}; +} + +using RegistryHubSingleton = Singleton; + +IRegistryHub const& getRegistryHub() { +return RegistryHubSingleton::get(); +} +IMutableRegistryHub& getMutableRegistryHub() { +return RegistryHubSingleton::getMutable(); +} +void cleanUp() { +cleanupSingletons(); +cleanUpContext(); +} +std::string translateActiveException() { +return getRegistryHub().getExceptionTranslatorRegistry().translateActiveException(); +} + +} // end namespace Catch +// end catch_registry_hub.cpp +// start catch_reporter_registry.cpp + +namespace Catch { + +ReporterRegistry::~ReporterRegistry() = default; + +IStreamingReporterPtr ReporterRegistry::create( std::string const& name, IConfigPtr const& config ) const { +auto it = m_factories.find( name ); +if( it == m_factories.end() ) +return nullptr; +return it->second->create( ReporterConfig( config ) ); +} + +void ReporterRegistry::registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) { +m_factories.emplace(name, factory); +} +void ReporterRegistry::registerListener( IReporterFactoryPtr const& factory ) { +m_listeners.push_back( factory ); +} + +IReporterRegistry::FactoryMap const& ReporterRegistry::getFactories() const { +return m_factories; +} +IReporterRegistry::Listeners const& ReporterRegistry::getListeners() const { +return m_listeners; +} + +} +// end catch_reporter_registry.cpp +// start catch_result_type.cpp + +namespace Catch { + +bool isOk( ResultWas::OfType resultType ) { +return ( resultType & ResultWas::FailureBit ) == 0; +} +bool isJustInfo( int flags ) { +return flags == ResultWas::Info; +} + +ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs ) { +return static_cast( static_cast( lhs ) | static_cast( rhs ) ); +} + +bool shouldContinueOnFailure( int flags ) { return ( flags & ResultDisposition::ContinueOnFailure ) != 0; } +bool shouldSuppressFailure( int flags ) { return ( flags & ResultDisposition::SuppressFail ) != 0; } + +} // end namespace Catch +// end catch_result_type.cpp +// start catch_run_context.cpp + + #include + #include + #include + +namespace Catch { + +namespace Generators { +struct GeneratorTracker : TestCaseTracking::TrackerBase, IGeneratorTracker { +GeneratorBasePtr m_generator; + +GeneratorTracker( TestCaseTracking::NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) +: TrackerBase( nameAndLocation, ctx, parent ) +{} +~GeneratorTracker(); + +static GeneratorTracker& acquire( TrackerContext& ctx, TestCaseTracking::NameAndLocation const& nameAndLocation ) { +std::shared_ptr tracker; + +ITracker& currentTracker = ctx.currentTracker(); +if( TestCaseTracking::ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) { +assert( childTracker ); +assert( childTracker->isGeneratorTracker() ); +tracker = std::static_pointer_cast( childTracker ); +} +else { +tracker = std::make_shared( nameAndLocation, ctx, ¤tTracker ); +currentTracker.addChild( tracker ); +} + +if( !ctx.completedCycle() && !tracker->isComplete() ) { +tracker->open(); +} + +return *tracker; +} + +// TrackerBase interface +bool isGeneratorTracker() const override { return true; } +auto hasGenerator() const -> bool override { +return !!m_generator; +} +void close() override { +TrackerBase::close(); +// Generator interface only finds out if it has another item on atual move +if (m_runState == CompletedSuccessfully && m_generator->next()) { +m_children.clear(); +m_runState = Executing; +} +} + +// IGeneratorTracker interface +auto getGenerator() const -> GeneratorBasePtr const& override { +return m_generator; +} +void setGenerator( GeneratorBasePtr&& generator ) override { +m_generator = std::move( generator ); +} +}; +GeneratorTracker::~GeneratorTracker() {} +} + +RunContext::RunContext(IConfigPtr const& _config, IStreamingReporterPtr&& reporter) +: m_runInfo(_config->name()), +m_context(getCurrentMutableContext()), +m_config(_config), +m_reporter(std::move(reporter)), +m_lastAssertionInfo{ StringRef(), SourceLineInfo("",0), StringRef(), ResultDisposition::Normal }, +m_includeSuccessfulResults( m_config->includeSuccessfulResults() || m_reporter->getPreferences().shouldReportAllAssertions ) +{ +m_context.setRunner(this); +m_context.setConfig(m_config); +m_context.setResultCapture(this); +m_reporter->testRunStarting(m_runInfo); +} + +RunContext::~RunContext() { +m_reporter->testRunEnded(TestRunStats(m_runInfo, m_totals, aborting())); +} + +void RunContext::testGroupStarting(std::string const& testSpec, std::size_t groupIndex, std::size_t groupsCount) { +m_reporter->testGroupStarting(GroupInfo(testSpec, groupIndex, groupsCount)); +} + +void RunContext::testGroupEnded(std::string const& testSpec, Totals const& totals, std::size_t groupIndex, std::size_t groupsCount) { +m_reporter->testGroupEnded(TestGroupStats(GroupInfo(testSpec, groupIndex, groupsCount), totals, aborting())); +} + +Totals RunContext::runTest(TestCase const& testCase) { +Totals prevTotals = m_totals; + +std::string redirectedCout; +std::string redirectedCerr; + +auto const& testInfo = testCase.getTestCaseInfo(); + +m_reporter->testCaseStarting(testInfo); + +m_activeTestCase = &testCase; + +ITracker& rootTracker = m_trackerContext.startRun(); +assert(rootTracker.isSectionTracker()); +static_cast(rootTracker).addInitialFilters(m_config->getSectionsToRun()); +do { +m_trackerContext.startCycle(); +m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(testInfo.name, testInfo.lineInfo)); +runCurrentTest(redirectedCout, redirectedCerr); +} while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting()); + +Totals deltaTotals = m_totals.delta(prevTotals); +if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) { +deltaTotals.assertions.failed++; +deltaTotals.testCases.passed--; +deltaTotals.testCases.failed++; +} +m_totals.testCases += deltaTotals.testCases; +m_reporter->testCaseEnded(TestCaseStats(testInfo, +deltaTotals, +redirectedCout, +redirectedCerr, +aborting())); + +m_activeTestCase = nullptr; +m_testCaseTracker = nullptr; + +return deltaTotals; +} + +IConfigPtr RunContext::config() const { +return m_config; +} + +IStreamingReporter& RunContext::reporter() const { +return *m_reporter; +} + +void RunContext::assertionEnded(AssertionResult const & result) { +if (result.getResultType() == ResultWas::Ok) { +m_totals.assertions.passed++; +m_lastAssertionPassed = true; +} else if (!result.isOk()) { +m_lastAssertionPassed = false; +if( m_activeTestCase->getTestCaseInfo().okToFail() ) +m_totals.assertions.failedButOk++; +else +m_totals.assertions.failed++; +} +else { +m_lastAssertionPassed = true; +} + +// We have no use for the return value (whether messages should be cleared), because messages were made scoped +// and should be let to clear themselves out. +static_cast(m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals))); + +if (result.getResultType() != ResultWas::Warning) +m_messageScopes.clear(); + +// Reset working state +resetAssertionInfo(); +m_lastResult = result; +} +void RunContext::resetAssertionInfo() { +m_lastAssertionInfo.macroName = StringRef(); +m_lastAssertionInfo.capturedExpression = "{Unknown expression after the reported line}"_sr; +} + +bool RunContext::sectionStarted(SectionInfo const & sectionInfo, Counts & assertions) { +ITracker& sectionTracker = SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(sectionInfo.name, sectionInfo.lineInfo)); +if (!sectionTracker.isOpen()) +return false; +m_activeSections.push_back(§ionTracker); + +m_lastAssertionInfo.lineInfo = sectionInfo.lineInfo; + +m_reporter->sectionStarting(sectionInfo); + +assertions = m_totals.assertions; + +return true; +} +auto RunContext::acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { +using namespace Generators; +GeneratorTracker& tracker = GeneratorTracker::acquire( m_trackerContext, TestCaseTracking::NameAndLocation( "generator", lineInfo ) ); +assert( tracker.isOpen() ); +m_lastAssertionInfo.lineInfo = lineInfo; +return tracker; +} + +bool RunContext::testForMissingAssertions(Counts& assertions) { +if (assertions.total() != 0) +return false; +if (!m_config->warnAboutMissingAssertions()) +return false; +if (m_trackerContext.currentTracker().hasChildren()) +return false; +m_totals.assertions.failed++; +assertions.failed++; +return true; +} + +void RunContext::sectionEnded(SectionEndInfo const & endInfo) { +Counts assertions = m_totals.assertions - endInfo.prevAssertions; +bool missingAssertions = testForMissingAssertions(assertions); + +if (!m_activeSections.empty()) { +m_activeSections.back()->close(); +m_activeSections.pop_back(); +} + +m_reporter->sectionEnded(SectionStats(endInfo.sectionInfo, assertions, endInfo.durationInSeconds, missingAssertions)); +m_messages.clear(); +m_messageScopes.clear(); +} + +void RunContext::sectionEndedEarly(SectionEndInfo const & endInfo) { +if (m_unfinishedSections.empty()) +m_activeSections.back()->fail(); +else +m_activeSections.back()->close(); +m_activeSections.pop_back(); + +m_unfinishedSections.push_back(endInfo); +} +void RunContext::benchmarkStarting( BenchmarkInfo const& info ) { +m_reporter->benchmarkStarting( info ); +} +void RunContext::benchmarkEnded( BenchmarkStats const& stats ) { +m_reporter->benchmarkEnded( stats ); +} + +void RunContext::pushScopedMessage(MessageInfo const & message) { +m_messages.push_back(message); +} + +void RunContext::popScopedMessage(MessageInfo const & message) { +m_messages.erase(std::remove(m_messages.begin(), m_messages.end(), message), m_messages.end()); +} + +void RunContext::emplaceUnscopedMessage( MessageBuilder const& builder ) { +m_messageScopes.emplace_back( builder ); +} + +std::string RunContext::getCurrentTestName() const { +return m_activeTestCase +? m_activeTestCase->getTestCaseInfo().name +: std::string(); +} + +const AssertionResult * RunContext::getLastResult() const { +return &(*m_lastResult); +} + +void RunContext::exceptionEarlyReported() { +m_shouldReportUnexpected = false; +} + +void RunContext::handleFatalErrorCondition( StringRef message ) { +// First notify reporter that bad things happened +m_reporter->fatalErrorEncountered(message); + +// Don't rebuild the result -- the stringification itself can cause more fatal errors +// Instead, fake a result data. +AssertionResultData tempResult( ResultWas::FatalErrorCondition, { false } ); +tempResult.message = message; +AssertionResult result(m_lastAssertionInfo, tempResult); + +assertionEnded(result); + +handleUnfinishedSections(); + +// Recreate section for test case (as we will lose the one that was in scope) +auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo(); +SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name); + +Counts assertions; +assertions.failed = 1; +SectionStats testCaseSectionStats(testCaseSection, assertions, 0, false); +m_reporter->sectionEnded(testCaseSectionStats); + +auto const& testInfo = m_activeTestCase->getTestCaseInfo(); + +Totals deltaTotals; +deltaTotals.testCases.failed = 1; +deltaTotals.assertions.failed = 1; +m_reporter->testCaseEnded(TestCaseStats(testInfo, +deltaTotals, +std::string(), +std::string(), +false)); +m_totals.testCases.failed++; +testGroupEnded(std::string(), m_totals, 1, 1); +m_reporter->testRunEnded(TestRunStats(m_runInfo, m_totals, false)); +} + +bool RunContext::lastAssertionPassed() { +return m_lastAssertionPassed; +} + +void RunContext::assertionPassed() { +m_lastAssertionPassed = true; +++m_totals.assertions.passed; +resetAssertionInfo(); +m_messageScopes.clear(); +} + +bool RunContext::aborting() const { +return m_totals.assertions.failed >= static_cast(m_config->abortAfter()); +} + +void RunContext::runCurrentTest(std::string & redirectedCout, std::string & redirectedCerr) { +auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo(); +SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name); +m_reporter->sectionStarting(testCaseSection); +Counts prevAssertions = m_totals.assertions; +double duration = 0; +m_shouldReportUnexpected = true; +m_lastAssertionInfo = { "TEST_CASE"_sr, testCaseInfo.lineInfo, StringRef(), ResultDisposition::Normal }; + +seedRng(*m_config); + +Timer timer; +CATCH_TRY { +if (m_reporter->getPreferences().shouldRedirectStdOut) { + #if !defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT) +RedirectedStreams redirectedStreams(redirectedCout, redirectedCerr); + +timer.start(); +invokeActiveTestCase(); + #else +OutputRedirect r(redirectedCout, redirectedCerr); +timer.start(); +invokeActiveTestCase(); + #endif +} else { +timer.start(); +invokeActiveTestCase(); +} +duration = timer.getElapsedSeconds(); +} CATCH_CATCH_ANON (TestFailureException&) { +// This just means the test was aborted due to failure +} CATCH_CATCH_ALL { +// Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions +// are reported without translation at the point of origin. +if( m_shouldReportUnexpected ) { +AssertionReaction dummyReaction; +handleUnexpectedInflightException( m_lastAssertionInfo, translateActiveException(), dummyReaction ); +} +} +Counts assertions = m_totals.assertions - prevAssertions; +bool missingAssertions = testForMissingAssertions(assertions); + +m_testCaseTracker->close(); +handleUnfinishedSections(); +m_messages.clear(); +m_messageScopes.clear(); + +SectionStats testCaseSectionStats(testCaseSection, assertions, duration, missingAssertions); +m_reporter->sectionEnded(testCaseSectionStats); +} + +void RunContext::invokeActiveTestCase() { +FatalConditionHandler fatalConditionHandler; // Handle signals +m_activeTestCase->invoke(); +fatalConditionHandler.reset(); +} + +void RunContext::handleUnfinishedSections() { +// If sections ended prematurely due to an exception we stored their +// infos here so we can tear them down outside the unwind process. +for (auto it = m_unfinishedSections.rbegin(), +itEnd = m_unfinishedSections.rend(); +it != itEnd; +++it) +sectionEnded(*it); +m_unfinishedSections.clear(); +} + +void RunContext::handleExpr( +AssertionInfo const& info, +ITransientExpression const& expr, +AssertionReaction& reaction +) { +m_reporter->assertionStarting( info ); + +bool negated = isFalseTest( info.resultDisposition ); +bool result = expr.getResult() != negated; + +if( result ) { +if (!m_includeSuccessfulResults) { +assertionPassed(); +} +else { +reportExpr(info, ResultWas::Ok, &expr, negated); +} +} +else { +reportExpr(info, ResultWas::ExpressionFailed, &expr, negated ); +populateReaction( reaction ); +} +} +void RunContext::reportExpr( +AssertionInfo const &info, +ResultWas::OfType resultType, +ITransientExpression const *expr, +bool negated ) { + +m_lastAssertionInfo = info; +AssertionResultData data( resultType, LazyExpression( negated ) ); + +AssertionResult assertionResult{ info, data }; +assertionResult.m_resultData.lazyExpression.m_transientExpression = expr; + +assertionEnded( assertionResult ); +} + +void RunContext::handleMessage( +AssertionInfo const& info, +ResultWas::OfType resultType, +StringRef const& message, +AssertionReaction& reaction +) { +m_reporter->assertionStarting( info ); + +m_lastAssertionInfo = info; + +AssertionResultData data( resultType, LazyExpression( false ) ); +data.message = message; +AssertionResult assertionResult{ m_lastAssertionInfo, data }; +assertionEnded( assertionResult ); +if( !assertionResult.isOk() ) +populateReaction( reaction ); +} +void RunContext::handleUnexpectedExceptionNotThrown( +AssertionInfo const& info, +AssertionReaction& reaction +) { +handleNonExpr(info, Catch::ResultWas::DidntThrowException, reaction); +} + +void RunContext::handleUnexpectedInflightException( +AssertionInfo const& info, +std::string const& message, +AssertionReaction& reaction +) { +m_lastAssertionInfo = info; + +AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) ); +data.message = message; +AssertionResult assertionResult{ info, data }; +assertionEnded( assertionResult ); +populateReaction( reaction ); +} + +void RunContext::populateReaction( AssertionReaction& reaction ) { +reaction.shouldDebugBreak = m_config->shouldDebugBreak(); +reaction.shouldThrow = aborting() || (m_lastAssertionInfo.resultDisposition & ResultDisposition::Normal); +} + +void RunContext::handleIncomplete( +AssertionInfo const& info +) { +m_lastAssertionInfo = info; + +AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) ); +data.message = "Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE"; +AssertionResult assertionResult{ info, data }; +assertionEnded( assertionResult ); +} +void RunContext::handleNonExpr( +AssertionInfo const &info, +ResultWas::OfType resultType, +AssertionReaction &reaction +) { +m_lastAssertionInfo = info; + +AssertionResultData data( resultType, LazyExpression( false ) ); +AssertionResult assertionResult{ info, data }; +assertionEnded( assertionResult ); + +if( !assertionResult.isOk() ) +populateReaction( reaction ); +} + +IResultCapture& getResultCapture() { +if (auto* capture = getCurrentContext().getResultCapture()) +return *capture; +else +CATCH_INTERNAL_ERROR("No result capture instance"); +} +} +// end catch_run_context.cpp +// start catch_section.cpp + +namespace Catch { + +Section::Section( SectionInfo const& info ) +: m_info( info ), +m_sectionIncluded( getResultCapture().sectionStarted( m_info, m_assertions ) ) +{ +m_timer.start(); +} + +Section::~Section() { +if( m_sectionIncluded ) { +SectionEndInfo endInfo{ m_info, m_assertions, m_timer.getElapsedSeconds() }; +if( uncaught_exceptions() ) +getResultCapture().sectionEndedEarly( endInfo ); +else +getResultCapture().sectionEnded( endInfo ); +} +} + +// This indicates whether the section should be executed or not +Section::operator bool() const { +return m_sectionIncluded; +} + +} // end namespace Catch +// end catch_section.cpp +// start catch_section_info.cpp + +namespace Catch { + +SectionInfo::SectionInfo +( SourceLineInfo const& _lineInfo, +std::string const& _name ) +: name( _name ), +lineInfo( _lineInfo ) +{} + +} // end namespace Catch +// end catch_section_info.cpp +// start catch_session.cpp + +// start catch_session.h + + #include + +namespace Catch { + +class Session : NonCopyable { +public: + +Session(); +~Session() override; + +void showHelp() const; +void libIdentify(); + +int applyCommandLine( int argc, char const * const * argv ); + #if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE) +int applyCommandLine( int argc, wchar_t const * const * argv ); + #endif + +void useConfigData( ConfigData const& configData ); + +template +int run(int argc, CharT const * const argv[]) { +if (m_startupExceptions) +return 1; +int returnCode = applyCommandLine(argc, argv); +if (returnCode == 0) +returnCode = run(); +return returnCode; +} + +int run(); + +clara::Parser const& cli() const; +void cli( clara::Parser const& newParser ); +ConfigData& configData(); +Config& config(); +private: +int runInternal(); + +clara::Parser m_cli; +ConfigData m_configData; +std::shared_ptr m_config; +bool m_startupExceptions = false; +}; + +} // end namespace Catch + +// end catch_session.h +// start catch_version.h + + #include + +namespace Catch { + +// Versioning information +struct Version { +Version( Version const& ) = delete; +Version& operator=( Version const& ) = delete; +Version( unsigned int _majorVersion, +unsigned int _minorVersion, +unsigned int _patchNumber, +char const * const _branchName, +unsigned int _buildNumber ); + +unsigned int const majorVersion; +unsigned int const minorVersion; +unsigned int const patchNumber; + +// buildNumber is only used if branchName is not null +char const * const branchName; +unsigned int const buildNumber; + +friend std::ostream& operator << ( std::ostream& os, Version const& version ); +}; + +Version const& libraryVersion(); +} + +// end catch_version.h + #include + #include + +namespace Catch { + +namespace { +const int MaxExitCode = 255; + +IStreamingReporterPtr createReporter(std::string const& reporterName, IConfigPtr const& config) { +auto reporter = Catch::getRegistryHub().getReporterRegistry().create(reporterName, config); +CATCH_ENFORCE(reporter, "No reporter registered with name: '" << reporterName << "'"); + +return reporter; +} + +IStreamingReporterPtr makeReporter(std::shared_ptr const& config) { +if (Catch::getRegistryHub().getReporterRegistry().getListeners().empty()) { +return createReporter(config->getReporterName(), config); +} + +// On older platforms, returning std::unique_ptr +// when the return type is std::unique_ptr +// doesn't compile without a std::move call. However, this causes +// a warning on newer platforms. Thus, we have to work around +// it a bit and downcast the pointer manually. +auto ret = std::unique_ptr(new ListeningReporter); +auto& multi = static_cast(*ret); +auto const& listeners = Catch::getRegistryHub().getReporterRegistry().getListeners(); +for (auto const& listener : listeners) { +multi.addListener(listener->create(Catch::ReporterConfig(config))); +} +multi.addReporter(createReporter(config->getReporterName(), config)); +return ret; +} + +Catch::Totals runTests(std::shared_ptr const& config) { +auto reporter = makeReporter(config); + +RunContext context(config, std::move(reporter)); + +Totals totals; + +context.testGroupStarting(config->name(), 1, 1); + +TestSpec testSpec = config->testSpec(); + +auto const& allTestCases = getAllTestCasesSorted(*config); +for (auto const& testCase : allTestCases) { +if (!context.aborting() && matchTest(testCase, testSpec, *config)) +totals += context.runTest(testCase); +else +context.reporter().skipTest(testCase); +} + +if (config->warnAboutNoTests() && totals.testCases.total() == 0) { +ReusableStringStream testConfig; + +bool first = true; +for (const auto& input : config->getTestsOrTags()) { +if (!first) { testConfig << ' '; } +first = false; +testConfig << input; +} + +context.reporter().noMatchingTestCases(testConfig.str()); +totals.error = -1; +} + +context.testGroupEnded(config->name(), totals, 1, 1); +return totals; +} + +void applyFilenamesAsTags(Catch::IConfig const& config) { +auto& tests = const_cast&>(getAllTestCasesSorted(config)); +for (auto& testCase : tests) { +auto tags = testCase.tags; + +std::string filename = testCase.lineInfo.file; +auto lastSlash = filename.find_last_of("\\/"); +if (lastSlash != std::string::npos) { +filename.erase(0, lastSlash); +filename[0] = '#'; +} + +auto lastDot = filename.find_last_of('.'); +if (lastDot != std::string::npos) { +filename.erase(lastDot); +} + +tags.push_back(std::move(filename)); +setTags(testCase, tags); +} +} + +} // anon namespace + +Session::Session() { +static bool alreadyInstantiated = false; +if( alreadyInstantiated ) { +CATCH_TRY { CATCH_INTERNAL_ERROR( "Only one instance of Catch::Session can ever be used" ); } +CATCH_CATCH_ALL { getMutableRegistryHub().registerStartupException(); } +} + +// There cannot be exceptions at startup in no-exception mode. + #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +const auto& exceptions = getRegistryHub().getStartupExceptionRegistry().getExceptions(); +if ( !exceptions.empty() ) { +m_startupExceptions = true; +Colour colourGuard( Colour::Red ); +Catch::cerr() << "Errors occurred during startup!" << '\n'; +// iterate over all exceptions and notify user +for ( const auto& ex_ptr : exceptions ) { +try { +std::rethrow_exception(ex_ptr); +} catch ( std::exception const& ex ) { +Catch::cerr() << Column( ex.what() ).indent(2) << '\n'; +} +} +} + #endif + +alreadyInstantiated = true; +m_cli = makeCommandLineParser( m_configData ); +} +Session::~Session() { +Catch::cleanUp(); +} + +void Session::showHelp() const { +Catch::cout() +<< "\nCatch v" << libraryVersion() << "\n" +<< m_cli << std::endl +<< "For more detailed usage please see the project docs\n" << std::endl; +} +void Session::libIdentify() { +Catch::cout() +<< std::left << std::setw(16) << "description: " << "A Catch test executable\n" +<< std::left << std::setw(16) << "category: " << "testframework\n" +<< std::left << std::setw(16) << "framework: " << "Catch Test\n" +<< std::left << std::setw(16) << "version: " << libraryVersion() << std::endl; +} + +int Session::applyCommandLine( int argc, char const * const * argv ) { +if( m_startupExceptions ) +return 1; + +auto result = m_cli.parse( clara::Args( argc, argv ) ); +if( !result ) { +config(); +getCurrentMutableContext().setConfig(m_config); +Catch::cerr() +<< Colour( Colour::Red ) +<< "\nError(s) in input:\n" +<< Column( result.errorMessage() ).indent( 2 ) +<< "\n\n"; +Catch::cerr() << "Run with -? for usage\n" << std::endl; +return MaxExitCode; +} + +if( m_configData.showHelp ) +showHelp(); +if( m_configData.libIdentify ) +libIdentify(); +m_config.reset(); +return 0; +} + + #if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE) +int Session::applyCommandLine( int argc, wchar_t const * const * argv ) { + +char **utf8Argv = new char *[ argc ]; + +for ( int i = 0; i < argc; ++i ) { +int bufSize = WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, NULL, 0, NULL, NULL ); + +utf8Argv[ i ] = new char[ bufSize ]; + +WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, utf8Argv[i], bufSize, NULL, NULL ); +} + +int returnCode = applyCommandLine( argc, utf8Argv ); + +for ( int i = 0; i < argc; ++i ) +delete [] utf8Argv[ i ]; + +delete [] utf8Argv; + +return returnCode; +} + #endif + +void Session::useConfigData( ConfigData const& configData ) { +m_configData = configData; +m_config.reset(); +} + +int Session::run() { +if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeStart ) != 0 ) { +Catch::cout() << "...waiting for enter/ return before starting" << std::endl; +static_cast(std::getchar()); +} +int exitCode = runInternal(); +if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeExit ) != 0 ) { +Catch::cout() << "...waiting for enter/ return before exiting, with code: " << exitCode << std::endl; +static_cast(std::getchar()); +} +return exitCode; +} + +clara::Parser const& Session::cli() const { +return m_cli; +} +void Session::cli( clara::Parser const& newParser ) { +m_cli = newParser; +} +ConfigData& Session::configData() { +return m_configData; +} +Config& Session::config() { +if( !m_config ) +m_config = std::make_shared( m_configData ); +return *m_config; +} + +int Session::runInternal() { +if( m_startupExceptions ) +return 1; + +if (m_configData.showHelp || m_configData.libIdentify) { +return 0; +} + +CATCH_TRY { +config(); // Force config to be constructed + +seedRng( *m_config ); + +if( m_configData.filenamesAsTags ) +applyFilenamesAsTags( *m_config ); + +// Handle list request +if( Option listed = list( m_config ) ) +return static_cast( *listed ); + +auto totals = runTests( m_config ); +// Note that on unices only the lower 8 bits are usually used, clamping +// the return value to 255 prevents false negative when some multiple +// of 256 tests has failed +return (std::min) (MaxExitCode, (std::max) (totals.error, static_cast(totals.assertions.failed))); +} + #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +catch( std::exception& ex ) { +Catch::cerr() << ex.what() << std::endl; +return MaxExitCode; +} + #endif +} + +} // end namespace Catch +// end catch_session.cpp +// start catch_singletons.cpp + + #include + +namespace Catch { + +namespace { +static auto getSingletons() -> std::vector*& { +static std::vector* g_singletons = nullptr; +if( !g_singletons ) +g_singletons = new std::vector(); +return g_singletons; +} +} + +ISingleton::~ISingleton() {} + +void addSingleton(ISingleton* singleton ) { +getSingletons()->push_back( singleton ); +} +void cleanupSingletons() { +auto& singletons = getSingletons(); +for( auto singleton : *singletons ) +delete singleton; +delete singletons; +singletons = nullptr; +} + +} // namespace Catch +// end catch_singletons.cpp +// start catch_startup_exception_registry.cpp + +namespace Catch { +void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexcept { +CATCH_TRY { +m_exceptions.push_back(exception); +} CATCH_CATCH_ALL { +// If we run out of memory during start-up there's really not a lot more we can do about it +std::terminate(); +} +} + +std::vector const& StartupExceptionRegistry::getExceptions() const noexcept { +return m_exceptions; +} + +} // end namespace Catch +// end catch_startup_exception_registry.cpp +// start catch_stream.cpp + + #include + #include + #include + #include + #include + #include + +namespace Catch { + +Catch::IStream::~IStream() = default; + +namespace detail { namespace { +template +class StreamBufImpl : public std::streambuf { +char data[bufferSize]; +WriterF m_writer; + +public: +StreamBufImpl() { +setp( data, data + sizeof(data) ); +} + +~StreamBufImpl() noexcept { +StreamBufImpl::sync(); +} + +private: +int overflow( int c ) override { +sync(); + +if( c != EOF ) { +if( pbase() == epptr() ) +m_writer( std::string( 1, static_cast( c ) ) ); +else +sputc( static_cast( c ) ); +} +return 0; +} + +int sync() override { +if( pbase() != pptr() ) { +m_writer( std::string( pbase(), static_cast( pptr() - pbase() ) ) ); +setp( pbase(), epptr() ); +} +return 0; +} +}; + +/////////////////////////////////////////////////////////////////////////// + +struct OutputDebugWriter { + +void operator()( std::string const&str ) { +writeToDebugConsole( str ); +} +}; + +/////////////////////////////////////////////////////////////////////////// + +class FileStream : public IStream { +mutable std::ofstream m_ofs; +public: +FileStream( StringRef filename ) { +m_ofs.open( filename.c_str() ); +CATCH_ENFORCE( !m_ofs.fail(), "Unable to open file: '" << filename << "'" ); +} +~FileStream() override = default; +public: // IStream +std::ostream& stream() const override { +return m_ofs; +} +}; + +/////////////////////////////////////////////////////////////////////////// + +class CoutStream : public IStream { +mutable std::ostream m_os; +public: +// Store the streambuf from cout up-front because +// cout may get redirected when running tests +CoutStream() : m_os( Catch::cout().rdbuf() ) {} +~CoutStream() override = default; + +public: // IStream +std::ostream& stream() const override { return m_os; } +}; + +/////////////////////////////////////////////////////////////////////////// + +class DebugOutStream : public IStream { +std::unique_ptr> m_streamBuf; +mutable std::ostream m_os; +public: +DebugOutStream() +: m_streamBuf( new StreamBufImpl() ), +m_os( m_streamBuf.get() ) +{} + +~DebugOutStream() override = default; + +public: // IStream +std::ostream& stream() const override { return m_os; } +}; + +}} // namespace anon::detail + +/////////////////////////////////////////////////////////////////////////// + +auto makeStream( StringRef const &filename ) -> IStream const* { +if( filename.empty() ) +return new detail::CoutStream(); +else if( filename[0] == '%' ) { +if( filename == "%debug" ) +return new detail::DebugOutStream(); +else +CATCH_ERROR( "Unrecognised stream: '" << filename << "'" ); +} +else +return new detail::FileStream( filename ); +} + +// This class encapsulates the idea of a pool of ostringstreams that can be reused. +struct StringStreams { +std::vector> m_streams; +std::vector m_unused; +std::ostringstream m_referenceStream; // Used for copy state/ flags from + +auto add() -> std::size_t { +if( m_unused.empty() ) { +m_streams.push_back( std::unique_ptr( new std::ostringstream ) ); +return m_streams.size()-1; +} +else { +auto index = m_unused.back(); +m_unused.pop_back(); +return index; +} +} + +void release( std::size_t index ) { +m_streams[index]->copyfmt( m_referenceStream ); // Restore initial flags and other state +m_unused.push_back(index); +} +}; + +ReusableStringStream::ReusableStringStream() +: m_index( Singleton::getMutable().add() ), +m_oss( Singleton::getMutable().m_streams[m_index].get() ) +{} + +ReusableStringStream::~ReusableStringStream() { +static_cast( m_oss )->str(""); +m_oss->clear(); +Singleton::getMutable().release( m_index ); +} + +auto ReusableStringStream::str() const -> std::string { +return static_cast( m_oss )->str(); +} + +/////////////////////////////////////////////////////////////////////////// + + #ifndef CATCH_CONFIG_NOSTDOUT // If you #define this you must implement these functions +std::ostream& cout() { return std::cout; } +std::ostream& cerr() { return std::cerr; } +std::ostream& clog() { return std::clog; } + #endif +} +// end catch_stream.cpp +// start catch_string_manip.cpp + + #include + #include + #include + #include + +namespace Catch { + +namespace { +char toLowerCh(char c) { +return static_cast( std::tolower( c ) ); +} +} + +bool startsWith( std::string const& s, std::string const& prefix ) { +return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin()); +} +bool startsWith( std::string const& s, char prefix ) { +return !s.empty() && s[0] == prefix; +} +bool endsWith( std::string const& s, std::string const& suffix ) { +return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin()); +} +bool endsWith( std::string const& s, char suffix ) { +return !s.empty() && s[s.size()-1] == suffix; +} +bool contains( std::string const& s, std::string const& infix ) { +return s.find( infix ) != std::string::npos; +} +void toLowerInPlace( std::string& s ) { +std::transform( s.begin(), s.end(), s.begin(), toLowerCh ); +} +std::string toLower( std::string const& s ) { +std::string lc = s; +toLowerInPlace( lc ); +return lc; +} +std::string trim( std::string const& str ) { +static char const* whitespaceChars = "\n\r\t "; +std::string::size_type start = str.find_first_not_of( whitespaceChars ); +std::string::size_type end = str.find_last_not_of( whitespaceChars ); + +return start != std::string::npos ? str.substr( start, 1+end-start ) : std::string(); +} + +bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) { +bool replaced = false; +std::size_t i = str.find( replaceThis ); +while( i != std::string::npos ) { +replaced = true; +str = str.substr( 0, i ) + withThis + str.substr( i+replaceThis.size() ); +if( i < str.size()-withThis.size() ) +i = str.find( replaceThis, i+withThis.size() ); +else +i = std::string::npos; +} +return replaced; +} + +pluralise::pluralise( std::size_t count, std::string const& label ) +: m_count( count ), +m_label( label ) +{} + +std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser ) { +os << pluraliser.m_count << ' ' << pluraliser.m_label; +if( pluraliser.m_count != 1 ) +os << 's'; +return os; +} + +} +// end catch_string_manip.cpp +// start catch_stringref.cpp + + #if defined(__clang__) + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wexit-time-destructors" + #endif + + #include + #include + #include + +namespace { +const uint32_t byte_2_lead = 0xC0; +const uint32_t byte_3_lead = 0xE0; +const uint32_t byte_4_lead = 0xF0; +} + +namespace Catch { +StringRef::StringRef( char const* rawChars ) noexcept +: StringRef( rawChars, static_cast(std::strlen(rawChars) ) ) +{} + +StringRef::operator std::string() const { +return std::string( m_start, m_size ); +} + +void StringRef::swap( StringRef& other ) noexcept { +std::swap( m_start, other.m_start ); +std::swap( m_size, other.m_size ); +std::swap( m_data, other.m_data ); +} + +auto StringRef::c_str() const -> char const* { +if( isSubstring() ) +const_cast( this )->takeOwnership(); +return m_start; +} +auto StringRef::currentData() const noexcept -> char const* { +return m_start; +} + +auto StringRef::isOwned() const noexcept -> bool { +return m_data != nullptr; +} +auto StringRef::isSubstring() const noexcept -> bool { +return m_start[m_size] != '\0'; +} + +void StringRef::takeOwnership() { +if( !isOwned() ) { +m_data = new char[m_size+1]; +memcpy( m_data, m_start, m_size ); +m_data[m_size] = '\0'; +m_start = m_data; +} +} +auto StringRef::substr( size_type start, size_type size ) const noexcept -> StringRef { +if( start < m_size ) +return StringRef( m_start+start, size ); +else +return StringRef(); +} +auto StringRef::operator == ( StringRef const& other ) const noexcept -> bool { +return +size() == other.size() && +(std::strncmp( m_start, other.m_start, size() ) == 0); +} +auto StringRef::operator != ( StringRef const& other ) const noexcept -> bool { +return !operator==( other ); +} + +auto StringRef::operator[](size_type index) const noexcept -> char { +return m_start[index]; +} + +auto StringRef::numberOfCharacters() const noexcept -> size_type { +size_type noChars = m_size; +// Make adjustments for uft encodings +for( size_type i=0; i < m_size; ++i ) { +char c = m_start[i]; +if( ( c & byte_2_lead ) == byte_2_lead ) { +noChars--; +if (( c & byte_3_lead ) == byte_3_lead ) +noChars--; +if( ( c & byte_4_lead ) == byte_4_lead ) +noChars--; +} +} +return noChars; +} + +auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string { +std::string str; +str.reserve( lhs.size() + rhs.size() ); +str += lhs; +str += rhs; +return str; +} +auto operator + ( StringRef const& lhs, const char* rhs ) -> std::string { +return std::string( lhs ) + std::string( rhs ); +} +auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string { +return std::string( lhs ) + std::string( rhs ); +} + +auto operator << ( std::ostream& os, StringRef const& str ) -> std::ostream& { +return os.write(str.currentData(), str.size()); +} + +auto operator+=( std::string& lhs, StringRef const& rhs ) -> std::string& { +lhs.append(rhs.currentData(), rhs.size()); +return lhs; +} + +} // namespace Catch + + #if defined(__clang__) + # pragma clang diagnostic pop + #endif +// end catch_stringref.cpp +// start catch_tag_alias.cpp + +namespace Catch { +TagAlias::TagAlias(std::string const & _tag, SourceLineInfo _lineInfo): tag(_tag), lineInfo(_lineInfo) {} +} +// end catch_tag_alias.cpp +// start catch_tag_alias_autoregistrar.cpp + +namespace Catch { + +RegistrarForTagAliases::RegistrarForTagAliases(char const* alias, char const* tag, SourceLineInfo const& lineInfo) { +CATCH_TRY { +getMutableRegistryHub().registerTagAlias(alias, tag, lineInfo); +} CATCH_CATCH_ALL { +// Do not throw when constructing global objects, instead register the exception to be processed later +getMutableRegistryHub().registerStartupException(); +} +} + +} +// end catch_tag_alias_autoregistrar.cpp +// start catch_tag_alias_registry.cpp + + #include + +namespace Catch { + +TagAliasRegistry::~TagAliasRegistry() {} + +TagAlias const* TagAliasRegistry::find( std::string const& alias ) const { +auto it = m_registry.find( alias ); +if( it != m_registry.end() ) +return &(it->second); +else +return nullptr; +} + +std::string TagAliasRegistry::expandAliases( std::string const& unexpandedTestSpec ) const { +std::string expandedTestSpec = unexpandedTestSpec; +for( auto const& registryKvp : m_registry ) { +std::size_t pos = expandedTestSpec.find( registryKvp.first ); +if( pos != std::string::npos ) { +expandedTestSpec = expandedTestSpec.substr( 0, pos ) + +registryKvp.second.tag + +expandedTestSpec.substr( pos + registryKvp.first.size() ); +} +} +return expandedTestSpec; +} + +void TagAliasRegistry::add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) { +CATCH_ENFORCE( startsWith(alias, "[@") && endsWith(alias, ']'), +"error: tag alias, '" << alias << "' is not of the form [@alias name].\n" << lineInfo ); + +CATCH_ENFORCE( m_registry.insert(std::make_pair(alias, TagAlias(tag, lineInfo))).second, +"error: tag alias, '" << alias << "' already registered.\n" +<< "\tFirst seen at: " << find(alias)->lineInfo << "\n" +<< "\tRedefined at: " << lineInfo ); +} + +ITagAliasRegistry::~ITagAliasRegistry() {} + +ITagAliasRegistry const& ITagAliasRegistry::get() { +return getRegistryHub().getTagAliasRegistry(); +} + +} // end namespace Catch +// end catch_tag_alias_registry.cpp +// start catch_test_case_info.cpp + + #include + #include + #include + #include + +namespace Catch { + +namespace { +TestCaseInfo::SpecialProperties parseSpecialTag( std::string const& tag ) { +if( startsWith( tag, '.' ) || +tag == "!hide" ) +return TestCaseInfo::IsHidden; +else if( tag == "!throws" ) +return TestCaseInfo::Throws; +else if( tag == "!shouldfail" ) +return TestCaseInfo::ShouldFail; +else if( tag == "!mayfail" ) +return TestCaseInfo::MayFail; +else if( tag == "!nonportable" ) +return TestCaseInfo::NonPortable; +else if( tag == "!benchmark" ) +return static_cast( TestCaseInfo::Benchmark | TestCaseInfo::IsHidden ); +else +return TestCaseInfo::None; +} +bool isReservedTag( std::string const& tag ) { +return parseSpecialTag( tag ) == TestCaseInfo::None && tag.size() > 0 && !std::isalnum( static_cast(tag[0]) ); +} +void enforceNotReservedTag( std::string const& tag, SourceLineInfo const& _lineInfo ) { +CATCH_ENFORCE( !isReservedTag(tag), +"Tag name: [" << tag << "] is not allowed.\n" +<< "Tag names starting with non alpha-numeric characters are reserved\n" +<< _lineInfo ); +} +} + +TestCase makeTestCase( ITestInvoker* _testCase, +std::string const& _className, +NameAndTags const& nameAndTags, +SourceLineInfo const& _lineInfo ) +{ +bool isHidden = false; + +// Parse out tags +std::vector tags; +std::string desc, tag; +bool inTag = false; +std::string _descOrTags = nameAndTags.tags; +for (char c : _descOrTags) { +if( !inTag ) { +if( c == '[' ) +inTag = true; +else +desc += c; +} +else { +if( c == ']' ) { +TestCaseInfo::SpecialProperties prop = parseSpecialTag( tag ); +if( ( prop & TestCaseInfo::IsHidden ) != 0 ) +isHidden = true; +else if( prop == TestCaseInfo::None ) +enforceNotReservedTag( tag, _lineInfo ); + +// Merged hide tags like `[.approvals]` should be added as +// `[.][approvals]`. The `[.]` is added at later point, so +// we only strip the prefix +if (startsWith(tag, '.') && tag.size() > 1) { +tag.erase(0, 1); +} +tags.push_back( tag ); +tag.clear(); +inTag = false; +} +else +tag += c; +} +} +if( isHidden ) { +tags.push_back( "." ); +} + +TestCaseInfo info( nameAndTags.name, _className, desc, tags, _lineInfo ); +return TestCase( _testCase, std::move(info) ); +} + +void setTags( TestCaseInfo& testCaseInfo, std::vector tags ) { +std::sort(begin(tags), end(tags)); +tags.erase(std::unique(begin(tags), end(tags)), end(tags)); +testCaseInfo.lcaseTags.clear(); + +for( auto const& tag : tags ) { +std::string lcaseTag = toLower( tag ); +testCaseInfo.properties = static_cast( testCaseInfo.properties | parseSpecialTag( lcaseTag ) ); +testCaseInfo.lcaseTags.push_back( lcaseTag ); +} +testCaseInfo.tags = std::move(tags); +} + +TestCaseInfo::TestCaseInfo( std::string const& _name, +std::string const& _className, +std::string const& _description, +std::vector const& _tags, +SourceLineInfo const& _lineInfo ) +: name( _name ), +className( _className ), +description( _description ), +lineInfo( _lineInfo ), +properties( None ) +{ +setTags( *this, _tags ); +} + +bool TestCaseInfo::isHidden() const { +return ( properties & IsHidden ) != 0; +} +bool TestCaseInfo::throws() const { +return ( properties & Throws ) != 0; +} +bool TestCaseInfo::okToFail() const { +return ( properties & (ShouldFail | MayFail ) ) != 0; +} +bool TestCaseInfo::expectedToFail() const { +return ( properties & (ShouldFail ) ) != 0; +} + +std::string TestCaseInfo::tagsAsString() const { +std::string ret; +// '[' and ']' per tag +std::size_t full_size = 2 * tags.size(); +for (const auto& tag : tags) { +full_size += tag.size(); +} +ret.reserve(full_size); +for (const auto& tag : tags) { +ret.push_back('['); +ret.append(tag); +ret.push_back(']'); +} + +return ret; +} + +TestCase::TestCase( ITestInvoker* testCase, TestCaseInfo&& info ) : TestCaseInfo( std::move(info) ), test( testCase ) {} + +TestCase TestCase::withName( std::string const& _newName ) const { +TestCase other( *this ); +other.name = _newName; +return other; +} + +void TestCase::invoke() const { +test->invoke(); +} + +bool TestCase::operator == ( TestCase const& other ) const { +return test.get() == other.test.get() && +name == other.name && +className == other.className; +} + +bool TestCase::operator < ( TestCase const& other ) const { +return name < other.name; +} + +TestCaseInfo const& TestCase::getTestCaseInfo() const +{ +return *this; +} + +} // end namespace Catch +// end catch_test_case_info.cpp +// start catch_test_case_registry_impl.cpp + + #include + +namespace Catch { + +std::vector sortTests( IConfig const& config, std::vector const& unsortedTestCases ) { + +std::vector sorted = unsortedTestCases; + +switch( config.runOrder() ) { +case RunTests::InLexicographicalOrder: +std::sort( sorted.begin(), sorted.end() ); +break; +case RunTests::InRandomOrder: +seedRng( config ); +std::shuffle( sorted.begin(), sorted.end(), rng() ); +break; +case RunTests::InDeclarationOrder: +// already in declaration order +break; +} +return sorted; +} +bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ) { +return testSpec.matches( testCase ) && ( config.allowThrows() || !testCase.throws() ); +} + +void enforceNoDuplicateTestCases( std::vector const& functions ) { +std::set seenFunctions; +for( auto const& function : functions ) { +auto prev = seenFunctions.insert( function ); +CATCH_ENFORCE( prev.second, +"error: TEST_CASE( \"" << function.name << "\" ) already defined.\n" +<< "\tFirst seen at " << prev.first->getTestCaseInfo().lineInfo << "\n" +<< "\tRedefined at " << function.getTestCaseInfo().lineInfo ); +} +} + +std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ) { +std::vector filtered; +filtered.reserve( testCases.size() ); +for( auto const& testCase : testCases ) +if( matchTest( testCase, testSpec, config ) ) +filtered.push_back( testCase ); +return filtered; +} +std::vector const& getAllTestCasesSorted( IConfig const& config ) { +return getRegistryHub().getTestCaseRegistry().getAllTestsSorted( config ); +} + +void TestRegistry::registerTest( TestCase const& testCase ) { +std::string name = testCase.getTestCaseInfo().name; +if( name.empty() ) { +ReusableStringStream rss; +rss << "Anonymous test case " << ++m_unnamedCount; +return registerTest( testCase.withName( rss.str() ) ); +} +m_functions.push_back( testCase ); +} + +std::vector const& TestRegistry::getAllTests() const { +return m_functions; +} +std::vector const& TestRegistry::getAllTestsSorted( IConfig const& config ) const { +if( m_sortedFunctions.empty() ) +enforceNoDuplicateTestCases( m_functions ); + +if( m_currentSortOrder != config.runOrder() || m_sortedFunctions.empty() ) { +m_sortedFunctions = sortTests( config, m_functions ); +m_currentSortOrder = config.runOrder(); +} +return m_sortedFunctions; +} + +/////////////////////////////////////////////////////////////////////////// +TestInvokerAsFunction::TestInvokerAsFunction( void(*testAsFunction)() ) noexcept : m_testAsFunction( testAsFunction ) {} + +void TestInvokerAsFunction::invoke() const { +m_testAsFunction(); +} + +std::string extractClassName( StringRef const& classOrQualifiedMethodName ) { +std::string className = classOrQualifiedMethodName; +if( startsWith( className, '&' ) ) +{ +std::size_t lastColons = className.rfind( "::" ); +std::size_t penultimateColons = className.rfind( "::", lastColons-1 ); +if( penultimateColons == std::string::npos ) +penultimateColons = 1; +className = className.substr( penultimateColons, lastColons-penultimateColons ); +} +return className; +} + +} // end namespace Catch +// end catch_test_case_registry_impl.cpp +// start catch_test_case_tracker.cpp + + #include + #include + #include + #include + #include + + #if defined(__clang__) + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wexit-time-destructors" + #endif + +namespace Catch { +namespace TestCaseTracking { + +NameAndLocation::NameAndLocation( std::string const& _name, SourceLineInfo const& _location ) +: name( _name ), +location( _location ) +{} + +ITracker::~ITracker() = default; + +TrackerContext& TrackerContext::instance() { +static TrackerContext s_instance; +return s_instance; +} + +ITracker& TrackerContext::startRun() { +m_rootTracker = std::make_shared( NameAndLocation( "{root}", CATCH_INTERNAL_LINEINFO ), *this, nullptr ); +m_currentTracker = nullptr; +m_runState = Executing; +return *m_rootTracker; +} + +void TrackerContext::endRun() { +m_rootTracker.reset(); +m_currentTracker = nullptr; +m_runState = NotStarted; +} + +void TrackerContext::startCycle() { +m_currentTracker = m_rootTracker.get(); +m_runState = Executing; +} +void TrackerContext::completeCycle() { +m_runState = CompletedCycle; +} + +bool TrackerContext::completedCycle() const { +return m_runState == CompletedCycle; +} +ITracker& TrackerContext::currentTracker() { +return *m_currentTracker; +} +void TrackerContext::setCurrentTracker( ITracker* tracker ) { +m_currentTracker = tracker; +} + +TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) +: m_nameAndLocation( nameAndLocation ), +m_ctx( ctx ), +m_parent( parent ) +{} + +NameAndLocation const& TrackerBase::nameAndLocation() const { +return m_nameAndLocation; +} +bool TrackerBase::isComplete() const { +return m_runState == CompletedSuccessfully || m_runState == Failed; +} +bool TrackerBase::isSuccessfullyCompleted() const { +return m_runState == CompletedSuccessfully; +} +bool TrackerBase::isOpen() const { +return m_runState != NotStarted && !isComplete(); +} +bool TrackerBase::hasChildren() const { +return !m_children.empty(); +} + +void TrackerBase::addChild( ITrackerPtr const& child ) { +m_children.push_back( child ); +} + +ITrackerPtr TrackerBase::findChild( NameAndLocation const& nameAndLocation ) { +auto it = std::find_if( m_children.begin(), m_children.end(), +[&nameAndLocation]( ITrackerPtr const& tracker ){ +return +tracker->nameAndLocation().location == nameAndLocation.location && +tracker->nameAndLocation().name == nameAndLocation.name; +} ); +return( it != m_children.end() ) +? *it +: nullptr; +} +ITracker& TrackerBase::parent() { +assert( m_parent ); // Should always be non-null except for root +return *m_parent; +} + +void TrackerBase::openChild() { +if( m_runState != ExecutingChildren ) { +m_runState = ExecutingChildren; +if( m_parent ) +m_parent->openChild(); +} +} + +bool TrackerBase::isSectionTracker() const { return false; } +bool TrackerBase::isGeneratorTracker() const { return false; } + +void TrackerBase::open() { +m_runState = Executing; +moveToThis(); +if( m_parent ) +m_parent->openChild(); +} + +void TrackerBase::close() { + +// Close any still open children (e.g. generators) +while( &m_ctx.currentTracker() != this ) +m_ctx.currentTracker().close(); + +switch( m_runState ) { +case NeedsAnotherRun: +break; + +case Executing: +m_runState = CompletedSuccessfully; +break; +case ExecutingChildren: +if( m_children.empty() || m_children.back()->isComplete() ) +m_runState = CompletedSuccessfully; +break; + +case NotStarted: +case CompletedSuccessfully: +case Failed: +CATCH_INTERNAL_ERROR( "Illogical state: " << m_runState ); + +default: +CATCH_INTERNAL_ERROR( "Unknown state: " << m_runState ); +} +moveToParent(); +m_ctx.completeCycle(); +} +void TrackerBase::fail() { +m_runState = Failed; +if( m_parent ) +m_parent->markAsNeedingAnotherRun(); +moveToParent(); +m_ctx.completeCycle(); +} +void TrackerBase::markAsNeedingAnotherRun() { +m_runState = NeedsAnotherRun; +} + +void TrackerBase::moveToParent() { +assert( m_parent ); +m_ctx.setCurrentTracker( m_parent ); +} +void TrackerBase::moveToThis() { +m_ctx.setCurrentTracker( this ); +} + +SectionTracker::SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) +: TrackerBase( nameAndLocation, ctx, parent ) +{ +if( parent ) { +while( !parent->isSectionTracker() ) +parent = &parent->parent(); + +SectionTracker& parentSection = static_cast( *parent ); +addNextFilters( parentSection.m_filters ); +} +} + +bool SectionTracker::isComplete() const { +bool complete = true; + +if ((m_filters.empty() || m_filters[0] == "") || +std::find(m_filters.begin(), m_filters.end(), +m_nameAndLocation.name) != m_filters.end()) +complete = TrackerBase::isComplete(); +return complete; + +} + +bool SectionTracker::isSectionTracker() const { return true; } + +SectionTracker& SectionTracker::acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ) { +std::shared_ptr section; + +ITracker& currentTracker = ctx.currentTracker(); +if( ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) { +assert( childTracker ); +assert( childTracker->isSectionTracker() ); +section = std::static_pointer_cast( childTracker ); +} +else { +section = std::make_shared( nameAndLocation, ctx, ¤tTracker ); +currentTracker.addChild( section ); +} +if( !ctx.completedCycle() ) +section->tryOpen(); +return *section; +} + +void SectionTracker::tryOpen() { +if( !isComplete() && (m_filters.empty() || m_filters[0].empty() || m_filters[0] == m_nameAndLocation.name ) ) +open(); +} + +void SectionTracker::addInitialFilters( std::vector const& filters ) { +if( !filters.empty() ) { +m_filters.push_back(""); // Root - should never be consulted +m_filters.push_back(""); // Test Case - not a section filter +m_filters.insert( m_filters.end(), filters.begin(), filters.end() ); +} +} +void SectionTracker::addNextFilters( std::vector const& filters ) { +if( filters.size() > 1 ) +m_filters.insert( m_filters.end(), ++filters.begin(), filters.end() ); +} + +} // namespace TestCaseTracking + +using TestCaseTracking::ITracker; +using TestCaseTracking::TrackerContext; +using TestCaseTracking::SectionTracker; + +} // namespace Catch + + #if defined(__clang__) + # pragma clang diagnostic pop + #endif +// end catch_test_case_tracker.cpp +// start catch_test_registry.cpp + +namespace Catch { + +auto makeTestInvoker( void(*testAsFunction)() ) noexcept -> ITestInvoker* { +return new(std::nothrow) TestInvokerAsFunction( testAsFunction ); +} + +NameAndTags::NameAndTags( StringRef const& name_ , StringRef const& tags_ ) noexcept : name( name_ ), tags( tags_ ) {} + +AutoReg::AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef const& classOrMethod, NameAndTags const& nameAndTags ) noexcept { +CATCH_TRY { +getMutableRegistryHub() +.registerTest( +makeTestCase( +invoker, +extractClassName( classOrMethod ), +nameAndTags, +lineInfo)); +} CATCH_CATCH_ALL { +// Do not throw when constructing global objects, instead register the exception to be processed later +getMutableRegistryHub().registerStartupException(); +} +} + +AutoReg::~AutoReg() = default; +} +// end catch_test_registry.cpp +// start catch_test_spec.cpp + + #include + #include + #include + #include + +namespace Catch { + +TestSpec::Pattern::~Pattern() = default; +TestSpec::NamePattern::~NamePattern() = default; +TestSpec::TagPattern::~TagPattern() = default; +TestSpec::ExcludedPattern::~ExcludedPattern() = default; + +TestSpec::NamePattern::NamePattern( std::string const& name ) +: m_wildcardPattern( toLower( name ), CaseSensitive::No ) +{} +bool TestSpec::NamePattern::matches( TestCaseInfo const& testCase ) const { +return m_wildcardPattern.matches( toLower( testCase.name ) ); +} + +TestSpec::TagPattern::TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {} +bool TestSpec::TagPattern::matches( TestCaseInfo const& testCase ) const { +return std::find(begin(testCase.lcaseTags), +end(testCase.lcaseTags), +m_tag) != end(testCase.lcaseTags); +} + +TestSpec::ExcludedPattern::ExcludedPattern( PatternPtr const& underlyingPattern ) : m_underlyingPattern( underlyingPattern ) {} +bool TestSpec::ExcludedPattern::matches( TestCaseInfo const& testCase ) const { return !m_underlyingPattern->matches( testCase ); } + +bool TestSpec::Filter::matches( TestCaseInfo const& testCase ) const { +// All patterns in a filter must match for the filter to be a match +for( auto const& pattern : m_patterns ) { +if( !pattern->matches( testCase ) ) +return false; +} +return true; +} + +bool TestSpec::hasFilters() const { +return !m_filters.empty(); +} +bool TestSpec::matches( TestCaseInfo const& testCase ) const { +// A TestSpec matches if any filter matches +for( auto const& filter : m_filters ) +if( filter.matches( testCase ) ) +return true; +return false; +} +} +// end catch_test_spec.cpp +// start catch_test_spec_parser.cpp + +namespace Catch { + +TestSpecParser::TestSpecParser( ITagAliasRegistry const& tagAliases ) : m_tagAliases( &tagAliases ) {} + +TestSpecParser& TestSpecParser::parse( std::string const& arg ) { +m_mode = None; +m_exclusion = false; +m_start = std::string::npos; +m_arg = m_tagAliases->expandAliases( arg ); +m_escapeChars.clear(); +for( m_pos = 0; m_pos < m_arg.size(); ++m_pos ) +visitChar( m_arg[m_pos] ); +if( m_mode == Name ) +addPattern(); +return *this; +} +TestSpec TestSpecParser::testSpec() { +addFilter(); +return m_testSpec; +} + +void TestSpecParser::visitChar( char c ) { +if( m_mode == None ) { +switch( c ) { +case ' ': return; +case '~': m_exclusion = true; return; +case '[': return startNewMode( Tag, ++m_pos ); +case '"': return startNewMode( QuotedName, ++m_pos ); +case '\\': return escape(); +default: startNewMode( Name, m_pos ); break; +} +} +if( m_mode == Name ) { +if( c == ',' ) { +addPattern(); +addFilter(); +} +else if( c == '[' ) { +if( subString() == "exclude:" ) +m_exclusion = true; +else +addPattern(); +startNewMode( Tag, ++m_pos ); +} +else if( c == '\\' ) +escape(); +} +else if( m_mode == EscapedName ) +m_mode = Name; +else if( m_mode == QuotedName && c == '"' ) +addPattern(); +else if( m_mode == Tag && c == ']' ) +addPattern(); +} +void TestSpecParser::startNewMode( Mode mode, std::size_t start ) { +m_mode = mode; +m_start = start; +} +void TestSpecParser::escape() { +if( m_mode == None ) +m_start = m_pos; +m_mode = EscapedName; +m_escapeChars.push_back( m_pos ); +} +std::string TestSpecParser::subString() const { return m_arg.substr( m_start, m_pos - m_start ); } + +void TestSpecParser::addFilter() { +if( !m_currentFilter.m_patterns.empty() ) { +m_testSpec.m_filters.push_back( m_currentFilter ); +m_currentFilter = TestSpec::Filter(); +} +} + +TestSpec parseTestSpec( std::string const& arg ) { +return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec(); +} + +} // namespace Catch +// end catch_test_spec_parser.cpp +// start catch_timer.cpp + + #include + +static const uint64_t nanosecondsInSecond = 1000000000; + +namespace Catch { + +auto getCurrentNanosecondsSinceEpoch() -> uint64_t { +return std::chrono::duration_cast( std::chrono::high_resolution_clock::now().time_since_epoch() ).count(); +} + +namespace { +auto estimateClockResolution() -> uint64_t { +uint64_t sum = 0; +static const uint64_t iterations = 1000000; + +auto startTime = getCurrentNanosecondsSinceEpoch(); + +for( std::size_t i = 0; i < iterations; ++i ) { + +uint64_t ticks; +uint64_t baseTicks = getCurrentNanosecondsSinceEpoch(); +do { +ticks = getCurrentNanosecondsSinceEpoch(); +} while( ticks == baseTicks ); + +auto delta = ticks - baseTicks; +sum += delta; + +// If we have been calibrating for over 3 seconds -- the clock +// is terrible and we should move on. +// TBD: How to signal that the measured resolution is probably wrong? +if (ticks > startTime + 3 * nanosecondsInSecond) { +return sum / ( i + 1u ); +} +} + +// We're just taking the mean, here. To do better we could take the std. dev and exclude outliers +// - and potentially do more iterations if there's a high variance. +return sum/iterations; +} +} +auto getEstimatedClockResolution() -> uint64_t { +static auto s_resolution = estimateClockResolution(); +return s_resolution; +} + +void Timer::start() { +m_nanoseconds = getCurrentNanosecondsSinceEpoch(); +} +auto Timer::getElapsedNanoseconds() const -> uint64_t { +return getCurrentNanosecondsSinceEpoch() - m_nanoseconds; +} +auto Timer::getElapsedMicroseconds() const -> uint64_t { +return getElapsedNanoseconds()/1000; +} +auto Timer::getElapsedMilliseconds() const -> unsigned int { +return static_cast(getElapsedMicroseconds()/1000); +} +auto Timer::getElapsedSeconds() const -> double { +return getElapsedMicroseconds()/1000000.0; +} + +} // namespace Catch +// end catch_timer.cpp +// start catch_tostring.cpp + + #if defined(__clang__) + # pragma clang diagnostic push + # pragma clang diagnostic ignored "-Wexit-time-destructors" + # pragma clang diagnostic ignored "-Wglobal-constructors" + #endif + +// Enable specific decls locally + #if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER) + #define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER + #endif + + #include + #include + +namespace Catch { + +namespace Detail { + +const std::string unprintableString = "{?}"; + +namespace { +const int hexThreshold = 255; + +struct Endianness { +enum Arch { Big, Little }; + +static Arch which() { +union _{ +int asInt; +char asChar[sizeof (int)]; +} u; + +u.asInt = 1; +return ( u.asChar[sizeof(int)-1] == 1 ) ? Big : Little; +} +}; +} + +std::string rawMemoryToString( const void *object, std::size_t size ) { +// Reverse order for little endian architectures +int i = 0, end = static_cast( size ), inc = 1; +if( Endianness::which() == Endianness::Little ) { +i = end-1; +end = inc = -1; +} + +unsigned char const *bytes = static_cast(object); +ReusableStringStream rss; +rss << "0x" << std::setfill('0') << std::hex; +for( ; i != end; i += inc ) +rss << std::setw(2) << static_cast(bytes[i]); +return rss.str(); +} +} + +template +std::string fpToString( T value, int precision ) { +if (Catch::isnan(value)) { +return "nan"; +} + +ReusableStringStream rss; +rss << std::setprecision( precision ) +<< std::fixed +<< value; +std::string d = rss.str(); +std::size_t i = d.find_last_not_of( '0' ); +if( i != std::string::npos && i != d.size()-1 ) { +if( d[i] == '.' ) +i++; +d = d.substr( 0, i+1 ); +} +return d; +} + +//// ======================================================= //// +// +// Out-of-line defs for full specialization of StringMaker +// +//// ======================================================= //// + +std::string StringMaker::convert(const std::string& str) { +if (!getCurrentContext().getConfig()->showInvisibles()) { +return '"' + str + '"'; +} + +std::string s("\""); +for (char c : str) { +switch (c) { +case '\n': +s.append("\\n"); +break; +case '\t': +s.append("\\t"); +break; +default: +s.push_back(c); +break; +} +} +s.append("\""); +return s; +} + + #ifdef CATCH_CONFIG_CPP17_STRING_VIEW +std::string StringMaker::convert(std::string_view str) { +return ::Catch::Detail::stringify(std::string{ str }); +} + #endif + +std::string StringMaker::convert(char const* str) { +if (str) { +return ::Catch::Detail::stringify(std::string{ str }); +} else { +return{ "{null string}" }; +} +} +std::string StringMaker::convert(char* str) { +if (str) { +return ::Catch::Detail::stringify(std::string{ str }); +} else { +return{ "{null string}" }; +} +} + + #ifdef CATCH_CONFIG_WCHAR +std::string StringMaker::convert(const std::wstring& wstr) { +std::string s; +s.reserve(wstr.size()); +for (auto c : wstr) { +s += (c <= 0xff) ? static_cast(c) : '?'; +} +return ::Catch::Detail::stringify(s); +} + + # ifdef CATCH_CONFIG_CPP17_STRING_VIEW +std::string StringMaker::convert(std::wstring_view str) { +return StringMaker::convert(std::wstring(str)); +} + # endif + +std::string StringMaker::convert(wchar_t const * str) { +if (str) { +return ::Catch::Detail::stringify(std::wstring{ str }); +} else { +return{ "{null string}" }; +} +} +std::string StringMaker::convert(wchar_t * str) { +if (str) { +return ::Catch::Detail::stringify(std::wstring{ str }); +} else { +return{ "{null string}" }; +} +} + #endif + +std::string StringMaker::convert(int value) { +return ::Catch::Detail::stringify(static_cast(value)); +} +std::string StringMaker::convert(long value) { +return ::Catch::Detail::stringify(static_cast(value)); +} +std::string StringMaker::convert(long long value) { +ReusableStringStream rss; +rss << value; +if (value > Detail::hexThreshold) { +rss << " (0x" << std::hex << value << ')'; +} +return rss.str(); +} + +std::string StringMaker::convert(unsigned int value) { +return ::Catch::Detail::stringify(static_cast(value)); +} +std::string StringMaker::convert(unsigned long value) { +return ::Catch::Detail::stringify(static_cast(value)); +} +std::string StringMaker::convert(unsigned long long value) { +ReusableStringStream rss; +rss << value; +if (value > Detail::hexThreshold) { +rss << " (0x" << std::hex << value << ')'; +} +return rss.str(); +} + +std::string StringMaker::convert(bool b) { +return b ? "true" : "false"; +} + +std::string StringMaker::convert(signed char value) { +if (value == '\r') { +return "'\\r'"; +} else if (value == '\f') { +return "'\\f'"; +} else if (value == '\n') { +return "'\\n'"; +} else if (value == '\t') { +return "'\\t'"; +} else if ('\0' <= value && value < ' ') { +return ::Catch::Detail::stringify(static_cast(value)); +} else { +char chstr[] = "' '"; +chstr[1] = value; +return chstr; +} +} +std::string StringMaker::convert(char c) { +return ::Catch::Detail::stringify(static_cast(c)); +} +std::string StringMaker::convert(unsigned char c) { +return ::Catch::Detail::stringify(static_cast(c)); +} + +std::string StringMaker::convert(std::nullptr_t) { +return "nullptr"; +} + +std::string StringMaker::convert(float value) { +return fpToString(value, 5) + 'f'; +} +std::string StringMaker::convert(double value) { +return fpToString(value, 10); +} + +std::string ratio_string::symbol() { return "a"; } +std::string ratio_string::symbol() { return "f"; } +std::string ratio_string::symbol() { return "p"; } +std::string ratio_string::symbol() { return "n"; } +std::string ratio_string::symbol() { return "u"; } +std::string ratio_string::symbol() { return "m"; } + +} // end namespace Catch + + #if defined(__clang__) + # pragma clang diagnostic pop + #endif + +// end catch_tostring.cpp +// start catch_totals.cpp + +namespace Catch { + +Counts Counts::operator - ( Counts const& other ) const { +Counts diff; +diff.passed = passed - other.passed; +diff.failed = failed - other.failed; +diff.failedButOk = failedButOk - other.failedButOk; +return diff; +} + +Counts& Counts::operator += ( Counts const& other ) { +passed += other.passed; +failed += other.failed; +failedButOk += other.failedButOk; +return *this; +} + +std::size_t Counts::total() const { +return passed + failed + failedButOk; +} +bool Counts::allPassed() const { +return failed == 0 && failedButOk == 0; +} +bool Counts::allOk() const { +return failed == 0; +} + +Totals Totals::operator - ( Totals const& other ) const { +Totals diff; +diff.assertions = assertions - other.assertions; +diff.testCases = testCases - other.testCases; +return diff; +} + +Totals& Totals::operator += ( Totals const& other ) { +assertions += other.assertions; +testCases += other.testCases; +return *this; +} + +Totals Totals::delta( Totals const& prevTotals ) const { +Totals diff = *this - prevTotals; +if( diff.assertions.failed > 0 ) +++diff.testCases.failed; +else if( diff.assertions.failedButOk > 0 ) +++diff.testCases.failedButOk; +else +++diff.testCases.passed; +return diff; +} + +} +// end catch_totals.cpp +// start catch_uncaught_exceptions.cpp + + #include + +namespace Catch { +bool uncaught_exceptions() { + #if defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) +return std::uncaught_exceptions() > 0; + #else +return std::uncaught_exception(); + #endif +} +} // end namespace Catch +// end catch_uncaught_exceptions.cpp +// start catch_version.cpp + + #include + +namespace Catch { + +Version::Version +( unsigned int _majorVersion, +unsigned int _minorVersion, +unsigned int _patchNumber, +char const * const _branchName, +unsigned int _buildNumber ) +: majorVersion( _majorVersion ), +minorVersion( _minorVersion ), +patchNumber( _patchNumber ), +branchName( _branchName ), +buildNumber( _buildNumber ) +{} + +std::ostream& operator << ( std::ostream& os, Version const& version ) { +os << version.majorVersion << '.' +<< version.minorVersion << '.' +<< version.patchNumber; +// branchName is never null -> 0th char is \0 if it is empty +if (version.branchName[0]) { +os << '-' << version.branchName +<< '.' << version.buildNumber; +} +return os; +} + +Version const& libraryVersion() { +static Version version( 2, 7, 1, "", 0 ); +return version; +} + +} +// end catch_version.cpp +// start catch_wildcard_pattern.cpp + + #include + +namespace Catch { + +WildcardPattern::WildcardPattern( std::string const& pattern, +CaseSensitive::Choice caseSensitivity ) +: m_caseSensitivity( caseSensitivity ), +m_pattern( adjustCase( pattern ) ) +{ +if( startsWith( m_pattern, '*' ) ) { +m_pattern = m_pattern.substr( 1 ); +m_wildcard = WildcardAtStart; +} +if( endsWith( m_pattern, '*' ) ) { +m_pattern = m_pattern.substr( 0, m_pattern.size()-1 ); +m_wildcard = static_cast( m_wildcard | WildcardAtEnd ); +} +} + +bool WildcardPattern::matches( std::string const& str ) const { +switch( m_wildcard ) { +case NoWildcard: +return m_pattern == adjustCase( str ); +case WildcardAtStart: +return endsWith( adjustCase( str ), m_pattern ); +case WildcardAtEnd: +return startsWith( adjustCase( str ), m_pattern ); +case WildcardAtBothEnds: +return contains( adjustCase( str ), m_pattern ); +default: +CATCH_INTERNAL_ERROR( "Unknown enum" ); +} +} + +std::string WildcardPattern::adjustCase( std::string const& str ) const { +return m_caseSensitivity == CaseSensitive::No ? toLower( str ) : str; +} +} +// end catch_wildcard_pattern.cpp +// start catch_xmlwriter.cpp + + #include + +using uchar = unsigned char; + +namespace Catch { + +namespace { + +size_t trailingBytes(unsigned char c) { +if ((c & 0xE0) == 0xC0) { +return 2; +} +if ((c & 0xF0) == 0xE0) { +return 3; +} +if ((c & 0xF8) == 0xF0) { +return 4; +} +CATCH_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered"); +} + +uint32_t headerValue(unsigned char c) { +if ((c & 0xE0) == 0xC0) { +return c & 0x1F; +} +if ((c & 0xF0) == 0xE0) { +return c & 0x0F; +} +if ((c & 0xF8) == 0xF0) { +return c & 0x07; +} +CATCH_INTERNAL_ERROR("Invalid multibyte utf-8 start byte encountered"); +} + +void hexEscapeChar(std::ostream& os, unsigned char c) { +std::ios_base::fmtflags f(os.flags()); +os << "\\x" +<< std::uppercase << std::hex << std::setfill('0') << std::setw(2) +<< static_cast(c); +os.flags(f); +} + +} // anonymous namespace + +XmlEncode::XmlEncode( std::string const& str, ForWhat forWhat ) +: m_str( str ), +m_forWhat( forWhat ) +{} + +void XmlEncode::encodeTo( std::ostream& os ) const { +// Apostrophe escaping not necessary if we always use " to write attributes +// (see: http://www.w3.org/TR/xml/#syntax) + +for( std::size_t idx = 0; idx < m_str.size(); ++ idx ) { +uchar c = m_str[idx]; +switch (c) { +case '<': os << "<"; break; +case '&': os << "&"; break; + +case '>': +// See: http://www.w3.org/TR/xml/#syntax +if (idx > 2 && m_str[idx - 1] == ']' && m_str[idx - 2] == ']') +os << ">"; +else +os << c; +break; + +case '\"': +if (m_forWhat == ForAttributes) +os << """; +else +os << c; +break; + +default: +// Check for control characters and invalid utf-8 + +// Escape control characters in standard ascii +// see http://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml-1-0 +if (c < 0x09 || (c > 0x0D && c < 0x20) || c == 0x7F) { +hexEscapeChar(os, c); +break; +} + +// Plain ASCII: Write it to stream +if (c < 0x7F) { +os << c; +break; +} + +// UTF-8 territory +// Check if the encoding is valid and if it is not, hex escape bytes. +// Important: We do not check the exact decoded values for validity, only the encoding format +// First check that this bytes is a valid lead byte: +// This means that it is not encoded as 1111 1XXX +// Or as 10XX XXXX +if (c < 0xC0 || +c >= 0xF8) { +hexEscapeChar(os, c); +break; +} + +auto encBytes = trailingBytes(c); +// Are there enough bytes left to avoid accessing out-of-bounds memory? +if (idx + encBytes - 1 >= m_str.size()) { +hexEscapeChar(os, c); +break; +} +// The header is valid, check data +// The next encBytes bytes must together be a valid utf-8 +// This means: bitpattern 10XX XXXX and the extracted value is sane (ish) +bool valid = true; +uint32_t value = headerValue(c); +for (std::size_t n = 1; n < encBytes; ++n) { +uchar nc = m_str[idx + n]; +valid &= ((nc & 0xC0) == 0x80); +value = (value << 6) | (nc & 0x3F); +} + +if ( +// Wrong bit pattern of following bytes +(!valid) || +// Overlong encodings +(value < 0x80) || +(0x80 <= value && value < 0x800 && encBytes > 2) || +(0x800 < value && value < 0x10000 && encBytes > 3) || +// Encoded value out of range +(value >= 0x110000) +) { +hexEscapeChar(os, c); +break; +} + +// If we got here, this is in fact a valid(ish) utf-8 sequence +for (std::size_t n = 0; n < encBytes; ++n) { +os << m_str[idx + n]; +} +idx += encBytes - 1; +break; +} +} +} + +std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ) { +xmlEncode.encodeTo( os ); +return os; +} + +XmlWriter::ScopedElement::ScopedElement( XmlWriter* writer ) +: m_writer( writer ) +{} + +XmlWriter::ScopedElement::ScopedElement( ScopedElement&& other ) noexcept +: m_writer( other.m_writer ){ +other.m_writer = nullptr; +} +XmlWriter::ScopedElement& XmlWriter::ScopedElement::operator=( ScopedElement&& other ) noexcept { +if ( m_writer ) { +m_writer->endElement(); +} +m_writer = other.m_writer; +other.m_writer = nullptr; +return *this; +} + +XmlWriter::ScopedElement::~ScopedElement() { +if( m_writer ) +m_writer->endElement(); +} + +XmlWriter::ScopedElement& XmlWriter::ScopedElement::writeText( std::string const& text, bool indent ) { +m_writer->writeText( text, indent ); +return *this; +} + +XmlWriter::XmlWriter( std::ostream& os ) : m_os( os ) +{ +writeDeclaration(); +} + +XmlWriter::~XmlWriter() { +while( !m_tags.empty() ) +endElement(); +} + +XmlWriter& XmlWriter::startElement( std::string const& name ) { +ensureTagClosed(); +newlineIfNecessary(); +m_os << m_indent << '<' << name; +m_tags.push_back( name ); +m_indent += " "; +m_tagIsOpen = true; +return *this; +} + +XmlWriter::ScopedElement XmlWriter::scopedElement( std::string const& name ) { +ScopedElement scoped( this ); +startElement( name ); +return scoped; +} + +XmlWriter& XmlWriter::endElement() { +newlineIfNecessary(); +m_indent = m_indent.substr( 0, m_indent.size()-2 ); +if( m_tagIsOpen ) { +m_os << "/>"; +m_tagIsOpen = false; +} +else { +m_os << m_indent << ""; +} +m_os << std::endl; +m_tags.pop_back(); +return *this; +} + +XmlWriter& XmlWriter::writeAttribute( std::string const& name, std::string const& attribute ) { +if( !name.empty() && !attribute.empty() ) +m_os << ' ' << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '"'; +return *this; +} + +XmlWriter& XmlWriter::writeAttribute( std::string const& name, bool attribute ) { +m_os << ' ' << name << "=\"" << ( attribute ? "true" : "false" ) << '"'; +return *this; +} + +XmlWriter& XmlWriter::writeText( std::string const& text, bool indent ) { +if( !text.empty() ){ +bool tagWasOpen = m_tagIsOpen; +ensureTagClosed(); +if( tagWasOpen && indent ) +m_os << m_indent; +m_os << XmlEncode( text ); +m_needsNewline = true; +} +return *this; +} + +XmlWriter& XmlWriter::writeComment( std::string const& text ) { +ensureTagClosed(); +m_os << m_indent << ""; +m_needsNewline = true; +return *this; +} + +void XmlWriter::writeStylesheetRef( std::string const& url ) { +m_os << "\n"; +} + +XmlWriter& XmlWriter::writeBlankLine() { +ensureTagClosed(); +m_os << '\n'; +return *this; +} + +void XmlWriter::ensureTagClosed() { +if( m_tagIsOpen ) { +m_os << ">" << std::endl; +m_tagIsOpen = false; +} +} + +void XmlWriter::writeDeclaration() { +m_os << "\n"; +} + +void XmlWriter::newlineIfNecessary() { +if( m_needsNewline ) { +m_os << std::endl; +m_needsNewline = false; +} +} +} +// end catch_xmlwriter.cpp +// start catch_reporter_bases.cpp + + #include + #include + #include + #include + #include + +namespace Catch { +void prepareExpandedExpression(AssertionResult& result) { +result.getExpandedExpression(); +} + +// Because formatting using c++ streams is stateful, drop down to C is required +// Alternatively we could use stringstream, but its performance is... not good. +std::string getFormattedDuration( double duration ) { +// Max exponent + 1 is required to represent the whole part +// + 1 for decimal point +// + 3 for the 3 decimal places +// + 1 for null terminator +const std::size_t maxDoubleSize = DBL_MAX_10_EXP + 1 + 1 + 3 + 1; +char buffer[maxDoubleSize]; + +// Save previous errno, to prevent sprintf from overwriting it +ErrnoGuard guard; + #ifdef _MSC_VER +sprintf_s(buffer, "%.3f", duration); + #else +std::sprintf(buffer, "%.3f", duration); + #endif +return std::string(buffer); +} + +std::string serializeFilters( std::vector const& container ) { +ReusableStringStream oss; +bool first = true; +for (auto&& filter : container) +{ +if (!first) +oss << ' '; +else +first = false; + +oss << filter; +} +return oss.str(); +} + +TestEventListenerBase::TestEventListenerBase(ReporterConfig const & _config) +:StreamingReporterBase(_config) {} + +std::set TestEventListenerBase::getSupportedVerbosities() { +return { Verbosity::Quiet, Verbosity::Normal, Verbosity::High }; +} + +void TestEventListenerBase::assertionStarting(AssertionInfo const &) {} + +bool TestEventListenerBase::assertionEnded(AssertionStats const &) { +return false; +} + +} // end namespace Catch +// end catch_reporter_bases.cpp +// start catch_reporter_compact.cpp + +namespace { + + #ifdef CATCH_PLATFORM_MAC +const char* failedString() { return "FAILED"; } +const char* passedString() { return "PASSED"; } + #else +const char* failedString() { return "failed"; } +const char* passedString() { return "passed"; } + #endif + +// Colour::LightGrey +Catch::Colour::Code dimColour() { return Catch::Colour::FileName; } + +std::string bothOrAll( std::size_t count ) { +return count == 1 ? std::string() : +count == 2 ? "both " : "all " ; +} + +} // anon namespace + +namespace Catch { +namespace { +// Colour, message variants: +// - white: No tests ran. +// - red: Failed [both/all] N test cases, failed [both/all] M assertions. +// - white: Passed [both/all] N test cases (no assertions). +// - red: Failed N tests cases, failed M assertions. +// - green: Passed [both/all] N tests cases with M assertions. +void printTotals(std::ostream& out, const Totals& totals) { +if (totals.testCases.total() == 0) { +out << "No tests ran."; +} else if (totals.testCases.failed == totals.testCases.total()) { +Colour colour(Colour::ResultError); +const std::string qualify_assertions_failed = +totals.assertions.failed == totals.assertions.total() ? +bothOrAll(totals.assertions.failed) : std::string(); +out << +"Failed " << bothOrAll(totals.testCases.failed) +<< pluralise(totals.testCases.failed, "test case") << ", " +"failed " << qualify_assertions_failed << +pluralise(totals.assertions.failed, "assertion") << '.'; +} else if (totals.assertions.total() == 0) { +out << +"Passed " << bothOrAll(totals.testCases.total()) +<< pluralise(totals.testCases.total(), "test case") +<< " (no assertions)."; +} else if (totals.assertions.failed) { +Colour colour(Colour::ResultError); +out << +"Failed " << pluralise(totals.testCases.failed, "test case") << ", " +"failed " << pluralise(totals.assertions.failed, "assertion") << '.'; +} else { +Colour colour(Colour::ResultSuccess); +out << +"Passed " << bothOrAll(totals.testCases.passed) +<< pluralise(totals.testCases.passed, "test case") << +" with " << pluralise(totals.assertions.passed, "assertion") << '.'; +} +} + +// Implementation of CompactReporter formatting +class AssertionPrinter { +public: +AssertionPrinter& operator= (AssertionPrinter const&) = delete; +AssertionPrinter(AssertionPrinter const&) = delete; +AssertionPrinter(std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages) +: stream(_stream) +, result(_stats.assertionResult) +, messages(_stats.infoMessages) +, itMessage(_stats.infoMessages.begin()) +, printInfoMessages(_printInfoMessages) {} + +void print() { +printSourceInfo(); + +itMessage = messages.begin(); + +switch (result.getResultType()) { +case ResultWas::Ok: +printResultType(Colour::ResultSuccess, passedString()); +printOriginalExpression(); +printReconstructedExpression(); +if (!result.hasExpression()) +printRemainingMessages(Colour::None); +else +printRemainingMessages(); +break; +case ResultWas::ExpressionFailed: +if (result.isOk()) +printResultType(Colour::ResultSuccess, failedString() + std::string(" - but was ok")); +else +printResultType(Colour::Error, failedString()); +printOriginalExpression(); +printReconstructedExpression(); +printRemainingMessages(); +break; +case ResultWas::ThrewException: +printResultType(Colour::Error, failedString()); +printIssue("unexpected exception with message:"); +printMessage(); +printExpressionWas(); +printRemainingMessages(); +break; +case ResultWas::FatalErrorCondition: +printResultType(Colour::Error, failedString()); +printIssue("fatal error condition with message:"); +printMessage(); +printExpressionWas(); +printRemainingMessages(); +break; +case ResultWas::DidntThrowException: +printResultType(Colour::Error, failedString()); +printIssue("expected exception, got none"); +printExpressionWas(); +printRemainingMessages(); +break; +case ResultWas::Info: +printResultType(Colour::None, "info"); +printMessage(); +printRemainingMessages(); +break; +case ResultWas::Warning: +printResultType(Colour::None, "warning"); +printMessage(); +printRemainingMessages(); +break; +case ResultWas::ExplicitFailure: +printResultType(Colour::Error, failedString()); +printIssue("explicitly"); +printRemainingMessages(Colour::None); +break; +// These cases are here to prevent compiler warnings +case ResultWas::Unknown: +case ResultWas::FailureBit: +case ResultWas::Exception: +printResultType(Colour::Error, "** internal error **"); +break; +} +} + +private: +void printSourceInfo() const { +Colour colourGuard(Colour::FileName); +stream << result.getSourceInfo() << ':'; +} + +void printResultType(Colour::Code colour, std::string const& passOrFail) const { +if (!passOrFail.empty()) { +{ +Colour colourGuard(colour); +stream << ' ' << passOrFail; +} +stream << ':'; +} +} + +void printIssue(std::string const& issue) const { +stream << ' ' << issue; +} + +void printExpressionWas() { +if (result.hasExpression()) { +stream << ';'; +{ +Colour colour(dimColour()); +stream << " expression was:"; +} +printOriginalExpression(); +} +} + +void printOriginalExpression() const { +if (result.hasExpression()) { +stream << ' ' << result.getExpression(); +} +} + +void printReconstructedExpression() const { +if (result.hasExpandedExpression()) { +{ +Colour colour(dimColour()); +stream << " for: "; +} +stream << result.getExpandedExpression(); +} +} + +void printMessage() { +if (itMessage != messages.end()) { +stream << " '" << itMessage->message << '\''; +++itMessage; +} +} + +void printRemainingMessages(Colour::Code colour = dimColour()) { +if (itMessage == messages.end()) +return; + +// using messages.end() directly yields (or auto) compilation error: +std::vector::const_iterator itEnd = messages.end(); +const std::size_t N = static_cast(std::distance(itMessage, itEnd)); + +{ +Colour colourGuard(colour); +stream << " with " << pluralise(N, "message") << ':'; +} + +for (; itMessage != itEnd; ) { +// If this assertion is a warning ignore any INFO messages +if (printInfoMessages || itMessage->type != ResultWas::Info) { +stream << " '" << itMessage->message << '\''; +if (++itMessage != itEnd) { +Colour colourGuard(dimColour()); +stream << " and"; +} +} +} +} + +private: +std::ostream& stream; +AssertionResult const& result; +std::vector messages; +std::vector::const_iterator itMessage; +bool printInfoMessages; +}; + +} // anon namespace + +std::string CompactReporter::getDescription() { +return "Reports test results on a single line, suitable for IDEs"; +} + +ReporterPreferences CompactReporter::getPreferences() const { +return m_reporterPrefs; +} + +void CompactReporter::noMatchingTestCases( std::string const& spec ) { +stream << "No test cases matched '" << spec << '\'' << std::endl; +} + +void CompactReporter::assertionStarting( AssertionInfo const& ) {} + +bool CompactReporter::assertionEnded( AssertionStats const& _assertionStats ) { +AssertionResult const& result = _assertionStats.assertionResult; + +bool printInfoMessages = true; + +// Drop out if result was successful and we're not printing those +if( !m_config->includeSuccessfulResults() && result.isOk() ) { +if( result.getResultType() != ResultWas::Warning ) +return false; +printInfoMessages = false; +} + +AssertionPrinter printer( stream, _assertionStats, printInfoMessages ); +printer.print(); + +stream << std::endl; +return true; +} + +void CompactReporter::sectionEnded(SectionStats const& _sectionStats) { +if (m_config->showDurations() == ShowDurations::Always) { +stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl; +} +} + +void CompactReporter::testRunEnded( TestRunStats const& _testRunStats ) { +printTotals( stream, _testRunStats.totals ); +stream << '\n' << std::endl; +StreamingReporterBase::testRunEnded( _testRunStats ); +} + +CompactReporter::~CompactReporter() {} + +CATCH_REGISTER_REPORTER( "compact", CompactReporter ) + +} // end namespace Catch +// end catch_reporter_compact.cpp +// start catch_reporter_console.cpp + + #include + #include + + #if defined(_MSC_VER) + #pragma warning(push) + #pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch +// Note that 4062 (not all labels are handled +// and default is missing) is enabled + #endif + +namespace Catch { + +namespace { + +// Formatter impl for ConsoleReporter +class ConsoleAssertionPrinter { +public: +ConsoleAssertionPrinter& operator= (ConsoleAssertionPrinter const&) = delete; +ConsoleAssertionPrinter(ConsoleAssertionPrinter const&) = delete; +ConsoleAssertionPrinter(std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages) +: stream(_stream), +stats(_stats), +result(_stats.assertionResult), +colour(Colour::None), +message(result.getMessage()), +messages(_stats.infoMessages), +printInfoMessages(_printInfoMessages) { +switch (result.getResultType()) { +case ResultWas::Ok: +colour = Colour::Success; +passOrFail = "PASSED"; +//if( result.hasMessage() ) +if (_stats.infoMessages.size() == 1) +messageLabel = "with message"; +if (_stats.infoMessages.size() > 1) +messageLabel = "with messages"; +break; +case ResultWas::ExpressionFailed: +if (result.isOk()) { +colour = Colour::Success; +passOrFail = "FAILED - but was ok"; +} else { +colour = Colour::Error; +passOrFail = "FAILED"; +} +if (_stats.infoMessages.size() == 1) +messageLabel = "with message"; +if (_stats.infoMessages.size() > 1) +messageLabel = "with messages"; +break; +case ResultWas::ThrewException: +colour = Colour::Error; +passOrFail = "FAILED"; +messageLabel = "due to unexpected exception with "; +if (_stats.infoMessages.size() == 1) +messageLabel += "message"; +if (_stats.infoMessages.size() > 1) +messageLabel += "messages"; +break; +case ResultWas::FatalErrorCondition: +colour = Colour::Error; +passOrFail = "FAILED"; +messageLabel = "due to a fatal error condition"; +break; +case ResultWas::DidntThrowException: +colour = Colour::Error; +passOrFail = "FAILED"; +messageLabel = "because no exception was thrown where one was expected"; +break; +case ResultWas::Info: +messageLabel = "info"; +break; +case ResultWas::Warning: +messageLabel = "warning"; +break; +case ResultWas::ExplicitFailure: +passOrFail = "FAILED"; +colour = Colour::Error; +if (_stats.infoMessages.size() == 1) +messageLabel = "explicitly with message"; +if (_stats.infoMessages.size() > 1) +messageLabel = "explicitly with messages"; +break; +// These cases are here to prevent compiler warnings +case ResultWas::Unknown: +case ResultWas::FailureBit: +case ResultWas::Exception: +passOrFail = "** internal error **"; +colour = Colour::Error; +break; +} +} + +void print() const { +printSourceInfo(); +if (stats.totals.assertions.total() > 0) { +printResultType(); +printOriginalExpression(); +printReconstructedExpression(); +} else { +stream << '\n'; +} +printMessage(); +} + +private: +void printResultType() const { +if (!passOrFail.empty()) { +Colour colourGuard(colour); +stream << passOrFail << ":\n"; +} +} +void printOriginalExpression() const { +if (result.hasExpression()) { +Colour colourGuard(Colour::OriginalExpression); +stream << " "; +stream << result.getExpressionInMacro(); +stream << '\n'; +} +} +void printReconstructedExpression() const { +if (result.hasExpandedExpression()) { +stream << "with expansion:\n"; +Colour colourGuard(Colour::ReconstructedExpression); +stream << Column(result.getExpandedExpression()).indent(2) << '\n'; +} +} +void printMessage() const { +if (!messageLabel.empty()) +stream << messageLabel << ':' << '\n'; +for (auto const& msg : messages) { +// If this assertion is a warning ignore any INFO messages +if (printInfoMessages || msg.type != ResultWas::Info) +stream << Column(msg.message).indent(2) << '\n'; +} +} +void printSourceInfo() const { +Colour colourGuard(Colour::FileName); +stream << result.getSourceInfo() << ": "; +} + +std::ostream& stream; +AssertionStats const& stats; +AssertionResult const& result; +Colour::Code colour; +std::string passOrFail; +std::string messageLabel; +std::string message; +std::vector messages; +bool printInfoMessages; +}; + +std::size_t makeRatio(std::size_t number, std::size_t total) { +std::size_t ratio = total > 0 ? CATCH_CONFIG_CONSOLE_WIDTH * number / total : 0; +return (ratio == 0 && number > 0) ? 1 : ratio; +} + +std::size_t& findMax(std::size_t& i, std::size_t& j, std::size_t& k) { +if (i > j && i > k) +return i; +else if (j > k) +return j; +else +return k; +} + +struct ColumnInfo { +enum Justification { Left, Right }; +std::string name; +int width; +Justification justification; +}; +struct ColumnBreak {}; +struct RowBreak {}; + +class Duration { +enum class Unit { +Auto, +Nanoseconds, +Microseconds, +Milliseconds, +Seconds, +Minutes +}; +static const uint64_t s_nanosecondsInAMicrosecond = 1000; +static const uint64_t s_nanosecondsInAMillisecond = 1000 * s_nanosecondsInAMicrosecond; +static const uint64_t s_nanosecondsInASecond = 1000 * s_nanosecondsInAMillisecond; +static const uint64_t s_nanosecondsInAMinute = 60 * s_nanosecondsInASecond; + +uint64_t m_inNanoseconds; +Unit m_units; + +public: +explicit Duration(uint64_t inNanoseconds, Unit units = Unit::Auto) +: m_inNanoseconds(inNanoseconds), +m_units(units) { +if (m_units == Unit::Auto) { +if (m_inNanoseconds < s_nanosecondsInAMicrosecond) +m_units = Unit::Nanoseconds; +else if (m_inNanoseconds < s_nanosecondsInAMillisecond) +m_units = Unit::Microseconds; +else if (m_inNanoseconds < s_nanosecondsInASecond) +m_units = Unit::Milliseconds; +else if (m_inNanoseconds < s_nanosecondsInAMinute) +m_units = Unit::Seconds; +else +m_units = Unit::Minutes; +} + +} + +auto value() const -> double { +switch (m_units) { +case Unit::Microseconds: +return m_inNanoseconds / static_cast(s_nanosecondsInAMicrosecond); +case Unit::Milliseconds: +return m_inNanoseconds / static_cast(s_nanosecondsInAMillisecond); +case Unit::Seconds: +return m_inNanoseconds / static_cast(s_nanosecondsInASecond); +case Unit::Minutes: +return m_inNanoseconds / static_cast(s_nanosecondsInAMinute); +default: +return static_cast(m_inNanoseconds); +} +} +auto unitsAsString() const -> std::string { +switch (m_units) { +case Unit::Nanoseconds: +return "ns"; +case Unit::Microseconds: +return "us"; +case Unit::Milliseconds: +return "ms"; +case Unit::Seconds: +return "s"; +case Unit::Minutes: +return "m"; +default: +return "** internal error **"; +} + +} +friend auto operator << (std::ostream& os, Duration const& duration) -> std::ostream& { +return os << duration.value() << " " << duration.unitsAsString(); +} +}; +} // end anon namespace + +class TablePrinter { +std::ostream& m_os; +std::vector m_columnInfos; +std::ostringstream m_oss; +int m_currentColumn = -1; +bool m_isOpen = false; + +public: +TablePrinter( std::ostream& os, std::vector columnInfos ) +: m_os( os ), +m_columnInfos( std::move( columnInfos ) ) {} + +auto columnInfos() const -> std::vector const& { +return m_columnInfos; +} + +void open() { +if (!m_isOpen) { +m_isOpen = true; +*this << RowBreak(); +for (auto const& info : m_columnInfos) +*this << info.name << ColumnBreak(); +*this << RowBreak(); +m_os << Catch::getLineOfChars<'-'>() << "\n"; +} +} +void close() { +if (m_isOpen) { +*this << RowBreak(); +m_os << std::endl; +m_isOpen = false; +} +} + +template +friend TablePrinter& operator << (TablePrinter& tp, T const& value) { +tp.m_oss << value; +return tp; +} + +friend TablePrinter& operator << (TablePrinter& tp, ColumnBreak) { +auto colStr = tp.m_oss.str(); +// This takes account of utf8 encodings +auto strSize = Catch::StringRef(colStr).numberOfCharacters(); +tp.m_oss.str(""); +tp.open(); +if (tp.m_currentColumn == static_cast(tp.m_columnInfos.size() - 1)) { +tp.m_currentColumn = -1; +tp.m_os << "\n"; +} +tp.m_currentColumn++; + +auto colInfo = tp.m_columnInfos[tp.m_currentColumn]; +auto padding = (strSize + 2 < static_cast(colInfo.width)) +? std::string(colInfo.width - (strSize + 2), ' ') +: std::string(); +if (colInfo.justification == ColumnInfo::Left) +tp.m_os << colStr << padding << " "; +else +tp.m_os << padding << colStr << " "; +return tp; +} + +friend TablePrinter& operator << (TablePrinter& tp, RowBreak) { +if (tp.m_currentColumn > 0) { +tp.m_os << "\n"; +tp.m_currentColumn = -1; +} +return tp; +} +}; + +ConsoleReporter::ConsoleReporter(ReporterConfig const& config) +: StreamingReporterBase(config), +m_tablePrinter(new TablePrinter(config.stream(), +{ +{ "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 32, ColumnInfo::Left }, +{ "iters", 8, ColumnInfo::Right }, +{ "elapsed ns", 14, ColumnInfo::Right }, +{ "average", 14, ColumnInfo::Right } +})) {} +ConsoleReporter::~ConsoleReporter() = default; + +std::string ConsoleReporter::getDescription() { +return "Reports test results as plain lines of text"; +} + +void ConsoleReporter::noMatchingTestCases(std::string const& spec) { +stream << "No test cases matched '" << spec << '\'' << std::endl; +} + +void ConsoleReporter::assertionStarting(AssertionInfo const&) {} + +bool ConsoleReporter::assertionEnded(AssertionStats const& _assertionStats) { +AssertionResult const& result = _assertionStats.assertionResult; + +bool includeResults = m_config->includeSuccessfulResults() || !result.isOk(); + +// Drop out if result was successful but we're not printing them. +if (!includeResults && result.getResultType() != ResultWas::Warning) +return false; + +lazyPrint(); + +ConsoleAssertionPrinter printer(stream, _assertionStats, includeResults); +printer.print(); +stream << std::endl; +return true; +} + +void ConsoleReporter::sectionStarting(SectionInfo const& _sectionInfo) { +m_headerPrinted = false; +StreamingReporterBase::sectionStarting(_sectionInfo); +} +void ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) { +m_tablePrinter->close(); +if (_sectionStats.missingAssertions) { +lazyPrint(); +Colour colour(Colour::ResultError); +if (m_sectionStack.size() > 1) +stream << "\nNo assertions in section"; +else +stream << "\nNo assertions in test case"; +stream << " '" << _sectionStats.sectionInfo.name << "'\n" << std::endl; +} +if (m_config->showDurations() == ShowDurations::Always) { +stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl; +} +if (m_headerPrinted) { +m_headerPrinted = false; +} +StreamingReporterBase::sectionEnded(_sectionStats); +} + +void ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) { +lazyPrintWithoutClosingBenchmarkTable(); + +auto nameCol = Column( info.name ).width( static_cast( m_tablePrinter->columnInfos()[0].width - 2 ) ); + +bool firstLine = true; +for (auto line : nameCol) { +if (!firstLine) +(*m_tablePrinter) << ColumnBreak() << ColumnBreak() << ColumnBreak(); +else +firstLine = false; + +(*m_tablePrinter) << line << ColumnBreak(); +} +} +void ConsoleReporter::benchmarkEnded(BenchmarkStats const& stats) { +Duration average(stats.elapsedTimeInNanoseconds / stats.iterations); +(*m_tablePrinter) +<< stats.iterations << ColumnBreak() +<< stats.elapsedTimeInNanoseconds << ColumnBreak() +<< average << ColumnBreak(); +} + +void ConsoleReporter::testCaseEnded(TestCaseStats const& _testCaseStats) { +m_tablePrinter->close(); +StreamingReporterBase::testCaseEnded(_testCaseStats); +m_headerPrinted = false; +} +void ConsoleReporter::testGroupEnded(TestGroupStats const& _testGroupStats) { +if (currentGroupInfo.used) { +printSummaryDivider(); +stream << "Summary for group '" << _testGroupStats.groupInfo.name << "':\n"; +printTotals(_testGroupStats.totals); +stream << '\n' << std::endl; +} +StreamingReporterBase::testGroupEnded(_testGroupStats); +} +void ConsoleReporter::testRunEnded(TestRunStats const& _testRunStats) { +printTotalsDivider(_testRunStats.totals); +printTotals(_testRunStats.totals); +stream << std::endl; +StreamingReporterBase::testRunEnded(_testRunStats); +} +void ConsoleReporter::testRunStarting(TestRunInfo const& _testInfo) { +StreamingReporterBase::testRunStarting(_testInfo); +printTestFilters(); +} + +void ConsoleReporter::lazyPrint() { + +m_tablePrinter->close(); +lazyPrintWithoutClosingBenchmarkTable(); +} + +void ConsoleReporter::lazyPrintWithoutClosingBenchmarkTable() { + +if (!currentTestRunInfo.used) +lazyPrintRunInfo(); +if (!currentGroupInfo.used) +lazyPrintGroupInfo(); + +if (!m_headerPrinted) { +printTestCaseAndSectionHeader(); +m_headerPrinted = true; +} +} +void ConsoleReporter::lazyPrintRunInfo() { +stream << '\n' << getLineOfChars<'~'>() << '\n'; +Colour colour(Colour::SecondaryText); +stream << currentTestRunInfo->name +<< " is a Catch v" << libraryVersion() << " host application.\n" +<< "Run with -? for options\n\n"; + +if (m_config->rngSeed() != 0) +stream << "Randomness seeded to: " << m_config->rngSeed() << "\n\n"; + +currentTestRunInfo.used = true; +} +void ConsoleReporter::lazyPrintGroupInfo() { +if (!currentGroupInfo->name.empty() && currentGroupInfo->groupsCounts > 1) { +printClosedHeader("Group: " + currentGroupInfo->name); +currentGroupInfo.used = true; +} +} +void ConsoleReporter::printTestCaseAndSectionHeader() { +assert(!m_sectionStack.empty()); +printOpenHeader(currentTestCaseInfo->name); + +if (m_sectionStack.size() > 1) { +Colour colourGuard(Colour::Headers); + +auto +it = m_sectionStack.begin() + 1, // Skip first section (test case) +itEnd = m_sectionStack.end(); +for (; it != itEnd; ++it) +printHeaderString(it->name, 2); +} + +SourceLineInfo lineInfo = m_sectionStack.back().lineInfo; + +if (!lineInfo.empty()) { +stream << getLineOfChars<'-'>() << '\n'; +Colour colourGuard(Colour::FileName); +stream << lineInfo << '\n'; +} +stream << getLineOfChars<'.'>() << '\n' << std::endl; +} + +void ConsoleReporter::printClosedHeader(std::string const& _name) { +printOpenHeader(_name); +stream << getLineOfChars<'.'>() << '\n'; +} +void ConsoleReporter::printOpenHeader(std::string const& _name) { +stream << getLineOfChars<'-'>() << '\n'; +{ +Colour colourGuard(Colour::Headers); +printHeaderString(_name); +} +} + +// if string has a : in first line will set indent to follow it on +// subsequent lines +void ConsoleReporter::printHeaderString(std::string const& _string, std::size_t indent) { +std::size_t i = _string.find(": "); +if (i != std::string::npos) +i += 2; +else +i = 0; +stream << Column(_string).indent(indent + i).initialIndent(indent) << '\n'; +} + +struct SummaryColumn { + +SummaryColumn( std::string _label, Colour::Code _colour ) +: label( std::move( _label ) ), +colour( _colour ) {} +SummaryColumn addRow( std::size_t count ) { +ReusableStringStream rss; +rss << count; +std::string row = rss.str(); +for (auto& oldRow : rows) { +while (oldRow.size() < row.size()) +oldRow = ' ' + oldRow; +while (oldRow.size() > row.size()) +row = ' ' + row; +} +rows.push_back(row); +return *this; +} + +std::string label; +Colour::Code colour; +std::vector rows; + +}; + +void ConsoleReporter::printTotals( Totals const& totals ) { +if (totals.testCases.total() == 0) { +stream << Colour(Colour::Warning) << "No tests ran\n"; +} else if (totals.assertions.total() > 0 && totals.testCases.allPassed()) { +stream << Colour(Colour::ResultSuccess) << "All tests passed"; +stream << " (" +<< pluralise(totals.assertions.passed, "assertion") << " in " +<< pluralise(totals.testCases.passed, "test case") << ')' +<< '\n'; +} else { + +std::vector columns; +columns.push_back(SummaryColumn("", Colour::None) +.addRow(totals.testCases.total()) +.addRow(totals.assertions.total())); +columns.push_back(SummaryColumn("passed", Colour::Success) +.addRow(totals.testCases.passed) +.addRow(totals.assertions.passed)); +columns.push_back(SummaryColumn("failed", Colour::ResultError) +.addRow(totals.testCases.failed) +.addRow(totals.assertions.failed)); +columns.push_back(SummaryColumn("failed as expected", Colour::ResultExpectedFailure) +.addRow(totals.testCases.failedButOk) +.addRow(totals.assertions.failedButOk)); + +printSummaryRow("test cases", columns, 0); +printSummaryRow("assertions", columns, 1); +} +} +void ConsoleReporter::printSummaryRow(std::string const& label, std::vector const& cols, std::size_t row) { +for (auto col : cols) { +std::string value = col.rows[row]; +if (col.label.empty()) { +stream << label << ": "; +if (value != "0") +stream << value; +else +stream << Colour(Colour::Warning) << "- none -"; +} else if (value != "0") { +stream << Colour(Colour::LightGrey) << " | "; +stream << Colour(col.colour) +<< value << ' ' << col.label; +} +} +stream << '\n'; +} + +void ConsoleReporter::printTotalsDivider(Totals const& totals) { +if (totals.testCases.total() > 0) { +std::size_t failedRatio = makeRatio(totals.testCases.failed, totals.testCases.total()); +std::size_t failedButOkRatio = makeRatio(totals.testCases.failedButOk, totals.testCases.total()); +std::size_t passedRatio = makeRatio(totals.testCases.passed, totals.testCases.total()); +while (failedRatio + failedButOkRatio + passedRatio < CATCH_CONFIG_CONSOLE_WIDTH - 1) +findMax(failedRatio, failedButOkRatio, passedRatio)++; +while (failedRatio + failedButOkRatio + passedRatio > CATCH_CONFIG_CONSOLE_WIDTH - 1) +findMax(failedRatio, failedButOkRatio, passedRatio)--; + +stream << Colour(Colour::Error) << std::string(failedRatio, '='); +stream << Colour(Colour::ResultExpectedFailure) << std::string(failedButOkRatio, '='); +if (totals.testCases.allPassed()) +stream << Colour(Colour::ResultSuccess) << std::string(passedRatio, '='); +else +stream << Colour(Colour::Success) << std::string(passedRatio, '='); +} else { +stream << Colour(Colour::Warning) << std::string(CATCH_CONFIG_CONSOLE_WIDTH - 1, '='); +} +stream << '\n'; +} +void ConsoleReporter::printSummaryDivider() { +stream << getLineOfChars<'-'>() << '\n'; +} + +void ConsoleReporter::printTestFilters() { +if (m_config->testSpec().hasFilters()) +stream << Colour(Colour::BrightYellow) << "Filters: " << serializeFilters( m_config->getTestsOrTags() ) << '\n'; +} + +CATCH_REGISTER_REPORTER("console", ConsoleReporter) + +} // end namespace Catch + + #if defined(_MSC_VER) + #pragma warning(pop) + #endif +// end catch_reporter_console.cpp +// start catch_reporter_junit.cpp + + #include + #include + #include + #include + +namespace Catch { + +namespace { +std::string getCurrentTimestamp() { +// Beware, this is not reentrant because of backward compatibility issues +// Also, UTC only, again because of backward compatibility (%z is C++11) +time_t rawtime; +std::time(&rawtime); +auto const timeStampSize = sizeof("2017-01-16T17:06:45Z"); + + #ifdef _MSC_VER +std::tm timeInfo = {}; +gmtime_s(&timeInfo, &rawtime); + #else +std::tm* timeInfo; +timeInfo = std::gmtime(&rawtime); + #endif + +char timeStamp[timeStampSize]; +const char * const fmt = "%Y-%m-%dT%H:%M:%SZ"; + + #ifdef _MSC_VER +std::strftime(timeStamp, timeStampSize, fmt, &timeInfo); + #else +std::strftime(timeStamp, timeStampSize, fmt, timeInfo); + #endif +return std::string(timeStamp); +} + +std::string fileNameTag(const std::vector &tags) { +auto it = std::find_if(begin(tags), +end(tags), +[] (std::string const& tag) {return tag.front() == '#'; }); +if (it != tags.end()) +return it->substr(1); +return std::string(); +} +} // anonymous namespace + +JunitReporter::JunitReporter( ReporterConfig const& _config ) +: CumulativeReporterBase( _config ), +xml( _config.stream() ) +{ +m_reporterPrefs.shouldRedirectStdOut = true; +m_reporterPrefs.shouldReportAllAssertions = true; +} + +JunitReporter::~JunitReporter() {} + +std::string JunitReporter::getDescription() { +return "Reports test results in an XML format that looks like Ant's junitreport target"; +} + +void JunitReporter::noMatchingTestCases( std::string const& /*spec*/ ) {} + +void JunitReporter::testRunStarting( TestRunInfo const& runInfo ) { +CumulativeReporterBase::testRunStarting( runInfo ); +xml.startElement( "testsuites" ); + +if ( m_config->hasTestFilters() || m_config->rngSeed() != 0 ) +xml.startElement("properties"); + +if ( m_config->hasTestFilters() ) { +xml.scopedElement( "property" ) +.writeAttribute( "name" , "filters" ) +.writeAttribute( "value" , serializeFilters( m_config->getTestsOrTags() ) ); +} + +if( m_config->rngSeed() != 0 ) { +xml.scopedElement( "property" ) +.writeAttribute( "name", "random-seed" ) +.writeAttribute( "value", m_config->rngSeed() ); +xml.endElement(); +} +} + +void JunitReporter::testGroupStarting( GroupInfo const& groupInfo ) { +suiteTimer.start(); +stdOutForSuite.clear(); +stdErrForSuite.clear(); +unexpectedExceptions = 0; +CumulativeReporterBase::testGroupStarting( groupInfo ); +} + +void JunitReporter::testCaseStarting( TestCaseInfo const& testCaseInfo ) { +m_okToFail = testCaseInfo.okToFail(); +} + +bool JunitReporter::assertionEnded( AssertionStats const& assertionStats ) { +if( assertionStats.assertionResult.getResultType() == ResultWas::ThrewException && !m_okToFail ) +unexpectedExceptions++; +return CumulativeReporterBase::assertionEnded( assertionStats ); +} + +void JunitReporter::testCaseEnded( TestCaseStats const& testCaseStats ) { +stdOutForSuite += testCaseStats.stdOut; +stdErrForSuite += testCaseStats.stdErr; +CumulativeReporterBase::testCaseEnded( testCaseStats ); +} + +void JunitReporter::testGroupEnded( TestGroupStats const& testGroupStats ) { +double suiteTime = suiteTimer.getElapsedSeconds(); +CumulativeReporterBase::testGroupEnded( testGroupStats ); +writeGroup( *m_testGroups.back(), suiteTime ); +} + +void JunitReporter::testRunEndedCumulative() { +xml.endElement(); +} + +void JunitReporter::writeGroup( TestGroupNode const& groupNode, double suiteTime ) { +XmlWriter::ScopedElement e = xml.scopedElement( "testsuite" ); +TestGroupStats const& stats = groupNode.value; +xml.writeAttribute( "name", stats.groupInfo.name ); +xml.writeAttribute( "errors", unexpectedExceptions ); +xml.writeAttribute( "failures", stats.totals.assertions.failed-unexpectedExceptions ); +xml.writeAttribute( "tests", stats.totals.assertions.total() ); +xml.writeAttribute( "hostname", "tbd" ); // !TBD +if( m_config->showDurations() == ShowDurations::Never ) +xml.writeAttribute( "time", "" ); +else +xml.writeAttribute( "time", suiteTime ); +xml.writeAttribute( "timestamp", getCurrentTimestamp() ); + +// Write test cases +for( auto const& child : groupNode.children ) +writeTestCase( *child ); + +xml.scopedElement( "system-out" ).writeText( trim( stdOutForSuite ), false ); +xml.scopedElement( "system-err" ).writeText( trim( stdErrForSuite ), false ); +} + +void JunitReporter::writeTestCase( TestCaseNode const& testCaseNode ) { +TestCaseStats const& stats = testCaseNode.value; + +// All test cases have exactly one section - which represents the +// test case itself. That section may have 0-n nested sections +assert( testCaseNode.children.size() == 1 ); +SectionNode const& rootSection = *testCaseNode.children.front(); + +std::string className = stats.testInfo.className; + +if( className.empty() ) { +className = fileNameTag(stats.testInfo.tags); +if ( className.empty() ) +className = "global"; +} + +if ( !m_config->name().empty() ) +className = m_config->name() + "." + className; + +writeSection( className, "", rootSection ); +} + +void JunitReporter::writeSection( std::string const& className, +std::string const& rootName, +SectionNode const& sectionNode ) { +std::string name = trim( sectionNode.stats.sectionInfo.name ); +if( !rootName.empty() ) +name = rootName + '/' + name; + +if( !sectionNode.assertions.empty() || +!sectionNode.stdOut.empty() || +!sectionNode.stdErr.empty() ) { +XmlWriter::ScopedElement e = xml.scopedElement( "testcase" ); +if( className.empty() ) { +xml.writeAttribute( "classname", name ); +xml.writeAttribute( "name", "root" ); +} +else { +xml.writeAttribute( "classname", className ); +xml.writeAttribute( "name", name ); +} +xml.writeAttribute( "time", ::Catch::Detail::stringify( sectionNode.stats.durationInSeconds ) ); + +writeAssertions( sectionNode ); + +if( !sectionNode.stdOut.empty() ) +xml.scopedElement( "system-out" ).writeText( trim( sectionNode.stdOut ), false ); +if( !sectionNode.stdErr.empty() ) +xml.scopedElement( "system-err" ).writeText( trim( sectionNode.stdErr ), false ); +} +for( auto const& childNode : sectionNode.childSections ) +if( className.empty() ) +writeSection( name, "", *childNode ); +else +writeSection( className, name, *childNode ); +} + +void JunitReporter::writeAssertions( SectionNode const& sectionNode ) { +for( auto const& assertion : sectionNode.assertions ) +writeAssertion( assertion ); +} + +void JunitReporter::writeAssertion( AssertionStats const& stats ) { +AssertionResult const& result = stats.assertionResult; +if( !result.isOk() ) { +std::string elementName; +switch( result.getResultType() ) { +case ResultWas::ThrewException: +case ResultWas::FatalErrorCondition: +elementName = "error"; +break; +case ResultWas::ExplicitFailure: +elementName = "failure"; +break; +case ResultWas::ExpressionFailed: +elementName = "failure"; +break; +case ResultWas::DidntThrowException: +elementName = "failure"; +break; + +// We should never see these here: +case ResultWas::Info: +case ResultWas::Warning: +case ResultWas::Ok: +case ResultWas::Unknown: +case ResultWas::FailureBit: +case ResultWas::Exception: +elementName = "internalError"; +break; +} + +XmlWriter::ScopedElement e = xml.scopedElement( elementName ); + +xml.writeAttribute( "message", result.getExpandedExpression() ); +xml.writeAttribute( "type", result.getTestMacroName() ); + +ReusableStringStream rss; +if( !result.getMessage().empty() ) +rss << result.getMessage() << '\n'; +for( auto const& msg : stats.infoMessages ) +if( msg.type == ResultWas::Info ) +rss << msg.message << '\n'; + +rss << "at " << result.getSourceInfo(); +xml.writeText( rss.str(), false ); +} +} + +CATCH_REGISTER_REPORTER( "junit", JunitReporter ) + +} // end namespace Catch +// end catch_reporter_junit.cpp +// start catch_reporter_listening.cpp + + #include + +namespace Catch { + +ListeningReporter::ListeningReporter() { +// We will assume that listeners will always want all assertions +m_preferences.shouldReportAllAssertions = true; +} + +void ListeningReporter::addListener( IStreamingReporterPtr&& listener ) { +m_listeners.push_back( std::move( listener ) ); +} + +void ListeningReporter::addReporter(IStreamingReporterPtr&& reporter) { +assert(!m_reporter && "Listening reporter can wrap only 1 real reporter"); +m_reporter = std::move( reporter ); +m_preferences.shouldRedirectStdOut = m_reporter->getPreferences().shouldRedirectStdOut; +} + +ReporterPreferences ListeningReporter::getPreferences() const { +return m_preferences; +} + +std::set ListeningReporter::getSupportedVerbosities() { +return std::set{ }; +} + +void ListeningReporter::noMatchingTestCases( std::string const& spec ) { +for ( auto const& listener : m_listeners ) { +listener->noMatchingTestCases( spec ); +} +m_reporter->noMatchingTestCases( spec ); +} + +void ListeningReporter::benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) { +for ( auto const& listener : m_listeners ) { +listener->benchmarkStarting( benchmarkInfo ); +} +m_reporter->benchmarkStarting( benchmarkInfo ); +} +void ListeningReporter::benchmarkEnded( BenchmarkStats const& benchmarkStats ) { +for ( auto const& listener : m_listeners ) { +listener->benchmarkEnded( benchmarkStats ); +} +m_reporter->benchmarkEnded( benchmarkStats ); +} + +void ListeningReporter::testRunStarting( TestRunInfo const& testRunInfo ) { +for ( auto const& listener : m_listeners ) { +listener->testRunStarting( testRunInfo ); +} +m_reporter->testRunStarting( testRunInfo ); +} + +void ListeningReporter::testGroupStarting( GroupInfo const& groupInfo ) { +for ( auto const& listener : m_listeners ) { +listener->testGroupStarting( groupInfo ); +} +m_reporter->testGroupStarting( groupInfo ); +} + +void ListeningReporter::testCaseStarting( TestCaseInfo const& testInfo ) { +for ( auto const& listener : m_listeners ) { +listener->testCaseStarting( testInfo ); +} +m_reporter->testCaseStarting( testInfo ); +} + +void ListeningReporter::sectionStarting( SectionInfo const& sectionInfo ) { +for ( auto const& listener : m_listeners ) { +listener->sectionStarting( sectionInfo ); +} +m_reporter->sectionStarting( sectionInfo ); +} + +void ListeningReporter::assertionStarting( AssertionInfo const& assertionInfo ) { +for ( auto const& listener : m_listeners ) { +listener->assertionStarting( assertionInfo ); +} +m_reporter->assertionStarting( assertionInfo ); +} + +// The return value indicates if the messages buffer should be cleared: +bool ListeningReporter::assertionEnded( AssertionStats const& assertionStats ) { +for( auto const& listener : m_listeners ) { +static_cast( listener->assertionEnded( assertionStats ) ); +} +return m_reporter->assertionEnded( assertionStats ); +} + +void ListeningReporter::sectionEnded( SectionStats const& sectionStats ) { +for ( auto const& listener : m_listeners ) { +listener->sectionEnded( sectionStats ); +} +m_reporter->sectionEnded( sectionStats ); +} + +void ListeningReporter::testCaseEnded( TestCaseStats const& testCaseStats ) { +for ( auto const& listener : m_listeners ) { +listener->testCaseEnded( testCaseStats ); +} +m_reporter->testCaseEnded( testCaseStats ); +} + +void ListeningReporter::testGroupEnded( TestGroupStats const& testGroupStats ) { +for ( auto const& listener : m_listeners ) { +listener->testGroupEnded( testGroupStats ); +} +m_reporter->testGroupEnded( testGroupStats ); +} + +void ListeningReporter::testRunEnded( TestRunStats const& testRunStats ) { +for ( auto const& listener : m_listeners ) { +listener->testRunEnded( testRunStats ); +} +m_reporter->testRunEnded( testRunStats ); +} + +void ListeningReporter::skipTest( TestCaseInfo const& testInfo ) { +for ( auto const& listener : m_listeners ) { +listener->skipTest( testInfo ); +} +m_reporter->skipTest( testInfo ); +} + +bool ListeningReporter::isMulti() const { +return true; +} + +} // end namespace Catch +// end catch_reporter_listening.cpp +// start catch_reporter_xml.cpp + + #if defined(_MSC_VER) + #pragma warning(push) + #pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch +// Note that 4062 (not all labels are handled +// and default is missing) is enabled + #endif + +namespace Catch { +XmlReporter::XmlReporter( ReporterConfig const& _config ) +: StreamingReporterBase( _config ), +m_xml(_config.stream()) +{ +m_reporterPrefs.shouldRedirectStdOut = true; +m_reporterPrefs.shouldReportAllAssertions = true; +} + +XmlReporter::~XmlReporter() = default; + +std::string XmlReporter::getDescription() { +return "Reports test results as an XML document"; +} + +std::string XmlReporter::getStylesheetRef() const { +return std::string(); +} + +void XmlReporter::writeSourceInfo( SourceLineInfo const& sourceInfo ) { +m_xml +.writeAttribute( "filename", sourceInfo.file ) +.writeAttribute( "line", sourceInfo.line ); +} + +void XmlReporter::noMatchingTestCases( std::string const& s ) { +StreamingReporterBase::noMatchingTestCases( s ); +} + +void XmlReporter::testRunStarting( TestRunInfo const& testInfo ) { +StreamingReporterBase::testRunStarting( testInfo ); +std::string stylesheetRef = getStylesheetRef(); +if( !stylesheetRef.empty() ) +m_xml.writeStylesheetRef( stylesheetRef ); +m_xml.startElement( "Catch" ); +if( !m_config->name().empty() ) +m_xml.writeAttribute( "name", m_config->name() ); +if (m_config->testSpec().hasFilters()) +m_xml.writeAttribute( "filters", serializeFilters( m_config->getTestsOrTags() ) ); +if( m_config->rngSeed() != 0 ) +m_xml.scopedElement( "Randomness" ) +.writeAttribute( "seed", m_config->rngSeed() ); +} + +void XmlReporter::testGroupStarting( GroupInfo const& groupInfo ) { +StreamingReporterBase::testGroupStarting( groupInfo ); +m_xml.startElement( "Group" ) +.writeAttribute( "name", groupInfo.name ); +} + +void XmlReporter::testCaseStarting( TestCaseInfo const& testInfo ) { +StreamingReporterBase::testCaseStarting(testInfo); +m_xml.startElement( "TestCase" ) +.writeAttribute( "name", trim( testInfo.name ) ) +.writeAttribute( "description", testInfo.description ) +.writeAttribute( "tags", testInfo.tagsAsString() ); + +writeSourceInfo( testInfo.lineInfo ); + +if ( m_config->showDurations() == ShowDurations::Always ) +m_testCaseTimer.start(); +m_xml.ensureTagClosed(); +} + +void XmlReporter::sectionStarting( SectionInfo const& sectionInfo ) { +StreamingReporterBase::sectionStarting( sectionInfo ); +if( m_sectionDepth++ > 0 ) { +m_xml.startElement( "Section" ) +.writeAttribute( "name", trim( sectionInfo.name ) ); +writeSourceInfo( sectionInfo.lineInfo ); +m_xml.ensureTagClosed(); +} +} + +void XmlReporter::assertionStarting( AssertionInfo const& ) { } + +bool XmlReporter::assertionEnded( AssertionStats const& assertionStats ) { + +AssertionResult const& result = assertionStats.assertionResult; + +bool includeResults = m_config->includeSuccessfulResults() || !result.isOk(); + +if( includeResults || result.getResultType() == ResultWas::Warning ) { +// Print any info messages in tags. +for( auto const& msg : assertionStats.infoMessages ) { +if( msg.type == ResultWas::Info && includeResults ) { +m_xml.scopedElement( "Info" ) +.writeText( msg.message ); +} else if ( msg.type == ResultWas::Warning ) { +m_xml.scopedElement( "Warning" ) +.writeText( msg.message ); +} +} +} + +// Drop out if result was successful but we're not printing them. +if( !includeResults && result.getResultType() != ResultWas::Warning ) +return true; + +// Print the expression if there is one. +if( result.hasExpression() ) { +m_xml.startElement( "Expression" ) +.writeAttribute( "success", result.succeeded() ) +.writeAttribute( "type", result.getTestMacroName() ); + +writeSourceInfo( result.getSourceInfo() ); + +m_xml.scopedElement( "Original" ) +.writeText( result.getExpression() ); +m_xml.scopedElement( "Expanded" ) +.writeText( result.getExpandedExpression() ); +} + +// And... Print a result applicable to each result type. +switch( result.getResultType() ) { +case ResultWas::ThrewException: +m_xml.startElement( "Exception" ); +writeSourceInfo( result.getSourceInfo() ); +m_xml.writeText( result.getMessage() ); +m_xml.endElement(); +break; +case ResultWas::FatalErrorCondition: +m_xml.startElement( "FatalErrorCondition" ); +writeSourceInfo( result.getSourceInfo() ); +m_xml.writeText( result.getMessage() ); +m_xml.endElement(); +break; +case ResultWas::Info: +m_xml.scopedElement( "Info" ) +.writeText( result.getMessage() ); +break; +case ResultWas::Warning: +// Warning will already have been written +break; +case ResultWas::ExplicitFailure: +m_xml.startElement( "Failure" ); +writeSourceInfo( result.getSourceInfo() ); +m_xml.writeText( result.getMessage() ); +m_xml.endElement(); +break; +default: +break; +} + +if( result.hasExpression() ) +m_xml.endElement(); + +return true; +} + +void XmlReporter::sectionEnded( SectionStats const& sectionStats ) { +StreamingReporterBase::sectionEnded( sectionStats ); +if( --m_sectionDepth > 0 ) { +XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResults" ); +e.writeAttribute( "successes", sectionStats.assertions.passed ); +e.writeAttribute( "failures", sectionStats.assertions.failed ); +e.writeAttribute( "expectedFailures", sectionStats.assertions.failedButOk ); + +if ( m_config->showDurations() == ShowDurations::Always ) +e.writeAttribute( "durationInSeconds", sectionStats.durationInSeconds ); + +m_xml.endElement(); +} +} + +void XmlReporter::testCaseEnded( TestCaseStats const& testCaseStats ) { +StreamingReporterBase::testCaseEnded( testCaseStats ); +XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResult" ); +e.writeAttribute( "success", testCaseStats.totals.assertions.allOk() ); + +if ( m_config->showDurations() == ShowDurations::Always ) +e.writeAttribute( "durationInSeconds", m_testCaseTimer.getElapsedSeconds() ); + +if( !testCaseStats.stdOut.empty() ) +m_xml.scopedElement( "StdOut" ).writeText( trim( testCaseStats.stdOut ), false ); +if( !testCaseStats.stdErr.empty() ) +m_xml.scopedElement( "StdErr" ).writeText( trim( testCaseStats.stdErr ), false ); + +m_xml.endElement(); +} + +void XmlReporter::testGroupEnded( TestGroupStats const& testGroupStats ) { +StreamingReporterBase::testGroupEnded( testGroupStats ); +// TODO: Check testGroupStats.aborting and act accordingly. +m_xml.scopedElement( "OverallResults" ) +.writeAttribute( "successes", testGroupStats.totals.assertions.passed ) +.writeAttribute( "failures", testGroupStats.totals.assertions.failed ) +.writeAttribute( "expectedFailures", testGroupStats.totals.assertions.failedButOk ); +m_xml.endElement(); +} + +void XmlReporter::testRunEnded( TestRunStats const& testRunStats ) { +StreamingReporterBase::testRunEnded( testRunStats ); +m_xml.scopedElement( "OverallResults" ) +.writeAttribute( "successes", testRunStats.totals.assertions.passed ) +.writeAttribute( "failures", testRunStats.totals.assertions.failed ) +.writeAttribute( "expectedFailures", testRunStats.totals.assertions.failedButOk ); +m_xml.endElement(); +} + +CATCH_REGISTER_REPORTER( "xml", XmlReporter ) + +} // end namespace Catch + + #if defined(_MSC_VER) + #pragma warning(pop) + #endif +// end catch_reporter_xml.cpp + +namespace Catch { +LeakDetector leakDetector; +} + + #ifdef __clang__ + #pragma clang diagnostic pop + #endif + +// end catch_impl.hpp + #endif + + #ifdef CATCH_CONFIG_MAIN +// start catch_default_main.hpp + + #ifndef __OBJC__ + + #if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN) +// Standard C/C++ Win32 Unicode wmain entry point +extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) { + #else +// Standard C/C++ main entry point +int main (int argc, char * argv[]) { + #endif + +return Catch::Session().run( argc, argv ); +} + + #else // __OBJC__ + +// Objective-C entry point +int main (int argc, char * const argv[]) { + #if !CATCH_ARC_ENABLED +NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + #endif + +Catch::registerTestMethods(); +int result = Catch::Session().run( argc, (char**)argv ); + + #if !CATCH_ARC_ENABLED +[pool drain]; + #endif + +return result; +} + + #endif // __OBJC__ + +// end catch_default_main.hpp + #endif + + #if !defined(CATCH_CONFIG_IMPL_ONLY) + + #ifdef CLARA_CONFIG_MAIN_NOT_DEFINED + # undef CLARA_CONFIG_MAIN + #endif + + #if !defined(CATCH_CONFIG_DISABLE) +////// +// If this config identifier is defined then all CATCH macros are prefixed with CATCH_ + #ifdef CATCH_CONFIG_PREFIX_ALL + + #define CATCH_REQUIRE( ... ) INTERNAL_CATCH_TEST( "CATCH_REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__ ) + #define CATCH_REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( "CATCH_REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ ) + + #define CATCH_REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( "CATCH_REQUIRE_THROWS", Catch::ResultDisposition::Normal, __VA_ARGS__ ) + #define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CATCH_REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr ) + #define CATCH_REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "CATCH_REQUIRE_THROWS_WITH", Catch::ResultDisposition::Normal, matcher, expr ) + #if !defined(CATCH_CONFIG_DISABLE_MATCHERS) + #define CATCH_REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "CATCH_REQUIRE_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::Normal, matcher, expr ) + #endif// CATCH_CONFIG_DISABLE_MATCHERS + #define CATCH_REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CATCH_REQUIRE_NOTHROW", Catch::ResultDisposition::Normal, __VA_ARGS__ ) + + #define CATCH_CHECK( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CATCH_CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK_FALSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ ) + #define CATCH_CHECKED_IF( ... ) INTERNAL_CATCH_IF( "CATCH_CHECKED_IF", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CATCH_CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( "CATCH_CHECKED_ELSE", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CATCH_CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK_NOFAIL", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ ) + + #define CATCH_CHECK_THROWS( ... ) INTERNAL_CATCH_THROWS( "CATCH_CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CATCH_CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CATCH_CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr ) + #define CATCH_CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "CATCH_CHECK_THROWS_WITH", Catch::ResultDisposition::ContinueOnFailure, matcher, expr ) + #if !defined(CATCH_CONFIG_DISABLE_MATCHERS) + #define CATCH_CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "CATCH_CHECK_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr ) + #endif // CATCH_CONFIG_DISABLE_MATCHERS + #define CATCH_CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CATCH_CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + + #if !defined(CATCH_CONFIG_DISABLE_MATCHERS) + #define CATCH_CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CATCH_CHECK_THAT", matcher, Catch::ResultDisposition::ContinueOnFailure, arg ) + + #define CATCH_REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CATCH_REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg ) + #endif // CATCH_CONFIG_DISABLE_MATCHERS + + #define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( "CATCH_INFO", msg ) + #define CATCH_WARN( msg ) INTERNAL_CATCH_MSG( "CATCH_WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg ) + #define CATCH_CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CATCH_CAPTURE",__VA_ARGS__ ) + + #define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ ) + #define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ ) + #define CATCH_METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ ) + #define CATCH_REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ ) + #define CATCH_SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ ) + #define CATCH_DYNAMIC_SECTION( ... ) INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ ) + #define CATCH_FAIL( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ) + #define CATCH_FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CATCH_SUCCEED( ... ) INTERNAL_CATCH_MSG( "CATCH_SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + + #define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE() + + #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR + #define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) + #define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) + #define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) + #define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) + #else + #define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) ) + #define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) ) + #define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) ) + #define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) ) + #endif + + #if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE) + #define CATCH_STATIC_REQUIRE( ... ) static_assert( __VA_ARGS__ , #__VA_ARGS__ ); CATCH_SUCCEED( #__VA_ARGS__ ) + #define CATCH_STATIC_REQUIRE_FALSE( ... ) static_assert( !(__VA_ARGS__), "!(" #__VA_ARGS__ ")" ); CATCH_SUCCEED( #__VA_ARGS__ ) + #else + #define CATCH_STATIC_REQUIRE( ... ) CATCH_REQUIRE( __VA_ARGS__ ) + #define CATCH_STATIC_REQUIRE_FALSE( ... ) CATCH_REQUIRE_FALSE( __VA_ARGS__ ) + #endif + +// "BDD-style" convenience wrappers + #define CATCH_SCENARIO( ... ) CATCH_TEST_CASE( "Scenario: " __VA_ARGS__ ) + #define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ ) + #define CATCH_GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " Given: " << desc ) + #define CATCH_AND_GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( "And given: " << desc ) + #define CATCH_WHEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " When: " << desc ) + #define CATCH_AND_WHEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " And when: " << desc ) + #define CATCH_THEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " Then: " << desc ) + #define CATCH_AND_THEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " And: " << desc ) + +// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required + #else + + #define REQUIRE( ... ) INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__ ) + #define REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( "REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ ) + + #define REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( "REQUIRE_THROWS", Catch::ResultDisposition::Normal, __VA_ARGS__ ) + #define REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr ) + #define REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "REQUIRE_THROWS_WITH", Catch::ResultDisposition::Normal, matcher, expr ) + #if !defined(CATCH_CONFIG_DISABLE_MATCHERS) + #define REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "REQUIRE_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::Normal, matcher, expr ) + #endif // CATCH_CONFIG_DISABLE_MATCHERS + #define REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "REQUIRE_NOTHROW", Catch::ResultDisposition::Normal, __VA_ARGS__ ) + + #define CHECK( ... ) INTERNAL_CATCH_TEST( "CHECK", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( "CHECK_FALSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ ) + #define CHECKED_IF( ... ) INTERNAL_CATCH_IF( "CHECKED_IF", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( "CHECKED_ELSE", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( "CHECK_NOFAIL", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ ) + + #define CHECK_THROWS( ... ) INTERNAL_CATCH_THROWS( "CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr ) + #define CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "CHECK_THROWS_WITH", Catch::ResultDisposition::ContinueOnFailure, matcher, expr ) + #if !defined(CATCH_CONFIG_DISABLE_MATCHERS) + #define CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "CHECK_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr ) + #endif // CATCH_CONFIG_DISABLE_MATCHERS + #define CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + + #if !defined(CATCH_CONFIG_DISABLE_MATCHERS) + #define CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CHECK_THAT", matcher, Catch::ResultDisposition::ContinueOnFailure, arg ) + + #define REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg ) + #endif // CATCH_CONFIG_DISABLE_MATCHERS + + #define INFO( msg ) INTERNAL_CATCH_INFO( "INFO", msg ) + #define UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( "UNSCOPED_INFO", msg ) + #define WARN( msg ) INTERNAL_CATCH_MSG( "WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg ) + #define CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CAPTURE",__VA_ARGS__ ) + + #define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ ) + #define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ ) + #define METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ ) + #define REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ ) + #define SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ ) + #define DYNAMIC_SECTION( ... ) INTERNAL_CATCH_DYNAMIC_SECTION( __VA_ARGS__ ) + #define FAIL( ... ) INTERNAL_CATCH_MSG( "FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ) + #define FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define SUCCEED( ... ) INTERNAL_CATCH_MSG( "SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) + #define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE() + + #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR + #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) + #define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) + #define TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) + #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) + #else + #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) ) + #define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) ) + #define TEMPLATE_PRODUCT_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE( __VA_ARGS__ ) ) + #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, __VA_ARGS__ ) ) + #endif + + #if !defined(CATCH_CONFIG_RUNTIME_STATIC_REQUIRE) + #define STATIC_REQUIRE( ... ) static_assert( __VA_ARGS__, #__VA_ARGS__ ); SUCCEED( #__VA_ARGS__ ) + #define STATIC_REQUIRE_FALSE( ... ) static_assert( !(__VA_ARGS__), "!(" #__VA_ARGS__ ")" ); SUCCEED( "!(" #__VA_ARGS__ ")" ) + #else + #define STATIC_REQUIRE( ... ) REQUIRE( __VA_ARGS__ ) + #define STATIC_REQUIRE_FALSE( ... ) REQUIRE_FALSE( __VA_ARGS__ ) + #endif + + #endif + + #define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature ) + +// "BDD-style" convenience wrappers + #define SCENARIO( ... ) TEST_CASE( "Scenario: " __VA_ARGS__ ) + #define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ ) + + #define GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " Given: " << desc ) + #define AND_GIVEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( "And given: " << desc ) + #define WHEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " When: " << desc ) + #define AND_WHEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " And when: " << desc ) + #define THEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " Then: " << desc ) + #define AND_THEN( desc ) INTERNAL_CATCH_DYNAMIC_SECTION( " And: " << desc ) + +using Catch::Detail::Approx; + + #else // CATCH_CONFIG_DISABLE + +////// +// If this config identifier is defined then all CATCH macros are prefixed with CATCH_ + #ifdef CATCH_CONFIG_PREFIX_ALL + + #define CATCH_REQUIRE( ... ) (void)(0) + #define CATCH_REQUIRE_FALSE( ... ) (void)(0) + + #define CATCH_REQUIRE_THROWS( ... ) (void)(0) + #define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) (void)(0) + #define CATCH_REQUIRE_THROWS_WITH( expr, matcher ) (void)(0) + #if !defined(CATCH_CONFIG_DISABLE_MATCHERS) + #define CATCH_REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0) + #endif// CATCH_CONFIG_DISABLE_MATCHERS + #define CATCH_REQUIRE_NOTHROW( ... ) (void)(0) + + #define CATCH_CHECK( ... ) (void)(0) + #define CATCH_CHECK_FALSE( ... ) (void)(0) + #define CATCH_CHECKED_IF( ... ) if (__VA_ARGS__) + #define CATCH_CHECKED_ELSE( ... ) if (!(__VA_ARGS__)) + #define CATCH_CHECK_NOFAIL( ... ) (void)(0) + + #define CATCH_CHECK_THROWS( ... ) (void)(0) + #define CATCH_CHECK_THROWS_AS( expr, exceptionType ) (void)(0) + #define CATCH_CHECK_THROWS_WITH( expr, matcher ) (void)(0) + #if !defined(CATCH_CONFIG_DISABLE_MATCHERS) + #define CATCH_CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0) + #endif // CATCH_CONFIG_DISABLE_MATCHERS + #define CATCH_CHECK_NOTHROW( ... ) (void)(0) + + #if !defined(CATCH_CONFIG_DISABLE_MATCHERS) + #define CATCH_CHECK_THAT( arg, matcher ) (void)(0) + + #define CATCH_REQUIRE_THAT( arg, matcher ) (void)(0) + #endif // CATCH_CONFIG_DISABLE_MATCHERS + + #define CATCH_INFO( msg ) (void)(0) + #define CATCH_WARN( msg ) (void)(0) + #define CATCH_CAPTURE( msg ) (void)(0) + + #define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) + #define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) + #define CATCH_METHOD_AS_TEST_CASE( method, ... ) + #define CATCH_REGISTER_TEST_CASE( Function, ... ) (void)(0) + #define CATCH_SECTION( ... ) + #define CATCH_DYNAMIC_SECTION( ... ) + #define CATCH_FAIL( ... ) (void)(0) + #define CATCH_FAIL_CHECK( ... ) (void)(0) + #define CATCH_SUCCEED( ... ) (void)(0) + + #define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) + + #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR + #define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) ) + #define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), className ) + #define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) + #define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) + #else + #define CATCH_TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) ) ) + #define CATCH_TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), className ) ) + #define CATCH_TEMPLATE_PRODUCT_TEST_CASE( ... ) CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ ) + #define CATCH_TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) CATCH_TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) + #endif + +// "BDD-style" convenience wrappers + #define CATCH_SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) + #define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), className ) + #define CATCH_GIVEN( desc ) + #define CATCH_AND_GIVEN( desc ) + #define CATCH_WHEN( desc ) + #define CATCH_AND_WHEN( desc ) + #define CATCH_THEN( desc ) + #define CATCH_AND_THEN( desc ) + + #define CATCH_STATIC_REQUIRE( ... ) (void)(0) + #define CATCH_STATIC_REQUIRE_FALSE( ... ) (void)(0) + +// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required + #else + + #define REQUIRE( ... ) (void)(0) + #define REQUIRE_FALSE( ... ) (void)(0) + + #define REQUIRE_THROWS( ... ) (void)(0) + #define REQUIRE_THROWS_AS( expr, exceptionType ) (void)(0) + #define REQUIRE_THROWS_WITH( expr, matcher ) (void)(0) + #if !defined(CATCH_CONFIG_DISABLE_MATCHERS) + #define REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0) + #endif // CATCH_CONFIG_DISABLE_MATCHERS + #define REQUIRE_NOTHROW( ... ) (void)(0) + + #define CHECK( ... ) (void)(0) + #define CHECK_FALSE( ... ) (void)(0) + #define CHECKED_IF( ... ) if (__VA_ARGS__) + #define CHECKED_ELSE( ... ) if (!(__VA_ARGS__)) + #define CHECK_NOFAIL( ... ) (void)(0) + + #define CHECK_THROWS( ... ) (void)(0) + #define CHECK_THROWS_AS( expr, exceptionType ) (void)(0) + #define CHECK_THROWS_WITH( expr, matcher ) (void)(0) + #if !defined(CATCH_CONFIG_DISABLE_MATCHERS) + #define CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0) + #endif // CATCH_CONFIG_DISABLE_MATCHERS + #define CHECK_NOTHROW( ... ) (void)(0) + + #if !defined(CATCH_CONFIG_DISABLE_MATCHERS) + #define CHECK_THAT( arg, matcher ) (void)(0) + + #define REQUIRE_THAT( arg, matcher ) (void)(0) + #endif // CATCH_CONFIG_DISABLE_MATCHERS + + #define INFO( msg ) (void)(0) + #define WARN( msg ) (void)(0) + #define CAPTURE( msg ) (void)(0) + + #define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) + #define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) + #define METHOD_AS_TEST_CASE( method, ... ) + #define REGISTER_TEST_CASE( Function, ... ) (void)(0) + #define SECTION( ... ) + #define DYNAMIC_SECTION( ... ) + #define FAIL( ... ) (void)(0) + #define FAIL_CHECK( ... ) (void)(0) + #define SUCCEED( ... ) (void)(0) + #define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) + + #ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR + #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) ) + #define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), className ) + #define TEMPLATE_PRODUCT_TEST_CASE( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ ) + #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) + #else + #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ) ) ) + #define TEMPLATE_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_EXPAND_VARGS( INTERNAL_CATCH_TEMPLATE_TEST_CASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_M_P_L_A_T_E____T_E_S_T____ ), className ) ) + #define TEMPLATE_PRODUCT_TEST_CASE( ... ) TEMPLATE_TEST_CASE( __VA_ARGS__ ) + #define TEMPLATE_PRODUCT_TEST_CASE_METHOD( className, ... ) TEMPLATE_TEST_CASE_METHOD( className, __VA_ARGS__ ) + #endif + + #define STATIC_REQUIRE( ... ) (void)(0) + #define STATIC_REQUIRE_FALSE( ... ) (void)(0) + + #endif + + #define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature ) + +// "BDD-style" convenience wrappers + #define SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ) ) + #define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), className ) + + #define GIVEN( desc ) + #define AND_GIVEN( desc ) + #define WHEN( desc ) + #define AND_WHEN( desc ) + #define THEN( desc ) + #define AND_THEN( desc ) + +using Catch::Detail::Approx; + + #endif + + #endif // ! CATCH_CONFIG_IMPL_ONLY + +// start catch_reenable_warnings.h + + + #ifdef __clang__ + # ifdef __ICC // icpc defines the __clang__ macro + # pragma warning(pop) + # else + # pragma clang diagnostic pop + # endif + #elif defined __GNUC__ + # pragma GCC diagnostic pop + #endif + +// end catch_reenable_warnings.h +// end catch.hpp +#endif // TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED diff --git a/Sourcecode/private/extern/ezxml/src/test/Files.h b/Sourcecode/private/extern/ezxml/src/test/Files.h new file mode 100644 index 000000000..b30c0d8a7 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/test/Files.h @@ -0,0 +1,60 @@ +#include "Path.h" + +namespace ezxmltest +{ + constexpr const char* const FREEZING_SMALL = "freezing-small.xml"; + constexpr const char* const SIMPLE = "simple.xml"; + +#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) + constexpr const char* const SLASH = "\\"; +#else + constexpr const char* const SLASH = "/"; +#endif + + constexpr const char* const TEST_DATA_DIRNAME = "testdata"; + constexpr const char* const TEST_INPUT_DIRNAME = "xml"; + constexpr const char* const TEST_OUTPUT_DIRNAME = "out"; + + + inline std::string + slash() + { + return std::string{ SLASH }; + } + + + inline std::string + inputDirname() + { + return std::string{ TEST_DATA_DIRNAME } + slash() + std::string{ TEST_INPUT_DIRNAME }; + } + + + inline std::string + root() + { + std::string r = EZXML_ROOT; + return r; + } + + + inline std::string + inpath() + { + auto r = root(); + auto s = slash(); + auto idir = inputDirname(); + auto i = r + s + idir; + return i; + } + + + inline std::string + filepath( const std::string& filename ) + { + auto i = inpath(); + auto s = slash(); + auto fp = i + s + filename; + return fp; + } +} \ No newline at end of file diff --git a/Sourcecode/private/extern/ezxml/src/test/Path.h b/Sourcecode/private/extern/ezxml/src/test/Path.h new file mode 100644 index 000000000..11f727029 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/test/Path.h @@ -0,0 +1,13 @@ +// ezxml, Copyright 2019 by Matthew James Briggs +// This file is auto generated by CMake +#pragma once + +// The absolute path to the root of the repository. +#ifndef EZXML_ROOT +#define EZXML_ROOT "/Users/brigmatt/repos/mx/Sourcecode/private/extern/ezxml" +#endif + +// The absolute path to the binary output directory. +#ifndef EZXML_BIN +#define EZXML_BIN "/Users/brigmatt/repos/mx/cmake-build-debug" +#endif diff --git a/Sourcecode/private/extern/ezxml/src/test/TestFreezing.cpp b/Sourcecode/private/extern/ezxml/src/test/TestFreezing.cpp new file mode 100644 index 000000000..72db5abd0 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/test/TestFreezing.cpp @@ -0,0 +1,87 @@ +#include + +#include "Catch.h" +#include "ezxml/ezxml.h" +#include "Files.h" +#include "equal.h" + +TEST_CASE( "FreezingTest" ) +{ + using namespace ezxml; + using namespace ezxmltest; + const auto fp = filepath( FREEZING_SMALL ); + auto xdocOriginal = XFactory::makeXDoc(); + xdocOriginal->loadFile( fp ); + auto xdoc = std::move( xdocOriginal ); + + const auto& root = xdoc->getRoot(); + auto str = root->getName(); + CHECK( "score-partwise" == str ); + auto aiter = root->attributesBegin(); + auto aend = root->attributesEnd(); + REQUIRE( aiter != aend ); + str = aiter->getName(); + CHECK( "version" == str ); + str = aiter->getValue(); + CHECK( "3.0" == str ); + ++aiter; + CHECK( aend == aiter ); + + auto iter = root->begin(); + + // drill down to some random place and check a few values + ++iter; + ++iter; + ++iter; + ++iter; + ++iter; + ++iter; + ++iter; + ++iter; + ++iter; + ++iter; + ++iter; + ++iter; + ++iter; + iter = iter->begin(); + iter = iter->begin(); + const auto name = iter->getName(); + CHECK( "print" == name ); + auto printAttributesIter = iter->attributesBegin(); + const auto printAttributesEnd = iter->attributesEnd(); + REQUIRE( printAttributesIter != printAttributesEnd ); + CHECK( "blank-page" == printAttributesIter->getName() ); + CHECK( "4" == printAttributesIter->getValue() ); + ++printAttributesIter; + REQUIRE( printAttributesIter != printAttributesEnd ); + CHECK( "new-page" == printAttributesIter->getName() ); + CHECK( "yes" == printAttributesIter->getValue() ); + ++printAttributesIter; + CHECK( printAttributesIter == printAttributesEnd ); + REQUIRE( iter->begin() != iter->end() ); + CHECK( "system-layout" == iter->begin()->getName() ); + + // round-trip the file and make sure it didn't change + std::stringstream saveStream; + xdoc->saveStream( saveStream ); + auto xmlStr = saveStream.str(); + std::istringstream iss{ xmlStr }; + auto reified = XFactory::makeXDoc(); + reified->loadStream( iss ); + CHECK( equal( xdoc, reified ).empty() ); + + // prove that our equality function would actually catch an inequality in the file + size_t start_pos = 0; + const std::string replaceable = "Freezing"; + const std::string replaceWith = "Breezing"; + while( ( start_pos = xmlStr.find( replaceable, start_pos ) ) != std::string::npos ) + { + xmlStr.replace( start_pos, replaceable.length(), replaceWith ); + start_pos += replaceWith.length(); + } + auto reifiedWrong = XFactory::makeXDoc(); + std::istringstream issWrong{ xmlStr }; + reifiedWrong->loadStream( issWrong ); + CHECK( "score-partwise/movement-title: element values not equal: Freezing Pieces vs Breezing Pieces" == + equal( xdoc, reifiedWrong ) ); +} \ No newline at end of file diff --git a/Sourcecode/private/extern/ezxml/src/test/TestProcessingInstructions.cpp b/Sourcecode/private/extern/ezxml/src/test/TestProcessingInstructions.cpp new file mode 100644 index 000000000..774fc93b5 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/test/TestProcessingInstructions.cpp @@ -0,0 +1,98 @@ +#include + +#include "Catch.h" +#include "ezxml/ezxml.h" +#include "Files.h" + +namespace ezxmltest +{ + struct Instruction + { + std::string name; + std::string value; + int elementNodeID{}; + }; + + using Instructions = std::vector; + + + inline void + recurse( const ezxml::XElement& current, int currentNodeID, Instructions& ioInstructions ) + { + const auto name = current.getName(); + if( current.getIsProcessingInstruction() ) + { + Instruction i; + i.name = current.getName(); + i.value = current.getValue(); + i.elementNodeID = currentNodeID; + ioInstructions.emplace_back( std::move( i ) ); + } + const auto xtype = current.getType(); + if( xtype == ezxml::XElementType::element ) + { + auto iter = current.beginWithProcessingInstructions(); + int childNodeID = currentNodeID + 1; + const auto end = current.end(); + for( ; iter != end; ++iter, ++childNodeID ) + { + recurse( *iter, childNodeID, ioInstructions ); + } + } + } + +} + +TEST_CASE( "SimpleProcessingInstruction" ) +{ + using namespace ezxml; + using namespace ezxmltest; + const auto fp = filepath( SIMPLE ); + const auto xdoc = XFactory::makeXDoc(); + xdoc->loadFile( fp ); + const auto root = xdoc->getRoot(); + Instructions instructions; + ezxmltest::recurse( *root, 0, instructions ); + REQUIRE( 1 == instructions.size() ); + const auto& instruction = instructions.at( 0 ); + CHECK( "InstructionName" == instruction.name ); + CHECK( "InstructionValue" == instruction.value ); + CHECK( 2 == instruction.elementNodeID ); +} + + +TEST_CASE( "FreezingProcessingInstructions" ) +{ + using namespace ezxml; + using namespace ezxmltest; + const auto fp = filepath( FREEZING_SMALL ); + const auto xdoc = XFactory::makeXDoc(); + xdoc->loadFile( fp ); + const auto root = xdoc->getRoot(); + Instructions instructions; + ezxmltest::recurse( *root, 0, instructions ); + REQUIRE( 4 == instructions.size() ); + size_t index = 0; + auto instruction = instructions.at( index ); + CHECK( "DoletFinale" == instruction.name ); + CHECK( "Unknown text expression 31 at part P4, measure X1, edu 3072" == instruction.value ); + CHECK( 23 == instruction.elementNodeID ); + + index = 1; + instruction = instructions.at( index ); + CHECK( "DoletFinale" == instruction.name ); + CHECK( "Unknown text expression 31 at part P4, measure X3, edu 3072" == instruction.value ); + CHECK( 27 == instruction.elementNodeID ); + + index = 2; + instruction = instructions.at( index ); + CHECK( "DoletFinale" == instruction.name ); + CHECK( "Unknown text expression 31 at part P4, measure X6, edu 512" == instruction.value ); + CHECK( 27 == instruction.elementNodeID ); + + index = 3; + instruction = instructions.at( index ); + CHECK( "DoletFinale" == instruction.name ); + CHECK( "Unknown text expression 31 at part P4, measure X7, edu 1536" == instruction.value ); + CHECK( 28 == instruction.elementNodeID ); +} \ No newline at end of file diff --git a/Sourcecode/private/extern/ezxml/src/test/TestXDoc.cpp b/Sourcecode/private/extern/ezxml/src/test/TestXDoc.cpp new file mode 100644 index 000000000..b7ec210f2 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/test/TestXDoc.cpp @@ -0,0 +1,47 @@ +#include + +#include "Catch.h" +#include "ezxml/ezxml.h" + +static constexpr const char* const xml = R"( + + blerp + bleep + +)"; + +TEST_CASE( "basic_xml", "1" ) +{ + std::istringstream iss{ xml }; + auto xdoc = ezxml::XFactory::makeXDoc(); + xdoc->loadStream( iss ); + auto root = xdoc->getRoot(); + CHECK( "whatever" == root->getName() ); + auto aiter = root->attributesBegin(); + const auto aend = root->attributesEnd(); + REQUIRE( aiter != aend ); + CHECK( "abc" == aiter->getName() ); + CHECK( "def" == aiter->getValue() ); + ++aiter; + REQUIRE( aiter != aend ); + CHECK( "ghi" == aiter->getName() ); + CHECK( "jkl" == aiter->getValue() ); + ++aiter; + REQUIRE( aiter == aend ); + + auto chiter = root->begin(); + const auto chend = root->end(); + REQUIRE( chiter != chend ); + REQUIRE( ezxml::XElementType::text == chiter->getType() ); + CHECK( "bloop" == chiter->getName() ); + CHECK( "blerp" == chiter->getValue() ); + + ++chiter; + REQUIRE( chiter != chend ); + REQUIRE( ezxml::XElementType::text == chiter->getType() ); + CHECK( "bloop" == chiter->getName() ); + CHECK( "bleep" == chiter->getValue() ); + + ++chiter; + REQUIRE( chiter == chend ); +} \ No newline at end of file diff --git a/Sourcecode/private/extern/ezxml/src/test/equal.h b/Sourcecode/private/extern/ezxml/src/test/equal.h new file mode 100644 index 000000000..a9673fd57 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/test/equal.h @@ -0,0 +1,222 @@ +#pragma once + +#include "ezxml/ezxml.h" + +namespace ezxmltest +{ + inline std::string + elementsEqual( const std::string& inParentName, const ezxml::XElement& a, const ezxml::XElement& b ); + + inline std::string + attributesEqual( + const std::string& inParentName, + ezxml::XAttributeIterator aitera, + const ezxml::XAttributeIterator& aenda, + ezxml::XAttributeIterator aiterb, + const ezxml::XAttributeIterator& aendb + ); + + + inline std::string + elementsEqual( + const std::string& inParentName, + ezxml::XElementIterator eitera, + const ezxml::XElementIterator& eenda, + ezxml::XElementIterator eiterb, + const ezxml::XElementIterator& eendb + ) + { + bool sameEndish = ( eitera == eenda ) == ( eiterb == eendb ); + + if( !sameEndish ) + { + return inParentName + ": one had zero children while the other had some children"; + } + + for( ; ( eitera != eenda ) && ( eiterb != eendb ); ++eitera, ++eiterb ) + { + if( eitera.getIsPayloadNull() || eiterb.getIsPayloadNull() ) + { + return inParentName + ": cannot proceed due to null xelement"; + } + + const auto result = elementsEqual( inParentName, *eitera, *eiterb ); + + if( !result.empty() ) + { + return result; + } + } + + sameEndish = ( eitera == eenda ) == ( eiterb == eendb ); + + if( !sameEndish ) + { + return inParentName + ": had different numbers of children"; + } + + return ""; + } + + + inline std::string + attributesEqual( + const std::string& inParentName, + ezxml::XAttributeIterator aitera, + const ezxml::XAttributeIterator& aenda, + ezxml::XAttributeIterator aiterb, + const ezxml::XAttributeIterator& aendb + ) + { + bool sameEndish = ( aitera == aenda ) == ( aiterb == aendb ); + + if( !sameEndish ) + { + return inParentName + ": one had zero attributes while the other had some attributes"; + } + + for( ; ( aitera != aenda ) && ( aiterb != aendb ); ++aitera, ++aiterb ) + { + if( aitera->getName() != aiterb->getName() ) + { + return inParentName + ": differing attribute names found, " + aitera->getName() + " vs " + + aiterb->getName(); + } + + if( aitera->getValue() != aiterb->getValue() ) + { + return inParentName + ": differing attribute values found, " + aitera->getValue() + " vs " + + aiterb->getValue(); + } + + } + + sameEndish = ( aitera == aenda ) == ( aiterb == aendb ); + + if( !sameEndish ) + { + return inParentName + ": had different numbers of attributes"; + } + + return ""; + } + + + inline std::string + elementsEqual( const std::string& inParentName, const ezxml::XElement& a, const ezxml::XElement& b ) + { + const auto myName = a.getName(); + + if( myName != b.getName() ) + { + return inParentName + "/" + myName + ": element names not equal: " + myName + " vs " + b.getName(); + } + + if( a.getType() != b.getType() ) + { + return inParentName + + "/" + + a.getName() + + ": element types not equal: " + + ezxml::toString( a.getType() ) + " vs " + + ezxml::toString( b.getType() ); + } + + auto aitera = a.attributesBegin(); + const auto aenda = a.attributesEnd(); + auto aiterb = b.attributesBegin(); + const auto aendb = b.attributesEnd(); + + const auto attributeResult = attributesEqual( a.getName(), aitera, aenda, aiterb, aendb ); + + if( !attributeResult.empty() ) + { + return attributeResult; + } + + if( a.getType() == ezxml::XElementType::element ) + { + auto eitera = a.begin(); + const auto eenda = a.end(); + auto eiterb = b.begin(); + const auto eendb = b.end(); + + const auto childrenResult = elementsEqual( a.getName(), eitera, eenda, eiterb, eendb ); + + if( !childrenResult.empty() ) + { + return childrenResult; + } + } + else if( a.getType() == ezxml::XElementType::text ) + { + const auto myVal = a.getValue(); + + if( myVal != b.getValue() ) + { + return inParentName + "/" + myName + ": element values not equal: " + myVal + " vs " + b.getValue(); + } + } + + return ""; + } + + + inline std::string + equal( const ezxml::XDocPtr& a, const ezxml::XDocPtr& b ) + { + using namespace ezxml; + + if( a == nullptr || b == nullptr ) + { + return "cannot proceed due to null xdoc"; + } + + if( a->getXmlVersion() != b->getXmlVersion() ) + { + return "xml-versions not equal"; + } + + if( a->getEncoding() != b->getEncoding() ) + { + return "getEncoding not equal"; + } + + if( a->getHasStandaloneAttribute() != b->getHasStandaloneAttribute() ) + { + return "getHasStandaloneAttribute not equal"; + } + + if( a->getIsStandalone() != b->getIsStandalone() ) + { + return "getIsStandalone not equal"; + } + + if( a->getHasDoctypeDeclaration() != b->getHasDoctypeDeclaration() ) + { + return "getHasDoctypeDeclaration not equal"; + } + + if( a->getDoctypeValue() != b->getDoctypeValue() ) + { + return "getDoctypeValue not equal"; + } + + const auto roota = a->getRoot(); + const auto rootb = b->getRoot(); + + if( roota == nullptr || rootb == nullptr ) + { + return "cannot proceed due to a null root"; + } + + const auto result = elementsEqual( "document", *roota, *rootb ); + + if( !result.empty() ) + { + return result; + } + + return ""; + } +} \ No newline at end of file diff --git a/Sourcecode/private/extern/ezxml/src/test/main.cpp b/Sourcecode/private/extern/ezxml/src/test/main.cpp new file mode 100644 index 000000000..8c54e4078 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/src/test/main.cpp @@ -0,0 +1,3 @@ +#define CATCH_CONFIG_MAIN +#include "Catch.h" +#undef CATCH_CONFIG_MAIN \ No newline at end of file diff --git a/Sourcecode/private/extern/ezxml/testdata/.keep b/Sourcecode/private/extern/ezxml/testdata/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/Sourcecode/private/extern/ezxml/testdata/xml/freezing-small.xml b/Sourcecode/private/extern/ezxml/testdata/xml/freezing-small.xml new file mode 100644 index 000000000..4597c99a2 --- /dev/null +++ b/Sourcecode/private/extern/ezxml/testdata/xml/freezing-small.xml @@ -0,0 +1,7316 @@ + + + + Freezing Pieces + + Matthew James Briggs + Copyright © 2001 Matthew James Briggs (ASCAP) + + Finale for Mac + 2016-10-12 + + + + + + + + + + 5.1153 + 40 + + + 2383 + 1788 + + 129 + 129 + 129 + 129 + + + + + 173 + 1434 + + 213 + 134 + + + 93 + + + 0.957 + 5.0065 + 0.957 + 0.957 + 5.0391 + 0.957 + 0.957 + 0.957 + 0.957 + 0.957 + 50 + 50 + 60 + 8 + + + + + + composer + ©2001 by + + Matthew James Briggs + + + I. +II. +III. +IV. +V. + + + Glacier +Northeast Harbor, Snowbound +March of the Polar Bears +Lonely Icicle +Melting Piece + + + For six musicians + + + title + Freezing Pieces + + + Instrumentation + + +Viola + +Bass Clarinet + +Percussion 1: +Glockenspiel, Tam-Tam, Suspended Metal Plate, +Tamborine, Metal Wind Chimes Made With Keys, +Crash Cymbals, Bass Drum, Triangle + +Percussion 2: +Glockenspiel, 2 Suspended Cymbals, 2 Suspended Metal Plates, +Bass Drum, Glass Wind Chimes, Tamborine + +Harp + +Celesta + +Piano + + +Note: None of the percussion instruments may be shared + + + + + Transposed Score + + + rights + Copyright © 2001 Matthew James Briggs (ASCAP) + + + page number + 2 + + + + Viola + Vla. + + viola + strings.viola + + + + Bank 1 + + 1 + 10 + 42 + 72 + 0 + + + + Bass Clarinet + B.Cl. + + b cl + + + Bank 1 + + 2 + 10 + 72 + 80 + 0 + + + + bracket + no + + + Percussion 1 + Prc. 1 + + glock1 + + + Bank 1 + + 3 + 10 + 10 + 74 + 0 + + + + Percussion 2 + Prc. 2 + + glock2 + + + Bank 1 + + 4 + 10 + 10 + 75 + 0 + + + + + Harp + Hp. + brace + yes + + + Harp RH + + harp + pluck.harp + + + Bank 1 + + 5 + 10 + 47 + 80 + 0 + + + + Harp LH + + harp + pluck.harp + + + Bank 1 + + 5 + 10 + 47 + 80 + 0 + + + + + Piano + Pno. + brace + yes + + + Celesta + Cel. + brace + yes + + + Celesta RH + Cel. + + celesta real + keyboard.piano + + + Bank 1 + + 6 + 10 + 1 + 80 + -49 + + + + Celesta LH + + celesta real + keyboard.piano + + + Bank 1 + + 6 + 10 + 1 + 80 + -49 + + + + + + + + + + + + 199 + 0 + + 111 + + + + 24 + + 0 + + + + C + 3 + + + + + + quarter + 48 + + + + + + + I. Glacier + + + + + 96 + 1 + + + + + + + 96 + 1 + + + + + + + 96 + 1 + + + + + + + 96 + 1 + + + + + + + + 90 + 0 + + 107 + + + + + 96 + 1 + + + + + + + 0 + major + + + + + 96 + 1 + + + + + + + + + + + + + + sul pont + + + + + D + 4 + + 96 + + 1 + whole + + + + 3 + + + + + + + + + + B + -1 + 5 + + 96 + + 1 + whole + flat + + + + + + + + + + D + 4 + + 12 + + 1 + eighth + down + begin + + + + 3 + + + + + + + B + -1 + 5 + + 12 + + 1 + eighth + down + + + + + + + + + + + + + + D + 4 + + 12 + + 1 + eighth + down + end + + + + 3 + + + + + + + + + + B + -1 + 5 + + 12 + + 1 + eighth + flat + down + + + + + + + + + -4 + + + + D + 4 + + 24 + + + 1 + quarter + down + + + + + 3 + + + + + + + B + -1 + 5 + + 24 + + + 1 + quarter + down + + + + + + + + D + 4 + + 16 + + 1 + quarter + + 3 + 2 + eighth + + down + + + + + 3 + + + + + + + B + -1 + 5 + + 16 + + 1 + quarter + + 3 + 2 + eighth + + down + + + + + + + + + -9 + + + + +

+ + + + + + D + 4 + + 8 + + 1 + eighth + + 3 + 2 + eighth + + down + + + + + 3 + + + + + + + + + + B + -1 + 5 + + 8 + + 1 + eighth + + 3 + 2 + eighth + + down + + + + + + + + + -3 + + + + D + 4 + + 18 + + 1 + eighth + + down + + + + 3 + + + + + + + B + -1 + 5 + + 18 + + 1 + eighth + + down + + + + + + + 6 + 1 + 16th + + + + + + + + 90 + 0 + + 40 + + + + + + + + + + + + + + + + + D + 4 + + 48 + 1 + half + down + + + 3 + + + + + + + + + + B + -1 + 5 + + 48 + 1 + half + flat + down + + + + + + -38 + + + + + + -10 + + + + + + + + + + + D + 4 + + 48 + + 1 + half + down + + + + 3 + + + + + + + + + + B + -1 + 5 + + 48 + + 1 + half + down + + + + + + + + + -36 + + + + + + + D + 4 + + 24 + + 1 + quarter + down + + + + 3 + + + + + + + B + -1 + 5 + + 24 + + 1 + quarter + down + + + + + + + + + -12 + + + + + + + + + + + D + 4 + + 8 + 1 + eighth + + 3 + 2 + + down + begin + + + + + + + + + + + B + -1 + 5 + + 8 + 1 + eighth + flat + + 3 + 2 + + down + + + + + + 3 + + + + D + 4 + + 8 + 1 + eighth + + 3 + 2 + + down + continue + + + + + + + + + + B + -1 + 5 + + 8 + 1 + eighth + + 3 + 2 + + down + + + + D + 4 + + 8 + + 1 + eighth + + 3 + 2 + + down + end + + + + + + + + + + + + B + -1 + 5 + + 8 + + 1 + eighth + + 3 + 2 + + down + + + + + + + D + 4 + + 48 + + 1 + half + down + + + + 3 + + + + + + + B + -1 + 5 + + 48 + + 1 + half + down + + + + + + + + + + 0 + + + + + + + + + + 96 + 1 + + + + + + + 96 + 1 + + + + + + + + + 65 + + + + 24 + + 0 + + + + G + 2 + + + -1 + -2 + -1 + + + + + 96 + 1 + + + + + + + 96 + 1 + + + + + + + 96 + 1 + + + + + + + 96 + 1 + + + + + + + 128 + + + + + 96 + 1 + + + + + + + 0 + major + + + + + 96 + 1 + + + + + + + 48 + 1 + half + + + + 24 + 1 + quarter + + + + + C + 1 + 6 + + 1 + quarter + sharp + up + + + + + + + + -1 + + + + B + 5 + + 24 + + 1 + quarter + down + + + + + + + + + + + + + -16 + + + + + + + B + 5 + + 24 + + 1 + quarter + down + + + + + + + + + -3 + + + + 6 + 1 + 16th + + + + + + + + + +

+ + + + + + B + 5 + + 18 + + 1 + eighth + + down + + + + + + + + + + + + + + + + -6 + + + + B + 5 + + 48 + + + 1 + half + down + + + + + + + + + + + 141 + + + + + B + 5 + + 8 + + 1 + eighth + + 3 + 2 + + down + + + + + + + + + + + + + -3 + + + + + + + + + + + B + 5 + + 16 + + 1 + quarter + + 3 + 2 + + down + + + + + + + + + + + + + + + + + -3 + + + + B + 5 + + 72 + + 1 + half + + down + + + + + + + + + + + + + + + + + + + + + + + + + B + 5 + + 96 + 1 + whole + + + + + + + + + + + + + + + + -70 + + + + + + -3 + + + + + + + 0 + + + + + 96 + 1 + + + + + + + 96 + 1 + + + + + + + + + 87 + + + + 60 + + 0 + major + + + + G + 2 + + + + + + + + + + + + Glock + + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + B + -1 + 4 + + 40 + 1 + quarter + flat + + 3 + 2 + + down + + + + + + + sempre l.v. + + -35 + + + + 60 + 1 + quarter + + + + 24 + 1 + eighth + + 5 + 4 + 16th + + + + + + + + F + 4 + + 36 + 1 + eighth + + + 5 + 4 + 16th + + up + + + + + + + 30 + 1 + eighth + + + + E + -1 + 4 + + 30 + 1 + eighth + flat + up + + + + + + + G + 5 + + 15 + 1 + 16th + down + begin + forward hook + + + + F + 1 + 4 + + 45 + 1 + eighth + + sharp + down + end + + + + A + -1 + 4 + + 30 + 1 + eighth + flat + down + begin + + + + E + 5 + + 30 + 1 + eighth + natural + down + end + + + + 15 + 1 + 16th + + + + F + 1 + 5 + + 45 + 1 + eighth + + sharp + down + + + + A + 5 + + 20 + 1 + eighth + + 3 + 2 + + down + + + + + + + B + 5 + + 40 + 1 + quarter + + 3 + 2 + + down + + + + + + + + + + C + 1 + 5 + + 15 + 1 + 16th + sharp + down + begin + forward hook + + + + D + 5 + + 45 + 1 + eighth + + down + end + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + B + -1 + 5 + + 40 + 1 + quarter + flat + + 3 + 2 + + down + + + + + + + 12 + 1 + 16th + + 5 + 4 + + + + + + + + A + -1 + 4 + + 24 + 1 + eighth + flat + + 5 + 4 + + down + begin + + + + G + 5 + + 24 + 1 + eighth + natural + + 5 + 4 + + down + end + + + + + + + 30 + 1 + eighth + + + + C + 6 + + 30 + 1 + eighth + natural + down + + + + + + + C + 1 + 4 + + 24 + 1 + eighth + sharp + + 5 + 4 + 16th + + up + begin + + + + + + + G + 4 + + 24 + 1 + eighth + + 5 + 4 + 16th + + up + continue + + + + A + 4 + + 12 + 1 + 16th + + 5 + 4 + 16th + + up + end + backward hook + + + + + + + B + 4 + + 60 + 1 + quarter + down + + + + + F + 4 + + 1 + 16th + up + + + + E + 5 + + 45 + 1 + eighth + + down + begin + + + + G + 5 + + 15 + 1 + 16th + natural + down + end + backward hook + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + B + 4 + + 40 + 1 + quarter + + 3 + 2 + + down + + + + + + + + + + 85 + + + + + F + 1 + 4 + + 15 + 1 + 16th + sharp + down + begin + forward hook + + + + E + 5 + + 45 + 1 + eighth + + down + end + + + + 12 + 1 + 16th + + 5 + 4 + + + + + + + + A + -1 + 4 + + 24 + 1 + eighth + flat + + 5 + 4 + + down + begin + + + + F + 5 + + 24 + 1 + eighth + natural + + 5 + 4 + + down + end + + + + + + + C + 6 + + 60 + 1 + quarter + down + + + + G + -1 + 5 + + 20 + 1 + eighth + flat + + 3 + 2 + + down + + + + + + + B + -1 + 4 + + 40 + 1 + quarter + flat + + 3 + 2 + + down + + + + + + + + + + 30 + 1 + eighth + + + + C + 4 + + 30 + 1 + eighth + up + + + + B + 4 + + 15 + 1 + 16th + down + begin + forward hook + + + + G + -1 + 5 + + 45 + 1 + eighth + + flat + down + end + + + + 30 + 1 + eighth + + + + A + 4 + + 30 + 1 + eighth + up + + + + 30 + 1 + eighth + + + + E + -1 + 4 + + 30 + 1 + eighth + flat + up + + + + + + + 40 + 1 + quarter + + 3 + 2 + eighth + + + + + + + + C + 4 + + 20 + 1 + eighth + + 3 + 2 + eighth + + up + + + + + + + D + -1 + 4 + + 45 + 1 + eighth + + flat + up + begin + + + + B + -1 + 4 + + 15 + 1 + 16th + flat + up + end + backward hook + + + + 60 + 1 + quarter + + + + 15 + 1 + 16th + + + + E + 5 + + 15 + 1 + 16th + natural + down + begin + forward hook + + + + B + 4 + + 30 + 1 + eighth + natural + down + end + + + + + + + 30 + 1 + eighth + + + + A + 4 + + 30 + 1 + eighth + up + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + F + 5 + + 40 + 1 + quarter + + 3 + 2 + + down + + + + + + + D + 5 + + 15 + 1 + 16th + up + begin + forward hook + + + + + + + + + + + F + 1 + 4 + + 45 + 1 + eighth + + sharp + up + end + + + + + + + + + + + + + -4 + + + + A + 4 + + 40 + 1 + quarter + + 3 + 2 + eighth + + up + + + + + + + B + -1 + 4 + + 20 + 1 + eighth + flat + + 3 + 2 + eighth + + down + + + + + + + + + + 84 + + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + G + 4 + + 20 + 1 + eighth + + 3 + 2 + + down + begin + + + + G + -1 + 5 + + 20 + 1 + eighth + flat + + 3 + 2 + + down + end + + + + + + + 15 + 1 + 16th + + + + B + -1 + 4 + + 15 + 1 + 16th + flat + up + begin + forward hook + + + + D + 4 + + 30 + 1 + eighth + up + end + + + + E + -1 + 4 + + 60 + 1 + quarter + flat + up + + + + C + 5 + + 15 + 1 + 16th + natural + up + begin + forward hook + + + + C + 1 + 4 + + 45 + 1 + eighth + + sharp + up + end + + + + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + B + 4 + + 20 + 1 + eighth + + 3 + 2 + + down + begin + + + + E + 5 + + 20 + 1 + eighth + + 3 + 2 + + down + end + + + + + + + E + -1 + 5 + + 45 + 1 + eighth + + flat + down + begin + + + + G + -1 + 4 + + 15 + 1 + 16th + flat + down + end + backward hook + + + +   + + + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + G + 4 + + 40 + 1 + quarter + natural + + 3 + 2 + + up + + + + + + + G + 1 + 4 + + 20 + 1 + eighth + sharp + + 3 + 2 + + up + + + + + + + A + 5 + + 40 + 1 + quarter + natural + + 3 + 2 + + down + + + + + + + + + +   + + + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + B + 4 + + 40 + 1 + quarter + + 3 + 2 + + down + + + + + + + 12 + 1 + 16th + + 5 + 4 + + + + + + + + A + -1 + 4 + + 24 + 1 + eighth + flat + + 5 + 4 + + down + begin + + + + G + 1 + 5 + + 24 + 1 + eighth + sharp + + 5 + 4 + + down + end + + + + + + +   + + + + + + 30 + 1 + eighth + + + + F + 4 + + 30 + 1 + eighth + up + + + + G + 4 + + 40 + 1 + quarter + natural + + 3 + 2 + eighth + + up + + + + + + + E + -1 + 4 + + 20 + 1 + eighth + flat + + 3 + 2 + eighth + + up + + + + + + + + + +   + + + + + + 30 + 1 + eighth + + + + C + 4 + + 30 + 1 + eighth + up + + + + B + 4 + + 15 + 1 + 16th + down + begin + forward hook + + + + F + 1 + 5 + + 45 + 1 + eighth + + sharp + down + end + + + + 30 + 1 + eighth + + + +   + + + + + + A + 4 + + 30 + 1 + eighth + up + + + + 30 + 1 + eighth + + + + E + -1 + 4 + + 30 + 1 + eighth + flat + up + + + + + + + + + 116 + + + + 60 + + 0 + major + + + + G + 2 + + + + + + + + + + + + Glock + + + + + 45 + 1 + eighth + + + + + sempre l.v. + + -20 + + + + D + 5 + + 15 + 1 + 16th + down + + + + 30 + 1 + eighth + + + + B + 5 + + 30 + 1 + eighth + down + + + + 40 + 1 + quarter + + 3 + 2 + eighth + + + + + + + + F + 1 + 5 + + 20 + 1 + eighth + sharp + + 3 + 2 + eighth + + down + + + + + + + 15 + 1 + 16th + + + + E + 5 + + 45 + 1 + eighth + + down + + + + + + + 120 + 1 + half + + + + 60 + 1 + quarter + + + + percussion + + + + + + + + + + -12 + + + + scrape + + + + + Sus Cym + + + + + F + 5 + + 60 + + 1 + quarter + down + diamond + + + + + + + + + -42 + + + + + + + + + + + + 120 + 1 + half + + + + G + 2 + + + + + Glock + + -56 + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + + + + + + + + B + 5 + + 40 + 1 + quarter + + 3 + 2 + + down + + + + + + + F + 1 + 5 + + 20 + 1 + eighth + sharp + + 3 + 2 + + down + + + + + + + B + 4 + + 40 + 1 + quarter + + 3 + 2 + + down + + + + + + + + + + 15 + 1 + 16th + + + + E + 5 + + 45 + 1 + eighth + + down + + + + 60 + 1 + quarter + + + + 60 + 1 + quarter + + + + percussion + + + + + + + + + + -7 + + + + scrape + + + + + F + 5 + + 60 + + 1 + quarter + down + diamond + + + + + + + + + -34 + + + + + + -6 + + + + + + + 80 + + + + + 120 + 1 + half + + + + 60 + 1 + quarter + + + + G + 2 + + + + + Glock + + -47 + + + + 12 + 1 + 16th + + 5 + 4 + + + + + + + + B + 5 + + 24 + 1 + eighth + + 5 + 4 + + down + begin + + + + G + 5 + + 24 + 1 + eighth + + 5 + 4 + + down + end + + + + + + + + + + 30 + 1 + eighth + + + + F + 1 + 5 + + 15 + 1 + 16th + sharp + down + begin + begin + + + + C + 5 + + 15 + 1 + 16th + down + end + end + + + + 60 + 1 + quarter + + + + + D + -1 + 5 + + 1 + 16th + flat + up + + + + G + 5 + + 60 + 1 + quarter + natural + down + + + + 60 + 1 + quarter + + + + + + + percussion + + + + + 30 + 1 + eighth + + + + + scrape + + -16 + + + + + + + + + + + F + 5 + + 60 + 1 + quarter + down + diamond + + + + + + + + + + -42 + + + + + + -7 + + + + 30 + 1 + eighth + + + + 120 + 1 + half + + + + + + + 60 + 1 + quarter + + + + 30 + 1 + eighth + + + + + + + 13 + + + + + + + + + + + F + 5 + + 60 + 1 + quarter + down + diamond + + + + + + + + + + + + + 30 + 1 + eighth + + + + 60 + 1 + quarter + + + + + + + 98 + + + + + G + 2 + + + + + Glock + + + + + 30 + 1 + eighth + + + + D + 4 + + 30 + 1 + eighth + up + + + + 15 + 1 + 16th + + + + F + 4 + + 45 + 1 + eighth + + up + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + A + 4 + + 20 + 1 + eighth + + 3 + 2 + + up + begin + + + + B + -1 + 4 + + 20 + 1 + eighth + flat + + 3 + 2 + + up + end + + + + + + + 45 + 1 + eighth + + + + + G + 4 + + 15 + 1 + 16th + up + + + + + + + 30 + 1 + eighth + + + + D + 5 + + 30 + 1 + eighth + down + + + + 45 + 1 + eighth + + + + + E + 4 + + 15 + 1 + 16th + up + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + B + 5 + + 40 + 1 + quarter + + 3 + 2 + + down + + + + + + + 60 + 1 + quarter + + + + + + + F + 1 + 4 + + 60 + 1 + quarter + sharp + up + + + + 15 + 1 + 16th + + + + G + 5 + + 45 + 1 + eighth + + down + + + + 40 + 1 + quarter + + 3 + 2 + eighth + + + + + + + + A + -1 + 5 + + 20 + 1 + eighth + flat + + 3 + 2 + eighth + + down + + + + + + + 60 + 1 + quarter + + + + + + + 15 + 1 + 16th + + + + E + -1 + 4 + + 45 + 1 + eighth + + flat + up + + + + 40 + 1 + quarter + + 3 + 2 + eighth + + + + + + + + A + 5 + + 20 + 1 + eighth + natural + + 3 + 2 + eighth + + down + + + + + + + B + -1 + 5 + + 60 + 1 + quarter + flat + down + + + + 15 + 1 + 16th + + + + C + 6 + + 45 + 1 + eighth + + down + + + + + + + + + 108 + + + + 60 + + 0 + major + + + + G + 2 + + + + + + + + + + + + A + 2 + + 30 + 1 + eighth + up + begin + + + + sempre l.v. + + -11 + + + + B + -1 + 4 + + 30 + 1 + eighth + flat + down + end + + + + 15 + 1 + 16th + + + + C + 1 + 5 + + 45 + 1 + eighth + + sharp + down + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + E + 5 + + 40 + 1 + quarter + + 3 + 2 + + down + + + + + + + D + 1 + 6 + + 60 + 1 + quarter + sharp + down + + + + + + + 15 + 1 + 16th + + + + B + -1 + 2 + + 30 + 1 + eighth + flat + up + begin + + + + A + 6 + + 15 + 1 + 16th + down + end + backward hook + + + + 24 + 1 + eighth + + 5 + 4 + 16th + + + + + + + + G + 6 + + 12 + 1 + 16th + + 5 + 4 + 16th + + down + begin + forward hook + + + + C + 1 + 6 + + 24 + 1 + eighth + sharp + + 5 + 4 + 16th + + down + end + + + + + + + F + 6 + + 24 + 1 + eighth + + 5 + 4 + 16th + + down + begin + + + + + + + E + 6 + + 24 + 1 + eighth + + 5 + 4 + 16th + + down + continue + + + + D + 1 + 6 + + 12 + 1 + 16th + sharp + + 5 + 4 + 16th + + down + end + backward hook + + + + + + + 45 + 1 + eighth + + + + + B + -1 + 5 + + 15 + 1 + 16th + flat + down + + + + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + C + 1 + 6 + + 40 + 1 + quarter + sharp + + 3 + 2 + + down + + + + + + + E + 6 + + 12 + 1 + 16th + + 5 + 4 + + down + + + + + + + D + 1 + 5 + + 48 + 1 + quarter + sharp + + 5 + 4 + + down + + + + + + + A + 6 + + 45 + 1 + eighth + + down + begin + + + + B + -1 + 5 + + 15 + 1 + 16th + flat + down + end + backward hook + + + + 15 + 1 + 16th + + + + G + 6 + + 15 + 1 + 16th + down + begin + forward hook + + + + E + 6 + + 30 + 1 + eighth + down + end + + + + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + F + 5 + + 20 + 1 + eighth + + 3 + 2 + + down + begin + + + + E + 6 + + 20 + 1 + eighth + + 3 + 2 + + down + end + + + + + + + 15 + 1 + 16th + + + + B + -1 + 5 + + 45 + 1 + eighth + + flat + down + + + + F + 5 + + 20 + 1 + eighth + + 3 + 2 + + down + + + + + + + D + 1 + 6 + + 40 + 1 + quarter + sharp + + 3 + 2 + + down + + + + + + + C + 1 + 6 + + 24 + 1 + eighth + sharp + + 5 + 4 + 16th + + down + begin + + + + + + + B + -1 + 5 + + 24 + 1 + eighth + + 5 + 4 + 16th + + down + continue + + + + G + 5 + + 12 + 1 + 16th + + 5 + 4 + 16th + + down + end + backward hook + + + + + + + + + + 106 + + + + + 40 + 1 + quarter + + 3 + 2 + eighth + + + + + + + + A + 5 + + 20 + 1 + eighth + + 3 + 2 + eighth + + down + + + + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + C + 1 + 6 + + 20 + 1 + eighth + sharp + + 3 + 2 + + down + begin + + + + G + 5 + + 20 + 1 + eighth + + 3 + 2 + + down + end + + + + + + + E + 6 + + 15 + 1 + 16th + down + begin + forward hook + + + + C + 1 + 5 + + 45 + 1 + eighth + + sharp + down + end + + + + 15 + 1 + 16th + + + + E + 6 + + 15 + 1 + 16th + down + begin + forward hook + + + + B + -1 + 5 + + 30 + 1 + eighth + flat + down + end + + + + + + + 36 + 1 + eighth + + + 5 + 4 + 16th + + + + + + + + G + 5 + + 12 + 1 + 16th + + 5 + 4 + 16th + + down + begin + begin + + + + C + 1 + 6 + + 12 + 1 + 16th + sharp + + 5 + 4 + 16th + + down + end + end + + + + + + + 12 + 1 + 16th + + 5 + 4 + + + + + + + + C + 1 + 6 + + 48 + 1 + quarter + + 5 + 4 + + down + + + + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + A + 5 + + 20 + 1 + eighth + + 3 + 2 + + down + begin + + + + F + 6 + + 20 + 1 + eighth + + 3 + 2 + + down + end + + + + + + + 60 + 1 + quarter + + + + + + + 60 + 1 + quarter + + + + 30 + 1 + eighth + + + + D + 1 + 6 + + 30 + 1 + eighth + sharp + down + + + + C + 1 + 6 + + 20 + 1 + eighth + sharp + + 3 + 2 + + down + + + + + + + A + 6 + + 40 + 1 + quarter + + 3 + 2 + + down + + + + + + + 60 + 1 + quarter + + + + + + + 120 + 1 + half + + + + + + + + -3 + + + + 15 + 1 + 16th + + + + D + 1 + 6 + + 45 + 1 + eighth + + sharp + down + + + + + + + + + + + + + -6 + + + + F + 1 + 5 + + 12 + 1 + 16th + sharp + + 5 + 4 + + down + + + + + + + G + 6 + + 48 + 1 + quarter + + 5 + 4 + + down + + + + + + + + + + 100 + + + + + + C + 5 + + 1 + 16th + up + begin + begin + + + + + + + + A + 5 + + 1 + 16th + up + end + end + + + + B + -1 + 5 + + 60 + 1 + quarter + flat + down + + + + + + + 24 + 1 + eighth + + 5 + 4 + 16th + + + + + + + + F + 1 + 6 + + 12 + 1 + 16th + sharp + + 5 + 4 + 16th + + down + begin + forward hook + + + + G + 6 + + 24 + 1 + eighth + + 5 + 4 + 16th + + down + end + + + + + + + 45 + 1 + eighth + + + + + A + 4 + + 15 + 1 + 16th + up + + + + 12 + 1 + 16th + + 5 + 4 + + + + + + + + D + 1 + 5 + + 24 + 1 + eighth + sharp + + 5 + 4 + + down + begin + + + + E + 5 + + 24 + 1 + eighth + + 5 + 4 + + down + end + + + + + + + + + + 60 + 1 + quarter + + + + F + 1 + 5 + + 12 + 1 + 16th + sharp + + 5 + 4 + + down + + + + + + + G + 6 + + 48 + 1 + quarter + + 5 + 4 + + down + + + + + + + + C + 5 + + 1 + 16th + up + begin + begin + + + + + + + + A + 5 + + 1 + 16th + up + end + end + + + + B + -1 + 5 + + 60 + 1 + quarter + flat + down + + + + + + + 40 + 1 + quarter + + 3 + 2 + eighth + + + + + + + + F + 1 + 4 + + 20 + 1 + eighth + sharp + + 3 + 2 + eighth + + up + + + + + + + + + + 36 + 1 + eighth + + + 5 + 4 + 16th + + + + + + + + A + 4 + + 24 + 1 + eighth + + 5 + 4 + 16th + + up + + + + + + + C + 6 + + 60 + 1 + quarter + down + + + + 45 + 1 + eighth + + + + + E + 6 + + 15 + 1 + 16th + down + + + + 15 + 1 + 16th + + + + F + 1 + 6 + + 45 + 1 + eighth + + sharp + down + + + + + + + 45 + 1 + eighth + + + + + G + 6 + + 15 + 1 + 16th + down + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + B + -1 + 5 + + 40 + 1 + quarter + flat + + 3 + 2 + + down + + + + + + + D + 1 + 5 + + 45 + 1 + eighth + + sharp + down + begin + + + + E + 6 + + 15 + 1 + 16th + down + end + backward hook + + + + 60 + 1 + quarter + + + + + + + + + 68 + + + + 2 + + 0 + major + + + + F + 4 + + + + 8 + 1 + + + + + + 8 + 1 + + + + + + + 8 + 1 + + + + + + + 8 + 1 + + + + + + + 64 + + + + + 8 + 1 + + + + + + + 8 + 1 + + + + + + + 2 + 1 + quarter + + + + E + 2 + + 6 + 1 + half + + up + + + + + + + 4 + 1 + half + + + + C + 3 + + 4 + 1 + half + up + + + + + + + + + + + + 54 + + + + + 8 + 1 + + + + + + + 8 + 1 + + + + + + + 8 + 1 + + + + + + + 8 + 1 + + + + + + + + + 90 + + + + 60 + + 0 + major + + + + G + 2 + + + + + + + + + + + + 120 + 1 + half + + + + sempre l.v. + + -91 + + + + 15 + 1 + 16th + + + + G + 5 + + 45 + 1 + eighth + + down + + + + 12 + 1 + 16th + + 5 + 4 + + + + + + + + B + -1 + 5 + + 24 + 1 + eighth + flat + + 5 + 4 + + down + begin + + + + C + 6 + + 24 + 1 + eighth + + 5 + 4 + + down + end + + + + + + + + + + E + 3 + + 20 + 1 + eighth + natural + + 3 + 2 + + up + begin + + + + + + + E + -1 + 6 + + 20 + 1 + eighth + flat + + 3 + 2 + + down + end + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + A + 5 + + 40 + 1 + quarter + + 3 + 2 + + down + + + + + + + D + -1 + 6 + + 40 + 1 + quarter + flat + + 3 + 2 + + down + + + + E + 3 + + 40 + 1 + quarter + natural + + 3 + 2 + + up + + + + + + + + G + -1 + 5 + + 40 + 1 + quarter + flat + + 3 + 2 + + up + + + + 24 + 1 + eighth + + 5 + 4 + 16th + + + + + + + + G + 6 + + 36 + 1 + eighth + + natural + + 5 + 4 + 16th + + down + + + + + + + + A + -1 + 6 + + 36 + 1 + eighth + + flat + + 5 + 4 + 16th + + down + + + + + + + 36 + 1 + eighth + + + 5 + 4 + 16th + + + + + + + + E + 5 + + 12 + 1 + 16th + + 5 + 4 + 16th + + down + begin + begin + + + + A + 6 + + 12 + 1 + 16th + + 5 + 4 + 16th + + down + end + end + + + + + + + 30 + 1 + eighth + + + + C + 1 + 6 + + 15 + 1 + 16th + sharp + down + begin + begin + + + + B + 6 + + 15 + 1 + 16th + down + end + end + + + + 30 + 1 + eighth + + + + G + 6 + + 30 + 1 + eighth + down + + + + C + 1 + 6 + + 36 + 1 + eighth + + sharp + + 5 + 4 + 16th + + down + begin + + + + + + + D + 1 + 6 + + 24 + 1 + eighth + sharp + + 5 + 4 + 16th + + down + end + + + + + + + + + + 30 + 1 + eighth + + + + B + -1 + 5 + + 30 + 1 + eighth + flat + down + + + + 12 + 1 + 16th + + 5 + 4 + + + + + + + + C + 6 + + 12 + 1 + 16th + + 5 + 4 + + down + begin + begin + + + + A + 5 + + 12 + 1 + 16th + + 5 + 4 + + down + continue + end + + + + G + 5 + + 24 + 1 + eighth + + 5 + 4 + + down + end + + + + + + + 30 + 1 + eighth + + + + G + -1 + 6 + + 30 + 1 + eighth + flat + down + + + + 15 + 1 + 16th + + + + A + -1 + 5 + + 15 + 1 + 16th + flat + down + begin + forward hook + + + + G + -1 + 6 + + 30 + 1 + eighth + down + end + + + + + + + 93 + + + + + 15 + 1 + 16th + + + + F + 5 + + 15 + 1 + 16th + down + begin + forward hook + + + + E + -1 + 6 + + 30 + 1 + eighth + flat + down + end + + + + E + 5 + + 15 + 1 + 16th + natural + down + begin + forward hook + + + + G + -1 + 6 + + 45 + 1 + eighth + + flat + down + end + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + B + 5 + + 20 + 1 + eighth + + 3 + 2 + + down + begin + + + + D + 1 + 4 + + 20 + 1 + eighth + sharp + + 3 + 2 + + down + end + + + + + + + 30 + 1 + eighth + + + + A + 5 + + 30 + 1 + eighth + natural + down + + + + + + + 30 + 1 + eighth + + + + C + 6 + + 30 + 1 + eighth + down + + + + E + -1 + 6 + + 45 + 1 + eighth + + flat + down + begin + + + + D + 5 + + 15 + 1 + 16th + down + end + backward hook + + + + 15 + 1 + 16th + + + + F + 5 + + 15 + 1 + 16th + down + begin + forward hook + + + + A + -1 + 6 + + 30 + 1 + eighth + flat + down + end + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + B + 5 + + 40 + 1 + quarter + + 3 + 2 + + down + + + + + + + + + + E + -1 + 5 + + 15 + 1 + 16th + flat + down + begin + forward hook + + + + G + 6 + + 45 + 1 + eighth + + down + end + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + E + 6 + + 20 + 1 + eighth + natural + + 3 + 2 + + down + begin + + + + D + 5 + + 20 + 1 + eighth + + 3 + 2 + + down + end + + + + + + + 15 + 1 + 16th + + + + C + 1 + 5 + + 45 + 1 + eighth + + sharp + down + + + + D + 5 + + 45 + 1 + eighth + + down + begin + + + + B + -1 + 4 + + 15 + 1 + 16th + flat + down + end + backward hook + + + + + + + F + 1 + 5 + + 20 + 1 + eighth + sharp + + 3 + 2 + + down + begin + + + + + + + G + 6 + + 20 + 1 + eighth + + 3 + 2 + + down + continue + + + + A + -1 + 5 + + 20 + 1 + eighth + flat + + 3 + 2 + + down + end + + + + + + + F + 5 + + 15 + 1 + 16th + natural + down + begin + forward hook + + + + B + 4 + + 45 + 1 + eighth + + natural + down + end + + + + + + + + + + + 12 + 1 + 16th + + 5 + 4 + + + + + + + + E + -1 + 6 + + 12 + 1 + 16th + flat + + 5 + 4 + + down + begin + begin + + + + + + + + + D + 5 + + 12 + 1 + 16th + + 5 + 4 + + down + continue + continue + + + + E + 5 + + 12 + 1 + 16th + natural + + 5 + 4 + + down + continue + continue + + + + D + -1 + 5 + + 12 + 1 + 16th + flat + + 5 + 4 + + down + end + end + + + + + + + 60 + 1 + quarter + + + + + + + 91 + + + + + 40 + 1 + quarter + + 3 + 2 + eighth + + + + + + + + + + + + -4 + + + + E + -1 + 5 + + 20 + 1 + eighth + flat + + 3 + 2 + eighth + + down + + + + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + G + 6 + + 40 + 1 + quarter + + 3 + 2 + + down + + + + + + + E + 5 + + 15 + 1 + 16th + natural + down + begin + forward hook + + + + F + 1 + 6 + + 45 + 1 + eighth + + sharp + down + end + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + A + -1 + 5 + + 40 + 1 + quarter + flat + + 3 + 2 + + down + + + + + + + + + + 40 + 1 + quarter + + 3 + 2 + eighth + + + + + + + + E + -1 + 5 + + 20 + 1 + eighth + flat + + 3 + 2 + eighth + + down + + + + + + + 40 + 1 + quarter + + 3 + 2 + eighth + + + + + + + + G + 5 + + 20 + 1 + eighth + + 3 + 2 + eighth + + down + + + + + + + 30 + 1 + eighth + + + + E + 5 + + 30 + 1 + eighth + down + + + + F + 1 + 6 + + 60 + 1 + quarter + sharp + down + + + + + + + 20 + 1 + eighth + + 3 + 2 + + + + + + + + A + -1 + 5 + + 40 + 1 + quarter + flat + + 3 + 2 + + down + + + + + + + F + 5 + + 15 + 1 + 16th + down + begin + forward hook + + + + B + 5 + + 45 + 1 + eighth + + down + end + + + + 15 + 1 + 16th + + + + C + 1 + 6 + + 30 + 1 + eighth + sharp + down + begin + + + + D + 5 + + 15 + 1 + 16th + natural + down + end + backward hook + + + + 30 + 1 + eighth + + + + A + 6 + + 30 + 1 + eighth + down + + + + + + + E + -1 + 6 + + 40 + 1 + quarter + flat + + 3 + 2 + eighth + + down + + + + + + + E + 5 + + 20 + 1 + eighth + natural + + 3 + 2 + eighth + + down + + + + + + + G + 5 + + 15 + 1 + 16th + down + begin + forward hook + + + + A + 5 + + 45 + 1 + eighth + + down + end + + + + B + -1 + 4 + + 40 + 1 + quarter + flat + + 3 + 2 + + down + + + + + + + D + -1 + 5 + + 40 + 1 + quarter + flat + + 3 + 2 + + down + + + + E + 3 + + 40 + 1 + quarter + natural + + 3 + 2 + + up + + + + + + + + F + 4 + + 40 + 1 + quarter + + 3 + 2 + + up + + + + + + + + + 80 + + + + 30 + + 0 + major + + + + F + 4 + + + + + + + + + + 18 + 1 + eighth + + + 5 + 4 + 16th + + + + + + + + A + -1 + 3 + + 12 + 1 + eighth + flat + + 5 + 4 + 16th + + down + + + + + + + 10 + 1 + eighth + + 3 + 2 + + + + + + + + C + 4 + + 20 + 1 + quarter + + 3 + 2 + + down + + + + + + 60 + 1 + + + + + + 120 + 1 + + + + + + + 120 + 1 + + + + + + + 120 + 1 + + + + + + + 69 + + + + + 120 + 1 + + + + + + + 120 + 1 + + + + + + + 120 + 1 + + + + + + + 60 + 1 + half + + + + C + 3 + + 60 + 1 + half + up + + + + + + + + + + + + 57 + + + + + 120 + 1 + + + + + + + 120 + 1 + + + + + + + 120 + 1 + + + + + + + 120 + 1 + + + + + diff --git a/Sourcecode/private/extern/ezxml/testdata/xml/simple.xml b/Sourcecode/private/extern/ezxml/testdata/xml/simple.xml new file mode 100644 index 000000000..0fe8347fe --- /dev/null +++ b/Sourcecode/private/extern/ezxml/testdata/xml/simple.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/Sourcecode/private/mx/api/DocumentManager.cpp b/Sourcecode/private/mx/api/DocumentManager.cpp index 61502693e..b294d377d 100755 --- a/Sourcecode/private/mx/api/DocumentManager.cpp +++ b/Sourcecode/private/mx/api/DocumentManager.cpp @@ -6,7 +6,7 @@ #include "mx/impl/ScoreReader.h" #include "mx/impl/ScoreWriter.h" #include "mx/core/Document.h" -#include "mx/xml/XFactory.h" +#include "ezxml/XFactory.h" #define LOCK_DOCUMENT_MANAGER std::lock_guard lock(myImpl->myMutex); @@ -55,7 +55,7 @@ namespace mx int DocumentManager::createFromFile( const std::string& filePath ) { - auto xdoc = mx::xml::XFactory::makeXDoc(); + auto xdoc = ::ezxml::XFactory::makeXDoc(); xdoc->loadFile( filePath ); #ifdef DEBUG_HELL @@ -80,7 +80,7 @@ namespace mx int DocumentManager::createFromStream( std::istream& stream ) { - auto xdoc = mx::xml::XFactory::makeXDoc(); + auto xdoc = ::ezxml::XFactory::makeXDoc(); xdoc->loadStream( stream ); auto mxdoc = mx::core::makeDocument(); @@ -129,7 +129,7 @@ namespace mx return; } - auto xdoc = mx::xml::XFactory::makeXDoc(); + auto xdoc = ::ezxml::XFactory::makeXDoc(); it->second->toXDoc( *xdoc ); xdoc->saveFile( filePath ); } @@ -146,7 +146,7 @@ namespace mx return; } - auto xdoc = mx::xml::XFactory::makeXDoc(); + auto xdoc = ::ezxml::XFactory::makeXDoc(); it->second->toXDoc( *xdoc ); xdoc->saveStream( stream ); } diff --git a/Sourcecode/private/mx/core/AttributesInterface.cpp b/Sourcecode/private/mx/core/AttributesInterface.cpp index 01cf5344b..ad2ffc3a3 100755 --- a/Sourcecode/private/mx/core/AttributesInterface.cpp +++ b/Sourcecode/private/mx/core/AttributesInterface.cpp @@ -22,7 +22,7 @@ namespace mx bool - AttributesInterface::fromXElement( std::ostream& message, xml::XElement& xelement ) + AttributesInterface::fromXElement( std::ostream& message, ::ezxml::XElement& xelement ) { return this->fromXElementImpl( message, xelement ); } diff --git a/Sourcecode/private/mx/core/AttributesInterface.h b/Sourcecode/private/mx/core/AttributesInterface.h index 00415bc36..ff21d60e9 100755 --- a/Sourcecode/private/mx/core/AttributesInterface.h +++ b/Sourcecode/private/mx/core/AttributesInterface.h @@ -9,13 +9,13 @@ #include #include +namespace ezxml +{ + class XElement; +} + namespace mx { - namespace xml - { - class XElement; - } - namespace core { struct AttributesInterface; @@ -27,10 +27,10 @@ namespace mx virtual ~AttributesInterface() {} virtual bool hasValues() const; virtual std::ostream& toStream( std::ostream& os ) const; - virtual bool fromXElement( std::ostream& message, xml::XElement& xelement ) final; + virtual bool fromXElement( std::ostream& message, ::ezxml::XElement& xelement ) final; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ) = 0; + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) = 0; }; std::ostream& operator<<( std::ostream& os, const AttributesInterface& value ); diff --git a/Sourcecode/private/mx/core/Decimals.cpp b/Sourcecode/private/mx/core/Decimals.cpp index e2cad9791..322b7733a 100755 --- a/Sourcecode/private/mx/core/Decimals.cpp +++ b/Sourcecode/private/mx/core/Decimals.cpp @@ -40,9 +40,6 @@ namespace mx } - impl( impl&& other ) = default; - - impl& operator=( const impl& other ) { if ( other.myValue ) @@ -57,9 +54,6 @@ namespace mx return *this; } - - impl& operator=( impl&& other ) = default; - void setValue( DecimalType value ) { diff --git a/Sourcecode/private/mx/core/Document.cpp b/Sourcecode/private/mx/core/Document.cpp index ccbd0e5e9..c369e54ca 100755 --- a/Sourcecode/private/mx/core/Document.cpp +++ b/Sourcecode/private/mx/core/Document.cpp @@ -3,14 +3,12 @@ // Distributed under the MIT License #include "mx/core/Document.h" -#include "mx/xml/XFactory.h" -#include "mx/xml/XAttribute.h" -#include "mx/xml/XElementIterator.h" -#include "mx/xml/XAttributeIterator.h" +#include "ezxml/XFactory.h" +#include "ezxml/XAttribute.h" +#include "ezxml/XElementIterator.h" +#include "ezxml/XAttributeIterator.h" #include "mx/core/ScoreConversions.h" -using namespace mx::xml; - namespace mx { namespace core @@ -136,7 +134,7 @@ namespace mx } - void Document::toXDoc( xml::XDoc& outXDoc ) const + void Document::toXDoc( ::ezxml::XDoc& outXDoc ) const { std::stringstream ss; toStream( ss ); @@ -161,7 +159,7 @@ namespace mx } - bool Document::fromXDoc( std::ostream& messages, const xml::XDoc& inXDoc ) + bool Document::fromXDoc( std::ostream& messages, const ::ezxml::XDoc& inXDoc ) { auto root = inXDoc.getRoot(); if( inXDoc.getRoot()->getName() == "score-partwise" ) diff --git a/Sourcecode/private/mx/core/Document.h b/Sourcecode/private/mx/core/Document.h index 1909d7a6f..403e674b1 100755 --- a/Sourcecode/private/mx/core/Document.h +++ b/Sourcecode/private/mx/core/Document.h @@ -10,6 +10,12 @@ // Forward Declarations ///////////////////////////////////////////////////// +namespace ezxml +{ + class XDoc; + using XDocPtr = std::shared_ptr; +} + namespace mx { namespace core @@ -23,13 +29,6 @@ namespace mx class ScoreTimewise; using ScoreTimewisePtr = std::shared_ptr; } - - namespace xml - { - class XDoc; - using XDocPtr = std::shared_ptr; - } - //////////////////////////////////////////////////////////////////////////// @@ -83,8 +82,8 @@ namespace mx void setScoreTimewise( const ScoreTimewisePtr& value ); std::ostream& toStream( std::ostream& os ) const; - void toXDoc( xml::XDoc& outXDoc ) const; - bool fromXDoc( std::ostream& messages, const xml::XDoc& inXDoc ); + void toXDoc( ::ezxml::XDoc& outXDoc ) const; + bool fromXDoc( std::ostream& messages, const ::ezxml::XDoc& inXDoc ); private: DocumentChoice myChoice; diff --git a/Sourcecode/private/mx/core/DocumentSpec.cpp b/Sourcecode/private/mx/core/DocumentSpec.cpp index 61932bea5..f02c0cc69 100755 --- a/Sourcecode/private/mx/core/DocumentSpec.cpp +++ b/Sourcecode/private/mx/core/DocumentSpec.cpp @@ -136,7 +136,7 @@ namespace mx } - DocumentSpec parseDocumentSpec( const xml::XDocCPtr& doc ) + DocumentSpec parseDocumentSpec( const ::ezxml::XDocCPtr& doc ) { MX_UNUSED( doc ); throw std::runtime_error( "not implemented" ); diff --git a/Sourcecode/private/mx/core/DocumentSpec.h b/Sourcecode/private/mx/core/DocumentSpec.h index 2a6e54d7c..99f689233 100755 --- a/Sourcecode/private/mx/core/DocumentSpec.h +++ b/Sourcecode/private/mx/core/DocumentSpec.h @@ -8,14 +8,14 @@ #include #include +namespace ezxml +{ + class XDoc; + using XDocCPtr = std::shared_ptr; +} + namespace mx { - namespace xml - { - class XDoc; - using XDocCPtr = std::shared_ptr; - } - namespace core { @@ -64,7 +64,7 @@ namespace mx MusicXmlVersion musicXmlVersion; }; - DocumentSpec parseDocumentSpec( const xml::XDocCPtr& doc ); + DocumentSpec parseDocumentSpec( const ::ezxml::XDocCPtr& doc ); } } diff --git a/Sourcecode/private/mx/core/ElementInterface.cpp b/Sourcecode/private/mx/core/ElementInterface.cpp index be8759055..5def48b4e 100755 --- a/Sourcecode/private/mx/core/ElementInterface.cpp +++ b/Sourcecode/private/mx/core/ElementInterface.cpp @@ -3,9 +3,9 @@ // Distributed under the MIT License #include "mx/core/ElementInterface.h" -#include "mx/xml/XElement.h" -#include "mx/xml/XElementIterator.h" -#include "mx/xml/XFactory.h" +#include "ezxml/XElement.h" +#include "ezxml/XElementIterator.h" +#include "ezxml/XFactory.h" #include namespace mx @@ -81,10 +81,10 @@ namespace mx streamWithoutProcessingInstructions( ss, 0 ); const auto xml = ss.str(); std::istringstream iss{ xml }; - const auto xdoc = xml::XFactory::makeXDoc(); + const auto xdoc = ::ezxml::XFactory::makeXDoc(); xdoc->loadStream( iss ); const auto root = xdoc->getRoot(); - const bool hasChildren = root->getType() == xml::XElementType::element && root->begin() != root->end(); + const bool hasChildren = root->getType() == ::ezxml::XElementType::element && root->begin() != root->end(); streamWithProcessingInstructions( os, indentLevel, hasChildren ); } @@ -116,7 +116,7 @@ namespace mx } - bool ElementInterface::fromXElement( std::ostream& message, xml::XElement& xelement ) + bool ElementInterface::fromXElement( std::ostream& message, ::ezxml::XElement& xelement ) { if( xelement.getIsProcessingInstruction() ) { @@ -132,7 +132,7 @@ namespace mx // check for processing instructions - if( xelement.getType() == xml::XElementType::element ) + if( xelement.getType() == ezxml::XElementType::element ) { auto childIter = xelement.beginWithProcessingInstructions(); const auto childEnd = xelement.end(); diff --git a/Sourcecode/private/mx/core/ElementInterface.h b/Sourcecode/private/mx/core/ElementInterface.h index aaba228c3..3c25364c5 100755 --- a/Sourcecode/private/mx/core/ElementInterface.h +++ b/Sourcecode/private/mx/core/ElementInterface.h @@ -10,13 +10,13 @@ #include "mx/core/AttributesInterface.h" #include "mx/core/ProcessingInstruction.h" +namespace ezxml +{ + class XElement; +} + namespace mx { - namespace xml - { - class XElement; - } - namespace core { // This will be used by toStream to indent the XML tree @@ -41,13 +41,13 @@ namespace mx virtual std::ostream& streamSelfCloseTag( std::ostream& os ) const; virtual std::ostream& toStream( std::ostream& os, const int indentLevel ) const; virtual const std::string getElementName() const; - virtual bool fromXElement( std::ostream& message, xml::XElement& xelement ) final; + virtual bool fromXElement( std::ostream& message, ezxml::XElement& xelement ) final; virtual const ProcessingInstructions& getProcessingInstructions() const final; virtual void clearProcessingInstructions() final; virtual void addProcessingInstruction( ProcessingInstruction inProcessingInstruction ) final; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ) = 0; + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) = 0; private: ProcessingInstructions myProcessingInstructions; diff --git a/Sourcecode/private/mx/core/EmptyPrintObjectStyleAlignAttributes.cpp b/Sourcecode/private/mx/core/EmptyPrintObjectStyleAlignAttributes.cpp index 5acec92e5..6521a894a 100755 --- a/Sourcecode/private/mx/core/EmptyPrintObjectStyleAlignAttributes.cpp +++ b/Sourcecode/private/mx/core/EmptyPrintObjectStyleAlignAttributes.cpp @@ -75,7 +75,7 @@ namespace mx } - bool EmptyPrintObjectStyleAlignAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool EmptyPrintObjectStyleAlignAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "EmptyPrintObjectStyleAlignAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/EmptyPrintObjectStyleAlignAttributes.h b/Sourcecode/private/mx/core/EmptyPrintObjectStyleAlignAttributes.h index e2aa854ed..f5a9920ba 100755 --- a/Sourcecode/private/mx/core/EmptyPrintObjectStyleAlignAttributes.h +++ b/Sourcecode/private/mx/core/EmptyPrintObjectStyleAlignAttributes.h @@ -50,7 +50,7 @@ namespace mx bool hasHalign; bool hasValign; - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/FromString.h b/Sourcecode/private/mx/core/FromString.h index 7e984632d..a1aa79343 100755 --- a/Sourcecode/private/mx/core/FromString.h +++ b/Sourcecode/private/mx/core/FromString.h @@ -3,8 +3,8 @@ // Distributed under the MIT License #pragma once -#include "mx/xml/XElement.h" -#include "mx/xml/XAttributeIterator.h" +#include "ezxml/XElement.h" +#include "ezxml/XAttributeIterator.h" #include namespace mx diff --git a/Sourcecode/private/mx/core/FromXElement.cpp b/Sourcecode/private/mx/core/FromXElement.cpp index 1ff0ce86f..db28a2d3a 100755 --- a/Sourcecode/private/mx/core/FromXElement.cpp +++ b/Sourcecode/private/mx/core/FromXElement.cpp @@ -61,7 +61,7 @@ namespace mx bool importElement( std::ostream& message, - xml::XElement& xelement, + ::ezxml::XElement& xelement, bool& isSuccess, ElementInterface& element, bool& isMatch ) @@ -76,8 +76,8 @@ namespace mx } bool isEndWithDecrementIfNeeded( - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool isDecrementNeeded ) { if( iter == endIter ) @@ -93,8 +93,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, EditorialGroupPtr& group ) { @@ -113,8 +113,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, EditorialVoiceGroupPtr& group ) { @@ -137,8 +137,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, EditorialVoiceDirectionGroupPtr& group ) { @@ -160,8 +160,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, LayoutGroupPtr& group ) { @@ -190,8 +190,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, BeatUnitGroupPtr& group ) { @@ -219,8 +219,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, MetronomeRelationGroupPtr& group, bool& hasGroup ) @@ -251,8 +251,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, DisplayStepOctaveGroupPtr& group, bool& hasGroup ) @@ -290,8 +290,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, SyllabicTextGroupPtr& group ) { @@ -366,8 +366,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, TimeSignatureGroupPtr& group ) { @@ -427,8 +427,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, MidiInstrumentPtr& group ) { @@ -513,8 +513,8 @@ namespace mx /* void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, CreditWordsGroupPtr& group ) { @@ -539,8 +539,8 @@ namespace mx /* void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, BeatUnitPerPtr& group ) { @@ -570,7 +570,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSuccess, XsString& assignmentTarget, @@ -592,7 +592,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSuccess, Decimal& assignmentTarget, @@ -614,7 +614,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSuccess, Integer& assignmentTarget, @@ -645,7 +645,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSuccess, Color& assignmentTarget, @@ -673,7 +673,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSuccess, Date& assignmentTarget, @@ -701,7 +701,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSuccess, FontSize& assignmentTarget, @@ -732,7 +732,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSuccess, NumberOrNormal& assignmentTarget, @@ -760,7 +760,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSuccess, PositiveIntegerOrEmpty& assignmentTarget, @@ -791,7 +791,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSuccess, YesNoNumber& assignmentTarget, @@ -819,7 +819,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSuccess, CommaSeparatedText& assignmentTarget, @@ -843,7 +843,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSuccess, DistanceType& assignmentTarget, @@ -867,7 +867,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSuccess, LineWidthType& assignmentTarget, @@ -891,7 +891,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSuccess, CommaSeparatedListOfPositiveIntegers& assignmentTarget, diff --git a/Sourcecode/private/mx/core/FromXElement.h b/Sourcecode/private/mx/core/FromXElement.h index 81959f2c4..0e67e6d0e 100755 --- a/Sourcecode/private/mx/core/FromXElement.h +++ b/Sourcecode/private/mx/core/FromXElement.h @@ -6,16 +6,16 @@ #include "mx/core/ForwardDeclare.h" #include "mx/core/ElementInterface.h" -#include "mx/xml/XElement.h" -#include "mx/xml/XAttribute.h" -#include "mx/xml/XElementIterator.h" -#include "mx/xml/XAttributeIterator.h" +#include "ezxml/XElement.h" +#include "ezxml/XAttribute.h" +#include "ezxml/XElementIterator.h" +#include "ezxml/XAttributeIterator.h" #include #ifndef MX_FROM_XELEMENT_UNUSED #define MX_FROM_XELEMENT_UNUSED( class_name ) \ \ - bool class_name::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) \ + bool class_name::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) \ { \ MX_UNUSED( xelement ); \ message << #class_name ": fromXElement function is not expected to be called on this class" << std::endl; \ @@ -52,7 +52,7 @@ namespace mx bool importElement( std::ostream& message, - xml::XElement& xelement, + ::ezxml::XElement& xelement, bool& isSuccess, ElementInterface& element, bool& isMatch ); @@ -61,8 +61,8 @@ namespace mx template bool importElementSet( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, const std::string& elementName, std::vector>& elementSet ) @@ -97,8 +97,8 @@ namespace mx template void checkSetGroupMemberAndIncrementIter( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, bool& hasIterBeenIncremented, std::shared_ptr& elementPtr, @@ -125,8 +125,8 @@ namespace mx template void checkSetGroupMemberAndIncrementIter( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, bool& hasIterBeenIncremented, std::shared_ptr& elementPtr, @@ -154,8 +154,8 @@ namespace mx template void checkSetGroupMemberSetAndIncrementIter( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, bool& hasIterBeenIncremented, std::string elementName, @@ -197,8 +197,8 @@ namespace mx bool isEndWithDecrementIfNeeded( - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool isDecrementNeeded ); @@ -206,8 +206,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, EditorialGroupPtr& group ); @@ -215,8 +215,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, EditorialVoiceGroupPtr& group ); @@ -224,8 +224,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, LayoutGroupPtr& group ); @@ -233,8 +233,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, DisplayStepOctaveGroupPtr& group, bool& hasGroup ); @@ -243,8 +243,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, SyllabicTextGroupPtr& group ); @@ -252,8 +252,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, EditorialVoiceDirectionGroupPtr& group ); @@ -261,8 +261,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, BeatUnitGroupPtr& group ); @@ -270,8 +270,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, MetronomeRelationGroupPtr& group, bool& hasGroup ); @@ -280,8 +280,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, TimeSignatureGroupPtr& group ); @@ -289,8 +289,8 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, MidiInstrumentPtr& group ); @@ -298,16 +298,16 @@ namespace mx void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, CreditWordsGroupPtr& group ); /* void importGroup( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess, BeatUnitPerPtr& group ); */ @@ -315,7 +315,7 @@ namespace mx template bool checkSetChoiceMember( std::ostream& message, - xml::XElement& xelement, + ::ezxml::XElement& xelement, bool& isSuccess, std::shared_ptr& elementPtr, std::string choiceElementName, @@ -339,7 +339,7 @@ namespace mx template bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, T& assignmentTarget, @@ -368,7 +368,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, XsString& assignmentTarget, @@ -380,7 +380,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, Decimal& assignmentTarget, @@ -392,7 +392,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, Integer& assignmentTarget, @@ -404,7 +404,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, Color& assignmentTarget, @@ -416,7 +416,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, Date& assignmentTarget, @@ -428,7 +428,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, FontSize& assignmentTarget, @@ -440,7 +440,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, NumberOrNormal& assignmentTarget, @@ -452,7 +452,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, PositiveIntegerOrEmpty& assignmentTarget, @@ -464,7 +464,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, YesNoNumber& assignmentTarget, @@ -476,7 +476,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, CommaSeparatedText& assignmentTarget, @@ -488,7 +488,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, DistanceType& assignmentTarget, @@ -500,7 +500,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, LineWidthType& assignmentTarget, @@ -512,7 +512,7 @@ namespace mx bool parseAttribute( std::ostream& message, - xml::XAttributeIterator& iter, + ::ezxml::XAttributeIterator& iter, const std::string& className, bool& isSucces, CommaSeparatedListOfPositiveIntegers& assignmentTarget, diff --git a/Sourcecode/private/mx/core/elements/Accent.cpp b/Sourcecode/private/mx/core/elements/Accent.cpp index 9fd539ea8..e46680854 100755 --- a/Sourcecode/private/mx/core/elements/Accent.cpp +++ b/Sourcecode/private/mx/core/elements/Accent.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Accent::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Accent::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Accent.h b/Sourcecode/private/mx/core/elements/Accent.h index da5fbb4f7..ecbfea266 100755 --- a/Sourcecode/private/mx/core/elements/Accent.h +++ b/Sourcecode/private/mx/core/elements/Accent.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Accidental.cpp b/Sourcecode/private/mx/core/elements/Accidental.cpp index 9a8e952a6..a95160e94 100755 --- a/Sourcecode/private/mx/core/elements/Accidental.cpp +++ b/Sourcecode/private/mx/core/elements/Accidental.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Accidental::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Accidental::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Accidental.h b/Sourcecode/private/mx/core/elements/Accidental.h index b59fa4159..10fa83f95 100755 --- a/Sourcecode/private/mx/core/elements/Accidental.h +++ b/Sourcecode/private/mx/core/elements/Accidental.h @@ -42,7 +42,7 @@ namespace mx void setValue( const AccidentalValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: AccidentalValue myValue; diff --git a/Sourcecode/private/mx/core/elements/AccidentalAttributes.cpp b/Sourcecode/private/mx/core/elements/AccidentalAttributes.cpp index 0d574e647..4aaead2a1 100755 --- a/Sourcecode/private/mx/core/elements/AccidentalAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/AccidentalAttributes.cpp @@ -80,7 +80,7 @@ namespace mx } - bool AccidentalAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool AccidentalAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "AccidentalAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/AccidentalAttributes.h b/Sourcecode/private/mx/core/elements/AccidentalAttributes.h index e889ffe8c..d3029c1dc 100755 --- a/Sourcecode/private/mx/core/elements/AccidentalAttributes.h +++ b/Sourcecode/private/mx/core/elements/AccidentalAttributes.h @@ -56,7 +56,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/AccidentalMark.cpp b/Sourcecode/private/mx/core/elements/AccidentalMark.cpp index 7d4fd367b..f3dba5a7d 100755 --- a/Sourcecode/private/mx/core/elements/AccidentalMark.cpp +++ b/Sourcecode/private/mx/core/elements/AccidentalMark.cpp @@ -87,7 +87,7 @@ namespace mx } - bool AccidentalMark::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool AccidentalMark::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/AccidentalMark.h b/Sourcecode/private/mx/core/elements/AccidentalMark.h index 1ed1868f7..3ab55ba07 100755 --- a/Sourcecode/private/mx/core/elements/AccidentalMark.h +++ b/Sourcecode/private/mx/core/elements/AccidentalMark.h @@ -42,7 +42,7 @@ namespace mx void setValue( const AccidentalValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: AccidentalValue myValue; diff --git a/Sourcecode/private/mx/core/elements/AccidentalMarkAttributes.cpp b/Sourcecode/private/mx/core/elements/AccidentalMarkAttributes.cpp index 5f854cb85..0798ca65f 100755 --- a/Sourcecode/private/mx/core/elements/AccidentalMarkAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/AccidentalMarkAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool AccidentalMarkAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool AccidentalMarkAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "AccidentalMarkAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/AccidentalMarkAttributes.h b/Sourcecode/private/mx/core/elements/AccidentalMarkAttributes.h index acc17430a..231480ca7 100755 --- a/Sourcecode/private/mx/core/elements/AccidentalMarkAttributes.h +++ b/Sourcecode/private/mx/core/elements/AccidentalMarkAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/AccidentalText.cpp b/Sourcecode/private/mx/core/elements/AccidentalText.cpp index 9fb1aa306..acbb46bbe 100755 --- a/Sourcecode/private/mx/core/elements/AccidentalText.cpp +++ b/Sourcecode/private/mx/core/elements/AccidentalText.cpp @@ -87,7 +87,7 @@ namespace mx } - bool AccidentalText::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool AccidentalText::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/AccidentalText.h b/Sourcecode/private/mx/core/elements/AccidentalText.h index d01a1f327..f46748c68 100755 --- a/Sourcecode/private/mx/core/elements/AccidentalText.h +++ b/Sourcecode/private/mx/core/elements/AccidentalText.h @@ -42,7 +42,7 @@ namespace mx void setValue( const AccidentalValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: AccidentalValue myValue; diff --git a/Sourcecode/private/mx/core/elements/AccidentalTextAttributes.cpp b/Sourcecode/private/mx/core/elements/AccidentalTextAttributes.cpp index 4fa085139..a5d79fa34 100755 --- a/Sourcecode/private/mx/core/elements/AccidentalTextAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/AccidentalTextAttributes.cpp @@ -104,7 +104,7 @@ namespace mx } - bool AccidentalTextAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool AccidentalTextAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "AccidentalTextAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/AccidentalTextAttributes.h b/Sourcecode/private/mx/core/elements/AccidentalTextAttributes.h index f21743162..bdd456b84 100755 --- a/Sourcecode/private/mx/core/elements/AccidentalTextAttributes.h +++ b/Sourcecode/private/mx/core/elements/AccidentalTextAttributes.h @@ -70,7 +70,7 @@ namespace mx bool hasEnclosure; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Accord.cpp b/Sourcecode/private/mx/core/elements/Accord.cpp index ee14d4655..ceb0adbe7 100755 --- a/Sourcecode/private/mx/core/elements/Accord.cpp +++ b/Sourcecode/private/mx/core/elements/Accord.cpp @@ -136,7 +136,7 @@ namespace mx } - bool Accord::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Accord::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Accord.h b/Sourcecode/private/mx/core/elements/Accord.h index 37f51222e..fe5fdb4f3 100755 --- a/Sourcecode/private/mx/core/elements/Accord.h +++ b/Sourcecode/private/mx/core/elements/Accord.h @@ -53,7 +53,7 @@ namespace mx void setTuningOctave( const TuningOctavePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: AccordAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/AccordAttributes.cpp b/Sourcecode/private/mx/core/elements/AccordAttributes.cpp index 5432003fe..21b7be2c0 100755 --- a/Sourcecode/private/mx/core/elements/AccordAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/AccordAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool AccordAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool AccordAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "AccordAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/AccordAttributes.h b/Sourcecode/private/mx/core/elements/AccordAttributes.h index 9103de717..0049be3d9 100755 --- a/Sourcecode/private/mx/core/elements/AccordAttributes.h +++ b/Sourcecode/private/mx/core/elements/AccordAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasString; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/AccordionHigh.cpp b/Sourcecode/private/mx/core/elements/AccordionHigh.cpp index 8f15565e2..b7ce2f02b 100755 --- a/Sourcecode/private/mx/core/elements/AccordionHigh.cpp +++ b/Sourcecode/private/mx/core/elements/AccordionHigh.cpp @@ -27,7 +27,7 @@ namespace mx } - bool AccordionHigh::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool AccordionHigh::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/AccordionHigh.h b/Sourcecode/private/mx/core/elements/AccordionHigh.h index 3b3b21b0f..13c0dc220 100755 --- a/Sourcecode/private/mx/core/elements/AccordionHigh.h +++ b/Sourcecode/private/mx/core/elements/AccordionHigh.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/AccordionLow.cpp b/Sourcecode/private/mx/core/elements/AccordionLow.cpp index 72b68f24b..51b307f2c 100755 --- a/Sourcecode/private/mx/core/elements/AccordionLow.cpp +++ b/Sourcecode/private/mx/core/elements/AccordionLow.cpp @@ -27,7 +27,7 @@ namespace mx } - bool AccordionLow::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool AccordionLow::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/AccordionLow.h b/Sourcecode/private/mx/core/elements/AccordionLow.h index b4b71b363..d5a2330aa 100755 --- a/Sourcecode/private/mx/core/elements/AccordionLow.h +++ b/Sourcecode/private/mx/core/elements/AccordionLow.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/AccordionMiddle.cpp b/Sourcecode/private/mx/core/elements/AccordionMiddle.cpp index 0799ea514..60823af36 100755 --- a/Sourcecode/private/mx/core/elements/AccordionMiddle.cpp +++ b/Sourcecode/private/mx/core/elements/AccordionMiddle.cpp @@ -66,7 +66,7 @@ namespace mx } - bool AccordionMiddle::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool AccordionMiddle::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/AccordionMiddle.h b/Sourcecode/private/mx/core/elements/AccordionMiddle.h index a3ed384c5..194ef3b0d 100755 --- a/Sourcecode/private/mx/core/elements/AccordionMiddle.h +++ b/Sourcecode/private/mx/core/elements/AccordionMiddle.h @@ -38,7 +38,7 @@ namespace mx void setValue( const AccordionMiddleValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: AccordionMiddleValue myValue; diff --git a/Sourcecode/private/mx/core/elements/AccordionRegistration.cpp b/Sourcecode/private/mx/core/elements/AccordionRegistration.cpp index 00c8e3f63..bea612c69 100755 --- a/Sourcecode/private/mx/core/elements/AccordionRegistration.cpp +++ b/Sourcecode/private/mx/core/elements/AccordionRegistration.cpp @@ -171,7 +171,7 @@ namespace mx } - bool AccordionRegistration::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool AccordionRegistration::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/AccordionRegistration.h b/Sourcecode/private/mx/core/elements/AccordionRegistration.h index 5eb75a3d9..a0d81d436 100755 --- a/Sourcecode/private/mx/core/elements/AccordionRegistration.h +++ b/Sourcecode/private/mx/core/elements/AccordionRegistration.h @@ -57,7 +57,7 @@ namespace mx void setHasAccordionLow( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: AccordionRegistrationAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/AccordionRegistrationAttributes.cpp b/Sourcecode/private/mx/core/elements/AccordionRegistrationAttributes.cpp index dad736ebb..5e6235fdb 100755 --- a/Sourcecode/private/mx/core/elements/AccordionRegistrationAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/AccordionRegistrationAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool AccordionRegistrationAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool AccordionRegistrationAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "AccordionRegistrationAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/AccordionRegistrationAttributes.h b/Sourcecode/private/mx/core/elements/AccordionRegistrationAttributes.h index e3329eca8..dca85df52 100755 --- a/Sourcecode/private/mx/core/elements/AccordionRegistrationAttributes.h +++ b/Sourcecode/private/mx/core/elements/AccordionRegistrationAttributes.h @@ -53,7 +53,7 @@ namespace mx bool hasValign; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/ActualNotes.cpp b/Sourcecode/private/mx/core/elements/ActualNotes.cpp index f0ecf29e2..a6ee4e4c5 100755 --- a/Sourcecode/private/mx/core/elements/ActualNotes.cpp +++ b/Sourcecode/private/mx/core/elements/ActualNotes.cpp @@ -66,7 +66,7 @@ namespace mx } - bool ActualNotes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ActualNotes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/ActualNotes.h b/Sourcecode/private/mx/core/elements/ActualNotes.h index 29cf98169..c8e53cb2d 100755 --- a/Sourcecode/private/mx/core/elements/ActualNotes.h +++ b/Sourcecode/private/mx/core/elements/ActualNotes.h @@ -38,7 +38,7 @@ namespace mx void setValue( const NonNegativeInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NonNegativeInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/Alter.cpp b/Sourcecode/private/mx/core/elements/Alter.cpp index 37df5c51b..2dcf56540 100755 --- a/Sourcecode/private/mx/core/elements/Alter.cpp +++ b/Sourcecode/private/mx/core/elements/Alter.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Alter::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Alter::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Alter.h b/Sourcecode/private/mx/core/elements/Alter.h index 960f35ff0..7d171f0ca 100755 --- a/Sourcecode/private/mx/core/elements/Alter.h +++ b/Sourcecode/private/mx/core/elements/Alter.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Semitones& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Semitones myValue; diff --git a/Sourcecode/private/mx/core/elements/Appearance.cpp b/Sourcecode/private/mx/core/elements/Appearance.cpp index 30354df86..1cfebcc41 100755 --- a/Sourcecode/private/mx/core/elements/Appearance.cpp +++ b/Sourcecode/private/mx/core/elements/Appearance.cpp @@ -241,7 +241,7 @@ namespace mx } - bool Appearance::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Appearance::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/Appearance.h b/Sourcecode/private/mx/core/elements/Appearance.h index a3dc4f488..24193ae04 100755 --- a/Sourcecode/private/mx/core/elements/Appearance.h +++ b/Sourcecode/private/mx/core/elements/Appearance.h @@ -64,7 +64,7 @@ namespace mx OtherAppearancePtr getOtherAppearance( const OtherAppearanceSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: LineWidthSet myLineWidthSet; diff --git a/Sourcecode/private/mx/core/elements/Arpeggiate.cpp b/Sourcecode/private/mx/core/elements/Arpeggiate.cpp index e767d31e5..f027fe034 100755 --- a/Sourcecode/private/mx/core/elements/Arpeggiate.cpp +++ b/Sourcecode/private/mx/core/elements/Arpeggiate.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Arpeggiate::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Arpeggiate::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Arpeggiate.h b/Sourcecode/private/mx/core/elements/Arpeggiate.h index ced87c2f5..1f470c613 100755 --- a/Sourcecode/private/mx/core/elements/Arpeggiate.h +++ b/Sourcecode/private/mx/core/elements/Arpeggiate.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const ArpeggiateAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ArpeggiateAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/ArpeggiateAttributes.cpp b/Sourcecode/private/mx/core/elements/ArpeggiateAttributes.cpp index cb1a57053..13cac6391 100755 --- a/Sourcecode/private/mx/core/elements/ArpeggiateAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/ArpeggiateAttributes.cpp @@ -56,7 +56,7 @@ namespace mx } - bool ArpeggiateAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ArpeggiateAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "ArpeggiateAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/ArpeggiateAttributes.h b/Sourcecode/private/mx/core/elements/ArpeggiateAttributes.h index 1deca6c48..a83f77fd2 100755 --- a/Sourcecode/private/mx/core/elements/ArpeggiateAttributes.h +++ b/Sourcecode/private/mx/core/elements/ArpeggiateAttributes.h @@ -43,7 +43,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Arrow.cpp b/Sourcecode/private/mx/core/elements/Arrow.cpp index 469eaaf4e..e0a9d9958 100755 --- a/Sourcecode/private/mx/core/elements/Arrow.cpp +++ b/Sourcecode/private/mx/core/elements/Arrow.cpp @@ -129,7 +129,7 @@ namespace mx } - bool Arrow::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Arrow::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Arrow.h b/Sourcecode/private/mx/core/elements/Arrow.h index 6f7dd4082..14618709c 100755 --- a/Sourcecode/private/mx/core/elements/Arrow.h +++ b/Sourcecode/private/mx/core/elements/Arrow.h @@ -55,7 +55,7 @@ namespace mx void setCircularArrow( const CircularArrowPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/ArrowAttributes.cpp b/Sourcecode/private/mx/core/elements/ArrowAttributes.cpp index 8238f1da7..eec9383a4 100755 --- a/Sourcecode/private/mx/core/elements/ArrowAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/ArrowAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool ArrowAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ArrowAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "ArrowAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/ArrowAttributes.h b/Sourcecode/private/mx/core/elements/ArrowAttributes.h index 6d7e0c60f..bebab0f0b 100755 --- a/Sourcecode/private/mx/core/elements/ArrowAttributes.h +++ b/Sourcecode/private/mx/core/elements/ArrowAttributes.h @@ -51,7 +51,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/ArrowDirection.cpp b/Sourcecode/private/mx/core/elements/ArrowDirection.cpp index 62e1b8d2b..2ce6009c6 100755 --- a/Sourcecode/private/mx/core/elements/ArrowDirection.cpp +++ b/Sourcecode/private/mx/core/elements/ArrowDirection.cpp @@ -66,7 +66,7 @@ namespace mx } - bool ArrowDirection::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ArrowDirection::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseArrowDirectionEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/ArrowDirection.h b/Sourcecode/private/mx/core/elements/ArrowDirection.h index c267c1319..257d2cec2 100755 --- a/Sourcecode/private/mx/core/elements/ArrowDirection.h +++ b/Sourcecode/private/mx/core/elements/ArrowDirection.h @@ -38,7 +38,7 @@ namespace mx void setValue( const ArrowDirectionEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ArrowDirectionEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/ArrowGroup.cpp b/Sourcecode/private/mx/core/elements/ArrowGroup.cpp index dafccf4de..8ea3d0429 100755 --- a/Sourcecode/private/mx/core/elements/ArrowGroup.cpp +++ b/Sourcecode/private/mx/core/elements/ArrowGroup.cpp @@ -98,7 +98,7 @@ namespace mx } - bool ArrowGroup::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ArrowGroup::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isArrowDirectionFound = false; diff --git a/Sourcecode/private/mx/core/elements/ArrowGroup.h b/Sourcecode/private/mx/core/elements/ArrowGroup.h index b9e9d98a6..6be9b580c 100755 --- a/Sourcecode/private/mx/core/elements/ArrowGroup.h +++ b/Sourcecode/private/mx/core/elements/ArrowGroup.h @@ -44,7 +44,7 @@ namespace mx void setHasArrowStyle( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ArrowDirectionPtr myArrowDirection; diff --git a/Sourcecode/private/mx/core/elements/ArrowStyle.cpp b/Sourcecode/private/mx/core/elements/ArrowStyle.cpp index 42bed6924..f2eacf6b0 100755 --- a/Sourcecode/private/mx/core/elements/ArrowStyle.cpp +++ b/Sourcecode/private/mx/core/elements/ArrowStyle.cpp @@ -66,7 +66,7 @@ namespace mx } - bool ArrowStyle::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ArrowStyle::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseArrowStyleEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/ArrowStyle.h b/Sourcecode/private/mx/core/elements/ArrowStyle.h index 024712268..58fb2772f 100755 --- a/Sourcecode/private/mx/core/elements/ArrowStyle.h +++ b/Sourcecode/private/mx/core/elements/ArrowStyle.h @@ -38,7 +38,7 @@ namespace mx void setValue( const ArrowStyleEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ArrowStyleEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/Articulations.cpp b/Sourcecode/private/mx/core/elements/Articulations.cpp index a058cf61a..7477af83c 100755 --- a/Sourcecode/private/mx/core/elements/Articulations.cpp +++ b/Sourcecode/private/mx/core/elements/Articulations.cpp @@ -100,7 +100,7 @@ namespace mx } - bool Articulations::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Articulations::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/Articulations.h b/Sourcecode/private/mx/core/elements/Articulations.h index e347d2c14..9e8f46109 100755 --- a/Sourcecode/private/mx/core/elements/Articulations.h +++ b/Sourcecode/private/mx/core/elements/Articulations.h @@ -40,7 +40,7 @@ namespace mx ArticulationsChoicePtr getArticulationsChoice( const ArticulationsChoiceSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ArticulationsChoiceSet myArticulationsChoiceSet; diff --git a/Sourcecode/private/mx/core/elements/ArticulationsChoice.cpp b/Sourcecode/private/mx/core/elements/ArticulationsChoice.cpp index c2e551d86..66140a4ba 100755 --- a/Sourcecode/private/mx/core/elements/ArticulationsChoice.cpp +++ b/Sourcecode/private/mx/core/elements/ArticulationsChoice.cpp @@ -417,7 +417,7 @@ namespace mx } - bool ArticulationsChoice::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ArticulationsChoice::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { if( xelement.getName() == "accent" ) { diff --git a/Sourcecode/private/mx/core/elements/ArticulationsChoice.h b/Sourcecode/private/mx/core/elements/ArticulationsChoice.h index 0559fb2f0..4d82061cd 100755 --- a/Sourcecode/private/mx/core/elements/ArticulationsChoice.h +++ b/Sourcecode/private/mx/core/elements/ArticulationsChoice.h @@ -135,7 +135,7 @@ namespace mx void setOtherArticulation( const OtherArticulationPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/Artificial.cpp b/Sourcecode/private/mx/core/elements/Artificial.cpp index 477d350f1..809ce27c1 100755 --- a/Sourcecode/private/mx/core/elements/Artificial.cpp +++ b/Sourcecode/private/mx/core/elements/Artificial.cpp @@ -27,7 +27,7 @@ namespace mx } - bool Artificial::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Artificial::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Artificial.h b/Sourcecode/private/mx/core/elements/Artificial.h index e001b5a34..9f260b515 100755 --- a/Sourcecode/private/mx/core/elements/Artificial.h +++ b/Sourcecode/private/mx/core/elements/Artificial.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Backup.cpp b/Sourcecode/private/mx/core/elements/Backup.cpp index aa6d0c56b..2af48365b 100755 --- a/Sourcecode/private/mx/core/elements/Backup.cpp +++ b/Sourcecode/private/mx/core/elements/Backup.cpp @@ -88,7 +88,7 @@ namespace mx } - bool Backup::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Backup::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isDurationFound = false; diff --git a/Sourcecode/private/mx/core/elements/Backup.h b/Sourcecode/private/mx/core/elements/Backup.h index a287fc1d3..9485a2b41 100755 --- a/Sourcecode/private/mx/core/elements/Backup.h +++ b/Sourcecode/private/mx/core/elements/Backup.h @@ -42,7 +42,7 @@ namespace mx void setEditorialGroup( const EditorialGroupPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: DurationPtr myDuration; diff --git a/Sourcecode/private/mx/core/elements/BarStyle.cpp b/Sourcecode/private/mx/core/elements/BarStyle.cpp index 9a53099a4..82ab7be09 100755 --- a/Sourcecode/private/mx/core/elements/BarStyle.cpp +++ b/Sourcecode/private/mx/core/elements/BarStyle.cpp @@ -87,7 +87,7 @@ namespace mx } - bool BarStyle::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BarStyle::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/BarStyle.h b/Sourcecode/private/mx/core/elements/BarStyle.h index 90bb2a0ee..9488d453c 100755 --- a/Sourcecode/private/mx/core/elements/BarStyle.h +++ b/Sourcecode/private/mx/core/elements/BarStyle.h @@ -42,7 +42,7 @@ namespace mx void setValue( const BarStyleEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BarStyleEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/BarStyleAttributes.cpp b/Sourcecode/private/mx/core/elements/BarStyleAttributes.cpp index 5b88bb422..a3557b014 100755 --- a/Sourcecode/private/mx/core/elements/BarStyleAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/BarStyleAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool BarStyleAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BarStyleAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "BarStyleAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/BarStyleAttributes.h b/Sourcecode/private/mx/core/elements/BarStyleAttributes.h index 9fa67f7af..6ee38c5a1 100755 --- a/Sourcecode/private/mx/core/elements/BarStyleAttributes.h +++ b/Sourcecode/private/mx/core/elements/BarStyleAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasColor; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Barline.cpp b/Sourcecode/private/mx/core/elements/Barline.cpp index 9aa759ab8..63f36efd0 100755 --- a/Sourcecode/private/mx/core/elements/Barline.cpp +++ b/Sourcecode/private/mx/core/elements/Barline.cpp @@ -358,7 +358,7 @@ namespace mx } - bool Barline::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Barline::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Barline.h b/Sourcecode/private/mx/core/elements/Barline.h index 0ab962057..bb6b247be 100755 --- a/Sourcecode/private/mx/core/elements/Barline.h +++ b/Sourcecode/private/mx/core/elements/Barline.h @@ -91,7 +91,7 @@ namespace mx void setHasRepeat( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BarlineAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/BarlineAttributes.cpp b/Sourcecode/private/mx/core/elements/BarlineAttributes.cpp index 468f32092..6a55db03c 100755 --- a/Sourcecode/private/mx/core/elements/BarlineAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/BarlineAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool BarlineAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BarlineAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "BarlineAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/BarlineAttributes.h b/Sourcecode/private/mx/core/elements/BarlineAttributes.h index 0c18c6e8b..ce614140d 100755 --- a/Sourcecode/private/mx/core/elements/BarlineAttributes.h +++ b/Sourcecode/private/mx/core/elements/BarlineAttributes.h @@ -37,7 +37,7 @@ namespace mx bool hasDivisions; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Barre.cpp b/Sourcecode/private/mx/core/elements/Barre.cpp index 19b477419..494691071 100755 --- a/Sourcecode/private/mx/core/elements/Barre.cpp +++ b/Sourcecode/private/mx/core/elements/Barre.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Barre::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Barre::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Barre.h b/Sourcecode/private/mx/core/elements/Barre.h index 2bff510e9..8447be667 100755 --- a/Sourcecode/private/mx/core/elements/Barre.h +++ b/Sourcecode/private/mx/core/elements/Barre.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const BarreAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BarreAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/BarreAttributes.cpp b/Sourcecode/private/mx/core/elements/BarreAttributes.cpp index 738b7d515..5052fc9ac 100755 --- a/Sourcecode/private/mx/core/elements/BarreAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/BarreAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool BarreAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BarreAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "BarreAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/BarreAttributes.h b/Sourcecode/private/mx/core/elements/BarreAttributes.h index c191c4aa8..047a7c34a 100755 --- a/Sourcecode/private/mx/core/elements/BarreAttributes.h +++ b/Sourcecode/private/mx/core/elements/BarreAttributes.h @@ -29,7 +29,7 @@ namespace mx const bool hasType; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/BasePitch.cpp b/Sourcecode/private/mx/core/elements/BasePitch.cpp index 3b7d299e2..1d7bdb4bd 100755 --- a/Sourcecode/private/mx/core/elements/BasePitch.cpp +++ b/Sourcecode/private/mx/core/elements/BasePitch.cpp @@ -27,7 +27,7 @@ namespace mx } - bool BasePitch::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BasePitch::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/BasePitch.h b/Sourcecode/private/mx/core/elements/BasePitch.h index bbbcc9ccb..d0d5f2ad0 100755 --- a/Sourcecode/private/mx/core/elements/BasePitch.h +++ b/Sourcecode/private/mx/core/elements/BasePitch.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Bass.cpp b/Sourcecode/private/mx/core/elements/Bass.cpp index 113c17af5..a1fa028ff 100755 --- a/Sourcecode/private/mx/core/elements/Bass.cpp +++ b/Sourcecode/private/mx/core/elements/Bass.cpp @@ -101,7 +101,7 @@ namespace mx } - bool Bass::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Bass::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isBassStepFound = false; diff --git a/Sourcecode/private/mx/core/elements/Bass.h b/Sourcecode/private/mx/core/elements/Bass.h index c7a74290d..4ac3b7c7d 100755 --- a/Sourcecode/private/mx/core/elements/Bass.h +++ b/Sourcecode/private/mx/core/elements/Bass.h @@ -44,7 +44,7 @@ namespace mx void setHasBassAlter( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BassStepPtr myBassStep; diff --git a/Sourcecode/private/mx/core/elements/BassAlter.cpp b/Sourcecode/private/mx/core/elements/BassAlter.cpp index 754b98f1a..5cc3c69d4 100755 --- a/Sourcecode/private/mx/core/elements/BassAlter.cpp +++ b/Sourcecode/private/mx/core/elements/BassAlter.cpp @@ -87,7 +87,7 @@ namespace mx } - bool BassAlter::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BassAlter::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/BassAlter.h b/Sourcecode/private/mx/core/elements/BassAlter.h index f44475301..d635df68c 100755 --- a/Sourcecode/private/mx/core/elements/BassAlter.h +++ b/Sourcecode/private/mx/core/elements/BassAlter.h @@ -42,7 +42,7 @@ namespace mx void setValue( const Semitones& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Semitones myValue; diff --git a/Sourcecode/private/mx/core/elements/BassAlterAttributes.cpp b/Sourcecode/private/mx/core/elements/BassAlterAttributes.cpp index 98113a0b9..dfb30752c 100755 --- a/Sourcecode/private/mx/core/elements/BassAlterAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/BassAlterAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool BassAlterAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BassAlterAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "BassAlterAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/BassAlterAttributes.h b/Sourcecode/private/mx/core/elements/BassAlterAttributes.h index 6d1456166..86c1789f7 100755 --- a/Sourcecode/private/mx/core/elements/BassAlterAttributes.h +++ b/Sourcecode/private/mx/core/elements/BassAlterAttributes.h @@ -50,7 +50,7 @@ namespace mx bool hasLocation; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/BassStep.cpp b/Sourcecode/private/mx/core/elements/BassStep.cpp index e373dbaee..cc511beb6 100755 --- a/Sourcecode/private/mx/core/elements/BassStep.cpp +++ b/Sourcecode/private/mx/core/elements/BassStep.cpp @@ -87,7 +87,7 @@ namespace mx } - bool BassStep::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BassStep::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/BassStep.h b/Sourcecode/private/mx/core/elements/BassStep.h index cb2ed5239..058c72ad6 100755 --- a/Sourcecode/private/mx/core/elements/BassStep.h +++ b/Sourcecode/private/mx/core/elements/BassStep.h @@ -42,7 +42,7 @@ namespace mx void setValue( const StepEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StepEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/BassStepAttributes.cpp b/Sourcecode/private/mx/core/elements/BassStepAttributes.cpp index 1d8a44595..c55d53cbf 100755 --- a/Sourcecode/private/mx/core/elements/BassStepAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/BassStepAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool BassStepAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BassStepAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "BassStepAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/BassStepAttributes.h b/Sourcecode/private/mx/core/elements/BassStepAttributes.h index 7d687f6f6..4cd3c615e 100755 --- a/Sourcecode/private/mx/core/elements/BassStepAttributes.h +++ b/Sourcecode/private/mx/core/elements/BassStepAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Beam.cpp b/Sourcecode/private/mx/core/elements/Beam.cpp index c8ac0034c..ecb8937fe 100755 --- a/Sourcecode/private/mx/core/elements/Beam.cpp +++ b/Sourcecode/private/mx/core/elements/Beam.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Beam::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Beam::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Beam.h b/Sourcecode/private/mx/core/elements/Beam.h index 4dfe010a3..b0a8bf64d 100755 --- a/Sourcecode/private/mx/core/elements/Beam.h +++ b/Sourcecode/private/mx/core/elements/Beam.h @@ -42,7 +42,7 @@ namespace mx void setValue( const BeamValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BeamValue myValue; diff --git a/Sourcecode/private/mx/core/elements/BeamAttributes.cpp b/Sourcecode/private/mx/core/elements/BeamAttributes.cpp index 9ebe422b1..236b00c42 100755 --- a/Sourcecode/private/mx/core/elements/BeamAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/BeamAttributes.cpp @@ -40,7 +40,7 @@ namespace mx } - bool BeamAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BeamAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "BeamAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/BeamAttributes.h b/Sourcecode/private/mx/core/elements/BeamAttributes.h index ed29a8b8b..ba0b12027 100755 --- a/Sourcecode/private/mx/core/elements/BeamAttributes.h +++ b/Sourcecode/private/mx/core/elements/BeamAttributes.h @@ -34,7 +34,7 @@ namespace mx bool hasFan; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/BeatRepeat.cpp b/Sourcecode/private/mx/core/elements/BeatRepeat.cpp index ea0d8e48b..841b6d94b 100755 --- a/Sourcecode/private/mx/core/elements/BeatRepeat.cpp +++ b/Sourcecode/private/mx/core/elements/BeatRepeat.cpp @@ -122,7 +122,7 @@ namespace mx } - bool BeatRepeat::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BeatRepeat::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/BeatRepeat.h b/Sourcecode/private/mx/core/elements/BeatRepeat.h index a40c04773..9b74bd1b3 100755 --- a/Sourcecode/private/mx/core/elements/BeatRepeat.h +++ b/Sourcecode/private/mx/core/elements/BeatRepeat.h @@ -48,7 +48,7 @@ namespace mx void clearSlashDotSet(); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BeatRepeatAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/BeatRepeatAttributes.cpp b/Sourcecode/private/mx/core/elements/BeatRepeatAttributes.cpp index d4dda2519..19697ef6b 100755 --- a/Sourcecode/private/mx/core/elements/BeatRepeatAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/BeatRepeatAttributes.cpp @@ -40,7 +40,7 @@ namespace mx } - bool BeatRepeatAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BeatRepeatAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "BeatRepeatAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/BeatRepeatAttributes.h b/Sourcecode/private/mx/core/elements/BeatRepeatAttributes.h index 80f36341f..e10335668 100755 --- a/Sourcecode/private/mx/core/elements/BeatRepeatAttributes.h +++ b/Sourcecode/private/mx/core/elements/BeatRepeatAttributes.h @@ -34,7 +34,7 @@ namespace mx bool hasUseDots; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/BeatType.cpp b/Sourcecode/private/mx/core/elements/BeatType.cpp index a3745a1b2..1a0117d9f 100755 --- a/Sourcecode/private/mx/core/elements/BeatType.cpp +++ b/Sourcecode/private/mx/core/elements/BeatType.cpp @@ -66,7 +66,7 @@ namespace mx } - bool BeatType::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BeatType::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/BeatType.h b/Sourcecode/private/mx/core/elements/BeatType.h index 8db0d9fd7..c8dc6a081 100755 --- a/Sourcecode/private/mx/core/elements/BeatType.h +++ b/Sourcecode/private/mx/core/elements/BeatType.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/BeatUnit.cpp b/Sourcecode/private/mx/core/elements/BeatUnit.cpp index a55afede3..447b61414 100755 --- a/Sourcecode/private/mx/core/elements/BeatUnit.cpp +++ b/Sourcecode/private/mx/core/elements/BeatUnit.cpp @@ -66,7 +66,7 @@ namespace mx } - bool BeatUnit::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BeatUnit::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseNoteTypeValue( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/BeatUnit.h b/Sourcecode/private/mx/core/elements/BeatUnit.h index e60d42a2c..303f7e086 100755 --- a/Sourcecode/private/mx/core/elements/BeatUnit.h +++ b/Sourcecode/private/mx/core/elements/BeatUnit.h @@ -38,7 +38,7 @@ namespace mx void setValue( const NoteTypeValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NoteTypeValue myValue; diff --git a/Sourcecode/private/mx/core/elements/BeatUnitDot.cpp b/Sourcecode/private/mx/core/elements/BeatUnitDot.cpp index b71be39c9..c1809da03 100755 --- a/Sourcecode/private/mx/core/elements/BeatUnitDot.cpp +++ b/Sourcecode/private/mx/core/elements/BeatUnitDot.cpp @@ -27,7 +27,7 @@ namespace mx } - bool BeatUnitDot::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BeatUnitDot::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/BeatUnitDot.h b/Sourcecode/private/mx/core/elements/BeatUnitDot.h index e7f3cf8e9..413954739 100755 --- a/Sourcecode/private/mx/core/elements/BeatUnitDot.h +++ b/Sourcecode/private/mx/core/elements/BeatUnitDot.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/BeatUnitGroup.cpp b/Sourcecode/private/mx/core/elements/BeatUnitGroup.cpp index 9088fcb2b..233ed5d33 100755 --- a/Sourcecode/private/mx/core/elements/BeatUnitGroup.cpp +++ b/Sourcecode/private/mx/core/elements/BeatUnitGroup.cpp @@ -99,7 +99,7 @@ namespace mx myBeatUnitDotSet.clear(); } - bool BeatUnitGroup::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BeatUnitGroup::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isBeatUnitFound = false; diff --git a/Sourcecode/private/mx/core/elements/BeatUnitGroup.h b/Sourcecode/private/mx/core/elements/BeatUnitGroup.h index c3c66f382..7dfca15c2 100755 --- a/Sourcecode/private/mx/core/elements/BeatUnitGroup.h +++ b/Sourcecode/private/mx/core/elements/BeatUnitGroup.h @@ -44,7 +44,7 @@ namespace mx void clearBeatUnitDotSet(); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BeatUnitPtr myBeatUnit; diff --git a/Sourcecode/private/mx/core/elements/BeatUnitPer.cpp b/Sourcecode/private/mx/core/elements/BeatUnitPer.cpp index 242e61ec3..6d6046a0c 100755 --- a/Sourcecode/private/mx/core/elements/BeatUnitPer.cpp +++ b/Sourcecode/private/mx/core/elements/BeatUnitPer.cpp @@ -82,7 +82,7 @@ namespace mx } - bool BeatUnitPer::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BeatUnitPer::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/BeatUnitPer.h b/Sourcecode/private/mx/core/elements/BeatUnitPer.h index f05fb9b76..e503aafcd 100755 --- a/Sourcecode/private/mx/core/elements/BeatUnitPer.h +++ b/Sourcecode/private/mx/core/elements/BeatUnitPer.h @@ -38,7 +38,7 @@ namespace mx void setPerMinuteOtBeatUnitChoice( const PerMinuteOrBeatUnitChoicePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BeatUnitGroupPtr myBeatUnitGroup; diff --git a/Sourcecode/private/mx/core/elements/BeatUnitPerOrNoteRelationNoteChoice.cpp b/Sourcecode/private/mx/core/elements/BeatUnitPerOrNoteRelationNoteChoice.cpp index 88b8188ae..6dee9d594 100755 --- a/Sourcecode/private/mx/core/elements/BeatUnitPerOrNoteRelationNoteChoice.cpp +++ b/Sourcecode/private/mx/core/elements/BeatUnitPerOrNoteRelationNoteChoice.cpp @@ -104,7 +104,7 @@ namespace mx } - bool BeatUnitPerOrNoteRelationNoteChoice::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BeatUnitPerOrNoteRelationNoteChoice::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_CHOICE_IF( beatUnitPer, "beat-unit-per", BeatUnitPer ); MX_CHOICE_IF( noteRelationNote, "note-relation-note", NoteRelationNote ); diff --git a/Sourcecode/private/mx/core/elements/BeatUnitPerOrNoteRelationNoteChoice.h b/Sourcecode/private/mx/core/elements/BeatUnitPerOrNoteRelationNoteChoice.h index a5a8f25e2..de6980b15 100755 --- a/Sourcecode/private/mx/core/elements/BeatUnitPerOrNoteRelationNoteChoice.h +++ b/Sourcecode/private/mx/core/elements/BeatUnitPerOrNoteRelationNoteChoice.h @@ -45,7 +45,7 @@ namespace mx void setNoteRelationNote( const NoteRelationNotePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/Beater.cpp b/Sourcecode/private/mx/core/elements/Beater.cpp index 72b8afa99..7341a60d4 100755 --- a/Sourcecode/private/mx/core/elements/Beater.cpp +++ b/Sourcecode/private/mx/core/elements/Beater.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Beater::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Beater::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Beater.h b/Sourcecode/private/mx/core/elements/Beater.h index 38adca12a..2340150cd 100755 --- a/Sourcecode/private/mx/core/elements/Beater.h +++ b/Sourcecode/private/mx/core/elements/Beater.h @@ -42,7 +42,7 @@ namespace mx void setValue( const BeaterValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BeaterValue myValue; diff --git a/Sourcecode/private/mx/core/elements/BeaterAttributes.cpp b/Sourcecode/private/mx/core/elements/BeaterAttributes.cpp index a69d7d776..ca96c39d1 100755 --- a/Sourcecode/private/mx/core/elements/BeaterAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/BeaterAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool BeaterAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BeaterAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "BeaterAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/BeaterAttributes.h b/Sourcecode/private/mx/core/elements/BeaterAttributes.h index ec55f442b..18d78a099 100755 --- a/Sourcecode/private/mx/core/elements/BeaterAttributes.h +++ b/Sourcecode/private/mx/core/elements/BeaterAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasTip; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Beats.cpp b/Sourcecode/private/mx/core/elements/Beats.cpp index dfb29d2ce..76f1db1b8 100755 --- a/Sourcecode/private/mx/core/elements/Beats.cpp +++ b/Sourcecode/private/mx/core/elements/Beats.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Beats::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Beats::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Beats.h b/Sourcecode/private/mx/core/elements/Beats.h index 1fa3efe9a..64b9fc2fc 100755 --- a/Sourcecode/private/mx/core/elements/Beats.h +++ b/Sourcecode/private/mx/core/elements/Beats.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/Bend.cpp b/Sourcecode/private/mx/core/elements/Bend.cpp index 35d4ebcc7..752e82e89 100755 --- a/Sourcecode/private/mx/core/elements/Bend.cpp +++ b/Sourcecode/private/mx/core/elements/Bend.cpp @@ -158,7 +158,7 @@ namespace mx } - bool Bend::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Bend::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Bend.h b/Sourcecode/private/mx/core/elements/Bend.h index 7756a5e0f..b65a792f9 100755 --- a/Sourcecode/private/mx/core/elements/Bend.h +++ b/Sourcecode/private/mx/core/elements/Bend.h @@ -55,7 +55,7 @@ namespace mx void setHasWithBar( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BendAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/BendAlter.cpp b/Sourcecode/private/mx/core/elements/BendAlter.cpp index 83e720cbe..415542d24 100755 --- a/Sourcecode/private/mx/core/elements/BendAlter.cpp +++ b/Sourcecode/private/mx/core/elements/BendAlter.cpp @@ -66,7 +66,7 @@ namespace mx } - bool BendAlter::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BendAlter::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/BendAlter.h b/Sourcecode/private/mx/core/elements/BendAlter.h index 9b1f46bd4..7f6cdafe5 100755 --- a/Sourcecode/private/mx/core/elements/BendAlter.h +++ b/Sourcecode/private/mx/core/elements/BendAlter.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Semitones& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Semitones myValue; diff --git a/Sourcecode/private/mx/core/elements/BendAttributes.cpp b/Sourcecode/private/mx/core/elements/BendAttributes.cpp index 4c1380aaa..7ae010823 100755 --- a/Sourcecode/private/mx/core/elements/BendAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/BendAttributes.cpp @@ -80,7 +80,7 @@ namespace mx } - bool BendAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BendAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "BendAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/BendAttributes.h b/Sourcecode/private/mx/core/elements/BendAttributes.h index 549668cc7..8cde04c4a 100755 --- a/Sourcecode/private/mx/core/elements/BendAttributes.h +++ b/Sourcecode/private/mx/core/elements/BendAttributes.h @@ -57,7 +57,7 @@ namespace mx bool hasLastBeat; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/BendChoice.h b/Sourcecode/private/mx/core/elements/BendChoice.h index a91f33132..2efc63f3d 100755 --- a/Sourcecode/private/mx/core/elements/BendChoice.h +++ b/Sourcecode/private/mx/core/elements/BendChoice.h @@ -49,7 +49,7 @@ namespace mx void setRelease( const ReleasePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/Bookmark.cpp b/Sourcecode/private/mx/core/elements/Bookmark.cpp index 656ef7fd0..01d77ba79 100755 --- a/Sourcecode/private/mx/core/elements/Bookmark.cpp +++ b/Sourcecode/private/mx/core/elements/Bookmark.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Bookmark::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Bookmark::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Bookmark.h b/Sourcecode/private/mx/core/elements/Bookmark.h index a93cb7802..b99dbf27b 100755 --- a/Sourcecode/private/mx/core/elements/Bookmark.h +++ b/Sourcecode/private/mx/core/elements/Bookmark.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const BookmarkAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BookmarkAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/BookmarkAttributes.cpp b/Sourcecode/private/mx/core/elements/BookmarkAttributes.cpp index 24ab66596..a3490808c 100755 --- a/Sourcecode/private/mx/core/elements/BookmarkAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/BookmarkAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool BookmarkAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BookmarkAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "BookmarkAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/BookmarkAttributes.h b/Sourcecode/private/mx/core/elements/BookmarkAttributes.h index 71b78b9ce..ffdabfb08 100755 --- a/Sourcecode/private/mx/core/elements/BookmarkAttributes.h +++ b/Sourcecode/private/mx/core/elements/BookmarkAttributes.h @@ -36,7 +36,7 @@ namespace mx bool hasPosition; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/BottomMargin.cpp b/Sourcecode/private/mx/core/elements/BottomMargin.cpp index b1066ab90..5abf2e5d8 100755 --- a/Sourcecode/private/mx/core/elements/BottomMargin.cpp +++ b/Sourcecode/private/mx/core/elements/BottomMargin.cpp @@ -66,7 +66,7 @@ namespace mx } - bool BottomMargin::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BottomMargin::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/BottomMargin.h b/Sourcecode/private/mx/core/elements/BottomMargin.h index bf1814992..1fc2eb0b6 100755 --- a/Sourcecode/private/mx/core/elements/BottomMargin.h +++ b/Sourcecode/private/mx/core/elements/BottomMargin.h @@ -38,7 +38,7 @@ namespace mx void setValue( const TenthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TenthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/Bracket.cpp b/Sourcecode/private/mx/core/elements/Bracket.cpp index ba97a7465..40ccdc0b3 100755 --- a/Sourcecode/private/mx/core/elements/Bracket.cpp +++ b/Sourcecode/private/mx/core/elements/Bracket.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Bracket::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Bracket::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Bracket.h b/Sourcecode/private/mx/core/elements/Bracket.h index ad75ac7d1..8f2aff7f0 100755 --- a/Sourcecode/private/mx/core/elements/Bracket.h +++ b/Sourcecode/private/mx/core/elements/Bracket.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const BracketAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BracketAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/BracketAttributes.cpp b/Sourcecode/private/mx/core/elements/BracketAttributes.cpp index a0c8bea81..5bd4d456d 100755 --- a/Sourcecode/private/mx/core/elements/BracketAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/BracketAttributes.cpp @@ -66,7 +66,7 @@ namespace mx } - bool BracketAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BracketAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "BracketAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/BracketAttributes.h b/Sourcecode/private/mx/core/elements/BracketAttributes.h index 840e4e55e..2585fdc89 100755 --- a/Sourcecode/private/mx/core/elements/BracketAttributes.h +++ b/Sourcecode/private/mx/core/elements/BracketAttributes.h @@ -63,7 +63,7 @@ namespace mx bool hasColor; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/BreathMark.cpp b/Sourcecode/private/mx/core/elements/BreathMark.cpp index 21e7c8af5..faf3b042a 100755 --- a/Sourcecode/private/mx/core/elements/BreathMark.cpp +++ b/Sourcecode/private/mx/core/elements/BreathMark.cpp @@ -87,7 +87,7 @@ namespace mx } - bool BreathMark::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BreathMark::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/BreathMark.h b/Sourcecode/private/mx/core/elements/BreathMark.h index abb469af7..706e906c3 100755 --- a/Sourcecode/private/mx/core/elements/BreathMark.h +++ b/Sourcecode/private/mx/core/elements/BreathMark.h @@ -42,7 +42,7 @@ namespace mx void setValue( const BreathMarkValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BreathMarkValue myValue; diff --git a/Sourcecode/private/mx/core/elements/BreathMarkAttributes.cpp b/Sourcecode/private/mx/core/elements/BreathMarkAttributes.cpp index 65486b75b..ba819fdb1 100755 --- a/Sourcecode/private/mx/core/elements/BreathMarkAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/BreathMarkAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool BreathMarkAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool BreathMarkAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "BreathMarkAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/BreathMarkAttributes.h b/Sourcecode/private/mx/core/elements/BreathMarkAttributes.h index 677e597c6..e1daa612c 100755 --- a/Sourcecode/private/mx/core/elements/BreathMarkAttributes.h +++ b/Sourcecode/private/mx/core/elements/BreathMarkAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Caesura.cpp b/Sourcecode/private/mx/core/elements/Caesura.cpp index 91b6abf02..2ce3319ce 100755 --- a/Sourcecode/private/mx/core/elements/Caesura.cpp +++ b/Sourcecode/private/mx/core/elements/Caesura.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Caesura::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Caesura::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Caesura.h b/Sourcecode/private/mx/core/elements/Caesura.h index 40fd7dd22..08fa65606 100755 --- a/Sourcecode/private/mx/core/elements/Caesura.h +++ b/Sourcecode/private/mx/core/elements/Caesura.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Cancel.cpp b/Sourcecode/private/mx/core/elements/Cancel.cpp index 191abb2c9..e63b2a80d 100755 --- a/Sourcecode/private/mx/core/elements/Cancel.cpp +++ b/Sourcecode/private/mx/core/elements/Cancel.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Cancel::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Cancel::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Cancel.h b/Sourcecode/private/mx/core/elements/Cancel.h index 46bced8b6..62f582daf 100755 --- a/Sourcecode/private/mx/core/elements/Cancel.h +++ b/Sourcecode/private/mx/core/elements/Cancel.h @@ -42,7 +42,7 @@ namespace mx void setValue( const FifthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: FifthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/CancelAttributes.cpp b/Sourcecode/private/mx/core/elements/CancelAttributes.cpp index 6a8dee23e..e00de9d50 100755 --- a/Sourcecode/private/mx/core/elements/CancelAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/CancelAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool CancelAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool CancelAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "CancelAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/CancelAttributes.h b/Sourcecode/private/mx/core/elements/CancelAttributes.h index 7230be6ef..02a793e7e 100755 --- a/Sourcecode/private/mx/core/elements/CancelAttributes.h +++ b/Sourcecode/private/mx/core/elements/CancelAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasLocation; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Capo.cpp b/Sourcecode/private/mx/core/elements/Capo.cpp index 4c052b730..faecb59fc 100755 --- a/Sourcecode/private/mx/core/elements/Capo.cpp +++ b/Sourcecode/private/mx/core/elements/Capo.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Capo::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Capo::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Capo.h b/Sourcecode/private/mx/core/elements/Capo.h index 88c0b006a..82589bb5c 100755 --- a/Sourcecode/private/mx/core/elements/Capo.h +++ b/Sourcecode/private/mx/core/elements/Capo.h @@ -38,7 +38,7 @@ namespace mx void setValue( const NonNegativeInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NonNegativeInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/Chord.cpp b/Sourcecode/private/mx/core/elements/Chord.cpp index e2e4a3306..221b0f274 100755 --- a/Sourcecode/private/mx/core/elements/Chord.cpp +++ b/Sourcecode/private/mx/core/elements/Chord.cpp @@ -27,7 +27,7 @@ namespace mx } - bool Chord::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Chord::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Chord.h b/Sourcecode/private/mx/core/elements/Chord.h index 94b993f45..6142c9dcc 100755 --- a/Sourcecode/private/mx/core/elements/Chord.h +++ b/Sourcecode/private/mx/core/elements/Chord.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Chromatic.cpp b/Sourcecode/private/mx/core/elements/Chromatic.cpp index b91b61fb7..f6792a76b 100755 --- a/Sourcecode/private/mx/core/elements/Chromatic.cpp +++ b/Sourcecode/private/mx/core/elements/Chromatic.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Chromatic::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Chromatic::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Chromatic.h b/Sourcecode/private/mx/core/elements/Chromatic.h index 64f58d798..bef306800 100755 --- a/Sourcecode/private/mx/core/elements/Chromatic.h +++ b/Sourcecode/private/mx/core/elements/Chromatic.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Semitones& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Semitones myValue; diff --git a/Sourcecode/private/mx/core/elements/CircularArrow.cpp b/Sourcecode/private/mx/core/elements/CircularArrow.cpp index 100c90872..8d690236a 100755 --- a/Sourcecode/private/mx/core/elements/CircularArrow.cpp +++ b/Sourcecode/private/mx/core/elements/CircularArrow.cpp @@ -66,7 +66,7 @@ namespace mx } - bool CircularArrow::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool CircularArrow::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseCircularArrowEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/CircularArrow.h b/Sourcecode/private/mx/core/elements/CircularArrow.h index b2b3cd058..20053634c 100755 --- a/Sourcecode/private/mx/core/elements/CircularArrow.h +++ b/Sourcecode/private/mx/core/elements/CircularArrow.h @@ -38,7 +38,7 @@ namespace mx void setValue( const CircularArrowEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: CircularArrowEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/Clef.cpp b/Sourcecode/private/mx/core/elements/Clef.cpp index 1e93c0311..f234a191e 100755 --- a/Sourcecode/private/mx/core/elements/Clef.cpp +++ b/Sourcecode/private/mx/core/elements/Clef.cpp @@ -152,7 +152,7 @@ namespace mx } - bool Clef::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Clef::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Clef.h b/Sourcecode/private/mx/core/elements/Clef.h index c86b5cbc3..9181c5208 100755 --- a/Sourcecode/private/mx/core/elements/Clef.h +++ b/Sourcecode/private/mx/core/elements/Clef.h @@ -55,7 +55,7 @@ namespace mx void setHasClefOctaveChange( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ClefAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/ClefAttributes.cpp b/Sourcecode/private/mx/core/elements/ClefAttributes.cpp index a117b52db..d24008352 100755 --- a/Sourcecode/private/mx/core/elements/ClefAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/ClefAttributes.cpp @@ -84,7 +84,7 @@ namespace mx } - bool ClefAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ClefAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "ClefAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/ClefAttributes.h b/Sourcecode/private/mx/core/elements/ClefAttributes.h index 9535c6f11..b33656570 100755 --- a/Sourcecode/private/mx/core/elements/ClefAttributes.h +++ b/Sourcecode/private/mx/core/elements/ClefAttributes.h @@ -60,7 +60,7 @@ namespace mx bool hasPrintObject; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/ClefOctaveChange.cpp b/Sourcecode/private/mx/core/elements/ClefOctaveChange.cpp index abab6e18f..42cff2ed3 100755 --- a/Sourcecode/private/mx/core/elements/ClefOctaveChange.cpp +++ b/Sourcecode/private/mx/core/elements/ClefOctaveChange.cpp @@ -66,7 +66,7 @@ namespace mx } - bool ClefOctaveChange::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ClefOctaveChange::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/ClefOctaveChange.h b/Sourcecode/private/mx/core/elements/ClefOctaveChange.h index 60541e073..09066bca6 100755 --- a/Sourcecode/private/mx/core/elements/ClefOctaveChange.h +++ b/Sourcecode/private/mx/core/elements/ClefOctaveChange.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Integer& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Integer myValue; diff --git a/Sourcecode/private/mx/core/elements/Coda.cpp b/Sourcecode/private/mx/core/elements/Coda.cpp index e42dbd826..d38f2bb7b 100755 --- a/Sourcecode/private/mx/core/elements/Coda.cpp +++ b/Sourcecode/private/mx/core/elements/Coda.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Coda::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Coda::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Coda.h b/Sourcecode/private/mx/core/elements/Coda.h index 71f2b3fa1..06802c601 100755 --- a/Sourcecode/private/mx/core/elements/Coda.h +++ b/Sourcecode/private/mx/core/elements/Coda.h @@ -35,7 +35,7 @@ namespace mx void setAttributes( const EmptyPrintObjectStyleAlignAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPrintObjectStyleAlignAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Creator.cpp b/Sourcecode/private/mx/core/elements/Creator.cpp index 9fabb6954..ab7b98bdf 100755 --- a/Sourcecode/private/mx/core/elements/Creator.cpp +++ b/Sourcecode/private/mx/core/elements/Creator.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Creator::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Creator::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Creator.h b/Sourcecode/private/mx/core/elements/Creator.h index 64379dc91..e59586c97 100755 --- a/Sourcecode/private/mx/core/elements/Creator.h +++ b/Sourcecode/private/mx/core/elements/Creator.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/CreatorAttributes.cpp b/Sourcecode/private/mx/core/elements/CreatorAttributes.cpp index e8b8b16ad..197a1fcff 100755 --- a/Sourcecode/private/mx/core/elements/CreatorAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/CreatorAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool CreatorAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool CreatorAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "CreatorAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/CreatorAttributes.h b/Sourcecode/private/mx/core/elements/CreatorAttributes.h index 31f378062..dedc245bd 100755 --- a/Sourcecode/private/mx/core/elements/CreatorAttributes.h +++ b/Sourcecode/private/mx/core/elements/CreatorAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasType; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Credit.cpp b/Sourcecode/private/mx/core/elements/Credit.cpp index 0134a5b8e..aa3d20067 100755 --- a/Sourcecode/private/mx/core/elements/Credit.cpp +++ b/Sourcecode/private/mx/core/elements/Credit.cpp @@ -238,14 +238,14 @@ namespace mx } #endif - bool Credit::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Credit::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); bool isCreditImageOrCreditWordsFound = false; - xml::XElementIterator i = xelement.begin(); - xml::XElementIterator endIter = xelement.end(); + ::ezxml::XElementIterator i = xelement.begin(); + ::ezxml::XElementIterator endIter = xelement.end(); MX_CREDIT_RETURN_IF_END; if( i->getName() == "credit-type" ) diff --git a/Sourcecode/private/mx/core/elements/Credit.h b/Sourcecode/private/mx/core/elements/Credit.h index 0ef044d9d..379b17a1d 100755 --- a/Sourcecode/private/mx/core/elements/Credit.h +++ b/Sourcecode/private/mx/core/elements/Credit.h @@ -12,13 +12,13 @@ #include #include -namespace mx +namespace ezxml { - namespace xml - { - class XElementIterator; - } + class XElementIterator; +} +namespace mx +{ namespace core { @@ -70,7 +70,7 @@ namespace mx void setCreditChoice( const CreditChoicePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: CreditAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/CreditAttributes.cpp b/Sourcecode/private/mx/core/elements/CreditAttributes.cpp index 266b48ebc..71638829e 100755 --- a/Sourcecode/private/mx/core/elements/CreditAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/CreditAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool CreditAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool CreditAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "CreditAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/CreditAttributes.h b/Sourcecode/private/mx/core/elements/CreditAttributes.h index c0722e294..ef4241e71 100755 --- a/Sourcecode/private/mx/core/elements/CreditAttributes.h +++ b/Sourcecode/private/mx/core/elements/CreditAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasPage; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/CreditChoice.h b/Sourcecode/private/mx/core/elements/CreditChoice.h index 7c34acbaf..a49cebc27 100755 --- a/Sourcecode/private/mx/core/elements/CreditChoice.h +++ b/Sourcecode/private/mx/core/elements/CreditChoice.h @@ -59,7 +59,7 @@ namespace mx CreditWordsGroupPtr getCreditWordsGroup( const CreditWordsGroupSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/CreditImage.cpp b/Sourcecode/private/mx/core/elements/CreditImage.cpp index d2f0d7efb..f494a6447 100755 --- a/Sourcecode/private/mx/core/elements/CreditImage.cpp +++ b/Sourcecode/private/mx/core/elements/CreditImage.cpp @@ -57,7 +57,7 @@ namespace mx } - bool CreditImage::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool CreditImage::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/CreditImage.h b/Sourcecode/private/mx/core/elements/CreditImage.h index fd1ab09ba..17550f71b 100755 --- a/Sourcecode/private/mx/core/elements/CreditImage.h +++ b/Sourcecode/private/mx/core/elements/CreditImage.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const CreditImageAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: CreditImageAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/CreditImageAttributes.cpp b/Sourcecode/private/mx/core/elements/CreditImageAttributes.cpp index 81c11064c..cc538bb16 100755 --- a/Sourcecode/private/mx/core/elements/CreditImageAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/CreditImageAttributes.cpp @@ -56,7 +56,7 @@ namespace mx } - bool CreditImageAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool CreditImageAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "CreditImageAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/CreditImageAttributes.h b/Sourcecode/private/mx/core/elements/CreditImageAttributes.h index 8b8479f97..99b32c34d 100755 --- a/Sourcecode/private/mx/core/elements/CreditImageAttributes.h +++ b/Sourcecode/private/mx/core/elements/CreditImageAttributes.h @@ -43,7 +43,7 @@ namespace mx bool hasHalign; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/CreditType.cpp b/Sourcecode/private/mx/core/elements/CreditType.cpp index b3aacca0e..f71ec4e3d 100755 --- a/Sourcecode/private/mx/core/elements/CreditType.cpp +++ b/Sourcecode/private/mx/core/elements/CreditType.cpp @@ -66,7 +66,7 @@ namespace mx } - bool CreditType::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool CreditType::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue.setValue( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/CreditType.h b/Sourcecode/private/mx/core/elements/CreditType.h index 51001bbf3..b1d2494f4 100755 --- a/Sourcecode/private/mx/core/elements/CreditType.h +++ b/Sourcecode/private/mx/core/elements/CreditType.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/CreditWords.cpp b/Sourcecode/private/mx/core/elements/CreditWords.cpp index d99e925fa..b6ed1b1dd 100755 --- a/Sourcecode/private/mx/core/elements/CreditWords.cpp +++ b/Sourcecode/private/mx/core/elements/CreditWords.cpp @@ -87,7 +87,7 @@ namespace mx } - bool CreditWords::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool CreditWords::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/CreditWords.h b/Sourcecode/private/mx/core/elements/CreditWords.h index 57c10d0b8..66386a468 100755 --- a/Sourcecode/private/mx/core/elements/CreditWords.h +++ b/Sourcecode/private/mx/core/elements/CreditWords.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/CreditWordsAttributes.cpp b/Sourcecode/private/mx/core/elements/CreditWordsAttributes.cpp index edc17dbd0..817f2b903 100755 --- a/Sourcecode/private/mx/core/elements/CreditWordsAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/CreditWordsAttributes.cpp @@ -112,7 +112,7 @@ namespace mx } - bool CreditWordsAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool CreditWordsAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "CreditWordsAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/CreditWordsAttributes.h b/Sourcecode/private/mx/core/elements/CreditWordsAttributes.h index 0273cb1a4..72d5d97ac 100755 --- a/Sourcecode/private/mx/core/elements/CreditWordsAttributes.h +++ b/Sourcecode/private/mx/core/elements/CreditWordsAttributes.h @@ -75,7 +75,7 @@ namespace mx bool hasEnclosure; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/CreditWordsGroup.h b/Sourcecode/private/mx/core/elements/CreditWordsGroup.h index ea88d594a..24393a8ab 100755 --- a/Sourcecode/private/mx/core/elements/CreditWordsGroup.h +++ b/Sourcecode/private/mx/core/elements/CreditWordsGroup.h @@ -53,7 +53,7 @@ namespace mx void setCreditWords( const CreditWordsPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: LinkSet myLinkSet; diff --git a/Sourcecode/private/mx/core/elements/Cue.cpp b/Sourcecode/private/mx/core/elements/Cue.cpp index 2f2211cf1..d99543523 100755 --- a/Sourcecode/private/mx/core/elements/Cue.cpp +++ b/Sourcecode/private/mx/core/elements/Cue.cpp @@ -27,7 +27,7 @@ namespace mx } - bool Cue::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Cue::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Cue.h b/Sourcecode/private/mx/core/elements/Cue.h index ed2b690fd..2a31fd358 100755 --- a/Sourcecode/private/mx/core/elements/Cue.h +++ b/Sourcecode/private/mx/core/elements/Cue.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/CueNoteGroup.h b/Sourcecode/private/mx/core/elements/CueNoteGroup.h index b03802445..fd8ce989c 100755 --- a/Sourcecode/private/mx/core/elements/CueNoteGroup.h +++ b/Sourcecode/private/mx/core/elements/CueNoteGroup.h @@ -47,7 +47,7 @@ namespace mx void setDuration( const DurationPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: CuePtr myCue; diff --git a/Sourcecode/private/mx/core/elements/Damp.cpp b/Sourcecode/private/mx/core/elements/Damp.cpp index d91fe42bd..c8b204829 100755 --- a/Sourcecode/private/mx/core/elements/Damp.cpp +++ b/Sourcecode/private/mx/core/elements/Damp.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Damp::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Damp::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Damp.h b/Sourcecode/private/mx/core/elements/Damp.h index a2bec46f9..1915764a7 100755 --- a/Sourcecode/private/mx/core/elements/Damp.h +++ b/Sourcecode/private/mx/core/elements/Damp.h @@ -35,7 +35,7 @@ namespace mx void setAttributes( const EmptyPrintObjectStyleAlignAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPrintObjectStyleAlignAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/DampAll.cpp b/Sourcecode/private/mx/core/elements/DampAll.cpp index bd377c063..00c84a953 100755 --- a/Sourcecode/private/mx/core/elements/DampAll.cpp +++ b/Sourcecode/private/mx/core/elements/DampAll.cpp @@ -57,7 +57,7 @@ namespace mx } - bool DampAll::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DampAll::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/DampAll.h b/Sourcecode/private/mx/core/elements/DampAll.h index 22e86edcf..95f4dee34 100755 --- a/Sourcecode/private/mx/core/elements/DampAll.h +++ b/Sourcecode/private/mx/core/elements/DampAll.h @@ -35,7 +35,7 @@ namespace mx void setAttributes( const EmptyPrintObjectStyleAlignAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPrintObjectStyleAlignAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Dashes.cpp b/Sourcecode/private/mx/core/elements/Dashes.cpp index 69ce177d8..78d64d8bd 100755 --- a/Sourcecode/private/mx/core/elements/Dashes.cpp +++ b/Sourcecode/private/mx/core/elements/Dashes.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Dashes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Dashes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Dashes.h b/Sourcecode/private/mx/core/elements/Dashes.h index d575faadc..d1ba504b3 100755 --- a/Sourcecode/private/mx/core/elements/Dashes.h +++ b/Sourcecode/private/mx/core/elements/Dashes.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const DashesAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: DashesAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/DashesAttributes.cpp b/Sourcecode/private/mx/core/elements/DashesAttributes.cpp index 611c94881..31998060a 100755 --- a/Sourcecode/private/mx/core/elements/DashesAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/DashesAttributes.cpp @@ -60,7 +60,7 @@ namespace mx } - bool DashesAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DashesAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "DashesAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/DashesAttributes.h b/Sourcecode/private/mx/core/elements/DashesAttributes.h index b9a34f559..05dcc9376 100755 --- a/Sourcecode/private/mx/core/elements/DashesAttributes.h +++ b/Sourcecode/private/mx/core/elements/DashesAttributes.h @@ -45,7 +45,7 @@ namespace mx bool hasRelativeY; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Defaults.cpp b/Sourcecode/private/mx/core/elements/Defaults.cpp index 61498667a..3f25dc772 100755 --- a/Sourcecode/private/mx/core/elements/Defaults.cpp +++ b/Sourcecode/private/mx/core/elements/Defaults.cpp @@ -316,7 +316,7 @@ namespace mx } - bool Defaults::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Defaults::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/Defaults.h b/Sourcecode/private/mx/core/elements/Defaults.h index de9ba1806..ebe5e9f7c 100755 --- a/Sourcecode/private/mx/core/elements/Defaults.h +++ b/Sourcecode/private/mx/core/elements/Defaults.h @@ -81,7 +81,7 @@ namespace mx LyricLanguagePtr getLyricLanguage( const LyricLanguageSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ScalingPtr myScaling; diff --git a/Sourcecode/private/mx/core/elements/Degree.cpp b/Sourcecode/private/mx/core/elements/Degree.cpp index 4438e47ae..1acd0d7c4 100755 --- a/Sourcecode/private/mx/core/elements/Degree.cpp +++ b/Sourcecode/private/mx/core/elements/Degree.cpp @@ -120,7 +120,7 @@ namespace mx } - bool Degree::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Degree::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Degree.h b/Sourcecode/private/mx/core/elements/Degree.h index 982040b04..47dd16194 100755 --- a/Sourcecode/private/mx/core/elements/Degree.h +++ b/Sourcecode/private/mx/core/elements/Degree.h @@ -51,7 +51,7 @@ namespace mx void setDegreeType( const DegreeTypePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: DegreeAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/DegreeAlter.cpp b/Sourcecode/private/mx/core/elements/DegreeAlter.cpp index fd9b404c0..577f9a1d3 100755 --- a/Sourcecode/private/mx/core/elements/DegreeAlter.cpp +++ b/Sourcecode/private/mx/core/elements/DegreeAlter.cpp @@ -87,7 +87,7 @@ namespace mx } - bool DegreeAlter::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DegreeAlter::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/DegreeAlter.h b/Sourcecode/private/mx/core/elements/DegreeAlter.h index 4da700478..8bc855ca1 100755 --- a/Sourcecode/private/mx/core/elements/DegreeAlter.h +++ b/Sourcecode/private/mx/core/elements/DegreeAlter.h @@ -42,7 +42,7 @@ namespace mx void setValue( const Semitones& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Semitones myValue; diff --git a/Sourcecode/private/mx/core/elements/DegreeAlterAttributes.cpp b/Sourcecode/private/mx/core/elements/DegreeAlterAttributes.cpp index a5f9a7939..976a1dc90 100755 --- a/Sourcecode/private/mx/core/elements/DegreeAlterAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/DegreeAlterAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool DegreeAlterAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DegreeAlterAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "DegreeAlterAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/DegreeAlterAttributes.h b/Sourcecode/private/mx/core/elements/DegreeAlterAttributes.h index 966b07f16..bab1632f8 100755 --- a/Sourcecode/private/mx/core/elements/DegreeAlterAttributes.h +++ b/Sourcecode/private/mx/core/elements/DegreeAlterAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasPlusMinus; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/DegreeAttributes.cpp b/Sourcecode/private/mx/core/elements/DegreeAttributes.cpp index eb92dd23f..4ba2969aa 100755 --- a/Sourcecode/private/mx/core/elements/DegreeAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/DegreeAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool DegreeAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DegreeAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "DegreeAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/DegreeAttributes.h b/Sourcecode/private/mx/core/elements/DegreeAttributes.h index c2e716c8b..c94899a05 100755 --- a/Sourcecode/private/mx/core/elements/DegreeAttributes.h +++ b/Sourcecode/private/mx/core/elements/DegreeAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasPrintObject; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/DegreeType.cpp b/Sourcecode/private/mx/core/elements/DegreeType.cpp index 368df4141..16d337a72 100755 --- a/Sourcecode/private/mx/core/elements/DegreeType.cpp +++ b/Sourcecode/private/mx/core/elements/DegreeType.cpp @@ -87,7 +87,7 @@ namespace mx } - bool DegreeType::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DegreeType::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/DegreeType.h b/Sourcecode/private/mx/core/elements/DegreeType.h index b5f438d79..537862b96 100755 --- a/Sourcecode/private/mx/core/elements/DegreeType.h +++ b/Sourcecode/private/mx/core/elements/DegreeType.h @@ -42,7 +42,7 @@ namespace mx void setValue( const DegreeTypeValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: DegreeTypeValue myValue; diff --git a/Sourcecode/private/mx/core/elements/DegreeTypeAttributes.cpp b/Sourcecode/private/mx/core/elements/DegreeTypeAttributes.cpp index eb30ad36b..7e9c1cc88 100755 --- a/Sourcecode/private/mx/core/elements/DegreeTypeAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/DegreeTypeAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool DegreeTypeAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DegreeTypeAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "DegreeTypeAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/DegreeTypeAttributes.h b/Sourcecode/private/mx/core/elements/DegreeTypeAttributes.h index f102afc27..0c0d33232 100755 --- a/Sourcecode/private/mx/core/elements/DegreeTypeAttributes.h +++ b/Sourcecode/private/mx/core/elements/DegreeTypeAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/DegreeValue.cpp b/Sourcecode/private/mx/core/elements/DegreeValue.cpp index 272fcf49a..415f907dd 100755 --- a/Sourcecode/private/mx/core/elements/DegreeValue.cpp +++ b/Sourcecode/private/mx/core/elements/DegreeValue.cpp @@ -87,7 +87,7 @@ namespace mx } - bool DegreeValue::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DegreeValue::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/DegreeValue.h b/Sourcecode/private/mx/core/elements/DegreeValue.h index d2c728984..45df3fbce 100755 --- a/Sourcecode/private/mx/core/elements/DegreeValue.h +++ b/Sourcecode/private/mx/core/elements/DegreeValue.h @@ -42,7 +42,7 @@ namespace mx void setValue( const PositiveInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PositiveInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/DegreeValueAttributes.cpp b/Sourcecode/private/mx/core/elements/DegreeValueAttributes.cpp index e3eb8a813..c7165edc8 100755 --- a/Sourcecode/private/mx/core/elements/DegreeValueAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/DegreeValueAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool DegreeValueAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DegreeValueAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "DegreeValueAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/DegreeValueAttributes.h b/Sourcecode/private/mx/core/elements/DegreeValueAttributes.h index 1df6e5d42..7078fe7ae 100755 --- a/Sourcecode/private/mx/core/elements/DegreeValueAttributes.h +++ b/Sourcecode/private/mx/core/elements/DegreeValueAttributes.h @@ -50,7 +50,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/DelayedInvertedTurn.cpp b/Sourcecode/private/mx/core/elements/DelayedInvertedTurn.cpp index 315f65ba1..b1dbd429d 100755 --- a/Sourcecode/private/mx/core/elements/DelayedInvertedTurn.cpp +++ b/Sourcecode/private/mx/core/elements/DelayedInvertedTurn.cpp @@ -57,7 +57,7 @@ namespace mx } - bool DelayedInvertedTurn::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DelayedInvertedTurn::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/DelayedInvertedTurn.h b/Sourcecode/private/mx/core/elements/DelayedInvertedTurn.h index f6fc9f346..eda170488 100755 --- a/Sourcecode/private/mx/core/elements/DelayedInvertedTurn.h +++ b/Sourcecode/private/mx/core/elements/DelayedInvertedTurn.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const DelayedInvertedTurnAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: DelayedInvertedTurnAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/DelayedInvertedTurnAttributes.cpp b/Sourcecode/private/mx/core/elements/DelayedInvertedTurnAttributes.cpp index 5cdaa61a0..cb53ade94 100755 --- a/Sourcecode/private/mx/core/elements/DelayedInvertedTurnAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/DelayedInvertedTurnAttributes.cpp @@ -96,7 +96,7 @@ namespace mx } - bool DelayedInvertedTurnAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DelayedInvertedTurnAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "DelayedInvertedTurnAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/DelayedInvertedTurnAttributes.h b/Sourcecode/private/mx/core/elements/DelayedInvertedTurnAttributes.h index c14b2c4d8..705cce395 100755 --- a/Sourcecode/private/mx/core/elements/DelayedInvertedTurnAttributes.h +++ b/Sourcecode/private/mx/core/elements/DelayedInvertedTurnAttributes.h @@ -64,7 +64,7 @@ namespace mx bool hasSlash; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/DelayedTurn.cpp b/Sourcecode/private/mx/core/elements/DelayedTurn.cpp index 566368218..7cab64b7c 100755 --- a/Sourcecode/private/mx/core/elements/DelayedTurn.cpp +++ b/Sourcecode/private/mx/core/elements/DelayedTurn.cpp @@ -57,7 +57,7 @@ namespace mx } - bool DelayedTurn::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DelayedTurn::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/DelayedTurn.h b/Sourcecode/private/mx/core/elements/DelayedTurn.h index d035f84ed..f14ecf259 100755 --- a/Sourcecode/private/mx/core/elements/DelayedTurn.h +++ b/Sourcecode/private/mx/core/elements/DelayedTurn.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const DelayedTurnAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: DelayedTurnAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/DelayedTurnAttributes.cpp b/Sourcecode/private/mx/core/elements/DelayedTurnAttributes.cpp index 07242eebc..e38b8d826 100755 --- a/Sourcecode/private/mx/core/elements/DelayedTurnAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/DelayedTurnAttributes.cpp @@ -96,7 +96,7 @@ namespace mx } - bool DelayedTurnAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DelayedTurnAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "DelayedTurnAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/DelayedTurnAttributes.h b/Sourcecode/private/mx/core/elements/DelayedTurnAttributes.h index 7fd72c4c2..27ebc1058 100755 --- a/Sourcecode/private/mx/core/elements/DelayedTurnAttributes.h +++ b/Sourcecode/private/mx/core/elements/DelayedTurnAttributes.h @@ -64,7 +64,7 @@ namespace mx bool hasSlash; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/DetachedLegato.cpp b/Sourcecode/private/mx/core/elements/DetachedLegato.cpp index 1bee45521..5cfba02a5 100755 --- a/Sourcecode/private/mx/core/elements/DetachedLegato.cpp +++ b/Sourcecode/private/mx/core/elements/DetachedLegato.cpp @@ -57,7 +57,7 @@ namespace mx } - bool DetachedLegato::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DetachedLegato::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/DetachedLegato.h b/Sourcecode/private/mx/core/elements/DetachedLegato.h index 02a6b5df9..feef90c79 100755 --- a/Sourcecode/private/mx/core/elements/DetachedLegato.h +++ b/Sourcecode/private/mx/core/elements/DetachedLegato.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Diatonic.cpp b/Sourcecode/private/mx/core/elements/Diatonic.cpp index cc01d0f06..6e9e6ef8f 100755 --- a/Sourcecode/private/mx/core/elements/Diatonic.cpp +++ b/Sourcecode/private/mx/core/elements/Diatonic.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Diatonic::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Diatonic::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Diatonic.h b/Sourcecode/private/mx/core/elements/Diatonic.h index d30d445b7..c7014a3b8 100755 --- a/Sourcecode/private/mx/core/elements/Diatonic.h +++ b/Sourcecode/private/mx/core/elements/Diatonic.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Integer& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Integer myValue; diff --git a/Sourcecode/private/mx/core/elements/Direction.cpp b/Sourcecode/private/mx/core/elements/Direction.cpp index 7c9b2236d..210142971 100755 --- a/Sourcecode/private/mx/core/elements/Direction.cpp +++ b/Sourcecode/private/mx/core/elements/Direction.cpp @@ -316,7 +316,7 @@ namespace mx } - bool Direction::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Direction::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isDirectionTypeFound = false; @@ -336,7 +336,7 @@ namespace mx } - bool Direction::importDirectionTypeSet( std::ostream& message, xml::XElementIterator& iter, xml::XElementIterator& endIter, bool& isSuccess, bool& isFound ) + bool Direction::importDirectionTypeSet( std::ostream& message, ::ezxml::XElementIterator& iter, ::ezxml::XElementIterator& endIter, bool& isSuccess, bool& isFound ) { if( iter == endIter ) { @@ -410,7 +410,7 @@ namespace mx } - DirectionTypePtr Direction::createDirectionType( std::ostream& message, xml::XElementIterator& subIter, xml::XElementIterator& subIterEnd, bool& isSuccess ) + DirectionTypePtr Direction::createDirectionType( std::ostream& message, ::ezxml::XElementIterator& subIter, ::ezxml::XElementIterator& subIterEnd, bool& isSuccess ) { auto directionType = makeDirectionType(); diff --git a/Sourcecode/private/mx/core/elements/Direction.h b/Sourcecode/private/mx/core/elements/Direction.h index b83949a4b..9e56128f3 100755 --- a/Sourcecode/private/mx/core/elements/Direction.h +++ b/Sourcecode/private/mx/core/elements/Direction.h @@ -12,14 +12,13 @@ #include #include +namespace ezxml +{ + class XElementIterator; +} + namespace mx { - - namespace xml - { - class XElementIterator; - } - namespace core { @@ -76,7 +75,7 @@ namespace mx void setHasSound( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: DirectionAttributesPtr myAttributes; @@ -89,8 +88,8 @@ namespace mx SoundPtr mySound; bool myHasSound; - bool importDirectionTypeSet( std::ostream& message, xml::XElementIterator& iter, xml::XElementIterator& endIter, bool& isSuccess, bool& isFound ); - DirectionTypePtr createDirectionType( std::ostream& message, xml::XElementIterator& iter, xml::XElementIterator& endIter, bool& isSuccess ); + bool importDirectionTypeSet( std::ostream& message, ::ezxml::XElementIterator& iter, ::ezxml::XElementIterator& endIter, bool& isSuccess, bool& isFound ); + DirectionTypePtr createDirectionType( std::ostream& message, ::ezxml::XElementIterator& iter, ::ezxml::XElementIterator& endIter, bool& isSuccess ); bool isDirectionType( const std::string& elementName ) const; bool isMultiDirectionType( const std::string& elementName ) const; diff --git a/Sourcecode/private/mx/core/elements/DirectionAttributes.cpp b/Sourcecode/private/mx/core/elements/DirectionAttributes.cpp index b7a6ffe12..91189d6dd 100755 --- a/Sourcecode/private/mx/core/elements/DirectionAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/DirectionAttributes.cpp @@ -36,7 +36,7 @@ namespace mx } - bool DirectionAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DirectionAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "DirectionAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/DirectionAttributes.h b/Sourcecode/private/mx/core/elements/DirectionAttributes.h index be5c056a5..80a611eb2 100755 --- a/Sourcecode/private/mx/core/elements/DirectionAttributes.h +++ b/Sourcecode/private/mx/core/elements/DirectionAttributes.h @@ -31,7 +31,7 @@ namespace mx bool hasDirective; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/DirectionType.h b/Sourcecode/private/mx/core/elements/DirectionType.h index 063a652b2..7a59aeb56 100755 --- a/Sourcecode/private/mx/core/elements/DirectionType.h +++ b/Sourcecode/private/mx/core/elements/DirectionType.h @@ -187,7 +187,7 @@ namespace mx void setOtherDirection( const OtherDirectionPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/Directive.cpp b/Sourcecode/private/mx/core/elements/Directive.cpp index dab5c871a..54d72f123 100755 --- a/Sourcecode/private/mx/core/elements/Directive.cpp +++ b/Sourcecode/private/mx/core/elements/Directive.cpp @@ -84,7 +84,7 @@ namespace mx } - bool Directive::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Directive::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Directive.h b/Sourcecode/private/mx/core/elements/Directive.h index e78b65ab9..1f2c367b3 100755 --- a/Sourcecode/private/mx/core/elements/Directive.h +++ b/Sourcecode/private/mx/core/elements/Directive.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: DirectiveAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/DirectiveAttributes.cpp b/Sourcecode/private/mx/core/elements/DirectiveAttributes.cpp index cddef4f4f..10b53bc2e 100755 --- a/Sourcecode/private/mx/core/elements/DirectiveAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/DirectiveAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool DirectiveAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DirectiveAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "DirectiveAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/DirectiveAttributes.h b/Sourcecode/private/mx/core/elements/DirectiveAttributes.h index 6bdcf4e9e..ce63b214a 100755 --- a/Sourcecode/private/mx/core/elements/DirectiveAttributes.h +++ b/Sourcecode/private/mx/core/elements/DirectiveAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasLang; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/DisplayOctave.cpp b/Sourcecode/private/mx/core/elements/DisplayOctave.cpp index 2ca19de78..e8c27e88d 100755 --- a/Sourcecode/private/mx/core/elements/DisplayOctave.cpp +++ b/Sourcecode/private/mx/core/elements/DisplayOctave.cpp @@ -66,7 +66,7 @@ namespace mx } - bool DisplayOctave::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DisplayOctave::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/DisplayOctave.h b/Sourcecode/private/mx/core/elements/DisplayOctave.h index 8d8270219..4e1e1ab98 100755 --- a/Sourcecode/private/mx/core/elements/DisplayOctave.h +++ b/Sourcecode/private/mx/core/elements/DisplayOctave.h @@ -38,7 +38,7 @@ namespace mx void setValue( const OctaveValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: OctaveValue myValue; diff --git a/Sourcecode/private/mx/core/elements/DisplayStep.cpp b/Sourcecode/private/mx/core/elements/DisplayStep.cpp index 2f52cd594..972fb3373 100755 --- a/Sourcecode/private/mx/core/elements/DisplayStep.cpp +++ b/Sourcecode/private/mx/core/elements/DisplayStep.cpp @@ -66,7 +66,7 @@ namespace mx } - bool DisplayStep::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DisplayStep::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseStepEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/DisplayStep.h b/Sourcecode/private/mx/core/elements/DisplayStep.h index 9a06cf146..2ff77b0eb 100755 --- a/Sourcecode/private/mx/core/elements/DisplayStep.h +++ b/Sourcecode/private/mx/core/elements/DisplayStep.h @@ -38,7 +38,7 @@ namespace mx void setValue( const StepEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StepEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/DisplayStepOctaveGroup.cpp b/Sourcecode/private/mx/core/elements/DisplayStepOctaveGroup.cpp index 96dcb0dc5..9fb74402b 100755 --- a/Sourcecode/private/mx/core/elements/DisplayStepOctaveGroup.cpp +++ b/Sourcecode/private/mx/core/elements/DisplayStepOctaveGroup.cpp @@ -82,7 +82,7 @@ namespace mx } - bool DisplayStepOctaveGroup::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DisplayStepOctaveGroup::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isDisplayStepFound = false; diff --git a/Sourcecode/private/mx/core/elements/DisplayStepOctaveGroup.h b/Sourcecode/private/mx/core/elements/DisplayStepOctaveGroup.h index 465e1689d..e81722348 100755 --- a/Sourcecode/private/mx/core/elements/DisplayStepOctaveGroup.h +++ b/Sourcecode/private/mx/core/elements/DisplayStepOctaveGroup.h @@ -42,7 +42,7 @@ namespace mx void setDisplayOctave( const DisplayOctavePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: DisplayStepPtr myDisplayStep; diff --git a/Sourcecode/private/mx/core/elements/DisplayText.cpp b/Sourcecode/private/mx/core/elements/DisplayText.cpp index e0247f211..2ebfdc10e 100755 --- a/Sourcecode/private/mx/core/elements/DisplayText.cpp +++ b/Sourcecode/private/mx/core/elements/DisplayText.cpp @@ -87,7 +87,7 @@ namespace mx } - bool DisplayText::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DisplayText::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/DisplayText.h b/Sourcecode/private/mx/core/elements/DisplayText.h index a62eb74f1..adf838bff 100755 --- a/Sourcecode/private/mx/core/elements/DisplayText.h +++ b/Sourcecode/private/mx/core/elements/DisplayText.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/DisplayTextAttributes.cpp b/Sourcecode/private/mx/core/elements/DisplayTextAttributes.cpp index 092a6c1ac..1bf700804 100755 --- a/Sourcecode/private/mx/core/elements/DisplayTextAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/DisplayTextAttributes.cpp @@ -104,7 +104,7 @@ namespace mx } - bool DisplayTextAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DisplayTextAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "DisplayTextAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/DisplayTextAttributes.h b/Sourcecode/private/mx/core/elements/DisplayTextAttributes.h index eb1ddfbae..0c5550261 100755 --- a/Sourcecode/private/mx/core/elements/DisplayTextAttributes.h +++ b/Sourcecode/private/mx/core/elements/DisplayTextAttributes.h @@ -70,7 +70,7 @@ namespace mx bool hasEnclosure; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/DisplayTextOrAccidentalText.cpp b/Sourcecode/private/mx/core/elements/DisplayTextOrAccidentalText.cpp index 36cf6f3a1..248f686f4 100755 --- a/Sourcecode/private/mx/core/elements/DisplayTextOrAccidentalText.cpp +++ b/Sourcecode/private/mx/core/elements/DisplayTextOrAccidentalText.cpp @@ -118,7 +118,7 @@ namespace mx } - bool DisplayTextOrAccidentalText::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DisplayTextOrAccidentalText::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_CHOICE_IF( displayText, "display-text", DisplayText ); MX_CHOICE_IF( accidentalText, "accidental-text", AccidentalText ); diff --git a/Sourcecode/private/mx/core/elements/DisplayTextOrAccidentalText.h b/Sourcecode/private/mx/core/elements/DisplayTextOrAccidentalText.h index 03965d69b..dca28ab2f 100755 --- a/Sourcecode/private/mx/core/elements/DisplayTextOrAccidentalText.h +++ b/Sourcecode/private/mx/core/elements/DisplayTextOrAccidentalText.h @@ -45,7 +45,7 @@ namespace mx void setAccidentalText( const AccidentalTextPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/Distance.cpp b/Sourcecode/private/mx/core/elements/Distance.cpp index 0837d63a6..0b613e230 100755 --- a/Sourcecode/private/mx/core/elements/Distance.cpp +++ b/Sourcecode/private/mx/core/elements/Distance.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Distance::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Distance::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Distance.h b/Sourcecode/private/mx/core/elements/Distance.h index b6976f90e..ba745e1e3 100755 --- a/Sourcecode/private/mx/core/elements/Distance.h +++ b/Sourcecode/private/mx/core/elements/Distance.h @@ -42,7 +42,7 @@ namespace mx void setValue( const TenthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TenthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/DistanceAttributes.cpp b/Sourcecode/private/mx/core/elements/DistanceAttributes.cpp index 012483417..42bdbba9c 100755 --- a/Sourcecode/private/mx/core/elements/DistanceAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/DistanceAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool DistanceAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DistanceAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "DistanceAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/DistanceAttributes.h b/Sourcecode/private/mx/core/elements/DistanceAttributes.h index e524ab93b..d69bf7af3 100755 --- a/Sourcecode/private/mx/core/elements/DistanceAttributes.h +++ b/Sourcecode/private/mx/core/elements/DistanceAttributes.h @@ -29,7 +29,7 @@ namespace mx const bool hasType; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Divisions.cpp b/Sourcecode/private/mx/core/elements/Divisions.cpp index 11a5de46c..dc865f84f 100755 --- a/Sourcecode/private/mx/core/elements/Divisions.cpp +++ b/Sourcecode/private/mx/core/elements/Divisions.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Divisions::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Divisions::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue.parse( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/Divisions.h b/Sourcecode/private/mx/core/elements/Divisions.h index 34371f331..b5a53a9d3 100755 --- a/Sourcecode/private/mx/core/elements/Divisions.h +++ b/Sourcecode/private/mx/core/elements/Divisions.h @@ -38,7 +38,7 @@ namespace mx void setValue( const PositiveDivisionsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PositiveDivisionsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/Doit.cpp b/Sourcecode/private/mx/core/elements/Doit.cpp index 0de66bdf6..33c4c85b0 100755 --- a/Sourcecode/private/mx/core/elements/Doit.cpp +++ b/Sourcecode/private/mx/core/elements/Doit.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Doit::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Doit::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Doit.h b/Sourcecode/private/mx/core/elements/Doit.h index d75962c0b..65e21ef5a 100755 --- a/Sourcecode/private/mx/core/elements/Doit.h +++ b/Sourcecode/private/mx/core/elements/Doit.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyLineAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyLineAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Dot.cpp b/Sourcecode/private/mx/core/elements/Dot.cpp index ac2fa55ce..d2270265c 100755 --- a/Sourcecode/private/mx/core/elements/Dot.cpp +++ b/Sourcecode/private/mx/core/elements/Dot.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Dot::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Dot::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Dot.h b/Sourcecode/private/mx/core/elements/Dot.h index f491f3030..09b956b90 100755 --- a/Sourcecode/private/mx/core/elements/Dot.h +++ b/Sourcecode/private/mx/core/elements/Dot.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Double.cpp b/Sourcecode/private/mx/core/elements/Double.cpp index 35d306d77..36f429309 100755 --- a/Sourcecode/private/mx/core/elements/Double.cpp +++ b/Sourcecode/private/mx/core/elements/Double.cpp @@ -27,7 +27,7 @@ namespace mx } - bool Double::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Double::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Double.h b/Sourcecode/private/mx/core/elements/Double.h index bcbcbbb31..22866f740 100755 --- a/Sourcecode/private/mx/core/elements/Double.h +++ b/Sourcecode/private/mx/core/elements/Double.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/DoubleTongue.cpp b/Sourcecode/private/mx/core/elements/DoubleTongue.cpp index 416800255..b2a949d65 100755 --- a/Sourcecode/private/mx/core/elements/DoubleTongue.cpp +++ b/Sourcecode/private/mx/core/elements/DoubleTongue.cpp @@ -57,7 +57,7 @@ namespace mx } - bool DoubleTongue::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DoubleTongue::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/DoubleTongue.h b/Sourcecode/private/mx/core/elements/DoubleTongue.h index d4257b41e..b643fcdda 100755 --- a/Sourcecode/private/mx/core/elements/DoubleTongue.h +++ b/Sourcecode/private/mx/core/elements/DoubleTongue.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/DownBow.cpp b/Sourcecode/private/mx/core/elements/DownBow.cpp index 72d79cbf4..4da6954cf 100755 --- a/Sourcecode/private/mx/core/elements/DownBow.cpp +++ b/Sourcecode/private/mx/core/elements/DownBow.cpp @@ -57,7 +57,7 @@ namespace mx } - bool DownBow::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DownBow::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/DownBow.h b/Sourcecode/private/mx/core/elements/DownBow.h index 58e65b30f..76c6188f1 100755 --- a/Sourcecode/private/mx/core/elements/DownBow.h +++ b/Sourcecode/private/mx/core/elements/DownBow.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Duration.cpp b/Sourcecode/private/mx/core/elements/Duration.cpp index d30312789..2c1819691 100755 --- a/Sourcecode/private/mx/core/elements/Duration.cpp +++ b/Sourcecode/private/mx/core/elements/Duration.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Duration::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Duration::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Duration.h b/Sourcecode/private/mx/core/elements/Duration.h index f3e0c435c..c75a3f3d9 100755 --- a/Sourcecode/private/mx/core/elements/Duration.h +++ b/Sourcecode/private/mx/core/elements/Duration.h @@ -38,7 +38,7 @@ namespace mx void setValue( const PositiveDivisionsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PositiveDivisionsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/Dynamics.cpp b/Sourcecode/private/mx/core/elements/Dynamics.cpp index 1937055f2..56752ac72 100755 --- a/Sourcecode/private/mx/core/elements/Dynamics.cpp +++ b/Sourcecode/private/mx/core/elements/Dynamics.cpp @@ -89,7 +89,7 @@ namespace mx } - bool Dynamics::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Dynamics::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Dynamics.h b/Sourcecode/private/mx/core/elements/Dynamics.h index 2c1dfb6be..8efe2df89 100755 --- a/Sourcecode/private/mx/core/elements/Dynamics.h +++ b/Sourcecode/private/mx/core/elements/Dynamics.h @@ -43,7 +43,7 @@ namespace mx private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: DynamicsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/DynamicsAttributes.cpp b/Sourcecode/private/mx/core/elements/DynamicsAttributes.cpp index 877d205d1..43d8d3975 100755 --- a/Sourcecode/private/mx/core/elements/DynamicsAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/DynamicsAttributes.cpp @@ -76,7 +76,7 @@ namespace mx } - bool DynamicsAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool DynamicsAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "DynamicsAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/DynamicsAttributes.h b/Sourcecode/private/mx/core/elements/DynamicsAttributes.h index d4deeefa1..4145e5667 100755 --- a/Sourcecode/private/mx/core/elements/DynamicsAttributes.h +++ b/Sourcecode/private/mx/core/elements/DynamicsAttributes.h @@ -64,7 +64,7 @@ namespace mx bool hasEnclosure; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/EditorialGroup.h b/Sourcecode/private/mx/core/elements/EditorialGroup.h index c9f36992e..eaeeb3818 100755 --- a/Sourcecode/private/mx/core/elements/EditorialGroup.h +++ b/Sourcecode/private/mx/core/elements/EditorialGroup.h @@ -46,7 +46,7 @@ namespace mx void setHasLevel( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: FootnotePtr myFootnote; diff --git a/Sourcecode/private/mx/core/elements/EditorialVoiceDirectionGroup.h b/Sourcecode/private/mx/core/elements/EditorialVoiceDirectionGroup.h index 5911ff512..de43ded5e 100755 --- a/Sourcecode/private/mx/core/elements/EditorialVoiceDirectionGroup.h +++ b/Sourcecode/private/mx/core/elements/EditorialVoiceDirectionGroup.h @@ -54,7 +54,7 @@ namespace mx void setHasVoice( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: FootnotePtr myFootnote; diff --git a/Sourcecode/private/mx/core/elements/EditorialVoiceGroup.h b/Sourcecode/private/mx/core/elements/EditorialVoiceGroup.h index 5278463de..5072f9732 100755 --- a/Sourcecode/private/mx/core/elements/EditorialVoiceGroup.h +++ b/Sourcecode/private/mx/core/elements/EditorialVoiceGroup.h @@ -53,7 +53,7 @@ namespace mx void setHasVoice( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: FootnotePtr myFootnote; diff --git a/Sourcecode/private/mx/core/elements/Effect.cpp b/Sourcecode/private/mx/core/elements/Effect.cpp index 4f3418e37..af1e7cac4 100755 --- a/Sourcecode/private/mx/core/elements/Effect.cpp +++ b/Sourcecode/private/mx/core/elements/Effect.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Effect::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Effect::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseEffectEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/Effect.h b/Sourcecode/private/mx/core/elements/Effect.h index 0e99ab64d..4ffaecc32 100755 --- a/Sourcecode/private/mx/core/elements/Effect.h +++ b/Sourcecode/private/mx/core/elements/Effect.h @@ -38,7 +38,7 @@ namespace mx void setValue( const EffectEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EffectEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/Elevation.cpp b/Sourcecode/private/mx/core/elements/Elevation.cpp index 9aece2547..985b512ca 100755 --- a/Sourcecode/private/mx/core/elements/Elevation.cpp +++ b/Sourcecode/private/mx/core/elements/Elevation.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Elevation::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Elevation::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Elevation.h b/Sourcecode/private/mx/core/elements/Elevation.h index 25d20c667..d1e4f926e 100755 --- a/Sourcecode/private/mx/core/elements/Elevation.h +++ b/Sourcecode/private/mx/core/elements/Elevation.h @@ -38,7 +38,7 @@ namespace mx void setValue( const RotationDegrees& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: RotationDegrees myValue; diff --git a/Sourcecode/private/mx/core/elements/Elision.cpp b/Sourcecode/private/mx/core/elements/Elision.cpp index 4e7f560e2..cb5ed8e80 100755 --- a/Sourcecode/private/mx/core/elements/Elision.cpp +++ b/Sourcecode/private/mx/core/elements/Elision.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Elision::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Elision::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Elision.h b/Sourcecode/private/mx/core/elements/Elision.h index 4d6a0c7c7..96188b6c8 100755 --- a/Sourcecode/private/mx/core/elements/Elision.h +++ b/Sourcecode/private/mx/core/elements/Elision.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/ElisionAttributes.cpp b/Sourcecode/private/mx/core/elements/ElisionAttributes.cpp index b9ebe6f43..428546a05 100755 --- a/Sourcecode/private/mx/core/elements/ElisionAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/ElisionAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool ElisionAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ElisionAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "ElisionAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/ElisionAttributes.h b/Sourcecode/private/mx/core/elements/ElisionAttributes.h index 19d5aecd0..f505ba920 100755 --- a/Sourcecode/private/mx/core/elements/ElisionAttributes.h +++ b/Sourcecode/private/mx/core/elements/ElisionAttributes.h @@ -52,7 +52,7 @@ namespace mx bool hasLang; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/ElisionSyllabicGroup.h b/Sourcecode/private/mx/core/elements/ElisionSyllabicGroup.h index 1d065b417..533be2b3a 100755 --- a/Sourcecode/private/mx/core/elements/ElisionSyllabicGroup.h +++ b/Sourcecode/private/mx/core/elements/ElisionSyllabicGroup.h @@ -44,7 +44,7 @@ namespace mx void setHasSyllabic( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ElisionPtr myElision; diff --git a/Sourcecode/private/mx/core/elements/ElisionSyllabicTextGroup.h b/Sourcecode/private/mx/core/elements/ElisionSyllabicTextGroup.h index 8322e92f9..a9846804a 100755 --- a/Sourcecode/private/mx/core/elements/ElisionSyllabicTextGroup.h +++ b/Sourcecode/private/mx/core/elements/ElisionSyllabicTextGroup.h @@ -44,7 +44,7 @@ namespace mx void setText( const TextPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ElisionSyllabicGroupPtr myElisionSyllabicGroup; diff --git a/Sourcecode/private/mx/core/elements/EmptyFontAttributes.cpp b/Sourcecode/private/mx/core/elements/EmptyFontAttributes.cpp index 9ca5418ea..03eb127a0 100755 --- a/Sourcecode/private/mx/core/elements/EmptyFontAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/EmptyFontAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool EmptyFontAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool EmptyFontAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "EmptyFontAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/EmptyFontAttributes.h b/Sourcecode/private/mx/core/elements/EmptyFontAttributes.h index 3c74d41af..32800246f 100755 --- a/Sourcecode/private/mx/core/elements/EmptyFontAttributes.h +++ b/Sourcecode/private/mx/core/elements/EmptyFontAttributes.h @@ -37,7 +37,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/EmptyLineAttributes.cpp b/Sourcecode/private/mx/core/elements/EmptyLineAttributes.cpp index 7a455d3c6..9ebc90918 100755 --- a/Sourcecode/private/mx/core/elements/EmptyLineAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/EmptyLineAttributes.cpp @@ -82,7 +82,7 @@ namespace mx } - bool EmptyLineAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool EmptyLineAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "EmptyLineAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/EmptyLineAttributes.h b/Sourcecode/private/mx/core/elements/EmptyLineAttributes.h index a7e17a36c..921115c3f 100755 --- a/Sourcecode/private/mx/core/elements/EmptyLineAttributes.h +++ b/Sourcecode/private/mx/core/elements/EmptyLineAttributes.h @@ -56,7 +56,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/EmptyPlacementAttributes.cpp b/Sourcecode/private/mx/core/elements/EmptyPlacementAttributes.cpp index d10d04d78..499b5da06 100755 --- a/Sourcecode/private/mx/core/elements/EmptyPlacementAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/EmptyPlacementAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool EmptyPlacementAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool EmptyPlacementAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "EmptyPlacementAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/EmptyPlacementAttributes.h b/Sourcecode/private/mx/core/elements/EmptyPlacementAttributes.h index e4225e33d..363495473 100755 --- a/Sourcecode/private/mx/core/elements/EmptyPlacementAttributes.h +++ b/Sourcecode/private/mx/core/elements/EmptyPlacementAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/EmptyTrillSoundAttributes.cpp b/Sourcecode/private/mx/core/elements/EmptyTrillSoundAttributes.cpp index 07f29a8c5..e922211ca 100755 --- a/Sourcecode/private/mx/core/elements/EmptyTrillSoundAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/EmptyTrillSoundAttributes.cpp @@ -92,7 +92,7 @@ namespace mx } - bool EmptyTrillSoundAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool EmptyTrillSoundAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "EmptyTrillSoundAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/EmptyTrillSoundAttributes.h b/Sourcecode/private/mx/core/elements/EmptyTrillSoundAttributes.h index ccf7d7801..ce499a7e9 100755 --- a/Sourcecode/private/mx/core/elements/EmptyTrillSoundAttributes.h +++ b/Sourcecode/private/mx/core/elements/EmptyTrillSoundAttributes.h @@ -62,7 +62,7 @@ namespace mx bool hasLastBeat; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Encoder.cpp b/Sourcecode/private/mx/core/elements/Encoder.cpp index 700b32411..e5ad36db5 100755 --- a/Sourcecode/private/mx/core/elements/Encoder.cpp +++ b/Sourcecode/private/mx/core/elements/Encoder.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Encoder::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Encoder::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Encoder.h b/Sourcecode/private/mx/core/elements/Encoder.h index d2d6122ae..61c02392c 100755 --- a/Sourcecode/private/mx/core/elements/Encoder.h +++ b/Sourcecode/private/mx/core/elements/Encoder.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/EncoderAttributes.cpp b/Sourcecode/private/mx/core/elements/EncoderAttributes.cpp index 826fb5135..a55fe4588 100755 --- a/Sourcecode/private/mx/core/elements/EncoderAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/EncoderAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool EncoderAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool EncoderAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "EncoderAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/EncoderAttributes.h b/Sourcecode/private/mx/core/elements/EncoderAttributes.h index f90734721..d75a0ecb2 100755 --- a/Sourcecode/private/mx/core/elements/EncoderAttributes.h +++ b/Sourcecode/private/mx/core/elements/EncoderAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasType; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Encoding.cpp b/Sourcecode/private/mx/core/elements/Encoding.cpp index 73fffd131..3da8ccdc7 100755 --- a/Sourcecode/private/mx/core/elements/Encoding.cpp +++ b/Sourcecode/private/mx/core/elements/Encoding.cpp @@ -92,7 +92,7 @@ namespace mx } - bool Encoding::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Encoding::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/Encoding.h b/Sourcecode/private/mx/core/elements/Encoding.h index e24ac7079..64dcf2dab 100755 --- a/Sourcecode/private/mx/core/elements/Encoding.h +++ b/Sourcecode/private/mx/core/elements/Encoding.h @@ -39,7 +39,7 @@ namespace mx void clearEncodingChoiceSet(); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EncodingChoiceSet myEncodingChoiceSet; diff --git a/Sourcecode/private/mx/core/elements/EncodingChoice.cpp b/Sourcecode/private/mx/core/elements/EncodingChoice.cpp index 09db6d6f5..7fcbc5284 100755 --- a/Sourcecode/private/mx/core/elements/EncodingChoice.cpp +++ b/Sourcecode/private/mx/core/elements/EncodingChoice.cpp @@ -175,7 +175,7 @@ namespace mx } - bool EncodingChoice::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool EncodingChoice::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_CHOICE_IF( encodingDate, "encoding-date", EncodingDate ); MX_CHOICE_IF( encoder, "encoder", Encoder ); diff --git a/Sourcecode/private/mx/core/elements/EncodingChoice.h b/Sourcecode/private/mx/core/elements/EncodingChoice.h index dcbb01e91..a66ec9655 100755 --- a/Sourcecode/private/mx/core/elements/EncodingChoice.h +++ b/Sourcecode/private/mx/core/elements/EncodingChoice.h @@ -69,7 +69,7 @@ namespace mx void setSupports( const SupportsPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/EncodingDate.cpp b/Sourcecode/private/mx/core/elements/EncodingDate.cpp index 22b4fb7e9..55e370a62 100755 --- a/Sourcecode/private/mx/core/elements/EncodingDate.cpp +++ b/Sourcecode/private/mx/core/elements/EncodingDate.cpp @@ -66,7 +66,7 @@ namespace mx } - bool EncodingDate::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool EncodingDate::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/EncodingDate.h b/Sourcecode/private/mx/core/elements/EncodingDate.h index 87ef83c76..17be5ed97 100755 --- a/Sourcecode/private/mx/core/elements/EncodingDate.h +++ b/Sourcecode/private/mx/core/elements/EncodingDate.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Date& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Date myValue; diff --git a/Sourcecode/private/mx/core/elements/EncodingDescription.cpp b/Sourcecode/private/mx/core/elements/EncodingDescription.cpp index 1ffcd85e4..3b7df02c9 100755 --- a/Sourcecode/private/mx/core/elements/EncodingDescription.cpp +++ b/Sourcecode/private/mx/core/elements/EncodingDescription.cpp @@ -66,7 +66,7 @@ namespace mx } - bool EncodingDescription::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool EncodingDescription::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/EncodingDescription.h b/Sourcecode/private/mx/core/elements/EncodingDescription.h index 74c34f84a..a6ace5766 100755 --- a/Sourcecode/private/mx/core/elements/EncodingDescription.h +++ b/Sourcecode/private/mx/core/elements/EncodingDescription.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/EndLine.cpp b/Sourcecode/private/mx/core/elements/EndLine.cpp index 1cc4fb072..b5f9a93c8 100755 --- a/Sourcecode/private/mx/core/elements/EndLine.cpp +++ b/Sourcecode/private/mx/core/elements/EndLine.cpp @@ -27,7 +27,7 @@ namespace mx } - bool EndLine::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool EndLine::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/EndLine.h b/Sourcecode/private/mx/core/elements/EndLine.h index 7f1d8dae3..aba68ecc5 100755 --- a/Sourcecode/private/mx/core/elements/EndLine.h +++ b/Sourcecode/private/mx/core/elements/EndLine.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/EndParagraph.cpp b/Sourcecode/private/mx/core/elements/EndParagraph.cpp index 5b975ecf2..d2949f1f0 100755 --- a/Sourcecode/private/mx/core/elements/EndParagraph.cpp +++ b/Sourcecode/private/mx/core/elements/EndParagraph.cpp @@ -27,7 +27,7 @@ namespace mx } - bool EndParagraph::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool EndParagraph::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/EndParagraph.h b/Sourcecode/private/mx/core/elements/EndParagraph.h index f0667b416..ad70cbac9 100755 --- a/Sourcecode/private/mx/core/elements/EndParagraph.h +++ b/Sourcecode/private/mx/core/elements/EndParagraph.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Ending.cpp b/Sourcecode/private/mx/core/elements/Ending.cpp index 2f6b72f4e..c3757fae1 100755 --- a/Sourcecode/private/mx/core/elements/Ending.cpp +++ b/Sourcecode/private/mx/core/elements/Ending.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Ending::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Ending::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Ending.h b/Sourcecode/private/mx/core/elements/Ending.h index 118e3b341..149507a04 100755 --- a/Sourcecode/private/mx/core/elements/Ending.h +++ b/Sourcecode/private/mx/core/elements/Ending.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/EndingAttributes.cpp b/Sourcecode/private/mx/core/elements/EndingAttributes.cpp index d2a68a0ea..c4b35430a 100755 --- a/Sourcecode/private/mx/core/elements/EndingAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/EndingAttributes.cpp @@ -84,7 +84,7 @@ namespace mx } - bool EndingAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool EndingAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "EndingAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/EndingAttributes.h b/Sourcecode/private/mx/core/elements/EndingAttributes.h index afa69b022..4e8424895 100755 --- a/Sourcecode/private/mx/core/elements/EndingAttributes.h +++ b/Sourcecode/private/mx/core/elements/EndingAttributes.h @@ -58,7 +58,7 @@ namespace mx bool hasTextY; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Ensemble.cpp b/Sourcecode/private/mx/core/elements/Ensemble.cpp index a74422be0..acf456a31 100755 --- a/Sourcecode/private/mx/core/elements/Ensemble.cpp +++ b/Sourcecode/private/mx/core/elements/Ensemble.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Ensemble::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Ensemble::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Ensemble.h b/Sourcecode/private/mx/core/elements/Ensemble.h index 9a82d8c4d..979d69341 100755 --- a/Sourcecode/private/mx/core/elements/Ensemble.h +++ b/Sourcecode/private/mx/core/elements/Ensemble.h @@ -38,7 +38,7 @@ namespace mx void setValue( const PositiveIntegerOrEmpty& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PositiveIntegerOrEmpty myValue; diff --git a/Sourcecode/private/mx/core/elements/Extend.cpp b/Sourcecode/private/mx/core/elements/Extend.cpp index 27b137a8d..435283690 100755 --- a/Sourcecode/private/mx/core/elements/Extend.cpp +++ b/Sourcecode/private/mx/core/elements/Extend.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Extend::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Extend::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Extend.h b/Sourcecode/private/mx/core/elements/Extend.h index 573d46d69..e405aba7c 100755 --- a/Sourcecode/private/mx/core/elements/Extend.h +++ b/Sourcecode/private/mx/core/elements/Extend.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const ExtendAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ExtendAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/ExtendAttributes.cpp b/Sourcecode/private/mx/core/elements/ExtendAttributes.cpp index 7d65f883c..cff2aed9e 100755 --- a/Sourcecode/private/mx/core/elements/ExtendAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/ExtendAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool ExtendAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ExtendAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "ExtendAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/ExtendAttributes.h b/Sourcecode/private/mx/core/elements/ExtendAttributes.h index c582d28dd..8f7fcfddf 100755 --- a/Sourcecode/private/mx/core/elements/ExtendAttributes.h +++ b/Sourcecode/private/mx/core/elements/ExtendAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Eyeglasses.cpp b/Sourcecode/private/mx/core/elements/Eyeglasses.cpp index aa06dadbf..0c7daa63b 100755 --- a/Sourcecode/private/mx/core/elements/Eyeglasses.cpp +++ b/Sourcecode/private/mx/core/elements/Eyeglasses.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Eyeglasses::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Eyeglasses::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Eyeglasses.h b/Sourcecode/private/mx/core/elements/Eyeglasses.h index 0fd96a303..11f58a683 100755 --- a/Sourcecode/private/mx/core/elements/Eyeglasses.h +++ b/Sourcecode/private/mx/core/elements/Eyeglasses.h @@ -35,7 +35,7 @@ namespace mx void setAttributes( const EmptyPrintObjectStyleAlignAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPrintObjectStyleAlignAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Falloff.cpp b/Sourcecode/private/mx/core/elements/Falloff.cpp index 9484d9312..28e543fcf 100755 --- a/Sourcecode/private/mx/core/elements/Falloff.cpp +++ b/Sourcecode/private/mx/core/elements/Falloff.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Falloff::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Falloff::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Falloff.h b/Sourcecode/private/mx/core/elements/Falloff.h index f821fc3ca..2f19efaa3 100755 --- a/Sourcecode/private/mx/core/elements/Falloff.h +++ b/Sourcecode/private/mx/core/elements/Falloff.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyLineAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyLineAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Feature.cpp b/Sourcecode/private/mx/core/elements/Feature.cpp index 165300963..ce06dabe0 100755 --- a/Sourcecode/private/mx/core/elements/Feature.cpp +++ b/Sourcecode/private/mx/core/elements/Feature.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Feature::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Feature::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Feature.h b/Sourcecode/private/mx/core/elements/Feature.h index c94e37527..148ca111a 100755 --- a/Sourcecode/private/mx/core/elements/Feature.h +++ b/Sourcecode/private/mx/core/elements/Feature.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/FeatureAttributes.cpp b/Sourcecode/private/mx/core/elements/FeatureAttributes.cpp index 8975d8e78..c4384d079 100755 --- a/Sourcecode/private/mx/core/elements/FeatureAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/FeatureAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool FeatureAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FeatureAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "FeatureAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/FeatureAttributes.h b/Sourcecode/private/mx/core/elements/FeatureAttributes.h index 3eaddd7ef..86a46968a 100755 --- a/Sourcecode/private/mx/core/elements/FeatureAttributes.h +++ b/Sourcecode/private/mx/core/elements/FeatureAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasType; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Fermata.cpp b/Sourcecode/private/mx/core/elements/Fermata.cpp index 9487a69b8..001b24fa3 100755 --- a/Sourcecode/private/mx/core/elements/Fermata.cpp +++ b/Sourcecode/private/mx/core/elements/Fermata.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Fermata::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Fermata::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Fermata.h b/Sourcecode/private/mx/core/elements/Fermata.h index 557570253..6b5e0cd7e 100755 --- a/Sourcecode/private/mx/core/elements/Fermata.h +++ b/Sourcecode/private/mx/core/elements/Fermata.h @@ -42,7 +42,7 @@ namespace mx void setValue( const FermataShape& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: FermataShape myValue; diff --git a/Sourcecode/private/mx/core/elements/FermataAttributes.cpp b/Sourcecode/private/mx/core/elements/FermataAttributes.cpp index 41e9032c1..719554ce8 100755 --- a/Sourcecode/private/mx/core/elements/FermataAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/FermataAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool FermataAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FermataAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "FermataAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/FermataAttributes.h b/Sourcecode/private/mx/core/elements/FermataAttributes.h index e1767aa2d..86ef8fd4d 100755 --- a/Sourcecode/private/mx/core/elements/FermataAttributes.h +++ b/Sourcecode/private/mx/core/elements/FermataAttributes.h @@ -51,7 +51,7 @@ namespace mx bool hasColor; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Fifths.cpp b/Sourcecode/private/mx/core/elements/Fifths.cpp index b10143bb3..5d34f9533 100755 --- a/Sourcecode/private/mx/core/elements/Fifths.cpp +++ b/Sourcecode/private/mx/core/elements/Fifths.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Fifths::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Fifths::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Fifths.h b/Sourcecode/private/mx/core/elements/Fifths.h index 611d26377..36173ea55 100755 --- a/Sourcecode/private/mx/core/elements/Fifths.h +++ b/Sourcecode/private/mx/core/elements/Fifths.h @@ -38,7 +38,7 @@ namespace mx void setValue( const FifthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: FifthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/Figure.cpp b/Sourcecode/private/mx/core/elements/Figure.cpp index 255b9653b..1f40dc2b0 100755 --- a/Sourcecode/private/mx/core/elements/Figure.cpp +++ b/Sourcecode/private/mx/core/elements/Figure.cpp @@ -194,7 +194,7 @@ namespace mx } - bool Figure::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Figure::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/Figure.h b/Sourcecode/private/mx/core/elements/Figure.h index 07af402b8..881056f8b 100755 --- a/Sourcecode/private/mx/core/elements/Figure.h +++ b/Sourcecode/private/mx/core/elements/Figure.h @@ -60,7 +60,7 @@ namespace mx void setHasExtend( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PrefixPtr myPrefix; diff --git a/Sourcecode/private/mx/core/elements/FigureNumber.cpp b/Sourcecode/private/mx/core/elements/FigureNumber.cpp index 1016d7fb6..ae210dfb6 100755 --- a/Sourcecode/private/mx/core/elements/FigureNumber.cpp +++ b/Sourcecode/private/mx/core/elements/FigureNumber.cpp @@ -87,7 +87,7 @@ namespace mx } - bool FigureNumber::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FigureNumber::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/FigureNumber.h b/Sourcecode/private/mx/core/elements/FigureNumber.h index 3a603ec8d..1b0946e6d 100755 --- a/Sourcecode/private/mx/core/elements/FigureNumber.h +++ b/Sourcecode/private/mx/core/elements/FigureNumber.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/FigureNumberAttributes.cpp b/Sourcecode/private/mx/core/elements/FigureNumberAttributes.cpp index 818b541c3..e75c7ffc3 100755 --- a/Sourcecode/private/mx/core/elements/FigureNumberAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/FigureNumberAttributes.cpp @@ -60,7 +60,7 @@ namespace mx } - bool FigureNumberAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FigureNumberAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "FigureNumberAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/FigureNumberAttributes.h b/Sourcecode/private/mx/core/elements/FigureNumberAttributes.h index 17b49103b..aadd7b7a1 100755 --- a/Sourcecode/private/mx/core/elements/FigureNumberAttributes.h +++ b/Sourcecode/private/mx/core/elements/FigureNumberAttributes.h @@ -46,7 +46,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/FiguredBass.cpp b/Sourcecode/private/mx/core/elements/FiguredBass.cpp index 11a9e3c0a..95a0cf8e0 100755 --- a/Sourcecode/private/mx/core/elements/FiguredBass.cpp +++ b/Sourcecode/private/mx/core/elements/FiguredBass.cpp @@ -176,7 +176,7 @@ namespace mx } - bool FiguredBass::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FiguredBass::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/FiguredBass.h b/Sourcecode/private/mx/core/elements/FiguredBass.h index 5031afc18..4af6aa7d6 100755 --- a/Sourcecode/private/mx/core/elements/FiguredBass.h +++ b/Sourcecode/private/mx/core/elements/FiguredBass.h @@ -56,7 +56,7 @@ namespace mx void setEditorialGroup( const EditorialGroupPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: FiguredBassAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/FiguredBassAttributes.cpp b/Sourcecode/private/mx/core/elements/FiguredBassAttributes.cpp index f2fda39d8..1b9b1e127 100755 --- a/Sourcecode/private/mx/core/elements/FiguredBassAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/FiguredBassAttributes.cpp @@ -84,7 +84,7 @@ namespace mx } - bool FiguredBassAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FiguredBassAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "FiguredBassAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/FiguredBassAttributes.h b/Sourcecode/private/mx/core/elements/FiguredBassAttributes.h index 72ea485cf..020187f27 100755 --- a/Sourcecode/private/mx/core/elements/FiguredBassAttributes.h +++ b/Sourcecode/private/mx/core/elements/FiguredBassAttributes.h @@ -59,7 +59,7 @@ namespace mx bool hasParentheses; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Fingering.cpp b/Sourcecode/private/mx/core/elements/Fingering.cpp index 3d9b65edc..322333c47 100755 --- a/Sourcecode/private/mx/core/elements/Fingering.cpp +++ b/Sourcecode/private/mx/core/elements/Fingering.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Fingering::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Fingering::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Fingering.h b/Sourcecode/private/mx/core/elements/Fingering.h index fde34e84d..005c0c531 100755 --- a/Sourcecode/private/mx/core/elements/Fingering.h +++ b/Sourcecode/private/mx/core/elements/Fingering.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/FingeringAttributes.cpp b/Sourcecode/private/mx/core/elements/FingeringAttributes.cpp index da7227c82..bffa41338 100755 --- a/Sourcecode/private/mx/core/elements/FingeringAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/FingeringAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool FingeringAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FingeringAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "FingeringAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/FingeringAttributes.h b/Sourcecode/private/mx/core/elements/FingeringAttributes.h index cb13dfc78..ad1bb1bc5 100755 --- a/Sourcecode/private/mx/core/elements/FingeringAttributes.h +++ b/Sourcecode/private/mx/core/elements/FingeringAttributes.h @@ -52,7 +52,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Fingernails.cpp b/Sourcecode/private/mx/core/elements/Fingernails.cpp index c9a829c25..c119170ba 100755 --- a/Sourcecode/private/mx/core/elements/Fingernails.cpp +++ b/Sourcecode/private/mx/core/elements/Fingernails.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Fingernails::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Fingernails::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Fingernails.h b/Sourcecode/private/mx/core/elements/Fingernails.h index c4ae70df8..b6161dd04 100755 --- a/Sourcecode/private/mx/core/elements/Fingernails.h +++ b/Sourcecode/private/mx/core/elements/Fingernails.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/FirstFret.cpp b/Sourcecode/private/mx/core/elements/FirstFret.cpp index 8115fe75f..866f12f66 100755 --- a/Sourcecode/private/mx/core/elements/FirstFret.cpp +++ b/Sourcecode/private/mx/core/elements/FirstFret.cpp @@ -87,7 +87,7 @@ namespace mx } - bool FirstFret::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FirstFret::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/FirstFret.h b/Sourcecode/private/mx/core/elements/FirstFret.h index 0448c5fdf..456e33b71 100755 --- a/Sourcecode/private/mx/core/elements/FirstFret.h +++ b/Sourcecode/private/mx/core/elements/FirstFret.h @@ -42,7 +42,7 @@ namespace mx void setValue( const PositiveInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PositiveInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/FirstFretAttributes.cpp b/Sourcecode/private/mx/core/elements/FirstFretAttributes.cpp index f5fece38d..2894b8f24 100755 --- a/Sourcecode/private/mx/core/elements/FirstFretAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/FirstFretAttributes.cpp @@ -36,7 +36,7 @@ namespace mx } - bool FirstFretAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FirstFretAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "FirstFretAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/FirstFretAttributes.h b/Sourcecode/private/mx/core/elements/FirstFretAttributes.h index 57dc530bd..b63afac57 100755 --- a/Sourcecode/private/mx/core/elements/FirstFretAttributes.h +++ b/Sourcecode/private/mx/core/elements/FirstFretAttributes.h @@ -32,7 +32,7 @@ namespace mx bool hasLocation; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Footnote.cpp b/Sourcecode/private/mx/core/elements/Footnote.cpp index a60330996..c1295641c 100755 --- a/Sourcecode/private/mx/core/elements/Footnote.cpp +++ b/Sourcecode/private/mx/core/elements/Footnote.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Footnote::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Footnote::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Footnote.h b/Sourcecode/private/mx/core/elements/Footnote.h index ffc4e150d..d3a2dccef 100755 --- a/Sourcecode/private/mx/core/elements/Footnote.h +++ b/Sourcecode/private/mx/core/elements/Footnote.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/FootnoteAttributes.cpp b/Sourcecode/private/mx/core/elements/FootnoteAttributes.cpp index 1c75d1bb9..d4582b3f1 100755 --- a/Sourcecode/private/mx/core/elements/FootnoteAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/FootnoteAttributes.cpp @@ -104,7 +104,7 @@ namespace mx } - bool FootnoteAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FootnoteAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "FootnoteAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/FootnoteAttributes.h b/Sourcecode/private/mx/core/elements/FootnoteAttributes.h index b779c7ab5..b7c970a26 100755 --- a/Sourcecode/private/mx/core/elements/FootnoteAttributes.h +++ b/Sourcecode/private/mx/core/elements/FootnoteAttributes.h @@ -70,7 +70,7 @@ namespace mx bool hasEnclosure; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Forward.cpp b/Sourcecode/private/mx/core/elements/Forward.cpp index 4777dc0cb..e039d5f44 100755 --- a/Sourcecode/private/mx/core/elements/Forward.cpp +++ b/Sourcecode/private/mx/core/elements/Forward.cpp @@ -123,7 +123,7 @@ namespace mx } - bool Forward::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Forward::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isDurationFound = false; diff --git a/Sourcecode/private/mx/core/elements/Forward.h b/Sourcecode/private/mx/core/elements/Forward.h index a646f40af..2597af8f5 100755 --- a/Sourcecode/private/mx/core/elements/Forward.h +++ b/Sourcecode/private/mx/core/elements/Forward.h @@ -50,7 +50,7 @@ namespace mx void setHasStaff( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: DurationPtr myDuration; diff --git a/Sourcecode/private/mx/core/elements/Frame.cpp b/Sourcecode/private/mx/core/elements/Frame.cpp index e751b0f89..f51a92fa4 100755 --- a/Sourcecode/private/mx/core/elements/Frame.cpp +++ b/Sourcecode/private/mx/core/elements/Frame.cpp @@ -189,7 +189,7 @@ namespace mx } - bool Frame::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Frame::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Frame.h b/Sourcecode/private/mx/core/elements/Frame.h index 61ddcfbbc..4feb6e214 100755 --- a/Sourcecode/private/mx/core/elements/Frame.h +++ b/Sourcecode/private/mx/core/elements/Frame.h @@ -61,7 +61,7 @@ namespace mx FrameNotePtr getFrameNote( const FrameNoteSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: FrameAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/FrameAttributes.cpp b/Sourcecode/private/mx/core/elements/FrameAttributes.cpp index 4ab7b46ee..82e1dcea8 100755 --- a/Sourcecode/private/mx/core/elements/FrameAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/FrameAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool FrameAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FrameAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "FrameAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/FrameAttributes.h b/Sourcecode/private/mx/core/elements/FrameAttributes.h index 7c0ec56ef..8f50e63c3 100755 --- a/Sourcecode/private/mx/core/elements/FrameAttributes.h +++ b/Sourcecode/private/mx/core/elements/FrameAttributes.h @@ -50,7 +50,7 @@ namespace mx bool hasUnplayed; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/FrameFrets.cpp b/Sourcecode/private/mx/core/elements/FrameFrets.cpp index 51ec56f8e..3f8b72589 100755 --- a/Sourcecode/private/mx/core/elements/FrameFrets.cpp +++ b/Sourcecode/private/mx/core/elements/FrameFrets.cpp @@ -66,7 +66,7 @@ namespace mx } - bool FrameFrets::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FrameFrets::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/FrameFrets.h b/Sourcecode/private/mx/core/elements/FrameFrets.h index c78780def..1e6440b1f 100755 --- a/Sourcecode/private/mx/core/elements/FrameFrets.h +++ b/Sourcecode/private/mx/core/elements/FrameFrets.h @@ -38,7 +38,7 @@ namespace mx void setValue( const PositiveInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PositiveInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/FrameNote.cpp b/Sourcecode/private/mx/core/elements/FrameNote.cpp index 3e51fc86a..19d386da4 100755 --- a/Sourcecode/private/mx/core/elements/FrameNote.cpp +++ b/Sourcecode/private/mx/core/elements/FrameNote.cpp @@ -155,7 +155,7 @@ namespace mx } - bool FrameNote::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FrameNote::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isStringFound = false; diff --git a/Sourcecode/private/mx/core/elements/FrameNote.h b/Sourcecode/private/mx/core/elements/FrameNote.h index c8bcc0265..1efd1e692 100755 --- a/Sourcecode/private/mx/core/elements/FrameNote.h +++ b/Sourcecode/private/mx/core/elements/FrameNote.h @@ -56,7 +56,7 @@ namespace mx void setHasBarre( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StringPtr myString; diff --git a/Sourcecode/private/mx/core/elements/FrameStrings.cpp b/Sourcecode/private/mx/core/elements/FrameStrings.cpp index e7d875ca6..927bf2d08 100755 --- a/Sourcecode/private/mx/core/elements/FrameStrings.cpp +++ b/Sourcecode/private/mx/core/elements/FrameStrings.cpp @@ -66,7 +66,7 @@ namespace mx } - bool FrameStrings::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FrameStrings::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/FrameStrings.h b/Sourcecode/private/mx/core/elements/FrameStrings.h index 46955359b..7988f1c2c 100755 --- a/Sourcecode/private/mx/core/elements/FrameStrings.h +++ b/Sourcecode/private/mx/core/elements/FrameStrings.h @@ -38,7 +38,7 @@ namespace mx void setValue( const PositiveInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PositiveInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/Fret.cpp b/Sourcecode/private/mx/core/elements/Fret.cpp index d34f9b075..e48db2307 100755 --- a/Sourcecode/private/mx/core/elements/Fret.cpp +++ b/Sourcecode/private/mx/core/elements/Fret.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Fret::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Fret::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Fret.h b/Sourcecode/private/mx/core/elements/Fret.h index 18d157f77..85fa65081 100755 --- a/Sourcecode/private/mx/core/elements/Fret.h +++ b/Sourcecode/private/mx/core/elements/Fret.h @@ -42,7 +42,7 @@ namespace mx void setValue( const NonNegativeInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NonNegativeInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/FretAttributes.cpp b/Sourcecode/private/mx/core/elements/FretAttributes.cpp index 68daa12f1..b74c4da09 100755 --- a/Sourcecode/private/mx/core/elements/FretAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/FretAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool FretAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FretAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "FretAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/FretAttributes.h b/Sourcecode/private/mx/core/elements/FretAttributes.h index 843777334..9c6be4825 100755 --- a/Sourcecode/private/mx/core/elements/FretAttributes.h +++ b/Sourcecode/private/mx/core/elements/FretAttributes.h @@ -37,7 +37,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/FullNoteGroup.h b/Sourcecode/private/mx/core/elements/FullNoteGroup.h index 2199ef4a0..8a2ac1ab0 100755 --- a/Sourcecode/private/mx/core/elements/FullNoteGroup.h +++ b/Sourcecode/private/mx/core/elements/FullNoteGroup.h @@ -44,7 +44,7 @@ namespace mx void setFullNoteTypeChoice( const FullNoteTypeChoicePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MX_MUTEX diff --git a/Sourcecode/private/mx/core/elements/FullNoteTypeChoice.h b/Sourcecode/private/mx/core/elements/FullNoteTypeChoice.h index 1e3aa1894..986032a28 100755 --- a/Sourcecode/private/mx/core/elements/FullNoteTypeChoice.h +++ b/Sourcecode/private/mx/core/elements/FullNoteTypeChoice.h @@ -57,7 +57,7 @@ namespace mx void setRest( const RestPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MX_MUTEX diff --git a/Sourcecode/private/mx/core/elements/Function.cpp b/Sourcecode/private/mx/core/elements/Function.cpp index e27243677..99b3ebab6 100755 --- a/Sourcecode/private/mx/core/elements/Function.cpp +++ b/Sourcecode/private/mx/core/elements/Function.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Function::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Function::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Function.h b/Sourcecode/private/mx/core/elements/Function.h index ce9dae1e1..4bcc7bc1f 100755 --- a/Sourcecode/private/mx/core/elements/Function.h +++ b/Sourcecode/private/mx/core/elements/Function.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/FunctionAttributes.cpp b/Sourcecode/private/mx/core/elements/FunctionAttributes.cpp index efdaee125..30b93770b 100755 --- a/Sourcecode/private/mx/core/elements/FunctionAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/FunctionAttributes.cpp @@ -60,7 +60,7 @@ namespace mx } - bool FunctionAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool FunctionAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "FunctionAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/FunctionAttributes.h b/Sourcecode/private/mx/core/elements/FunctionAttributes.h index 9a65b251e..9b7927403 100755 --- a/Sourcecode/private/mx/core/elements/FunctionAttributes.h +++ b/Sourcecode/private/mx/core/elements/FunctionAttributes.h @@ -46,7 +46,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Glass.cpp b/Sourcecode/private/mx/core/elements/Glass.cpp index a24fc1037..f66cbc711 100755 --- a/Sourcecode/private/mx/core/elements/Glass.cpp +++ b/Sourcecode/private/mx/core/elements/Glass.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Glass::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Glass::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseGlassEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/Glass.h b/Sourcecode/private/mx/core/elements/Glass.h index ce1e3166f..4a829cab4 100755 --- a/Sourcecode/private/mx/core/elements/Glass.h +++ b/Sourcecode/private/mx/core/elements/Glass.h @@ -38,7 +38,7 @@ namespace mx void setValue( const GlassEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: GlassEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/Glissando.cpp b/Sourcecode/private/mx/core/elements/Glissando.cpp index 548041139..22fe16ceb 100755 --- a/Sourcecode/private/mx/core/elements/Glissando.cpp +++ b/Sourcecode/private/mx/core/elements/Glissando.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Glissando::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Glissando::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Glissando.h b/Sourcecode/private/mx/core/elements/Glissando.h index 684579f1c..7f942f1a8 100755 --- a/Sourcecode/private/mx/core/elements/Glissando.h +++ b/Sourcecode/private/mx/core/elements/Glissando.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/GlissandoAttributes.cpp b/Sourcecode/private/mx/core/elements/GlissandoAttributes.cpp index 44f3ad6eb..fbeb6e9cd 100755 --- a/Sourcecode/private/mx/core/elements/GlissandoAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/GlissandoAttributes.cpp @@ -80,7 +80,7 @@ namespace mx } - bool GlissandoAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GlissandoAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "GlissandoAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/GlissandoAttributes.h b/Sourcecode/private/mx/core/elements/GlissandoAttributes.h index 501186890..8435b94cc 100755 --- a/Sourcecode/private/mx/core/elements/GlissandoAttributes.h +++ b/Sourcecode/private/mx/core/elements/GlissandoAttributes.h @@ -57,7 +57,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Grace.cpp b/Sourcecode/private/mx/core/elements/Grace.cpp index 990aa37ce..4fcbf3ace 100755 --- a/Sourcecode/private/mx/core/elements/Grace.cpp +++ b/Sourcecode/private/mx/core/elements/Grace.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Grace::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Grace::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Grace.h b/Sourcecode/private/mx/core/elements/Grace.h index 654cc0e90..21ebf7b1e 100755 --- a/Sourcecode/private/mx/core/elements/Grace.h +++ b/Sourcecode/private/mx/core/elements/Grace.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const GraceAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: GraceAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/GraceAttributes.cpp b/Sourcecode/private/mx/core/elements/GraceAttributes.cpp index 0068c6fcf..e448e6928 100755 --- a/Sourcecode/private/mx/core/elements/GraceAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/GraceAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool GraceAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GraceAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "GraceAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/GraceAttributes.h b/Sourcecode/private/mx/core/elements/GraceAttributes.h index 55c98e226..76ac2fd0a 100755 --- a/Sourcecode/private/mx/core/elements/GraceAttributes.h +++ b/Sourcecode/private/mx/core/elements/GraceAttributes.h @@ -36,7 +36,7 @@ namespace mx bool hasSlash; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/GraceNoteGroup.h b/Sourcecode/private/mx/core/elements/GraceNoteGroup.h index 0a0a66be8..0b262a412 100755 --- a/Sourcecode/private/mx/core/elements/GraceNoteGroup.h +++ b/Sourcecode/private/mx/core/elements/GraceNoteGroup.h @@ -50,7 +50,7 @@ namespace mx TiePtr getTie( const TieSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: GracePtr myGrace; diff --git a/Sourcecode/private/mx/core/elements/Group.cpp b/Sourcecode/private/mx/core/elements/Group.cpp index b76f8b45b..b418e5c66 100755 --- a/Sourcecode/private/mx/core/elements/Group.cpp +++ b/Sourcecode/private/mx/core/elements/Group.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Group::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Group::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Group.h b/Sourcecode/private/mx/core/elements/Group.h index 0dffe9eff..32ea514bd 100755 --- a/Sourcecode/private/mx/core/elements/Group.h +++ b/Sourcecode/private/mx/core/elements/Group.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/GroupAbbreviation.cpp b/Sourcecode/private/mx/core/elements/GroupAbbreviation.cpp index d2f04393e..0554f0a97 100755 --- a/Sourcecode/private/mx/core/elements/GroupAbbreviation.cpp +++ b/Sourcecode/private/mx/core/elements/GroupAbbreviation.cpp @@ -87,7 +87,7 @@ namespace mx } - bool GroupAbbreviation::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupAbbreviation::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/GroupAbbreviation.h b/Sourcecode/private/mx/core/elements/GroupAbbreviation.h index 267174750..857e597c7 100755 --- a/Sourcecode/private/mx/core/elements/GroupAbbreviation.h +++ b/Sourcecode/private/mx/core/elements/GroupAbbreviation.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/GroupAbbreviationAttributes.cpp b/Sourcecode/private/mx/core/elements/GroupAbbreviationAttributes.cpp index ec0ba7845..5b01c1a74 100755 --- a/Sourcecode/private/mx/core/elements/GroupAbbreviationAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/GroupAbbreviationAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool GroupAbbreviationAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupAbbreviationAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "GroupAbbreviationAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/GroupAbbreviationAttributes.h b/Sourcecode/private/mx/core/elements/GroupAbbreviationAttributes.h index c4f6dbc30..5b0e18a95 100755 --- a/Sourcecode/private/mx/core/elements/GroupAbbreviationAttributes.h +++ b/Sourcecode/private/mx/core/elements/GroupAbbreviationAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasJustify; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplay.cpp b/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplay.cpp index ae5e2176b..e1567031e 100755 --- a/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplay.cpp +++ b/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplay.cpp @@ -120,7 +120,7 @@ namespace mx } - bool GroupAbbreviationDisplay::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupAbbreviationDisplay::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplay.h b/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplay.h index 2e24f5d5e..296a3058f 100755 --- a/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplay.h +++ b/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplay.h @@ -50,7 +50,7 @@ namespace mx const DisplayTextOrAccidentalTextSet& getDisplayTextOrAccidentalTextSet() const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: GroupAbbreviationDisplayAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplayAttributes.cpp b/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplayAttributes.cpp index b52792dd9..144224e05 100755 --- a/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplayAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplayAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool GroupAbbreviationDisplayAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupAbbreviationDisplayAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "GroupAbbreviationDisplayAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplayAttributes.h b/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplayAttributes.h index 6797b4163..aea5f5643 100755 --- a/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplayAttributes.h +++ b/Sourcecode/private/mx/core/elements/GroupAbbreviationDisplayAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasPrintObject; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/GroupBarline.cpp b/Sourcecode/private/mx/core/elements/GroupBarline.cpp index 3db02e9d0..f28940f80 100755 --- a/Sourcecode/private/mx/core/elements/GroupBarline.cpp +++ b/Sourcecode/private/mx/core/elements/GroupBarline.cpp @@ -87,7 +87,7 @@ namespace mx } - bool GroupBarline::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupBarline::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/GroupBarline.h b/Sourcecode/private/mx/core/elements/GroupBarline.h index 2511446c2..62e7d39ee 100755 --- a/Sourcecode/private/mx/core/elements/GroupBarline.h +++ b/Sourcecode/private/mx/core/elements/GroupBarline.h @@ -42,7 +42,7 @@ namespace mx void setValue( const GroupBarlineValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: GroupBarlineValue myValue; diff --git a/Sourcecode/private/mx/core/elements/GroupBarlineAttributes.cpp b/Sourcecode/private/mx/core/elements/GroupBarlineAttributes.cpp index fd60a6eae..3e128491d 100755 --- a/Sourcecode/private/mx/core/elements/GroupBarlineAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/GroupBarlineAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool GroupBarlineAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupBarlineAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "GroupBarlineAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/GroupBarlineAttributes.h b/Sourcecode/private/mx/core/elements/GroupBarlineAttributes.h index 2467570e9..d6603b298 100755 --- a/Sourcecode/private/mx/core/elements/GroupBarlineAttributes.h +++ b/Sourcecode/private/mx/core/elements/GroupBarlineAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasColor; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/GroupName.cpp b/Sourcecode/private/mx/core/elements/GroupName.cpp index f9e5d5161..6006ef00b 100755 --- a/Sourcecode/private/mx/core/elements/GroupName.cpp +++ b/Sourcecode/private/mx/core/elements/GroupName.cpp @@ -87,7 +87,7 @@ namespace mx } - bool GroupName::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupName::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/GroupName.h b/Sourcecode/private/mx/core/elements/GroupName.h index ee704cb7a..5a36c6b19 100755 --- a/Sourcecode/private/mx/core/elements/GroupName.h +++ b/Sourcecode/private/mx/core/elements/GroupName.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/GroupNameAttributes.cpp b/Sourcecode/private/mx/core/elements/GroupNameAttributes.cpp index 5f4a0bd28..38fb3e1fc 100755 --- a/Sourcecode/private/mx/core/elements/GroupNameAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/GroupNameAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool GroupNameAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupNameAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "GroupNameAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/GroupNameAttributes.h b/Sourcecode/private/mx/core/elements/GroupNameAttributes.h index 6659b1907..c489b8cc9 100755 --- a/Sourcecode/private/mx/core/elements/GroupNameAttributes.h +++ b/Sourcecode/private/mx/core/elements/GroupNameAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasJustify; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/GroupNameDisplay.cpp b/Sourcecode/private/mx/core/elements/GroupNameDisplay.cpp index 75ccea353..f3003ffbe 100755 --- a/Sourcecode/private/mx/core/elements/GroupNameDisplay.cpp +++ b/Sourcecode/private/mx/core/elements/GroupNameDisplay.cpp @@ -120,7 +120,7 @@ namespace mx } - bool GroupNameDisplay::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupNameDisplay::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/GroupNameDisplay.h b/Sourcecode/private/mx/core/elements/GroupNameDisplay.h index 957efcddc..6361d786d 100755 --- a/Sourcecode/private/mx/core/elements/GroupNameDisplay.h +++ b/Sourcecode/private/mx/core/elements/GroupNameDisplay.h @@ -46,7 +46,7 @@ namespace mx const DisplayTextOrAccidentalTextSet& getDisplayTextOrAccidentalTextSet() const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: GroupNameDisplayAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/GroupNameDisplayAttributes.cpp b/Sourcecode/private/mx/core/elements/GroupNameDisplayAttributes.cpp index 7d5b17d70..5f0eef857 100755 --- a/Sourcecode/private/mx/core/elements/GroupNameDisplayAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/GroupNameDisplayAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool GroupNameDisplayAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupNameDisplayAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "GroupNameDisplayAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/GroupNameDisplayAttributes.h b/Sourcecode/private/mx/core/elements/GroupNameDisplayAttributes.h index 121935145..5f86cf2ff 100755 --- a/Sourcecode/private/mx/core/elements/GroupNameDisplayAttributes.h +++ b/Sourcecode/private/mx/core/elements/GroupNameDisplayAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasPrintObject; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/GroupSymbol.cpp b/Sourcecode/private/mx/core/elements/GroupSymbol.cpp index bb980d8d8..693bbcb00 100755 --- a/Sourcecode/private/mx/core/elements/GroupSymbol.cpp +++ b/Sourcecode/private/mx/core/elements/GroupSymbol.cpp @@ -87,7 +87,7 @@ namespace mx } - bool GroupSymbol::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupSymbol::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/GroupSymbol.h b/Sourcecode/private/mx/core/elements/GroupSymbol.h index 748a479ef..3117cdde3 100755 --- a/Sourcecode/private/mx/core/elements/GroupSymbol.h +++ b/Sourcecode/private/mx/core/elements/GroupSymbol.h @@ -42,7 +42,7 @@ namespace mx void setValue( const GroupSymbolValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: GroupSymbolValue myValue; diff --git a/Sourcecode/private/mx/core/elements/GroupSymbolAttributes.cpp b/Sourcecode/private/mx/core/elements/GroupSymbolAttributes.cpp index 7d5303694..f312933c9 100755 --- a/Sourcecode/private/mx/core/elements/GroupSymbolAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/GroupSymbolAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool GroupSymbolAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupSymbolAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "GroupSymbolAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/GroupSymbolAttributes.h b/Sourcecode/private/mx/core/elements/GroupSymbolAttributes.h index c1ddcef28..568524366 100755 --- a/Sourcecode/private/mx/core/elements/GroupSymbolAttributes.h +++ b/Sourcecode/private/mx/core/elements/GroupSymbolAttributes.h @@ -35,7 +35,7 @@ namespace mx bool hasRelativeY; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/GroupTime.cpp b/Sourcecode/private/mx/core/elements/GroupTime.cpp index 64d76d953..4460ff32f 100755 --- a/Sourcecode/private/mx/core/elements/GroupTime.cpp +++ b/Sourcecode/private/mx/core/elements/GroupTime.cpp @@ -27,7 +27,7 @@ namespace mx } - bool GroupTime::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupTime::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/GroupTime.h b/Sourcecode/private/mx/core/elements/GroupTime.h index 715f6f47f..6f26e245c 100755 --- a/Sourcecode/private/mx/core/elements/GroupTime.h +++ b/Sourcecode/private/mx/core/elements/GroupTime.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Grouping.cpp b/Sourcecode/private/mx/core/elements/Grouping.cpp index 51bdff9c7..a20e495ce 100755 --- a/Sourcecode/private/mx/core/elements/Grouping.cpp +++ b/Sourcecode/private/mx/core/elements/Grouping.cpp @@ -117,7 +117,7 @@ namespace mx } - bool Grouping::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Grouping::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Grouping.h b/Sourcecode/private/mx/core/elements/Grouping.h index 0683ee6e4..ae25da1a3 100755 --- a/Sourcecode/private/mx/core/elements/Grouping.h +++ b/Sourcecode/private/mx/core/elements/Grouping.h @@ -44,7 +44,7 @@ namespace mx FeaturePtr getFeature( const FeatureSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: GroupingAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/GroupingAttributes.cpp b/Sourcecode/private/mx/core/elements/GroupingAttributes.cpp index 173eda83c..0216c547a 100755 --- a/Sourcecode/private/mx/core/elements/GroupingAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/GroupingAttributes.cpp @@ -40,7 +40,7 @@ namespace mx } - bool GroupingAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool GroupingAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "GroupingAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/GroupingAttributes.h b/Sourcecode/private/mx/core/elements/GroupingAttributes.h index b48b43be0..a5044bfa0 100755 --- a/Sourcecode/private/mx/core/elements/GroupingAttributes.h +++ b/Sourcecode/private/mx/core/elements/GroupingAttributes.h @@ -34,7 +34,7 @@ namespace mx bool hasMemberOf; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/HammerOn.cpp b/Sourcecode/private/mx/core/elements/HammerOn.cpp index 8c16ce807..5b678a9c4 100755 --- a/Sourcecode/private/mx/core/elements/HammerOn.cpp +++ b/Sourcecode/private/mx/core/elements/HammerOn.cpp @@ -87,7 +87,7 @@ namespace mx } - bool HammerOn::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool HammerOn::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/HammerOn.h b/Sourcecode/private/mx/core/elements/HammerOn.h index ab6c2d29d..9ff45d0fe 100755 --- a/Sourcecode/private/mx/core/elements/HammerOn.h +++ b/Sourcecode/private/mx/core/elements/HammerOn.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/HammerOnAttributes.cpp b/Sourcecode/private/mx/core/elements/HammerOnAttributes.cpp index 08b8724f3..2eb604e13 100755 --- a/Sourcecode/private/mx/core/elements/HammerOnAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/HammerOnAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool HammerOnAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool HammerOnAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "HammerOnAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/HammerOnAttributes.h b/Sourcecode/private/mx/core/elements/HammerOnAttributes.h index f5d1d5bd8..2ca33d99f 100755 --- a/Sourcecode/private/mx/core/elements/HammerOnAttributes.h +++ b/Sourcecode/private/mx/core/elements/HammerOnAttributes.h @@ -53,7 +53,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Handbell.cpp b/Sourcecode/private/mx/core/elements/Handbell.cpp index 25c87109e..1ff68f1c9 100755 --- a/Sourcecode/private/mx/core/elements/Handbell.cpp +++ b/Sourcecode/private/mx/core/elements/Handbell.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Handbell::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Handbell::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Handbell.h b/Sourcecode/private/mx/core/elements/Handbell.h index 7a76a528a..7aa2d5269 100755 --- a/Sourcecode/private/mx/core/elements/Handbell.h +++ b/Sourcecode/private/mx/core/elements/Handbell.h @@ -42,7 +42,7 @@ namespace mx void setValue( const HandbellValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: HandbellValue myValue; diff --git a/Sourcecode/private/mx/core/elements/HandbellAttributes.cpp b/Sourcecode/private/mx/core/elements/HandbellAttributes.cpp index f48ee6379..4be078607 100755 --- a/Sourcecode/private/mx/core/elements/HandbellAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/HandbellAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool HandbellAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool HandbellAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "HandbellAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/HandbellAttributes.h b/Sourcecode/private/mx/core/elements/HandbellAttributes.h index ba311048d..966606b3d 100755 --- a/Sourcecode/private/mx/core/elements/HandbellAttributes.h +++ b/Sourcecode/private/mx/core/elements/HandbellAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Harmonic.cpp b/Sourcecode/private/mx/core/elements/Harmonic.cpp index d057a0c49..b90d67244 100755 --- a/Sourcecode/private/mx/core/elements/Harmonic.cpp +++ b/Sourcecode/private/mx/core/elements/Harmonic.cpp @@ -145,7 +145,7 @@ namespace mx } - bool Harmonic::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Harmonic::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Harmonic.h b/Sourcecode/private/mx/core/elements/Harmonic.h index ed24743a1..24a35f511 100755 --- a/Sourcecode/private/mx/core/elements/Harmonic.h +++ b/Sourcecode/private/mx/core/elements/Harmonic.h @@ -50,7 +50,7 @@ namespace mx void setHasHarmonicInfoChoice( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: HarmonicAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/HarmonicAttributes.cpp b/Sourcecode/private/mx/core/elements/HarmonicAttributes.cpp index 40c49cdcd..e792deb27 100755 --- a/Sourcecode/private/mx/core/elements/HarmonicAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/HarmonicAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool HarmonicAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool HarmonicAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "HarmonicAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/HarmonicAttributes.h b/Sourcecode/private/mx/core/elements/HarmonicAttributes.h index 1e40f5a48..2bca3382e 100755 --- a/Sourcecode/private/mx/core/elements/HarmonicAttributes.h +++ b/Sourcecode/private/mx/core/elements/HarmonicAttributes.h @@ -53,7 +53,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/HarmonicInfoChoice.h b/Sourcecode/private/mx/core/elements/HarmonicInfoChoice.h index 19579072c..8ef94c3fe 100755 --- a/Sourcecode/private/mx/core/elements/HarmonicInfoChoice.h +++ b/Sourcecode/private/mx/core/elements/HarmonicInfoChoice.h @@ -57,7 +57,7 @@ namespace mx void setSoundingPitch( const SoundingPitchPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/HarmonicTypeChoice.h b/Sourcecode/private/mx/core/elements/HarmonicTypeChoice.h index 657407230..9d7f75f3b 100755 --- a/Sourcecode/private/mx/core/elements/HarmonicTypeChoice.h +++ b/Sourcecode/private/mx/core/elements/HarmonicTypeChoice.h @@ -51,7 +51,7 @@ namespace mx void setArtificial( const ArtificialPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/Harmony.cpp b/Sourcecode/private/mx/core/elements/Harmony.cpp index 2a88f3b69..f199cf1bd 100755 --- a/Sourcecode/private/mx/core/elements/Harmony.cpp +++ b/Sourcecode/private/mx/core/elements/Harmony.cpp @@ -249,7 +249,7 @@ namespace mx } - bool Harmony::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Harmony::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Harmony.h b/Sourcecode/private/mx/core/elements/Harmony.h index bbba219f5..9230b6c33 100755 --- a/Sourcecode/private/mx/core/elements/Harmony.h +++ b/Sourcecode/private/mx/core/elements/Harmony.h @@ -70,7 +70,7 @@ namespace mx void setHasStaff( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: HarmonyAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/HarmonyAttributes.cpp b/Sourcecode/private/mx/core/elements/HarmonyAttributes.cpp index 2351a2183..37d98b41a 100755 --- a/Sourcecode/private/mx/core/elements/HarmonyAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/HarmonyAttributes.cpp @@ -80,7 +80,7 @@ namespace mx } - bool HarmonyAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool HarmonyAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "HarmonyAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/HarmonyAttributes.h b/Sourcecode/private/mx/core/elements/HarmonyAttributes.h index 2c8d6b753..bf27f297e 100755 --- a/Sourcecode/private/mx/core/elements/HarmonyAttributes.h +++ b/Sourcecode/private/mx/core/elements/HarmonyAttributes.h @@ -57,7 +57,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/HarmonyChordGroup.h b/Sourcecode/private/mx/core/elements/HarmonyChordGroup.h index a31e14d54..1aa8fd735 100755 --- a/Sourcecode/private/mx/core/elements/HarmonyChordGroup.h +++ b/Sourcecode/private/mx/core/elements/HarmonyChordGroup.h @@ -76,7 +76,7 @@ namespace mx DegreePtr getDegree( const DegreeSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/HarpPedals.cpp b/Sourcecode/private/mx/core/elements/HarpPedals.cpp index 59e132bee..d42863810 100755 --- a/Sourcecode/private/mx/core/elements/HarpPedals.cpp +++ b/Sourcecode/private/mx/core/elements/HarpPedals.cpp @@ -116,7 +116,7 @@ namespace mx } - bool HarpPedals::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool HarpPedals::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/HarpPedals.h b/Sourcecode/private/mx/core/elements/HarpPedals.h index 97c4d3b41..9ea3499bb 100755 --- a/Sourcecode/private/mx/core/elements/HarpPedals.h +++ b/Sourcecode/private/mx/core/elements/HarpPedals.h @@ -44,7 +44,7 @@ namespace mx PedalTuningPtr getPedalTuning( const PedalTuningSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: HarpPedalsAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/HarpPedalsAttributes.cpp b/Sourcecode/private/mx/core/elements/HarpPedalsAttributes.cpp index ffeace0fe..47b13ea9e 100755 --- a/Sourcecode/private/mx/core/elements/HarpPedalsAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/HarpPedalsAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool HarpPedalsAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool HarpPedalsAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "HarpPedalsAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/HarpPedalsAttributes.h b/Sourcecode/private/mx/core/elements/HarpPedalsAttributes.h index 6dc0ba674..559298318 100755 --- a/Sourcecode/private/mx/core/elements/HarpPedalsAttributes.h +++ b/Sourcecode/private/mx/core/elements/HarpPedalsAttributes.h @@ -53,7 +53,7 @@ namespace mx bool hasValign; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Heel.cpp b/Sourcecode/private/mx/core/elements/Heel.cpp index bba9e1cca..da7125b83 100755 --- a/Sourcecode/private/mx/core/elements/Heel.cpp +++ b/Sourcecode/private/mx/core/elements/Heel.cpp @@ -63,7 +63,7 @@ namespace mx } - bool Heel::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Heel::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Heel.h b/Sourcecode/private/mx/core/elements/Heel.h index d81dc57a2..067d770a3 100755 --- a/Sourcecode/private/mx/core/elements/Heel.h +++ b/Sourcecode/private/mx/core/elements/Heel.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const HeelAttributesPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: HeelAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/HeelAttributes.cpp b/Sourcecode/private/mx/core/elements/HeelAttributes.cpp index 1655cb252..f6f1bfbc3 100755 --- a/Sourcecode/private/mx/core/elements/HeelAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/HeelAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool HeelAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool HeelAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "HeelAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/HeelAttributes.h b/Sourcecode/private/mx/core/elements/HeelAttributes.h index e58122543..df3710b26 100755 --- a/Sourcecode/private/mx/core/elements/HeelAttributes.h +++ b/Sourcecode/private/mx/core/elements/HeelAttributes.h @@ -53,7 +53,7 @@ namespace mx bool hasSubstitution; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Hole.cpp b/Sourcecode/private/mx/core/elements/Hole.cpp index a9d868840..f8c7344b1 100755 --- a/Sourcecode/private/mx/core/elements/Hole.cpp +++ b/Sourcecode/private/mx/core/elements/Hole.cpp @@ -152,7 +152,7 @@ namespace mx } - bool Hole::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Hole::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Hole.h b/Sourcecode/private/mx/core/elements/Hole.h index 3fbfee765..89ae7901a 100755 --- a/Sourcecode/private/mx/core/elements/Hole.h +++ b/Sourcecode/private/mx/core/elements/Hole.h @@ -55,7 +55,7 @@ namespace mx void setHasHoleShape( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: HoleAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/HoleAttributes.cpp b/Sourcecode/private/mx/core/elements/HoleAttributes.cpp index 3f91503b4..d24cbc772 100755 --- a/Sourcecode/private/mx/core/elements/HoleAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/HoleAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool HoleAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool HoleAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "HoleAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/HoleAttributes.h b/Sourcecode/private/mx/core/elements/HoleAttributes.h index a6c267ea0..bb620bd93 100755 --- a/Sourcecode/private/mx/core/elements/HoleAttributes.h +++ b/Sourcecode/private/mx/core/elements/HoleAttributes.h @@ -51,7 +51,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/HoleClosed.cpp b/Sourcecode/private/mx/core/elements/HoleClosed.cpp index 8b9e5e206..2f6e7fbb2 100755 --- a/Sourcecode/private/mx/core/elements/HoleClosed.cpp +++ b/Sourcecode/private/mx/core/elements/HoleClosed.cpp @@ -3,7 +3,7 @@ // Distributed under the MIT License #include "mx/core/elements/HoleClosed.h" -#include "mx/xml/XElement.h" +#include "ezxml/XElement.h" #include namespace mx @@ -87,7 +87,7 @@ namespace mx } - bool HoleClosed::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool HoleClosed::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/HoleClosed.h b/Sourcecode/private/mx/core/elements/HoleClosed.h index d62ac426a..79c722670 100755 --- a/Sourcecode/private/mx/core/elements/HoleClosed.h +++ b/Sourcecode/private/mx/core/elements/HoleClosed.h @@ -42,7 +42,7 @@ namespace mx void setValue( const HoleClosedValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: HoleClosedValue myValue; diff --git a/Sourcecode/private/mx/core/elements/HoleClosedAttributes.cpp b/Sourcecode/private/mx/core/elements/HoleClosedAttributes.cpp index 037e2875f..6aca13517 100755 --- a/Sourcecode/private/mx/core/elements/HoleClosedAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/HoleClosedAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool HoleClosedAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool HoleClosedAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "HoleClosedAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/HoleClosedAttributes.h b/Sourcecode/private/mx/core/elements/HoleClosedAttributes.h index 1c6eb2011..5fe875c0f 100755 --- a/Sourcecode/private/mx/core/elements/HoleClosedAttributes.h +++ b/Sourcecode/private/mx/core/elements/HoleClosedAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasLocation; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/HoleShape.cpp b/Sourcecode/private/mx/core/elements/HoleShape.cpp index 3aac456be..3a86981a0 100755 --- a/Sourcecode/private/mx/core/elements/HoleShape.cpp +++ b/Sourcecode/private/mx/core/elements/HoleShape.cpp @@ -66,7 +66,7 @@ namespace mx } - bool HoleShape::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool HoleShape::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/HoleShape.h b/Sourcecode/private/mx/core/elements/HoleShape.h index ba41225f8..369f34508 100755 --- a/Sourcecode/private/mx/core/elements/HoleShape.h +++ b/Sourcecode/private/mx/core/elements/HoleShape.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/HoleType.cpp b/Sourcecode/private/mx/core/elements/HoleType.cpp index 2c629a012..638265e53 100755 --- a/Sourcecode/private/mx/core/elements/HoleType.cpp +++ b/Sourcecode/private/mx/core/elements/HoleType.cpp @@ -66,7 +66,7 @@ namespace mx } - bool HoleType::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool HoleType::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/HoleType.h b/Sourcecode/private/mx/core/elements/HoleType.h index 8ba11462c..e0e60a60a 100755 --- a/Sourcecode/private/mx/core/elements/HoleType.h +++ b/Sourcecode/private/mx/core/elements/HoleType.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/Humming.cpp b/Sourcecode/private/mx/core/elements/Humming.cpp index ac441074c..a4f2ddf2b 100755 --- a/Sourcecode/private/mx/core/elements/Humming.cpp +++ b/Sourcecode/private/mx/core/elements/Humming.cpp @@ -27,7 +27,7 @@ namespace mx } - bool Humming::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Humming::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Humming.h b/Sourcecode/private/mx/core/elements/Humming.h index 4d73f4c4b..07e5a94cf 100755 --- a/Sourcecode/private/mx/core/elements/Humming.h +++ b/Sourcecode/private/mx/core/elements/Humming.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Identification.cpp b/Sourcecode/private/mx/core/elements/Identification.cpp index 5003aa6cf..6a9a9b175 100755 --- a/Sourcecode/private/mx/core/elements/Identification.cpp +++ b/Sourcecode/private/mx/core/elements/Identification.cpp @@ -305,7 +305,7 @@ namespace mx } - bool Identification::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Identification::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/Identification.h b/Sourcecode/private/mx/core/elements/Identification.h index bc8bce0b5..6eb32a800 100755 --- a/Sourcecode/private/mx/core/elements/Identification.h +++ b/Sourcecode/private/mx/core/elements/Identification.h @@ -77,7 +77,7 @@ namespace mx void setHasMiscellaneous( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: CreatorSet myCreatorSet; diff --git a/Sourcecode/private/mx/core/elements/Image.cpp b/Sourcecode/private/mx/core/elements/Image.cpp index fd67e634d..6e5509c43 100755 --- a/Sourcecode/private/mx/core/elements/Image.cpp +++ b/Sourcecode/private/mx/core/elements/Image.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Image::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Image::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Image.h b/Sourcecode/private/mx/core/elements/Image.h index c297b1fde..10bbaaed7 100755 --- a/Sourcecode/private/mx/core/elements/Image.h +++ b/Sourcecode/private/mx/core/elements/Image.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const ImageAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ImageAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/ImageAttributes.cpp b/Sourcecode/private/mx/core/elements/ImageAttributes.cpp index 29b3c2095..2172a66b2 100755 --- a/Sourcecode/private/mx/core/elements/ImageAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/ImageAttributes.cpp @@ -56,7 +56,7 @@ namespace mx } - bool ImageAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ImageAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "ImageAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/ImageAttributes.h b/Sourcecode/private/mx/core/elements/ImageAttributes.h index 9d3ca0b45..b67e5bb78 100755 --- a/Sourcecode/private/mx/core/elements/ImageAttributes.h +++ b/Sourcecode/private/mx/core/elements/ImageAttributes.h @@ -43,7 +43,7 @@ namespace mx bool hasHalign; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Instrument.cpp b/Sourcecode/private/mx/core/elements/Instrument.cpp index f1498351c..63fc61005 100755 --- a/Sourcecode/private/mx/core/elements/Instrument.cpp +++ b/Sourcecode/private/mx/core/elements/Instrument.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Instrument::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Instrument::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Instrument.h b/Sourcecode/private/mx/core/elements/Instrument.h index e3c8c1182..069c9580b 100755 --- a/Sourcecode/private/mx/core/elements/Instrument.h +++ b/Sourcecode/private/mx/core/elements/Instrument.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const InstrumentAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: InstrumentAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/InstrumentAbbreviation.cpp b/Sourcecode/private/mx/core/elements/InstrumentAbbreviation.cpp index 6f43711a7..1aebb7bf1 100755 --- a/Sourcecode/private/mx/core/elements/InstrumentAbbreviation.cpp +++ b/Sourcecode/private/mx/core/elements/InstrumentAbbreviation.cpp @@ -66,7 +66,7 @@ namespace mx } - bool InstrumentAbbreviation::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool InstrumentAbbreviation::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/InstrumentAbbreviation.h b/Sourcecode/private/mx/core/elements/InstrumentAbbreviation.h index 72377ad7f..9ddd4aa41 100755 --- a/Sourcecode/private/mx/core/elements/InstrumentAbbreviation.h +++ b/Sourcecode/private/mx/core/elements/InstrumentAbbreviation.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/InstrumentAttributes.cpp b/Sourcecode/private/mx/core/elements/InstrumentAttributes.cpp index 0f378d636..8d1d7d73f 100755 --- a/Sourcecode/private/mx/core/elements/InstrumentAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/InstrumentAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool InstrumentAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool InstrumentAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "InstrumentAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/InstrumentAttributes.h b/Sourcecode/private/mx/core/elements/InstrumentAttributes.h index cbc9134a6..9cd616029 100755 --- a/Sourcecode/private/mx/core/elements/InstrumentAttributes.h +++ b/Sourcecode/private/mx/core/elements/InstrumentAttributes.h @@ -29,7 +29,7 @@ namespace mx const bool hasId; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/InstrumentName.cpp b/Sourcecode/private/mx/core/elements/InstrumentName.cpp index 5ede59416..5c1e0d7a3 100755 --- a/Sourcecode/private/mx/core/elements/InstrumentName.cpp +++ b/Sourcecode/private/mx/core/elements/InstrumentName.cpp @@ -66,7 +66,7 @@ namespace mx } - bool InstrumentName::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool InstrumentName::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/InstrumentName.h b/Sourcecode/private/mx/core/elements/InstrumentName.h index 3a82d34c4..8f64dfcb5 100755 --- a/Sourcecode/private/mx/core/elements/InstrumentName.h +++ b/Sourcecode/private/mx/core/elements/InstrumentName.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/InstrumentSound.cpp b/Sourcecode/private/mx/core/elements/InstrumentSound.cpp index 1494c53d8..09c2d4c79 100755 --- a/Sourcecode/private/mx/core/elements/InstrumentSound.cpp +++ b/Sourcecode/private/mx/core/elements/InstrumentSound.cpp @@ -66,7 +66,7 @@ namespace mx } - bool InstrumentSound::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool InstrumentSound::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/InstrumentSound.h b/Sourcecode/private/mx/core/elements/InstrumentSound.h index fdefad42e..e6fd77f5f 100755 --- a/Sourcecode/private/mx/core/elements/InstrumentSound.h +++ b/Sourcecode/private/mx/core/elements/InstrumentSound.h @@ -37,7 +37,7 @@ namespace mx void setValue( const PlaybackSound& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PlaybackSound myValue; diff --git a/Sourcecode/private/mx/core/elements/Instruments.cpp b/Sourcecode/private/mx/core/elements/Instruments.cpp index 3a1947846..0c4bcee4b 100755 --- a/Sourcecode/private/mx/core/elements/Instruments.cpp +++ b/Sourcecode/private/mx/core/elements/Instruments.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Instruments::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Instruments::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Instruments.h b/Sourcecode/private/mx/core/elements/Instruments.h index f1bf80325..b10754c19 100755 --- a/Sourcecode/private/mx/core/elements/Instruments.h +++ b/Sourcecode/private/mx/core/elements/Instruments.h @@ -38,7 +38,7 @@ namespace mx void setValue( const NonNegativeInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NonNegativeInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/Interchangeable.cpp b/Sourcecode/private/mx/core/elements/Interchangeable.cpp index f1e6d3181..14fd40be9 100755 --- a/Sourcecode/private/mx/core/elements/Interchangeable.cpp +++ b/Sourcecode/private/mx/core/elements/Interchangeable.cpp @@ -136,7 +136,7 @@ namespace mx } - bool Interchangeable::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Interchangeable::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Interchangeable.h b/Sourcecode/private/mx/core/elements/Interchangeable.h index 2c21e0200..bb4ebd850 100755 --- a/Sourcecode/private/mx/core/elements/Interchangeable.h +++ b/Sourcecode/private/mx/core/elements/Interchangeable.h @@ -53,7 +53,7 @@ namespace mx void setBeatType( const BeatTypePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: InterchangeableAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/InterchangeableAttributes.cpp b/Sourcecode/private/mx/core/elements/InterchangeableAttributes.cpp index 2e7a7f931..f1751f632 100755 --- a/Sourcecode/private/mx/core/elements/InterchangeableAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/InterchangeableAttributes.cpp @@ -36,7 +36,7 @@ namespace mx } - bool InterchangeableAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool InterchangeableAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "InterchangeableAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/InterchangeableAttributes.h b/Sourcecode/private/mx/core/elements/InterchangeableAttributes.h index 8c17528d7..da1d19fb8 100755 --- a/Sourcecode/private/mx/core/elements/InterchangeableAttributes.h +++ b/Sourcecode/private/mx/core/elements/InterchangeableAttributes.h @@ -31,7 +31,7 @@ namespace mx bool hasSeparator; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Inversion.cpp b/Sourcecode/private/mx/core/elements/Inversion.cpp index 5b01c2a46..ade20e040 100755 --- a/Sourcecode/private/mx/core/elements/Inversion.cpp +++ b/Sourcecode/private/mx/core/elements/Inversion.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Inversion::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Inversion::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Inversion.h b/Sourcecode/private/mx/core/elements/Inversion.h index 57ff1dee4..6c9529f68 100755 --- a/Sourcecode/private/mx/core/elements/Inversion.h +++ b/Sourcecode/private/mx/core/elements/Inversion.h @@ -42,7 +42,7 @@ namespace mx void setValue( const NonNegativeInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NonNegativeInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/InversionAttributes.cpp b/Sourcecode/private/mx/core/elements/InversionAttributes.cpp index 64e24b647..e7fc0b429 100755 --- a/Sourcecode/private/mx/core/elements/InversionAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/InversionAttributes.cpp @@ -60,7 +60,7 @@ namespace mx } - bool InversionAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool InversionAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "InversionAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/InversionAttributes.h b/Sourcecode/private/mx/core/elements/InversionAttributes.h index e58885416..ad85da4d6 100755 --- a/Sourcecode/private/mx/core/elements/InversionAttributes.h +++ b/Sourcecode/private/mx/core/elements/InversionAttributes.h @@ -46,7 +46,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/InvertedMordent.cpp b/Sourcecode/private/mx/core/elements/InvertedMordent.cpp index 1a5ef303f..23c373841 100755 --- a/Sourcecode/private/mx/core/elements/InvertedMordent.cpp +++ b/Sourcecode/private/mx/core/elements/InvertedMordent.cpp @@ -62,7 +62,7 @@ namespace mx } - bool InvertedMordent::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool InvertedMordent::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/InvertedMordent.h b/Sourcecode/private/mx/core/elements/InvertedMordent.h index 17ab0adfb..7c2d040fb 100755 --- a/Sourcecode/private/mx/core/elements/InvertedMordent.h +++ b/Sourcecode/private/mx/core/elements/InvertedMordent.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const InvertedMordentAttributesPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: InvertedMordentAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/InvertedMordentAttributes.cpp b/Sourcecode/private/mx/core/elements/InvertedMordentAttributes.cpp index f7d5899bd..4b0c42a8d 100755 --- a/Sourcecode/private/mx/core/elements/InvertedMordentAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/InvertedMordentAttributes.cpp @@ -109,7 +109,7 @@ namespace mx } - bool InvertedMordentAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool InvertedMordentAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "InvertedMordentAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/InvertedMordentAttributes.h b/Sourcecode/private/mx/core/elements/InvertedMordentAttributes.h index b32c56f40..a44a7e631 100755 --- a/Sourcecode/private/mx/core/elements/InvertedMordentAttributes.h +++ b/Sourcecode/private/mx/core/elements/InvertedMordentAttributes.h @@ -71,7 +71,7 @@ namespace mx bool hasDeparture; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/InvertedTurn.cpp b/Sourcecode/private/mx/core/elements/InvertedTurn.cpp index b5714e469..b99ed7031 100755 --- a/Sourcecode/private/mx/core/elements/InvertedTurn.cpp +++ b/Sourcecode/private/mx/core/elements/InvertedTurn.cpp @@ -57,7 +57,7 @@ namespace mx } - bool InvertedTurn::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool InvertedTurn::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/InvertedTurn.h b/Sourcecode/private/mx/core/elements/InvertedTurn.h index d643e3d09..50ce5733c 100755 --- a/Sourcecode/private/mx/core/elements/InvertedTurn.h +++ b/Sourcecode/private/mx/core/elements/InvertedTurn.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const InvertedTurnAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: InvertedTurnAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/InvertedTurnAttributes.cpp b/Sourcecode/private/mx/core/elements/InvertedTurnAttributes.cpp index 7b2111aa0..fd3a96718 100755 --- a/Sourcecode/private/mx/core/elements/InvertedTurnAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/InvertedTurnAttributes.cpp @@ -96,7 +96,7 @@ namespace mx } - bool InvertedTurnAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool InvertedTurnAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "InvertedTurnAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/InvertedTurnAttributes.h b/Sourcecode/private/mx/core/elements/InvertedTurnAttributes.h index 1cf8175a5..cadc90973 100755 --- a/Sourcecode/private/mx/core/elements/InvertedTurnAttributes.h +++ b/Sourcecode/private/mx/core/elements/InvertedTurnAttributes.h @@ -64,7 +64,7 @@ namespace mx bool hasSlash; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Ipa.cpp b/Sourcecode/private/mx/core/elements/Ipa.cpp index 6ad117b1b..e2cf083dc 100755 --- a/Sourcecode/private/mx/core/elements/Ipa.cpp +++ b/Sourcecode/private/mx/core/elements/Ipa.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Ipa::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Ipa::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Ipa.h b/Sourcecode/private/mx/core/elements/Ipa.h index 1b65dec57..216a6f218 100755 --- a/Sourcecode/private/mx/core/elements/Ipa.h +++ b/Sourcecode/private/mx/core/elements/Ipa.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/Key.cpp b/Sourcecode/private/mx/core/elements/Key.cpp index ea4a7cecd..32477351a 100755 --- a/Sourcecode/private/mx/core/elements/Key.cpp +++ b/Sourcecode/private/mx/core/elements/Key.cpp @@ -146,7 +146,7 @@ namespace mx } - bool Key::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Key::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); @@ -163,7 +163,7 @@ namespace mx } - bool Key::importTraditionalKey( std::ostream& message, xml::XElementIterator& iter, xml::XElementIterator& endIter, bool& isSuccess ) + bool Key::importTraditionalKey( std::ostream& message, ::ezxml::XElementIterator& iter, ::ezxml::XElementIterator& endIter, bool& isSuccess ) { if( iter == endIter ) { @@ -212,7 +212,7 @@ namespace mx } - bool Key::importNonTraditionalKey( std::ostream& message, xml::XElementIterator& iter, xml::XElementIterator& endIter, bool& isSuccess ) + bool Key::importNonTraditionalKey( std::ostream& message, ::ezxml::XElementIterator& iter, ::ezxml::XElementIterator& endIter, bool& isSuccess ) { if( iter == endIter ) { diff --git a/Sourcecode/private/mx/core/elements/Key.h b/Sourcecode/private/mx/core/elements/Key.h index bdd49c26a..47214a002 100755 --- a/Sourcecode/private/mx/core/elements/Key.h +++ b/Sourcecode/private/mx/core/elements/Key.h @@ -12,14 +12,13 @@ #include #include +namespace ezxml +{ + class XElementIterator; +} + namespace mx { - - namespace xml - { - class XElementIterator; - } - namespace core { @@ -50,15 +49,15 @@ namespace mx void clearKeyOctaveSet(); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: KeyAttributesPtr myAttributes; KeyChoicePtr myKeyChoice; KeyOctaveSet myKeyOctaveSet; - bool importTraditionalKey( std::ostream& message, xml::XElementIterator& iter, xml::XElementIterator& endIter, bool& isSuccess ); - bool importNonTraditionalKey( std::ostream& message, xml::XElementIterator& iter, xml::XElementIterator& endIter, bool& isSuccess ); + bool importTraditionalKey( std::ostream& message, ::ezxml::XElementIterator& iter, ::ezxml::XElementIterator& endIter, bool& isSuccess ); + bool importNonTraditionalKey( std::ostream& message, ::ezxml::XElementIterator& iter, ::ezxml::XElementIterator& endIter, bool& isSuccess ); }; } } diff --git a/Sourcecode/private/mx/core/elements/KeyAccidental.cpp b/Sourcecode/private/mx/core/elements/KeyAccidental.cpp index 6969063a9..a5d545c0a 100755 --- a/Sourcecode/private/mx/core/elements/KeyAccidental.cpp +++ b/Sourcecode/private/mx/core/elements/KeyAccidental.cpp @@ -66,7 +66,7 @@ namespace mx } - bool KeyAccidental::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool KeyAccidental::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseAccidentalValue( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/KeyAccidental.h b/Sourcecode/private/mx/core/elements/KeyAccidental.h index 5df5d9bf7..0aa01193d 100755 --- a/Sourcecode/private/mx/core/elements/KeyAccidental.h +++ b/Sourcecode/private/mx/core/elements/KeyAccidental.h @@ -38,7 +38,7 @@ namespace mx void setValue( const AccidentalValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: AccidentalValue myValue; diff --git a/Sourcecode/private/mx/core/elements/KeyAlter.cpp b/Sourcecode/private/mx/core/elements/KeyAlter.cpp index ca3621573..a412f0e0f 100755 --- a/Sourcecode/private/mx/core/elements/KeyAlter.cpp +++ b/Sourcecode/private/mx/core/elements/KeyAlter.cpp @@ -66,7 +66,7 @@ namespace mx } - bool KeyAlter::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool KeyAlter::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/KeyAlter.h b/Sourcecode/private/mx/core/elements/KeyAlter.h index d87ed4c10..bd0ca5861 100755 --- a/Sourcecode/private/mx/core/elements/KeyAlter.h +++ b/Sourcecode/private/mx/core/elements/KeyAlter.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Semitones& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Semitones myValue; diff --git a/Sourcecode/private/mx/core/elements/KeyAttributes.cpp b/Sourcecode/private/mx/core/elements/KeyAttributes.cpp index ff96fd8dd..74653620b 100755 --- a/Sourcecode/private/mx/core/elements/KeyAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/KeyAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool KeyAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool KeyAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "KeyAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/KeyAttributes.h b/Sourcecode/private/mx/core/elements/KeyAttributes.h index 36bf59d19..23832a417 100755 --- a/Sourcecode/private/mx/core/elements/KeyAttributes.h +++ b/Sourcecode/private/mx/core/elements/KeyAttributes.h @@ -54,7 +54,7 @@ namespace mx bool hasPrintObject; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/KeyChoice.h b/Sourcecode/private/mx/core/elements/KeyChoice.h index 39ee353d6..0ce010091 100755 --- a/Sourcecode/private/mx/core/elements/KeyChoice.h +++ b/Sourcecode/private/mx/core/elements/KeyChoice.h @@ -49,7 +49,7 @@ namespace mx private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/KeyOctave.cpp b/Sourcecode/private/mx/core/elements/KeyOctave.cpp index 6b8206543..afe7f2219 100755 --- a/Sourcecode/private/mx/core/elements/KeyOctave.cpp +++ b/Sourcecode/private/mx/core/elements/KeyOctave.cpp @@ -87,7 +87,7 @@ namespace mx } - bool KeyOctave::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool KeyOctave::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/KeyOctave.h b/Sourcecode/private/mx/core/elements/KeyOctave.h index 49204ff17..02a09b63a 100755 --- a/Sourcecode/private/mx/core/elements/KeyOctave.h +++ b/Sourcecode/private/mx/core/elements/KeyOctave.h @@ -42,7 +42,7 @@ namespace mx void setValue( const OctaveValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: OctaveValue myValue; diff --git a/Sourcecode/private/mx/core/elements/KeyOctaveAttributes.cpp b/Sourcecode/private/mx/core/elements/KeyOctaveAttributes.cpp index ac7d08afb..292a1acf2 100755 --- a/Sourcecode/private/mx/core/elements/KeyOctaveAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/KeyOctaveAttributes.cpp @@ -36,7 +36,7 @@ namespace mx } - bool KeyOctaveAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool KeyOctaveAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "KeyOctaveAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/KeyOctaveAttributes.h b/Sourcecode/private/mx/core/elements/KeyOctaveAttributes.h index 433d38b91..f4030021c 100755 --- a/Sourcecode/private/mx/core/elements/KeyOctaveAttributes.h +++ b/Sourcecode/private/mx/core/elements/KeyOctaveAttributes.h @@ -32,7 +32,7 @@ namespace mx bool hasCancel; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/KeyStep.cpp b/Sourcecode/private/mx/core/elements/KeyStep.cpp index 7af8e45ca..f705fbd9f 100755 --- a/Sourcecode/private/mx/core/elements/KeyStep.cpp +++ b/Sourcecode/private/mx/core/elements/KeyStep.cpp @@ -66,7 +66,7 @@ namespace mx } - bool KeyStep::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool KeyStep::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/KeyStep.h b/Sourcecode/private/mx/core/elements/KeyStep.h index 6c9030a76..b8c29a337 100755 --- a/Sourcecode/private/mx/core/elements/KeyStep.h +++ b/Sourcecode/private/mx/core/elements/KeyStep.h @@ -38,7 +38,7 @@ namespace mx void setValue( const StepEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StepEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/Kind.cpp b/Sourcecode/private/mx/core/elements/Kind.cpp index 93dc97d74..f1e49d368 100755 --- a/Sourcecode/private/mx/core/elements/Kind.cpp +++ b/Sourcecode/private/mx/core/elements/Kind.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Kind::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Kind::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Kind.h b/Sourcecode/private/mx/core/elements/Kind.h index 6242a1527..c905f90bf 100755 --- a/Sourcecode/private/mx/core/elements/Kind.h +++ b/Sourcecode/private/mx/core/elements/Kind.h @@ -42,7 +42,7 @@ namespace mx void setValue( const KindValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: KindValue myValue; diff --git a/Sourcecode/private/mx/core/elements/KindAttributes.cpp b/Sourcecode/private/mx/core/elements/KindAttributes.cpp index 9ba455b0c..abe7f40e7 100755 --- a/Sourcecode/private/mx/core/elements/KindAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/KindAttributes.cpp @@ -84,7 +84,7 @@ namespace mx } - bool KindAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool KindAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "KindAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/KindAttributes.h b/Sourcecode/private/mx/core/elements/KindAttributes.h index 994254131..01f32209b 100755 --- a/Sourcecode/private/mx/core/elements/KindAttributes.h +++ b/Sourcecode/private/mx/core/elements/KindAttributes.h @@ -58,7 +58,7 @@ namespace mx bool hasHalign; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Laughing.cpp b/Sourcecode/private/mx/core/elements/Laughing.cpp index c66625c81..c973b2ae3 100755 --- a/Sourcecode/private/mx/core/elements/Laughing.cpp +++ b/Sourcecode/private/mx/core/elements/Laughing.cpp @@ -27,7 +27,7 @@ namespace mx } - bool Laughing::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Laughing::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Laughing.h b/Sourcecode/private/mx/core/elements/Laughing.h index cd1ef4cbb..d499b893e 100755 --- a/Sourcecode/private/mx/core/elements/Laughing.h +++ b/Sourcecode/private/mx/core/elements/Laughing.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/LayoutGroup.h b/Sourcecode/private/mx/core/elements/LayoutGroup.h index 6d3e59e5d..38603809c 100755 --- a/Sourcecode/private/mx/core/elements/LayoutGroup.h +++ b/Sourcecode/private/mx/core/elements/LayoutGroup.h @@ -54,7 +54,7 @@ namespace mx StaffLayoutPtr getStaffLayout( const StaffLayoutSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PageLayoutPtr myPageLayout; diff --git a/Sourcecode/private/mx/core/elements/LeftDivider.cpp b/Sourcecode/private/mx/core/elements/LeftDivider.cpp index 37e21f018..28a9ceea5 100755 --- a/Sourcecode/private/mx/core/elements/LeftDivider.cpp +++ b/Sourcecode/private/mx/core/elements/LeftDivider.cpp @@ -57,7 +57,7 @@ namespace mx } - bool LeftDivider::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool LeftDivider::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/LeftDivider.h b/Sourcecode/private/mx/core/elements/LeftDivider.h index 485f5ca1a..a0c0ae144 100755 --- a/Sourcecode/private/mx/core/elements/LeftDivider.h +++ b/Sourcecode/private/mx/core/elements/LeftDivider.h @@ -35,7 +35,7 @@ namespace mx void setAttributes( const EmptyPrintObjectStyleAlignAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPrintObjectStyleAlignAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/LeftMargin.cpp b/Sourcecode/private/mx/core/elements/LeftMargin.cpp index e1d9a5264..6163cbb64 100755 --- a/Sourcecode/private/mx/core/elements/LeftMargin.cpp +++ b/Sourcecode/private/mx/core/elements/LeftMargin.cpp @@ -66,7 +66,7 @@ namespace mx } - bool LeftMargin::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool LeftMargin::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/LeftMargin.h b/Sourcecode/private/mx/core/elements/LeftMargin.h index 34738b676..53f825a93 100755 --- a/Sourcecode/private/mx/core/elements/LeftMargin.h +++ b/Sourcecode/private/mx/core/elements/LeftMargin.h @@ -38,7 +38,7 @@ namespace mx void setValue( const TenthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TenthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/Level.cpp b/Sourcecode/private/mx/core/elements/Level.cpp index 00dbd3460..987766c45 100755 --- a/Sourcecode/private/mx/core/elements/Level.cpp +++ b/Sourcecode/private/mx/core/elements/Level.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Level::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Level::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Level.h b/Sourcecode/private/mx/core/elements/Level.h index 62082b2f9..ad495e106 100755 --- a/Sourcecode/private/mx/core/elements/Level.h +++ b/Sourcecode/private/mx/core/elements/Level.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/LevelAttributes.cpp b/Sourcecode/private/mx/core/elements/LevelAttributes.cpp index 46544bbda..988796d44 100755 --- a/Sourcecode/private/mx/core/elements/LevelAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/LevelAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool LevelAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool LevelAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "LevelAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/LevelAttributes.h b/Sourcecode/private/mx/core/elements/LevelAttributes.h index 147a6158b..594d2133f 100755 --- a/Sourcecode/private/mx/core/elements/LevelAttributes.h +++ b/Sourcecode/private/mx/core/elements/LevelAttributes.h @@ -35,7 +35,7 @@ namespace mx bool hasSize; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Line.cpp b/Sourcecode/private/mx/core/elements/Line.cpp index 950bcb33e..d19d129ff 100755 --- a/Sourcecode/private/mx/core/elements/Line.cpp +++ b/Sourcecode/private/mx/core/elements/Line.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Line::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Line::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Line.h b/Sourcecode/private/mx/core/elements/Line.h index 1f03bd604..67ebf7f60 100755 --- a/Sourcecode/private/mx/core/elements/Line.h +++ b/Sourcecode/private/mx/core/elements/Line.h @@ -38,7 +38,7 @@ namespace mx void setValue( const StaffLine& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StaffLine myValue; diff --git a/Sourcecode/private/mx/core/elements/LineWidth.cpp b/Sourcecode/private/mx/core/elements/LineWidth.cpp index f60760ca8..b786106e3 100755 --- a/Sourcecode/private/mx/core/elements/LineWidth.cpp +++ b/Sourcecode/private/mx/core/elements/LineWidth.cpp @@ -87,7 +87,7 @@ namespace mx } - bool LineWidth::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool LineWidth::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/LineWidth.h b/Sourcecode/private/mx/core/elements/LineWidth.h index da933ffe7..1c3c3f4a0 100755 --- a/Sourcecode/private/mx/core/elements/LineWidth.h +++ b/Sourcecode/private/mx/core/elements/LineWidth.h @@ -42,7 +42,7 @@ namespace mx void setValue( const TenthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TenthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/LineWidthAttributes.cpp b/Sourcecode/private/mx/core/elements/LineWidthAttributes.cpp index b68857d63..e1d01d617 100755 --- a/Sourcecode/private/mx/core/elements/LineWidthAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/LineWidthAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool LineWidthAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool LineWidthAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "LineWidthAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/LineWidthAttributes.h b/Sourcecode/private/mx/core/elements/LineWidthAttributes.h index 06fa9ec11..a7823c94d 100755 --- a/Sourcecode/private/mx/core/elements/LineWidthAttributes.h +++ b/Sourcecode/private/mx/core/elements/LineWidthAttributes.h @@ -29,7 +29,7 @@ namespace mx const bool hasType; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Link.cpp b/Sourcecode/private/mx/core/elements/Link.cpp index 5af5282b9..0437855a8 100755 --- a/Sourcecode/private/mx/core/elements/Link.cpp +++ b/Sourcecode/private/mx/core/elements/Link.cpp @@ -56,7 +56,7 @@ namespace mx } - bool Link::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Link::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); return myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Link.h b/Sourcecode/private/mx/core/elements/Link.h index 674ab503d..992c7c73b 100755 --- a/Sourcecode/private/mx/core/elements/Link.h +++ b/Sourcecode/private/mx/core/elements/Link.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const LinkAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: LinkAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/LinkAttributes.cpp b/Sourcecode/private/mx/core/elements/LinkAttributes.cpp index ec601d1f4..21f84759b 100755 --- a/Sourcecode/private/mx/core/elements/LinkAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/LinkAttributes.cpp @@ -80,7 +80,7 @@ namespace mx } - bool LinkAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool LinkAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "LinkAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/LinkAttributes.h b/Sourcecode/private/mx/core/elements/LinkAttributes.h index 954b99ef1..22f0d245a 100755 --- a/Sourcecode/private/mx/core/elements/LinkAttributes.h +++ b/Sourcecode/private/mx/core/elements/LinkAttributes.h @@ -56,7 +56,7 @@ namespace mx bool hasRelativeY; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Lyric.cpp b/Sourcecode/private/mx/core/elements/Lyric.cpp index 8ab120301..40944008c 100755 --- a/Sourcecode/private/mx/core/elements/Lyric.cpp +++ b/Sourcecode/private/mx/core/elements/Lyric.cpp @@ -181,7 +181,7 @@ namespace mx } - bool Lyric::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Lyric::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Lyric.h b/Sourcecode/private/mx/core/elements/Lyric.h index 19b03e7e6..53895009b 100755 --- a/Sourcecode/private/mx/core/elements/Lyric.h +++ b/Sourcecode/private/mx/core/elements/Lyric.h @@ -60,7 +60,7 @@ namespace mx void setEditorialGroup( const EditorialGroupPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: LyricAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/LyricAttributes.cpp b/Sourcecode/private/mx/core/elements/LyricAttributes.cpp index be323fbb8..18f6afaed 100755 --- a/Sourcecode/private/mx/core/elements/LyricAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/LyricAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool LyricAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool LyricAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "LyricAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/LyricAttributes.h b/Sourcecode/private/mx/core/elements/LyricAttributes.h index d94cdec9d..ee7582623 100755 --- a/Sourcecode/private/mx/core/elements/LyricAttributes.h +++ b/Sourcecode/private/mx/core/elements/LyricAttributes.h @@ -50,7 +50,7 @@ namespace mx bool hasPrintObject; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/LyricFont.cpp b/Sourcecode/private/mx/core/elements/LyricFont.cpp index 3a08cb5c7..ece30f7f0 100755 --- a/Sourcecode/private/mx/core/elements/LyricFont.cpp +++ b/Sourcecode/private/mx/core/elements/LyricFont.cpp @@ -57,7 +57,7 @@ namespace mx } - bool LyricFont::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool LyricFont::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/LyricFont.h b/Sourcecode/private/mx/core/elements/LyricFont.h index 7f421e51b..031558fb7 100755 --- a/Sourcecode/private/mx/core/elements/LyricFont.h +++ b/Sourcecode/private/mx/core/elements/LyricFont.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const LyricFontAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: LyricFontAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/LyricFontAttributes.cpp b/Sourcecode/private/mx/core/elements/LyricFontAttributes.cpp index 06b5a256d..dbb5b7e2d 100755 --- a/Sourcecode/private/mx/core/elements/LyricFontAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/LyricFontAttributes.cpp @@ -52,7 +52,7 @@ namespace mx } - bool LyricFontAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool LyricFontAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "LyricFontAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/LyricFontAttributes.h b/Sourcecode/private/mx/core/elements/LyricFontAttributes.h index b39cd2ead..4485eea11 100755 --- a/Sourcecode/private/mx/core/elements/LyricFontAttributes.h +++ b/Sourcecode/private/mx/core/elements/LyricFontAttributes.h @@ -41,7 +41,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/LyricLanguage.cpp b/Sourcecode/private/mx/core/elements/LyricLanguage.cpp index 1c68af5a8..944f2fbd8 100755 --- a/Sourcecode/private/mx/core/elements/LyricLanguage.cpp +++ b/Sourcecode/private/mx/core/elements/LyricLanguage.cpp @@ -57,7 +57,7 @@ namespace mx } - bool LyricLanguage::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool LyricLanguage::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/LyricLanguage.h b/Sourcecode/private/mx/core/elements/LyricLanguage.h index 7e5c75a59..fb16c5d61 100755 --- a/Sourcecode/private/mx/core/elements/LyricLanguage.h +++ b/Sourcecode/private/mx/core/elements/LyricLanguage.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const LyricLanguageAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: LyricLanguageAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/LyricLanguageAttributes.cpp b/Sourcecode/private/mx/core/elements/LyricLanguageAttributes.cpp index cd16cbc86..33f3b7dd2 100755 --- a/Sourcecode/private/mx/core/elements/LyricLanguageAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/LyricLanguageAttributes.cpp @@ -40,7 +40,7 @@ namespace mx } - bool LyricLanguageAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool LyricLanguageAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "LyricLanguageAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/LyricLanguageAttributes.h b/Sourcecode/private/mx/core/elements/LyricLanguageAttributes.h index 9fe88b56a..4b16fca17 100755 --- a/Sourcecode/private/mx/core/elements/LyricLanguageAttributes.h +++ b/Sourcecode/private/mx/core/elements/LyricLanguageAttributes.h @@ -33,7 +33,7 @@ namespace mx const bool hasLang; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/LyricTextChoice.h b/Sourcecode/private/mx/core/elements/LyricTextChoice.h index 61b5188f2..f2180bb59 100755 --- a/Sourcecode/private/mx/core/elements/LyricTextChoice.h +++ b/Sourcecode/private/mx/core/elements/LyricTextChoice.h @@ -61,7 +61,7 @@ namespace mx void setHumming( const HummingPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/MeasureAttributes.cpp b/Sourcecode/private/mx/core/elements/MeasureAttributes.cpp index 0c3023091..a3ab1f1fe 100755 --- a/Sourcecode/private/mx/core/elements/MeasureAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/MeasureAttributes.cpp @@ -45,7 +45,7 @@ namespace mx } - bool MeasureAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MeasureAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "MeasureAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/MeasureAttributes.h b/Sourcecode/private/mx/core/elements/MeasureAttributes.h index 7cbe66794..160ce4a70 100755 --- a/Sourcecode/private/mx/core/elements/MeasureAttributes.h +++ b/Sourcecode/private/mx/core/elements/MeasureAttributes.h @@ -37,7 +37,7 @@ namespace mx bool hasWidth; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/MeasureDistance.cpp b/Sourcecode/private/mx/core/elements/MeasureDistance.cpp index 1b6cc75f5..f61e1f8e2 100755 --- a/Sourcecode/private/mx/core/elements/MeasureDistance.cpp +++ b/Sourcecode/private/mx/core/elements/MeasureDistance.cpp @@ -66,7 +66,7 @@ namespace mx } - bool MeasureDistance::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MeasureDistance::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/MeasureDistance.h b/Sourcecode/private/mx/core/elements/MeasureDistance.h index 6d55aba61..4057e42e4 100755 --- a/Sourcecode/private/mx/core/elements/MeasureDistance.h +++ b/Sourcecode/private/mx/core/elements/MeasureDistance.h @@ -38,7 +38,7 @@ namespace mx void setValue( const TenthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TenthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/MeasureLayout.cpp b/Sourcecode/private/mx/core/elements/MeasureLayout.cpp index 4121daafb..749b98413 100755 --- a/Sourcecode/private/mx/core/elements/MeasureLayout.cpp +++ b/Sourcecode/private/mx/core/elements/MeasureLayout.cpp @@ -86,7 +86,7 @@ namespace mx } - bool MeasureLayout::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MeasureLayout::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/MeasureLayout.h b/Sourcecode/private/mx/core/elements/MeasureLayout.h index 56ae4b6f8..a29bfaaba 100755 --- a/Sourcecode/private/mx/core/elements/MeasureLayout.h +++ b/Sourcecode/private/mx/core/elements/MeasureLayout.h @@ -39,7 +39,7 @@ namespace mx void setHasMeasureDistance( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MeasureDistancePtr myMeasureDistance; diff --git a/Sourcecode/private/mx/core/elements/MeasureNumbering.cpp b/Sourcecode/private/mx/core/elements/MeasureNumbering.cpp index 437e01d23..7e1d6b5a7 100755 --- a/Sourcecode/private/mx/core/elements/MeasureNumbering.cpp +++ b/Sourcecode/private/mx/core/elements/MeasureNumbering.cpp @@ -87,7 +87,7 @@ namespace mx } - bool MeasureNumbering::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MeasureNumbering::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/MeasureNumbering.h b/Sourcecode/private/mx/core/elements/MeasureNumbering.h index 8e39be373..3fb0ecc1d 100755 --- a/Sourcecode/private/mx/core/elements/MeasureNumbering.h +++ b/Sourcecode/private/mx/core/elements/MeasureNumbering.h @@ -42,7 +42,7 @@ namespace mx void setValue( const MeasureNumberingValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MeasureNumberingValue myValue; diff --git a/Sourcecode/private/mx/core/elements/MeasureNumberingAttributes.cpp b/Sourcecode/private/mx/core/elements/MeasureNumberingAttributes.cpp index e5867fa6a..f903b30ce 100755 --- a/Sourcecode/private/mx/core/elements/MeasureNumberingAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/MeasureNumberingAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool MeasureNumberingAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MeasureNumberingAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "MeasureNumberingAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/MeasureNumberingAttributes.h b/Sourcecode/private/mx/core/elements/MeasureNumberingAttributes.h index 3be5c5f27..0d8fd2b57 100755 --- a/Sourcecode/private/mx/core/elements/MeasureNumberingAttributes.h +++ b/Sourcecode/private/mx/core/elements/MeasureNumberingAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasHalign; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/MeasureRepeat.cpp b/Sourcecode/private/mx/core/elements/MeasureRepeat.cpp index d690fc498..a3a862640 100755 --- a/Sourcecode/private/mx/core/elements/MeasureRepeat.cpp +++ b/Sourcecode/private/mx/core/elements/MeasureRepeat.cpp @@ -87,7 +87,7 @@ namespace mx } - bool MeasureRepeat::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MeasureRepeat::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/MeasureRepeat.h b/Sourcecode/private/mx/core/elements/MeasureRepeat.h index c6cc3d761..ef09f276d 100755 --- a/Sourcecode/private/mx/core/elements/MeasureRepeat.h +++ b/Sourcecode/private/mx/core/elements/MeasureRepeat.h @@ -42,7 +42,7 @@ namespace mx void setValue( const PositiveIntegerOrEmpty& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PositiveIntegerOrEmpty myValue; diff --git a/Sourcecode/private/mx/core/elements/MeasureRepeatAttributes.cpp b/Sourcecode/private/mx/core/elements/MeasureRepeatAttributes.cpp index 99b4fa8d7..0c3982750 100755 --- a/Sourcecode/private/mx/core/elements/MeasureRepeatAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/MeasureRepeatAttributes.cpp @@ -36,7 +36,7 @@ namespace mx } - bool MeasureRepeatAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MeasureRepeatAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "MeasureRepeatAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/MeasureRepeatAttributes.h b/Sourcecode/private/mx/core/elements/MeasureRepeatAttributes.h index c4d3e265f..44fe3346a 100755 --- a/Sourcecode/private/mx/core/elements/MeasureRepeatAttributes.h +++ b/Sourcecode/private/mx/core/elements/MeasureRepeatAttributes.h @@ -32,7 +32,7 @@ namespace mx bool hasSlashes; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/MeasureStyle.cpp b/Sourcecode/private/mx/core/elements/MeasureStyle.cpp index e4c48106e..16398914e 100755 --- a/Sourcecode/private/mx/core/elements/MeasureStyle.cpp +++ b/Sourcecode/private/mx/core/elements/MeasureStyle.cpp @@ -82,7 +82,7 @@ namespace mx } - bool MeasureStyle::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MeasureStyle::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/MeasureStyle.h b/Sourcecode/private/mx/core/elements/MeasureStyle.h index 18eadc175..e790a6781 100755 --- a/Sourcecode/private/mx/core/elements/MeasureStyle.h +++ b/Sourcecode/private/mx/core/elements/MeasureStyle.h @@ -39,7 +39,7 @@ namespace mx void setMeasureStyleChoice( const MeasureStyleChoicePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MeasureStyleAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/MeasureStyleAttributes.cpp b/Sourcecode/private/mx/core/elements/MeasureStyleAttributes.cpp index 9bddd1842..a37c8f7fb 100755 --- a/Sourcecode/private/mx/core/elements/MeasureStyleAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/MeasureStyleAttributes.cpp @@ -52,7 +52,7 @@ namespace mx } - bool MeasureStyleAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MeasureStyleAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "MeasureStyleAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/MeasureStyleAttributes.h b/Sourcecode/private/mx/core/elements/MeasureStyleAttributes.h index 6f2625420..1ddc047d0 100755 --- a/Sourcecode/private/mx/core/elements/MeasureStyleAttributes.h +++ b/Sourcecode/private/mx/core/elements/MeasureStyleAttributes.h @@ -43,7 +43,7 @@ namespace mx bool hasColor; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/MeasureStyleChoice.cpp b/Sourcecode/private/mx/core/elements/MeasureStyleChoice.cpp index c87090520..c9c71c347 100755 --- a/Sourcecode/private/mx/core/elements/MeasureStyleChoice.cpp +++ b/Sourcecode/private/mx/core/elements/MeasureStyleChoice.cpp @@ -145,7 +145,7 @@ namespace mx } - bool MeasureStyleChoice::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MeasureStyleChoice::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_CHOICE_IF( multipleRest, "multiple-rest", MultipleRest ); MX_CHOICE_IF( measureRepeat, "measure-repeat", MeasureRepeat ); diff --git a/Sourcecode/private/mx/core/elements/MeasureStyleChoice.h b/Sourcecode/private/mx/core/elements/MeasureStyleChoice.h index 0a61119a5..470f73c9c 100755 --- a/Sourcecode/private/mx/core/elements/MeasureStyleChoice.h +++ b/Sourcecode/private/mx/core/elements/MeasureStyleChoice.h @@ -53,7 +53,7 @@ namespace mx void setSlash( const SlashPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/Membrane.cpp b/Sourcecode/private/mx/core/elements/Membrane.cpp index 64958b52d..1a4c6ec71 100755 --- a/Sourcecode/private/mx/core/elements/Membrane.cpp +++ b/Sourcecode/private/mx/core/elements/Membrane.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Membrane::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Membrane::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Membrane.h b/Sourcecode/private/mx/core/elements/Membrane.h index d1ad7eff7..74191d4ba 100755 --- a/Sourcecode/private/mx/core/elements/Membrane.h +++ b/Sourcecode/private/mx/core/elements/Membrane.h @@ -38,7 +38,7 @@ namespace mx void setValue( const MembraneEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MembraneEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/Metal.cpp b/Sourcecode/private/mx/core/elements/Metal.cpp index b77de52e2..8cb490df2 100755 --- a/Sourcecode/private/mx/core/elements/Metal.cpp +++ b/Sourcecode/private/mx/core/elements/Metal.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Metal::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Metal::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseMetalEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/Metal.h b/Sourcecode/private/mx/core/elements/Metal.h index 129080291..345ae0c64 100755 --- a/Sourcecode/private/mx/core/elements/Metal.h +++ b/Sourcecode/private/mx/core/elements/Metal.h @@ -38,7 +38,7 @@ namespace mx void setValue( const MetalEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MetalEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/Metronome.cpp b/Sourcecode/private/mx/core/elements/Metronome.cpp index 7de26c3b2..0b67c9a2f 100755 --- a/Sourcecode/private/mx/core/elements/Metronome.cpp +++ b/Sourcecode/private/mx/core/elements/Metronome.cpp @@ -102,7 +102,7 @@ namespace mx */ - bool Metronome::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Metronome::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Metronome.h b/Sourcecode/private/mx/core/elements/Metronome.h index c75b4902c..a657b9ed2 100755 --- a/Sourcecode/private/mx/core/elements/Metronome.h +++ b/Sourcecode/private/mx/core/elements/Metronome.h @@ -39,7 +39,7 @@ namespace mx void setBeatUnitPerOrNoteRelationNoteChoice( const BeatUnitPerOrNoteRelationNoteChoicePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MetronomeAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/MetronomeAttributes.cpp b/Sourcecode/private/mx/core/elements/MetronomeAttributes.cpp index 9b0b533b9..a3dcc5bb7 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/MetronomeAttributes.cpp @@ -80,7 +80,7 @@ namespace mx } - bool MetronomeAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MetronomeAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "MetronomeAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/MetronomeAttributes.h b/Sourcecode/private/mx/core/elements/MetronomeAttributes.h index 106e4cf07..b8359565b 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeAttributes.h +++ b/Sourcecode/private/mx/core/elements/MetronomeAttributes.h @@ -57,7 +57,7 @@ namespace mx bool hasParentheses; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/MetronomeBeam.cpp b/Sourcecode/private/mx/core/elements/MetronomeBeam.cpp index 555d36222..1e4f1da00 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeBeam.cpp +++ b/Sourcecode/private/mx/core/elements/MetronomeBeam.cpp @@ -87,7 +87,7 @@ namespace mx } - bool MetronomeBeam::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MetronomeBeam::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/MetronomeBeam.h b/Sourcecode/private/mx/core/elements/MetronomeBeam.h index 9a6353fa2..0263a4720 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeBeam.h +++ b/Sourcecode/private/mx/core/elements/MetronomeBeam.h @@ -42,7 +42,7 @@ namespace mx void setValue( const BeamValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BeamValue myValue; diff --git a/Sourcecode/private/mx/core/elements/MetronomeBeamAttributes.cpp b/Sourcecode/private/mx/core/elements/MetronomeBeamAttributes.cpp index 0aaaf752a..c0a02b1da 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeBeamAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/MetronomeBeamAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool MetronomeBeamAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MetronomeBeamAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "MetronomeBeamAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/MetronomeBeamAttributes.h b/Sourcecode/private/mx/core/elements/MetronomeBeamAttributes.h index 01305a9d3..0d2751f96 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeBeamAttributes.h +++ b/Sourcecode/private/mx/core/elements/MetronomeBeamAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasNumber; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/MetronomeDot.cpp b/Sourcecode/private/mx/core/elements/MetronomeDot.cpp index e5e301dc7..329a3202a 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeDot.cpp +++ b/Sourcecode/private/mx/core/elements/MetronomeDot.cpp @@ -27,7 +27,7 @@ namespace mx } - bool MetronomeDot::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MetronomeDot::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/MetronomeDot.h b/Sourcecode/private/mx/core/elements/MetronomeDot.h index f57d9dc0a..61cd1357a 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeDot.h +++ b/Sourcecode/private/mx/core/elements/MetronomeDot.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/MetronomeNote.cpp b/Sourcecode/private/mx/core/elements/MetronomeNote.cpp index c3b23ebbb..71e780a86 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeNote.cpp +++ b/Sourcecode/private/mx/core/elements/MetronomeNote.cpp @@ -195,7 +195,7 @@ namespace mx } - bool MetronomeNote::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MetronomeNote::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isMetronomeTypeFound = false; diff --git a/Sourcecode/private/mx/core/elements/MetronomeNote.h b/Sourcecode/private/mx/core/elements/MetronomeNote.h index 0d88d91a5..dc6508ad6 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeNote.h +++ b/Sourcecode/private/mx/core/elements/MetronomeNote.h @@ -60,7 +60,7 @@ namespace mx void setHasMetronomeTuplet( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MetronomeTypePtr myMetronomeType; diff --git a/Sourcecode/private/mx/core/elements/MetronomeRelation.cpp b/Sourcecode/private/mx/core/elements/MetronomeRelation.cpp index f0631775e..b49ae6b1c 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeRelation.cpp +++ b/Sourcecode/private/mx/core/elements/MetronomeRelation.cpp @@ -66,7 +66,7 @@ namespace mx } - bool MetronomeRelation::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MetronomeRelation::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue.setValue( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/MetronomeRelation.h b/Sourcecode/private/mx/core/elements/MetronomeRelation.h index 43f0e1b94..a38feff2d 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeRelation.h +++ b/Sourcecode/private/mx/core/elements/MetronomeRelation.h @@ -36,7 +36,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/MetronomeRelationGroup.h b/Sourcecode/private/mx/core/elements/MetronomeRelationGroup.h index ee4510018..35a60a4d1 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeRelationGroup.h +++ b/Sourcecode/private/mx/core/elements/MetronomeRelationGroup.h @@ -42,7 +42,7 @@ namespace mx void setMetronomeNote( const MetronomeNotePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MetronomeRelationPtr myMetronomeRelation; diff --git a/Sourcecode/private/mx/core/elements/MetronomeTuplet.cpp b/Sourcecode/private/mx/core/elements/MetronomeTuplet.cpp index d07cdc2f3..0d20fcb4d 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeTuplet.cpp +++ b/Sourcecode/private/mx/core/elements/MetronomeTuplet.cpp @@ -136,7 +136,7 @@ namespace mx } - bool MetronomeTuplet::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MetronomeTuplet::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/MetronomeTuplet.h b/Sourcecode/private/mx/core/elements/MetronomeTuplet.h index 27be28f4d..f674f6a69 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeTuplet.h +++ b/Sourcecode/private/mx/core/elements/MetronomeTuplet.h @@ -54,7 +54,7 @@ namespace mx void setHasTimeModificationNormalTypeNormalDot( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MetronomeTupletAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/MetronomeTupletAttributes.cpp b/Sourcecode/private/mx/core/elements/MetronomeTupletAttributes.cpp index ccabacbbf..3f6aa7d04 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeTupletAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/MetronomeTupletAttributes.cpp @@ -40,7 +40,7 @@ namespace mx } - bool MetronomeTupletAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MetronomeTupletAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "MetronomeTupletAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/MetronomeTupletAttributes.h b/Sourcecode/private/mx/core/elements/MetronomeTupletAttributes.h index 284d813b0..36cb8edcd 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeTupletAttributes.h +++ b/Sourcecode/private/mx/core/elements/MetronomeTupletAttributes.h @@ -33,7 +33,7 @@ namespace mx bool hasShowNumber; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/MetronomeType.cpp b/Sourcecode/private/mx/core/elements/MetronomeType.cpp index 91980da5b..a53a626a5 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeType.cpp +++ b/Sourcecode/private/mx/core/elements/MetronomeType.cpp @@ -66,7 +66,7 @@ namespace mx } - bool MetronomeType::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MetronomeType::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseNoteTypeValue( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/MetronomeType.h b/Sourcecode/private/mx/core/elements/MetronomeType.h index ee051452b..7293f9b81 100755 --- a/Sourcecode/private/mx/core/elements/MetronomeType.h +++ b/Sourcecode/private/mx/core/elements/MetronomeType.h @@ -38,7 +38,7 @@ namespace mx void setValue( const NoteTypeValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NoteTypeValue myValue; diff --git a/Sourcecode/private/mx/core/elements/MidiBank.cpp b/Sourcecode/private/mx/core/elements/MidiBank.cpp index adc6d51b2..c0adcbca8 100755 --- a/Sourcecode/private/mx/core/elements/MidiBank.cpp +++ b/Sourcecode/private/mx/core/elements/MidiBank.cpp @@ -66,7 +66,7 @@ namespace mx } - bool MidiBank::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MidiBank::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/MidiBank.h b/Sourcecode/private/mx/core/elements/MidiBank.h index 187c9fd55..41c8a76c8 100755 --- a/Sourcecode/private/mx/core/elements/MidiBank.h +++ b/Sourcecode/private/mx/core/elements/MidiBank.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Midi16384& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Midi16384 myValue; diff --git a/Sourcecode/private/mx/core/elements/MidiChannel.cpp b/Sourcecode/private/mx/core/elements/MidiChannel.cpp index daefd42af..483f44d68 100755 --- a/Sourcecode/private/mx/core/elements/MidiChannel.cpp +++ b/Sourcecode/private/mx/core/elements/MidiChannel.cpp @@ -66,7 +66,7 @@ namespace mx } - bool MidiChannel::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MidiChannel::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/MidiChannel.h b/Sourcecode/private/mx/core/elements/MidiChannel.h index beca1e138..ad229268b 100755 --- a/Sourcecode/private/mx/core/elements/MidiChannel.h +++ b/Sourcecode/private/mx/core/elements/MidiChannel.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Midi16& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Midi16 myValue; diff --git a/Sourcecode/private/mx/core/elements/MidiDevice.cpp b/Sourcecode/private/mx/core/elements/MidiDevice.cpp index 55612f4ac..b719c4e73 100755 --- a/Sourcecode/private/mx/core/elements/MidiDevice.cpp +++ b/Sourcecode/private/mx/core/elements/MidiDevice.cpp @@ -87,7 +87,7 @@ namespace mx } - bool MidiDevice::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MidiDevice::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/MidiDevice.h b/Sourcecode/private/mx/core/elements/MidiDevice.h index 8c875ac26..602fc4251 100755 --- a/Sourcecode/private/mx/core/elements/MidiDevice.h +++ b/Sourcecode/private/mx/core/elements/MidiDevice.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/MidiDeviceAttributes.cpp b/Sourcecode/private/mx/core/elements/MidiDeviceAttributes.cpp index e1cea2ae6..557a916df 100755 --- a/Sourcecode/private/mx/core/elements/MidiDeviceAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/MidiDeviceAttributes.cpp @@ -36,7 +36,7 @@ namespace mx } - bool MidiDeviceAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MidiDeviceAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "MidiDeviceAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/MidiDeviceAttributes.h b/Sourcecode/private/mx/core/elements/MidiDeviceAttributes.h index 24b5a9ed2..62162b69d 100755 --- a/Sourcecode/private/mx/core/elements/MidiDeviceAttributes.h +++ b/Sourcecode/private/mx/core/elements/MidiDeviceAttributes.h @@ -32,7 +32,7 @@ namespace mx bool hasId; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/MidiDeviceInstrumentGroup.h b/Sourcecode/private/mx/core/elements/MidiDeviceInstrumentGroup.h index 968953832..536abfb73 100755 --- a/Sourcecode/private/mx/core/elements/MidiDeviceInstrumentGroup.h +++ b/Sourcecode/private/mx/core/elements/MidiDeviceInstrumentGroup.h @@ -46,7 +46,7 @@ namespace mx void setHasMidiInstrument( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MidiDevicePtr myMidiDevice; diff --git a/Sourcecode/private/mx/core/elements/MidiInstrument.cpp b/Sourcecode/private/mx/core/elements/MidiInstrument.cpp index fecbe56d4..8518d2bbb 100755 --- a/Sourcecode/private/mx/core/elements/MidiInstrument.cpp +++ b/Sourcecode/private/mx/core/elements/MidiInstrument.cpp @@ -357,7 +357,7 @@ namespace mx } - bool MidiInstrument::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MidiInstrument::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/MidiInstrument.h b/Sourcecode/private/mx/core/elements/MidiInstrument.h index d53434456..254cdc547 100755 --- a/Sourcecode/private/mx/core/elements/MidiInstrument.h +++ b/Sourcecode/private/mx/core/elements/MidiInstrument.h @@ -92,7 +92,7 @@ namespace mx void setHasElevation( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MidiInstrumentAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/MidiInstrumentAttributes.cpp b/Sourcecode/private/mx/core/elements/MidiInstrumentAttributes.cpp index c2bb29bf3..25d88e611 100755 --- a/Sourcecode/private/mx/core/elements/MidiInstrumentAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/MidiInstrumentAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool MidiInstrumentAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MidiInstrumentAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "MidiInstrumentAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/MidiInstrumentAttributes.h b/Sourcecode/private/mx/core/elements/MidiInstrumentAttributes.h index 6f10c3f6d..d34a99a5e 100755 --- a/Sourcecode/private/mx/core/elements/MidiInstrumentAttributes.h +++ b/Sourcecode/private/mx/core/elements/MidiInstrumentAttributes.h @@ -29,7 +29,7 @@ namespace mx const bool hasId; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/MidiName.cpp b/Sourcecode/private/mx/core/elements/MidiName.cpp index 09b314413..958c5ca36 100755 --- a/Sourcecode/private/mx/core/elements/MidiName.cpp +++ b/Sourcecode/private/mx/core/elements/MidiName.cpp @@ -66,7 +66,7 @@ namespace mx } - bool MidiName::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MidiName::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/MidiName.h b/Sourcecode/private/mx/core/elements/MidiName.h index fc22508e9..a0d70b110 100755 --- a/Sourcecode/private/mx/core/elements/MidiName.h +++ b/Sourcecode/private/mx/core/elements/MidiName.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/MidiProgram.cpp b/Sourcecode/private/mx/core/elements/MidiProgram.cpp index 46f42ec6a..15868e2da 100755 --- a/Sourcecode/private/mx/core/elements/MidiProgram.cpp +++ b/Sourcecode/private/mx/core/elements/MidiProgram.cpp @@ -66,7 +66,7 @@ namespace mx } - bool MidiProgram::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MidiProgram::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/MidiProgram.h b/Sourcecode/private/mx/core/elements/MidiProgram.h index b0d99253a..0eb4dcf77 100755 --- a/Sourcecode/private/mx/core/elements/MidiProgram.h +++ b/Sourcecode/private/mx/core/elements/MidiProgram.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Midi128& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Midi128 myValue; diff --git a/Sourcecode/private/mx/core/elements/MidiUnpitched.cpp b/Sourcecode/private/mx/core/elements/MidiUnpitched.cpp index ecd186c64..6cb3e589e 100755 --- a/Sourcecode/private/mx/core/elements/MidiUnpitched.cpp +++ b/Sourcecode/private/mx/core/elements/MidiUnpitched.cpp @@ -66,7 +66,7 @@ namespace mx } - bool MidiUnpitched::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MidiUnpitched::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/MidiUnpitched.h b/Sourcecode/private/mx/core/elements/MidiUnpitched.h index 397da0d42..43481e38f 100755 --- a/Sourcecode/private/mx/core/elements/MidiUnpitched.h +++ b/Sourcecode/private/mx/core/elements/MidiUnpitched.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Midi128& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Midi128 myValue; diff --git a/Sourcecode/private/mx/core/elements/Millimeters.cpp b/Sourcecode/private/mx/core/elements/Millimeters.cpp index 94315f4ae..ac2b0d40f 100755 --- a/Sourcecode/private/mx/core/elements/Millimeters.cpp +++ b/Sourcecode/private/mx/core/elements/Millimeters.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Millimeters::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Millimeters::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Millimeters.h b/Sourcecode/private/mx/core/elements/Millimeters.h index e83ef7956..ffd3b9770 100755 --- a/Sourcecode/private/mx/core/elements/Millimeters.h +++ b/Sourcecode/private/mx/core/elements/Millimeters.h @@ -38,7 +38,7 @@ namespace mx void setValue( const MillimetersValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MillimetersValue myValue; diff --git a/Sourcecode/private/mx/core/elements/Miscellaneous.cpp b/Sourcecode/private/mx/core/elements/Miscellaneous.cpp index 01e558403..1803e604d 100755 --- a/Sourcecode/private/mx/core/elements/Miscellaneous.cpp +++ b/Sourcecode/private/mx/core/elements/Miscellaneous.cpp @@ -101,7 +101,7 @@ namespace mx } - bool Miscellaneous::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Miscellaneous::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/Miscellaneous.h b/Sourcecode/private/mx/core/elements/Miscellaneous.h index a7687c14e..9972c3444 100755 --- a/Sourcecode/private/mx/core/elements/Miscellaneous.h +++ b/Sourcecode/private/mx/core/elements/Miscellaneous.h @@ -40,7 +40,7 @@ namespace mx MiscellaneousFieldPtr getMiscellaneousField( const MiscellaneousFieldSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MiscellaneousFieldSet myMiscellaneousFieldSet; diff --git a/Sourcecode/private/mx/core/elements/MiscellaneousField.cpp b/Sourcecode/private/mx/core/elements/MiscellaneousField.cpp index 1bd2bdddc..87d698bea 100755 --- a/Sourcecode/private/mx/core/elements/MiscellaneousField.cpp +++ b/Sourcecode/private/mx/core/elements/MiscellaneousField.cpp @@ -87,7 +87,7 @@ namespace mx } - bool MiscellaneousField::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MiscellaneousField::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/MiscellaneousField.h b/Sourcecode/private/mx/core/elements/MiscellaneousField.h index eab00b17c..bf1fabb06 100755 --- a/Sourcecode/private/mx/core/elements/MiscellaneousField.h +++ b/Sourcecode/private/mx/core/elements/MiscellaneousField.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/MiscellaneousFieldAttributes.cpp b/Sourcecode/private/mx/core/elements/MiscellaneousFieldAttributes.cpp index f014db482..7d547f4ad 100755 --- a/Sourcecode/private/mx/core/elements/MiscellaneousFieldAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/MiscellaneousFieldAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool MiscellaneousFieldAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MiscellaneousFieldAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "MiscellaneousFieldAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/MiscellaneousFieldAttributes.h b/Sourcecode/private/mx/core/elements/MiscellaneousFieldAttributes.h index 97dde8944..fa0795093 100755 --- a/Sourcecode/private/mx/core/elements/MiscellaneousFieldAttributes.h +++ b/Sourcecode/private/mx/core/elements/MiscellaneousFieldAttributes.h @@ -29,7 +29,7 @@ namespace mx const bool hasName; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Mode.cpp b/Sourcecode/private/mx/core/elements/Mode.cpp index e76920d17..f25e27105 100755 --- a/Sourcecode/private/mx/core/elements/Mode.cpp +++ b/Sourcecode/private/mx/core/elements/Mode.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Mode::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Mode::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Mode.h b/Sourcecode/private/mx/core/elements/Mode.h index 689e76d69..812a474a0 100755 --- a/Sourcecode/private/mx/core/elements/Mode.h +++ b/Sourcecode/private/mx/core/elements/Mode.h @@ -38,7 +38,7 @@ namespace mx void setValue( const ModeValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ModeValue myValue; diff --git a/Sourcecode/private/mx/core/elements/Mordent.cpp b/Sourcecode/private/mx/core/elements/Mordent.cpp index fc6b0eb5d..41bee3a75 100755 --- a/Sourcecode/private/mx/core/elements/Mordent.cpp +++ b/Sourcecode/private/mx/core/elements/Mordent.cpp @@ -63,7 +63,7 @@ namespace mx } - bool Mordent::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Mordent::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Mordent.h b/Sourcecode/private/mx/core/elements/Mordent.h index f5b57981c..a1bfcda55 100755 --- a/Sourcecode/private/mx/core/elements/Mordent.h +++ b/Sourcecode/private/mx/core/elements/Mordent.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const MordentAttributesPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MordentAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/MordentAttributes.cpp b/Sourcecode/private/mx/core/elements/MordentAttributes.cpp index 72b8feb2e..7871c547a 100755 --- a/Sourcecode/private/mx/core/elements/MordentAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/MordentAttributes.cpp @@ -108,7 +108,7 @@ namespace mx } - bool MordentAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MordentAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "MordentAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/MordentAttributes.h b/Sourcecode/private/mx/core/elements/MordentAttributes.h index df3dd6531..a6227caad 100755 --- a/Sourcecode/private/mx/core/elements/MordentAttributes.h +++ b/Sourcecode/private/mx/core/elements/MordentAttributes.h @@ -71,7 +71,7 @@ namespace mx bool hasDeparture; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/MovementNumber.cpp b/Sourcecode/private/mx/core/elements/MovementNumber.cpp index d6114f711..08d8ada7e 100755 --- a/Sourcecode/private/mx/core/elements/MovementNumber.cpp +++ b/Sourcecode/private/mx/core/elements/MovementNumber.cpp @@ -66,7 +66,7 @@ namespace mx } - bool MovementNumber::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MovementNumber::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/MovementNumber.h b/Sourcecode/private/mx/core/elements/MovementNumber.h index b56f9bdb5..8c68de253 100755 --- a/Sourcecode/private/mx/core/elements/MovementNumber.h +++ b/Sourcecode/private/mx/core/elements/MovementNumber.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/MovementTitle.cpp b/Sourcecode/private/mx/core/elements/MovementTitle.cpp index 26fc67a5f..aa9a87763 100755 --- a/Sourcecode/private/mx/core/elements/MovementTitle.cpp +++ b/Sourcecode/private/mx/core/elements/MovementTitle.cpp @@ -66,7 +66,7 @@ namespace mx } - bool MovementTitle::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MovementTitle::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/MovementTitle.h b/Sourcecode/private/mx/core/elements/MovementTitle.h index 0975b3afe..f2d0b71d6 100755 --- a/Sourcecode/private/mx/core/elements/MovementTitle.h +++ b/Sourcecode/private/mx/core/elements/MovementTitle.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/MultipleRest.cpp b/Sourcecode/private/mx/core/elements/MultipleRest.cpp index 5847cff68..a428d3e9e 100755 --- a/Sourcecode/private/mx/core/elements/MultipleRest.cpp +++ b/Sourcecode/private/mx/core/elements/MultipleRest.cpp @@ -87,7 +87,7 @@ namespace mx } - bool MultipleRest::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MultipleRest::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/MultipleRest.h b/Sourcecode/private/mx/core/elements/MultipleRest.h index d4342b99d..66ee8bd94 100755 --- a/Sourcecode/private/mx/core/elements/MultipleRest.h +++ b/Sourcecode/private/mx/core/elements/MultipleRest.h @@ -42,7 +42,7 @@ namespace mx void setValue( const PositiveIntegerOrEmpty& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PositiveIntegerOrEmpty myValue; diff --git a/Sourcecode/private/mx/core/elements/MultipleRestAttributes.cpp b/Sourcecode/private/mx/core/elements/MultipleRestAttributes.cpp index 76488eb35..1ca8f2d3c 100755 --- a/Sourcecode/private/mx/core/elements/MultipleRestAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/MultipleRestAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool MultipleRestAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MultipleRestAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "MultipleRestAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/MultipleRestAttributes.h b/Sourcecode/private/mx/core/elements/MultipleRestAttributes.h index 372651099..1f6ac528e 100755 --- a/Sourcecode/private/mx/core/elements/MultipleRestAttributes.h +++ b/Sourcecode/private/mx/core/elements/MultipleRestAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasUseSymbols; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/MusicDataChoice.h b/Sourcecode/private/mx/core/elements/MusicDataChoice.h index 89f193514..81e3f1798 100755 --- a/Sourcecode/private/mx/core/elements/MusicDataChoice.h +++ b/Sourcecode/private/mx/core/elements/MusicDataChoice.h @@ -117,7 +117,7 @@ namespace mx void setBookmark( const BookmarkPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MX_MUTEX diff --git a/Sourcecode/private/mx/core/elements/MusicDataGroup.h b/Sourcecode/private/mx/core/elements/MusicDataGroup.h index 757f42b82..943670661 100755 --- a/Sourcecode/private/mx/core/elements/MusicDataGroup.h +++ b/Sourcecode/private/mx/core/elements/MusicDataGroup.h @@ -40,7 +40,7 @@ namespace mx MusicDataChoicePtr getMusicDataChoice( const MusicDataChoiceSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MusicDataChoiceSet myMusicDataChoiceSet; diff --git a/Sourcecode/private/mx/core/elements/MusicFont.cpp b/Sourcecode/private/mx/core/elements/MusicFont.cpp index 6c163eb3c..64615b32b 100755 --- a/Sourcecode/private/mx/core/elements/MusicFont.cpp +++ b/Sourcecode/private/mx/core/elements/MusicFont.cpp @@ -57,7 +57,7 @@ namespace mx } - bool MusicFont::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool MusicFont::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/MusicFont.h b/Sourcecode/private/mx/core/elements/MusicFont.h index 87f7b4c4e..b9b244efc 100755 --- a/Sourcecode/private/mx/core/elements/MusicFont.h +++ b/Sourcecode/private/mx/core/elements/MusicFont.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyFontAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyFontAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Mute.cpp b/Sourcecode/private/mx/core/elements/Mute.cpp index 8ac2262ec..896387a74 100755 --- a/Sourcecode/private/mx/core/elements/Mute.cpp +++ b/Sourcecode/private/mx/core/elements/Mute.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Mute::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Mute::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseMuteEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/Mute.h b/Sourcecode/private/mx/core/elements/Mute.h index 682af5d65..a775b58e0 100755 --- a/Sourcecode/private/mx/core/elements/Mute.h +++ b/Sourcecode/private/mx/core/elements/Mute.h @@ -38,7 +38,7 @@ namespace mx void setValue( const MuteEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MuteEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/Natural.cpp b/Sourcecode/private/mx/core/elements/Natural.cpp index e65af9508..a5dd0404d 100755 --- a/Sourcecode/private/mx/core/elements/Natural.cpp +++ b/Sourcecode/private/mx/core/elements/Natural.cpp @@ -27,7 +27,7 @@ namespace mx } - bool Natural::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Natural::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Natural.h b/Sourcecode/private/mx/core/elements/Natural.h index 499f11db5..3e7b61b57 100755 --- a/Sourcecode/private/mx/core/elements/Natural.h +++ b/Sourcecode/private/mx/core/elements/Natural.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/NonArpeggiate.cpp b/Sourcecode/private/mx/core/elements/NonArpeggiate.cpp index 376bebdaa..46b4a6230 100755 --- a/Sourcecode/private/mx/core/elements/NonArpeggiate.cpp +++ b/Sourcecode/private/mx/core/elements/NonArpeggiate.cpp @@ -57,7 +57,7 @@ namespace mx } - bool NonArpeggiate::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NonArpeggiate::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/NonArpeggiate.h b/Sourcecode/private/mx/core/elements/NonArpeggiate.h index 8b760d9e4..dde9c5d83 100755 --- a/Sourcecode/private/mx/core/elements/NonArpeggiate.h +++ b/Sourcecode/private/mx/core/elements/NonArpeggiate.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const NonArpeggiateAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NonArpeggiateAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/NonArpeggiateAttributes.cpp b/Sourcecode/private/mx/core/elements/NonArpeggiateAttributes.cpp index a9715a5e8..6cac1adb4 100755 --- a/Sourcecode/private/mx/core/elements/NonArpeggiateAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/NonArpeggiateAttributes.cpp @@ -56,7 +56,7 @@ namespace mx } - bool NonArpeggiateAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NonArpeggiateAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "NonArpeggiateAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/NonArpeggiateAttributes.h b/Sourcecode/private/mx/core/elements/NonArpeggiateAttributes.h index 892806777..2f004f6aa 100755 --- a/Sourcecode/private/mx/core/elements/NonArpeggiateAttributes.h +++ b/Sourcecode/private/mx/core/elements/NonArpeggiateAttributes.h @@ -43,7 +43,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/NonTraditionalKey.cpp b/Sourcecode/private/mx/core/elements/NonTraditionalKey.cpp index a502afe88..b17102912 100755 --- a/Sourcecode/private/mx/core/elements/NonTraditionalKey.cpp +++ b/Sourcecode/private/mx/core/elements/NonTraditionalKey.cpp @@ -123,7 +123,7 @@ namespace mx } - bool NonTraditionalKey::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NonTraditionalKey::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isKeyStepFound = false; diff --git a/Sourcecode/private/mx/core/elements/NonTraditionalKey.h b/Sourcecode/private/mx/core/elements/NonTraditionalKey.h index fdb44c3ec..1416aef61 100755 --- a/Sourcecode/private/mx/core/elements/NonTraditionalKey.h +++ b/Sourcecode/private/mx/core/elements/NonTraditionalKey.h @@ -43,7 +43,7 @@ namespace mx void setHasKeyAccidental( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: KeyStepPtr myKeyStep; diff --git a/Sourcecode/private/mx/core/elements/NormalDot.cpp b/Sourcecode/private/mx/core/elements/NormalDot.cpp index 2b3cda51c..47f9289c4 100755 --- a/Sourcecode/private/mx/core/elements/NormalDot.cpp +++ b/Sourcecode/private/mx/core/elements/NormalDot.cpp @@ -27,7 +27,7 @@ namespace mx } - bool NormalDot::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NormalDot::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/NormalDot.h b/Sourcecode/private/mx/core/elements/NormalDot.h index 82006bbc4..0bad92f4b 100755 --- a/Sourcecode/private/mx/core/elements/NormalDot.h +++ b/Sourcecode/private/mx/core/elements/NormalDot.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/NormalNoteGroup.h b/Sourcecode/private/mx/core/elements/NormalNoteGroup.h index c29d90904..6816f6923 100755 --- a/Sourcecode/private/mx/core/elements/NormalNoteGroup.h +++ b/Sourcecode/private/mx/core/elements/NormalNoteGroup.h @@ -50,7 +50,7 @@ namespace mx TiePtr getTie( const TieSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: FullNoteGroupPtr myFullNoteGroup; diff --git a/Sourcecode/private/mx/core/elements/NormalNotes.cpp b/Sourcecode/private/mx/core/elements/NormalNotes.cpp index f3490b8b7..20c2c5aa3 100755 --- a/Sourcecode/private/mx/core/elements/NormalNotes.cpp +++ b/Sourcecode/private/mx/core/elements/NormalNotes.cpp @@ -66,7 +66,7 @@ namespace mx } - bool NormalNotes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NormalNotes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/NormalNotes.h b/Sourcecode/private/mx/core/elements/NormalNotes.h index b339970b2..05f6c8820 100755 --- a/Sourcecode/private/mx/core/elements/NormalNotes.h +++ b/Sourcecode/private/mx/core/elements/NormalNotes.h @@ -38,7 +38,7 @@ namespace mx void setValue( const NonNegativeInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NonNegativeInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/NormalType.cpp b/Sourcecode/private/mx/core/elements/NormalType.cpp index de6997c0e..786f96aaf 100755 --- a/Sourcecode/private/mx/core/elements/NormalType.cpp +++ b/Sourcecode/private/mx/core/elements/NormalType.cpp @@ -66,7 +66,7 @@ namespace mx } - bool NormalType::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NormalType::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseNoteTypeValue( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/NormalType.h b/Sourcecode/private/mx/core/elements/NormalType.h index c388d1c46..576618458 100755 --- a/Sourcecode/private/mx/core/elements/NormalType.h +++ b/Sourcecode/private/mx/core/elements/NormalType.h @@ -38,7 +38,7 @@ namespace mx void setValue( const NoteTypeValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NoteTypeValue myValue; diff --git a/Sourcecode/private/mx/core/elements/NormalTypeNormalDotGroup.cpp b/Sourcecode/private/mx/core/elements/NormalTypeNormalDotGroup.cpp index 233583919..60a70ac0f 100755 --- a/Sourcecode/private/mx/core/elements/NormalTypeNormalDotGroup.cpp +++ b/Sourcecode/private/mx/core/elements/NormalTypeNormalDotGroup.cpp @@ -110,7 +110,7 @@ namespace mx } - bool NormalTypeNormalDotGroup::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NormalTypeNormalDotGroup::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isNormalTypeFound = false; diff --git a/Sourcecode/private/mx/core/elements/NormalTypeNormalDotGroup.h b/Sourcecode/private/mx/core/elements/NormalTypeNormalDotGroup.h index eaf5135d2..4e5a7460e 100755 --- a/Sourcecode/private/mx/core/elements/NormalTypeNormalDotGroup.h +++ b/Sourcecode/private/mx/core/elements/NormalTypeNormalDotGroup.h @@ -45,7 +45,7 @@ namespace mx NormalDotPtr getNormalDot( const NormalDotSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NormalTypePtr myNormalType; diff --git a/Sourcecode/private/mx/core/elements/Notations.cpp b/Sourcecode/private/mx/core/elements/Notations.cpp index 5ad58ab3c..c04477ac3 100755 --- a/Sourcecode/private/mx/core/elements/Notations.cpp +++ b/Sourcecode/private/mx/core/elements/Notations.cpp @@ -155,7 +155,7 @@ namespace mx } - bool Notations::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Notations::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Notations.h b/Sourcecode/private/mx/core/elements/Notations.h index fb66fdcbc..ca2b286be 100755 --- a/Sourcecode/private/mx/core/elements/Notations.h +++ b/Sourcecode/private/mx/core/elements/Notations.h @@ -49,7 +49,7 @@ namespace mx NotationsChoicePtr getNotationsChoice( const NotationsChoiceSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NotationsAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/NotationsAttributes.cpp b/Sourcecode/private/mx/core/elements/NotationsAttributes.cpp index 1b1e2e4ad..e07aa4fa4 100755 --- a/Sourcecode/private/mx/core/elements/NotationsAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/NotationsAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool NotationsAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NotationsAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "NotationsAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/NotationsAttributes.h b/Sourcecode/private/mx/core/elements/NotationsAttributes.h index 11d31a2d5..729f831bc 100755 --- a/Sourcecode/private/mx/core/elements/NotationsAttributes.h +++ b/Sourcecode/private/mx/core/elements/NotationsAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasPrintObject; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/NotationsChoice.h b/Sourcecode/private/mx/core/elements/NotationsChoice.h index fa1b374b8..cc1a1ec98 100755 --- a/Sourcecode/private/mx/core/elements/NotationsChoice.h +++ b/Sourcecode/private/mx/core/elements/NotationsChoice.h @@ -123,7 +123,7 @@ namespace mx void setOtherNotation( const OtherNotationPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/Note.cpp b/Sourcecode/private/mx/core/elements/Note.cpp index 7855af046..eba64984f 100755 --- a/Sourcecode/private/mx/core/elements/Note.cpp +++ b/Sourcecode/private/mx/core/elements/Note.cpp @@ -649,7 +649,7 @@ namespace mx } - bool Note::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Note::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isNoteChoiceFound = false; @@ -807,7 +807,7 @@ namespace mx } - bool Note::parseNoteChoice( std::ostream& message, xml::XElement& noteElement, xml::XElementIterator& iter ) + bool Note::parseNoteChoice( std::ostream& message, ::ezxml::XElement& noteElement, ::ezxml::XElementIterator& iter ) { if( iter == noteElement.end() ) { @@ -898,7 +898,7 @@ namespace mx } - bool Note::parseFullNoteGroup( std::ostream& message, xml::XElement& noteElement, xml::XElementIterator& iter, FullNoteGroupPtr& outFullNoteGroup ) + bool Note::parseFullNoteGroup( std::ostream& message, ::ezxml::XElement& noteElement, ::ezxml::XElementIterator& iter, FullNoteGroupPtr& outFullNoteGroup ) { if( iter == noteElement.end() ) { @@ -951,7 +951,7 @@ namespace mx } - bool Note::parseEditorialVoiceGroup( std::ostream& message, xml::XElement& noteElement, xml::XElementIterator& iter ) + bool Note::parseEditorialVoiceGroup( std::ostream& message, ::ezxml::XElement& noteElement, ::ezxml::XElementIterator& iter ) { bool isSuccess = true; bool isIterIncremented = false; diff --git a/Sourcecode/private/mx/core/elements/Note.h b/Sourcecode/private/mx/core/elements/Note.h index d99ebb27e..acacb45d6 100755 --- a/Sourcecode/private/mx/core/elements/Note.h +++ b/Sourcecode/private/mx/core/elements/Note.h @@ -12,14 +12,13 @@ #include #include +namespace ezxml +{ + class XElementIterator; +} + namespace mx { - - namespace xml - { - class XElementIterator; - } - namespace core { @@ -148,7 +147,7 @@ namespace mx void setHasPlay( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MX_MUTEX @@ -180,19 +179,19 @@ namespace mx bool parseNoteChoice( std::ostream& message, - xml::XElement& noteElement, - xml::XElementIterator& iter ); + ::ezxml::XElement& noteElement, + ::ezxml::XElementIterator& iter ); bool parseFullNoteGroup( std::ostream& message, - xml::XElement& noteElement, - xml::XElementIterator& iter, + ::ezxml::XElement& noteElement, + ::ezxml::XElementIterator& iter, FullNoteGroupPtr& outFullNoteGroup ); bool parseEditorialVoiceGroup( std::ostream& message, - xml::XElement& noteElement, - xml::XElementIterator& iter ); + ::ezxml::XElement& noteElement, + ::ezxml::XElementIterator& iter ); }; } } diff --git a/Sourcecode/private/mx/core/elements/NoteAttributes.cpp b/Sourcecode/private/mx/core/elements/NoteAttributes.cpp index ac7d5cdce..96c45bff4 100755 --- a/Sourcecode/private/mx/core/elements/NoteAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/NoteAttributes.cpp @@ -104,7 +104,7 @@ namespace mx } - bool NoteAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NoteAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "NoteAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/NoteAttributes.h b/Sourcecode/private/mx/core/elements/NoteAttributes.h index 8db3b26ed..c6b920067 100755 --- a/Sourcecode/private/mx/core/elements/NoteAttributes.h +++ b/Sourcecode/private/mx/core/elements/NoteAttributes.h @@ -69,7 +69,7 @@ namespace mx bool hasPizzicato; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/NoteChoice.h b/Sourcecode/private/mx/core/elements/NoteChoice.h index c6d464c34..de3e3b537 100755 --- a/Sourcecode/private/mx/core/elements/NoteChoice.h +++ b/Sourcecode/private/mx/core/elements/NoteChoice.h @@ -57,7 +57,7 @@ namespace mx void setNormalNoteGroup( const NormalNoteGroupPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/NoteRelationNote.cpp b/Sourcecode/private/mx/core/elements/NoteRelationNote.cpp index 48ad47560..2c8cfd749 100755 --- a/Sourcecode/private/mx/core/elements/NoteRelationNote.cpp +++ b/Sourcecode/private/mx/core/elements/NoteRelationNote.cpp @@ -128,7 +128,7 @@ namespace mx } - bool NoteRelationNote::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NoteRelationNote::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/NoteRelationNote.h b/Sourcecode/private/mx/core/elements/NoteRelationNote.h index fb40efe81..4c5c38dd0 100755 --- a/Sourcecode/private/mx/core/elements/NoteRelationNote.h +++ b/Sourcecode/private/mx/core/elements/NoteRelationNote.h @@ -46,7 +46,7 @@ namespace mx void setHasMetronomeRelationGroup( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MetronomeNoteSet myMetronomeNoteSet; diff --git a/Sourcecode/private/mx/core/elements/NoteSize.cpp b/Sourcecode/private/mx/core/elements/NoteSize.cpp index 0d466adcf..edaecf47a 100755 --- a/Sourcecode/private/mx/core/elements/NoteSize.cpp +++ b/Sourcecode/private/mx/core/elements/NoteSize.cpp @@ -87,7 +87,7 @@ namespace mx } - bool NoteSize::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NoteSize::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/NoteSize.h b/Sourcecode/private/mx/core/elements/NoteSize.h index e094641bc..1d266482a 100755 --- a/Sourcecode/private/mx/core/elements/NoteSize.h +++ b/Sourcecode/private/mx/core/elements/NoteSize.h @@ -42,7 +42,7 @@ namespace mx void setValue( const NonNegativeDecimal& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NonNegativeDecimal myValue; diff --git a/Sourcecode/private/mx/core/elements/NoteSizeAttributes.cpp b/Sourcecode/private/mx/core/elements/NoteSizeAttributes.cpp index bf91355c0..a2e4a50f4 100755 --- a/Sourcecode/private/mx/core/elements/NoteSizeAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/NoteSizeAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool NoteSizeAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NoteSizeAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "NoteSizeAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/NoteSizeAttributes.h b/Sourcecode/private/mx/core/elements/NoteSizeAttributes.h index 85affcd6e..80b060263 100755 --- a/Sourcecode/private/mx/core/elements/NoteSizeAttributes.h +++ b/Sourcecode/private/mx/core/elements/NoteSizeAttributes.h @@ -29,7 +29,7 @@ namespace mx const bool hasType; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Notehead.cpp b/Sourcecode/private/mx/core/elements/Notehead.cpp index 3f61cecb0..07cecdab6 100755 --- a/Sourcecode/private/mx/core/elements/Notehead.cpp +++ b/Sourcecode/private/mx/core/elements/Notehead.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Notehead::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Notehead::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Notehead.h b/Sourcecode/private/mx/core/elements/Notehead.h index bc31a0eb2..aec8c27c7 100755 --- a/Sourcecode/private/mx/core/elements/Notehead.h +++ b/Sourcecode/private/mx/core/elements/Notehead.h @@ -42,7 +42,7 @@ namespace mx void setValue( const NoteheadValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NoteheadValue myValue; diff --git a/Sourcecode/private/mx/core/elements/NoteheadAttributes.cpp b/Sourcecode/private/mx/core/elements/NoteheadAttributes.cpp index c0d47da58..e2d8ffcd9 100755 --- a/Sourcecode/private/mx/core/elements/NoteheadAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/NoteheadAttributes.cpp @@ -55,7 +55,7 @@ namespace mx } - bool NoteheadAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NoteheadAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "NoteheadAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/NoteheadAttributes.h b/Sourcecode/private/mx/core/elements/NoteheadAttributes.h index c49831244..851152032 100755 --- a/Sourcecode/private/mx/core/elements/NoteheadAttributes.h +++ b/Sourcecode/private/mx/core/elements/NoteheadAttributes.h @@ -44,7 +44,7 @@ namespace mx bool hasColor; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/NoteheadText.cpp b/Sourcecode/private/mx/core/elements/NoteheadText.cpp index 8f3248cb8..cb92a2030 100755 --- a/Sourcecode/private/mx/core/elements/NoteheadText.cpp +++ b/Sourcecode/private/mx/core/elements/NoteheadText.cpp @@ -89,7 +89,7 @@ namespace mx } - bool NoteheadText::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NoteheadText::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isFirstItemAdded = false; diff --git a/Sourcecode/private/mx/core/elements/NoteheadText.h b/Sourcecode/private/mx/core/elements/NoteheadText.h index b0268605a..9d930c33a 100755 --- a/Sourcecode/private/mx/core/elements/NoteheadText.h +++ b/Sourcecode/private/mx/core/elements/NoteheadText.h @@ -42,7 +42,7 @@ namespace mx NoteheadTextChoicePtr getNoteheadTextChoice( const NoteheadTextChoiceSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NoteheadTextChoiceSet myNoteheadTextChoiceSet; diff --git a/Sourcecode/private/mx/core/elements/NoteheadTextChoice.cpp b/Sourcecode/private/mx/core/elements/NoteheadTextChoice.cpp index 8b256a8cc..b5050a622 100755 --- a/Sourcecode/private/mx/core/elements/NoteheadTextChoice.cpp +++ b/Sourcecode/private/mx/core/elements/NoteheadTextChoice.cpp @@ -105,7 +105,7 @@ namespace mx } - bool NoteheadTextChoice::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool NoteheadTextChoice::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { if( xelement.getName() == "display-text" ) diff --git a/Sourcecode/private/mx/core/elements/NoteheadTextChoice.h b/Sourcecode/private/mx/core/elements/NoteheadTextChoice.h index b19a9e56c..62c5fea42 100755 --- a/Sourcecode/private/mx/core/elements/NoteheadTextChoice.h +++ b/Sourcecode/private/mx/core/elements/NoteheadTextChoice.h @@ -52,7 +52,7 @@ namespace mx void setAccidentalText( const AccidentalTextPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/Octave.cpp b/Sourcecode/private/mx/core/elements/Octave.cpp index d0890dc46..c48407e7c 100755 --- a/Sourcecode/private/mx/core/elements/Octave.cpp +++ b/Sourcecode/private/mx/core/elements/Octave.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Octave::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Octave::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Octave.h b/Sourcecode/private/mx/core/elements/Octave.h index 87bd22138..7c1aaa90e 100755 --- a/Sourcecode/private/mx/core/elements/Octave.h +++ b/Sourcecode/private/mx/core/elements/Octave.h @@ -38,7 +38,7 @@ namespace mx void setValue( const OctaveValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: OctaveValue myValue; diff --git a/Sourcecode/private/mx/core/elements/OctaveChange.cpp b/Sourcecode/private/mx/core/elements/OctaveChange.cpp index 0e23eb1ab..6974b3a28 100755 --- a/Sourcecode/private/mx/core/elements/OctaveChange.cpp +++ b/Sourcecode/private/mx/core/elements/OctaveChange.cpp @@ -66,7 +66,7 @@ namespace mx } - bool OctaveChange::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OctaveChange::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue.parse( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/OctaveChange.h b/Sourcecode/private/mx/core/elements/OctaveChange.h index dbd547b80..ed9e74a51 100755 --- a/Sourcecode/private/mx/core/elements/OctaveChange.h +++ b/Sourcecode/private/mx/core/elements/OctaveChange.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Integer& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Integer myValue; diff --git a/Sourcecode/private/mx/core/elements/OctaveShift.cpp b/Sourcecode/private/mx/core/elements/OctaveShift.cpp index d507dc0be..e21f60432 100755 --- a/Sourcecode/private/mx/core/elements/OctaveShift.cpp +++ b/Sourcecode/private/mx/core/elements/OctaveShift.cpp @@ -57,7 +57,7 @@ namespace mx } - bool OctaveShift::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OctaveShift::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/OctaveShift.h b/Sourcecode/private/mx/core/elements/OctaveShift.h index 2243c5210..2e4e8ea08 100755 --- a/Sourcecode/private/mx/core/elements/OctaveShift.h +++ b/Sourcecode/private/mx/core/elements/OctaveShift.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const OctaveShiftAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: OctaveShiftAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/OctaveShiftAttributes.cpp b/Sourcecode/private/mx/core/elements/OctaveShiftAttributes.cpp index 1fa60bf45..3167f3c5e 100755 --- a/Sourcecode/private/mx/core/elements/OctaveShiftAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/OctaveShiftAttributes.cpp @@ -80,7 +80,7 @@ namespace mx } - bool OctaveShiftAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OctaveShiftAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "OctaveShiftAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/OctaveShiftAttributes.h b/Sourcecode/private/mx/core/elements/OctaveShiftAttributes.h index 201f6299b..80197acac 100755 --- a/Sourcecode/private/mx/core/elements/OctaveShiftAttributes.h +++ b/Sourcecode/private/mx/core/elements/OctaveShiftAttributes.h @@ -57,7 +57,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Offset.cpp b/Sourcecode/private/mx/core/elements/Offset.cpp index 9f3a17b9c..5a6a3df24 100755 --- a/Sourcecode/private/mx/core/elements/Offset.cpp +++ b/Sourcecode/private/mx/core/elements/Offset.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Offset::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Offset::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Offset.h b/Sourcecode/private/mx/core/elements/Offset.h index c3406e5df..9abb121e1 100755 --- a/Sourcecode/private/mx/core/elements/Offset.h +++ b/Sourcecode/private/mx/core/elements/Offset.h @@ -42,7 +42,7 @@ namespace mx void setValue( const DivisionsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: DivisionsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/OffsetAttributes.cpp b/Sourcecode/private/mx/core/elements/OffsetAttributes.cpp index 7c49b9bab..c255e40f6 100755 --- a/Sourcecode/private/mx/core/elements/OffsetAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/OffsetAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool OffsetAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OffsetAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "OffsetAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/OffsetAttributes.h b/Sourcecode/private/mx/core/elements/OffsetAttributes.h index 915b8e671..e360c3968 100755 --- a/Sourcecode/private/mx/core/elements/OffsetAttributes.h +++ b/Sourcecode/private/mx/core/elements/OffsetAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasSound; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/OpenString.cpp b/Sourcecode/private/mx/core/elements/OpenString.cpp index 01efc90a3..76eb8fd91 100755 --- a/Sourcecode/private/mx/core/elements/OpenString.cpp +++ b/Sourcecode/private/mx/core/elements/OpenString.cpp @@ -57,7 +57,7 @@ namespace mx } - bool OpenString::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OpenString::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/OpenString.h b/Sourcecode/private/mx/core/elements/OpenString.h index 4ba548168..ea2c00538 100755 --- a/Sourcecode/private/mx/core/elements/OpenString.h +++ b/Sourcecode/private/mx/core/elements/OpenString.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Opus.cpp b/Sourcecode/private/mx/core/elements/Opus.cpp index e1bede9a4..f46d04956 100755 --- a/Sourcecode/private/mx/core/elements/Opus.cpp +++ b/Sourcecode/private/mx/core/elements/Opus.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Opus::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Opus::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Opus.h b/Sourcecode/private/mx/core/elements/Opus.h index 853388496..f289d9afc 100755 --- a/Sourcecode/private/mx/core/elements/Opus.h +++ b/Sourcecode/private/mx/core/elements/Opus.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const OpusAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: OpusAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/OpusAttributes.cpp b/Sourcecode/private/mx/core/elements/OpusAttributes.cpp index b857e4856..dd5aa181f 100755 --- a/Sourcecode/private/mx/core/elements/OpusAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/OpusAttributes.cpp @@ -52,7 +52,7 @@ namespace mx } - bool OpusAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OpusAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "OpusAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/OpusAttributes.h b/Sourcecode/private/mx/core/elements/OpusAttributes.h index 6301dc968..ba5336665 100755 --- a/Sourcecode/private/mx/core/elements/OpusAttributes.h +++ b/Sourcecode/private/mx/core/elements/OpusAttributes.h @@ -40,7 +40,7 @@ namespace mx bool hasActuate; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Ornaments.cpp b/Sourcecode/private/mx/core/elements/Ornaments.cpp index b3af8fa43..2c938ceed 100755 --- a/Sourcecode/private/mx/core/elements/Ornaments.cpp +++ b/Sourcecode/private/mx/core/elements/Ornaments.cpp @@ -163,7 +163,7 @@ namespace mx constexpr size_t ornamentsChoicesSize = 13; - bool Ornaments::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Ornaments::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/Ornaments.h b/Sourcecode/private/mx/core/elements/Ornaments.h index 5d131b045..3a7273c5f 100755 --- a/Sourcecode/private/mx/core/elements/Ornaments.h +++ b/Sourcecode/private/mx/core/elements/Ornaments.h @@ -49,7 +49,7 @@ namespace mx AccidentalMarkPtr getAccidentalMark( const AccidentalMarkSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: OrnamentsChoiceSet myOrnamentsChoiceSet; diff --git a/Sourcecode/private/mx/core/elements/OrnamentsChoice.cpp b/Sourcecode/private/mx/core/elements/OrnamentsChoice.cpp index f08e8c36c..811fd4fdf 100755 --- a/Sourcecode/private/mx/core/elements/OrnamentsChoice.cpp +++ b/Sourcecode/private/mx/core/elements/OrnamentsChoice.cpp @@ -350,7 +350,7 @@ namespace mx } - bool OrnamentsChoice::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OrnamentsChoice::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/OrnamentsChoice.h b/Sourcecode/private/mx/core/elements/OrnamentsChoice.h index 274a2033a..5596c9947 100755 --- a/Sourcecode/private/mx/core/elements/OrnamentsChoice.h +++ b/Sourcecode/private/mx/core/elements/OrnamentsChoice.h @@ -117,7 +117,7 @@ namespace mx void setOtherOrnament( const OtherOrnamentPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/OtherAppearance.cpp b/Sourcecode/private/mx/core/elements/OtherAppearance.cpp index 510fd431b..08c9f06d4 100755 --- a/Sourcecode/private/mx/core/elements/OtherAppearance.cpp +++ b/Sourcecode/private/mx/core/elements/OtherAppearance.cpp @@ -87,7 +87,7 @@ namespace mx } - bool OtherAppearance::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherAppearance::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/OtherAppearance.h b/Sourcecode/private/mx/core/elements/OtherAppearance.h index ed198e509..c6970e0c6 100755 --- a/Sourcecode/private/mx/core/elements/OtherAppearance.h +++ b/Sourcecode/private/mx/core/elements/OtherAppearance.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/OtherAppearanceAttributes.cpp b/Sourcecode/private/mx/core/elements/OtherAppearanceAttributes.cpp index 74effbe7d..a6460dc9b 100755 --- a/Sourcecode/private/mx/core/elements/OtherAppearanceAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/OtherAppearanceAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool OtherAppearanceAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherAppearanceAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "OtherAppearanceAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/OtherAppearanceAttributes.h b/Sourcecode/private/mx/core/elements/OtherAppearanceAttributes.h index ec47bcbe3..81efbb9d0 100755 --- a/Sourcecode/private/mx/core/elements/OtherAppearanceAttributes.h +++ b/Sourcecode/private/mx/core/elements/OtherAppearanceAttributes.h @@ -29,7 +29,7 @@ namespace mx const bool hasType; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/OtherArticulation.cpp b/Sourcecode/private/mx/core/elements/OtherArticulation.cpp index 37a5673c1..b8bca2397 100755 --- a/Sourcecode/private/mx/core/elements/OtherArticulation.cpp +++ b/Sourcecode/private/mx/core/elements/OtherArticulation.cpp @@ -87,7 +87,7 @@ namespace mx } - bool OtherArticulation::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherArticulation::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/OtherArticulation.h b/Sourcecode/private/mx/core/elements/OtherArticulation.h index b35574de7..1861a937e 100755 --- a/Sourcecode/private/mx/core/elements/OtherArticulation.h +++ b/Sourcecode/private/mx/core/elements/OtherArticulation.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/OtherArticulationAttributes.cpp b/Sourcecode/private/mx/core/elements/OtherArticulationAttributes.cpp index 7a3693e62..d54dd9e6a 100755 --- a/Sourcecode/private/mx/core/elements/OtherArticulationAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/OtherArticulationAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool OtherArticulationAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherArticulationAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "OtherArticulationAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/OtherArticulationAttributes.h b/Sourcecode/private/mx/core/elements/OtherArticulationAttributes.h index d4faecac6..f808828ea 100755 --- a/Sourcecode/private/mx/core/elements/OtherArticulationAttributes.h +++ b/Sourcecode/private/mx/core/elements/OtherArticulationAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/OtherDirection.cpp b/Sourcecode/private/mx/core/elements/OtherDirection.cpp index 42b4f5a33..4441d294d 100755 --- a/Sourcecode/private/mx/core/elements/OtherDirection.cpp +++ b/Sourcecode/private/mx/core/elements/OtherDirection.cpp @@ -87,7 +87,7 @@ namespace mx } - bool OtherDirection::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherDirection::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/OtherDirection.h b/Sourcecode/private/mx/core/elements/OtherDirection.h index 3bc42ac33..720c33a53 100755 --- a/Sourcecode/private/mx/core/elements/OtherDirection.h +++ b/Sourcecode/private/mx/core/elements/OtherDirection.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/OtherDirectionAttributes.cpp b/Sourcecode/private/mx/core/elements/OtherDirectionAttributes.cpp index 52e30a982..dc7abc07f 100755 --- a/Sourcecode/private/mx/core/elements/OtherDirectionAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/OtherDirectionAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool OtherDirectionAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherDirectionAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "OtherDirectionAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/OtherDirectionAttributes.h b/Sourcecode/private/mx/core/elements/OtherDirectionAttributes.h index a0c1b4738..c74b653c1 100755 --- a/Sourcecode/private/mx/core/elements/OtherDirectionAttributes.h +++ b/Sourcecode/private/mx/core/elements/OtherDirectionAttributes.h @@ -50,7 +50,7 @@ namespace mx bool hasHalign; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/OtherNotation.cpp b/Sourcecode/private/mx/core/elements/OtherNotation.cpp index 6bbc36a02..1b169ca65 100755 --- a/Sourcecode/private/mx/core/elements/OtherNotation.cpp +++ b/Sourcecode/private/mx/core/elements/OtherNotation.cpp @@ -87,7 +87,7 @@ namespace mx } - bool OtherNotation::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherNotation::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/OtherNotation.h b/Sourcecode/private/mx/core/elements/OtherNotation.h index 8c3ac4acc..b5b107b08 100755 --- a/Sourcecode/private/mx/core/elements/OtherNotation.h +++ b/Sourcecode/private/mx/core/elements/OtherNotation.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/OtherNotationAttributes.cpp b/Sourcecode/private/mx/core/elements/OtherNotationAttributes.cpp index 28d9a4105..77c37bf99 100755 --- a/Sourcecode/private/mx/core/elements/OtherNotationAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/OtherNotationAttributes.cpp @@ -76,7 +76,7 @@ namespace mx } - bool OtherNotationAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherNotationAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "OtherNotationAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/OtherNotationAttributes.h b/Sourcecode/private/mx/core/elements/OtherNotationAttributes.h index 660649ea6..e55842e2a 100755 --- a/Sourcecode/private/mx/core/elements/OtherNotationAttributes.h +++ b/Sourcecode/private/mx/core/elements/OtherNotationAttributes.h @@ -55,7 +55,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/OtherOrnament.cpp b/Sourcecode/private/mx/core/elements/OtherOrnament.cpp index 2ac03b6d4..081ba8272 100755 --- a/Sourcecode/private/mx/core/elements/OtherOrnament.cpp +++ b/Sourcecode/private/mx/core/elements/OtherOrnament.cpp @@ -87,7 +87,7 @@ namespace mx } - bool OtherOrnament::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherOrnament::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/OtherOrnament.h b/Sourcecode/private/mx/core/elements/OtherOrnament.h index e1b7a7e11..0417f9a7e 100755 --- a/Sourcecode/private/mx/core/elements/OtherOrnament.h +++ b/Sourcecode/private/mx/core/elements/OtherOrnament.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/OtherOrnamentAttributes.cpp b/Sourcecode/private/mx/core/elements/OtherOrnamentAttributes.cpp index 48ee699b2..d91428035 100755 --- a/Sourcecode/private/mx/core/elements/OtherOrnamentAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/OtherOrnamentAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool OtherOrnamentAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherOrnamentAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "OtherOrnamentAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/OtherOrnamentAttributes.h b/Sourcecode/private/mx/core/elements/OtherOrnamentAttributes.h index efa8fcb2b..71344cd27 100755 --- a/Sourcecode/private/mx/core/elements/OtherOrnamentAttributes.h +++ b/Sourcecode/private/mx/core/elements/OtherOrnamentAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/OtherPercussion.cpp b/Sourcecode/private/mx/core/elements/OtherPercussion.cpp index 74a9c8267..fd5bcea67 100755 --- a/Sourcecode/private/mx/core/elements/OtherPercussion.cpp +++ b/Sourcecode/private/mx/core/elements/OtherPercussion.cpp @@ -66,7 +66,7 @@ namespace mx } - bool OtherPercussion::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherPercussion::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/OtherPercussion.h b/Sourcecode/private/mx/core/elements/OtherPercussion.h index c00558194..14c154a8d 100755 --- a/Sourcecode/private/mx/core/elements/OtherPercussion.h +++ b/Sourcecode/private/mx/core/elements/OtherPercussion.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/OtherPlay.cpp b/Sourcecode/private/mx/core/elements/OtherPlay.cpp index 02c7f488f..d6567c5e4 100755 --- a/Sourcecode/private/mx/core/elements/OtherPlay.cpp +++ b/Sourcecode/private/mx/core/elements/OtherPlay.cpp @@ -87,7 +87,7 @@ namespace mx } - bool OtherPlay::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherPlay::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/OtherPlay.h b/Sourcecode/private/mx/core/elements/OtherPlay.h index 686133e56..cb71b2c77 100755 --- a/Sourcecode/private/mx/core/elements/OtherPlay.h +++ b/Sourcecode/private/mx/core/elements/OtherPlay.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/OtherPlayAttributes.cpp b/Sourcecode/private/mx/core/elements/OtherPlayAttributes.cpp index c122af100..c5b831653 100755 --- a/Sourcecode/private/mx/core/elements/OtherPlayAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/OtherPlayAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool OtherPlayAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherPlayAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "OtherPlayAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/OtherPlayAttributes.h b/Sourcecode/private/mx/core/elements/OtherPlayAttributes.h index 26a92bb0b..77ee5005d 100755 --- a/Sourcecode/private/mx/core/elements/OtherPlayAttributes.h +++ b/Sourcecode/private/mx/core/elements/OtherPlayAttributes.h @@ -29,7 +29,7 @@ namespace mx const bool hasType; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/OtherTechnical.cpp b/Sourcecode/private/mx/core/elements/OtherTechnical.cpp index 840343e3f..3baf810ff 100755 --- a/Sourcecode/private/mx/core/elements/OtherTechnical.cpp +++ b/Sourcecode/private/mx/core/elements/OtherTechnical.cpp @@ -87,7 +87,7 @@ namespace mx } - bool OtherTechnical::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherTechnical::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/OtherTechnical.h b/Sourcecode/private/mx/core/elements/OtherTechnical.h index 899c6bc24..ececc9ae2 100755 --- a/Sourcecode/private/mx/core/elements/OtherTechnical.h +++ b/Sourcecode/private/mx/core/elements/OtherTechnical.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/OtherTechnicalAttributes.cpp b/Sourcecode/private/mx/core/elements/OtherTechnicalAttributes.cpp index 9e9bb74ab..7b55e9c4a 100755 --- a/Sourcecode/private/mx/core/elements/OtherTechnicalAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/OtherTechnicalAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool OtherTechnicalAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool OtherTechnicalAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "OtherTechnicalAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/OtherTechnicalAttributes.h b/Sourcecode/private/mx/core/elements/OtherTechnicalAttributes.h index 95c245a02..ed5f3f434 100755 --- a/Sourcecode/private/mx/core/elements/OtherTechnicalAttributes.h +++ b/Sourcecode/private/mx/core/elements/OtherTechnicalAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PageHeight.cpp b/Sourcecode/private/mx/core/elements/PageHeight.cpp index cdf217de7..9d1cbde85 100755 --- a/Sourcecode/private/mx/core/elements/PageHeight.cpp +++ b/Sourcecode/private/mx/core/elements/PageHeight.cpp @@ -66,7 +66,7 @@ namespace mx } - bool PageHeight::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PageHeight::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/PageHeight.h b/Sourcecode/private/mx/core/elements/PageHeight.h index db743a08b..e55cd34e5 100755 --- a/Sourcecode/private/mx/core/elements/PageHeight.h +++ b/Sourcecode/private/mx/core/elements/PageHeight.h @@ -38,7 +38,7 @@ namespace mx void setValue( const TenthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TenthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/PageLayout.cpp b/Sourcecode/private/mx/core/elements/PageLayout.cpp index c2b625839..9f36d9ab7 100755 --- a/Sourcecode/private/mx/core/elements/PageLayout.cpp +++ b/Sourcecode/private/mx/core/elements/PageLayout.cpp @@ -135,7 +135,7 @@ namespace mx } - bool PageLayout::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PageLayout::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isPageHeightFound = false; diff --git a/Sourcecode/private/mx/core/elements/PageLayout.h b/Sourcecode/private/mx/core/elements/PageLayout.h index 4a03b582d..9b0dd4a43 100755 --- a/Sourcecode/private/mx/core/elements/PageLayout.h +++ b/Sourcecode/private/mx/core/elements/PageLayout.h @@ -50,7 +50,7 @@ namespace mx PageMarginsPtr getPageMargins( const PageMarginsSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PageHeightPtr myPageHeight; diff --git a/Sourcecode/private/mx/core/elements/PageMargins.cpp b/Sourcecode/private/mx/core/elements/PageMargins.cpp index 3734ea4f5..733308c3e 100755 --- a/Sourcecode/private/mx/core/elements/PageMargins.cpp +++ b/Sourcecode/private/mx/core/elements/PageMargins.cpp @@ -139,7 +139,7 @@ namespace mx } - bool PageMargins::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PageMargins::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/PageMargins.h b/Sourcecode/private/mx/core/elements/PageMargins.h index bcb0579c2..4f382bd85 100755 --- a/Sourcecode/private/mx/core/elements/PageMargins.h +++ b/Sourcecode/private/mx/core/elements/PageMargins.h @@ -56,7 +56,7 @@ namespace mx void setBottomMargin( const BottomMarginPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PageMarginsAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/PageMarginsAttributes.cpp b/Sourcecode/private/mx/core/elements/PageMarginsAttributes.cpp index 4b6b28701..d10f197b7 100755 --- a/Sourcecode/private/mx/core/elements/PageMarginsAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PageMarginsAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool PageMarginsAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PageMarginsAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PageMarginsAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PageMarginsAttributes.h b/Sourcecode/private/mx/core/elements/PageMarginsAttributes.h index ab2e83323..bcdecd8f7 100755 --- a/Sourcecode/private/mx/core/elements/PageMarginsAttributes.h +++ b/Sourcecode/private/mx/core/elements/PageMarginsAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasType; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PageWidth.cpp b/Sourcecode/private/mx/core/elements/PageWidth.cpp index 7d1ca999b..98c25bff8 100755 --- a/Sourcecode/private/mx/core/elements/PageWidth.cpp +++ b/Sourcecode/private/mx/core/elements/PageWidth.cpp @@ -66,7 +66,7 @@ namespace mx } - bool PageWidth::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PageWidth::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/PageWidth.h b/Sourcecode/private/mx/core/elements/PageWidth.h index 2a23b297c..8eaff1fac 100755 --- a/Sourcecode/private/mx/core/elements/PageWidth.h +++ b/Sourcecode/private/mx/core/elements/PageWidth.h @@ -38,7 +38,7 @@ namespace mx void setValue( const TenthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TenthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/Pan.cpp b/Sourcecode/private/mx/core/elements/Pan.cpp index 4fcd3b1c7..e2184c92f 100755 --- a/Sourcecode/private/mx/core/elements/Pan.cpp +++ b/Sourcecode/private/mx/core/elements/Pan.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Pan::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Pan::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Pan.h b/Sourcecode/private/mx/core/elements/Pan.h index 7beda6c96..c112febe3 100755 --- a/Sourcecode/private/mx/core/elements/Pan.h +++ b/Sourcecode/private/mx/core/elements/Pan.h @@ -38,7 +38,7 @@ namespace mx void setValue( const RotationDegrees& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: RotationDegrees myValue; diff --git a/Sourcecode/private/mx/core/elements/PartAbbreviation.cpp b/Sourcecode/private/mx/core/elements/PartAbbreviation.cpp index 76eb2ae67..56cc7ccc2 100755 --- a/Sourcecode/private/mx/core/elements/PartAbbreviation.cpp +++ b/Sourcecode/private/mx/core/elements/PartAbbreviation.cpp @@ -87,7 +87,7 @@ namespace mx } - bool PartAbbreviation::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartAbbreviation::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/PartAbbreviation.h b/Sourcecode/private/mx/core/elements/PartAbbreviation.h index da90818a5..a25b61f1f 100755 --- a/Sourcecode/private/mx/core/elements/PartAbbreviation.h +++ b/Sourcecode/private/mx/core/elements/PartAbbreviation.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/PartAbbreviationAttributes.cpp b/Sourcecode/private/mx/core/elements/PartAbbreviationAttributes.cpp index a28a114f5..5c872120a 100755 --- a/Sourcecode/private/mx/core/elements/PartAbbreviationAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PartAbbreviationAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool PartAbbreviationAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartAbbreviationAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PartAbbreviationAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PartAbbreviationAttributes.h b/Sourcecode/private/mx/core/elements/PartAbbreviationAttributes.h index ae1456bd8..cea46970b 100755 --- a/Sourcecode/private/mx/core/elements/PartAbbreviationAttributes.h +++ b/Sourcecode/private/mx/core/elements/PartAbbreviationAttributes.h @@ -50,7 +50,7 @@ namespace mx bool hasJustify; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PartAbbreviationDisplay.cpp b/Sourcecode/private/mx/core/elements/PartAbbreviationDisplay.cpp index b6837ec21..bf3d93570 100755 --- a/Sourcecode/private/mx/core/elements/PartAbbreviationDisplay.cpp +++ b/Sourcecode/private/mx/core/elements/PartAbbreviationDisplay.cpp @@ -123,7 +123,7 @@ namespace mx } - bool PartAbbreviationDisplay::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartAbbreviationDisplay::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/PartAbbreviationDisplay.h b/Sourcecode/private/mx/core/elements/PartAbbreviationDisplay.h index c52053b1c..54337cd55 100755 --- a/Sourcecode/private/mx/core/elements/PartAbbreviationDisplay.h +++ b/Sourcecode/private/mx/core/elements/PartAbbreviationDisplay.h @@ -45,7 +45,7 @@ namespace mx const DisplayTextOrAccidentalTextSet& getDisplayTextOrAccidentalTextSet() const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PartAbbreviationDisplayAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/PartAbbreviationDisplayAttributes.cpp b/Sourcecode/private/mx/core/elements/PartAbbreviationDisplayAttributes.cpp index fc4dcde20..23b3ca14f 100755 --- a/Sourcecode/private/mx/core/elements/PartAbbreviationDisplayAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PartAbbreviationDisplayAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool PartAbbreviationDisplayAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartAbbreviationDisplayAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PartAbbreviationDisplayAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PartAbbreviationDisplayAttributes.h b/Sourcecode/private/mx/core/elements/PartAbbreviationDisplayAttributes.h index ae1b53d3b..3b5d8b35f 100755 --- a/Sourcecode/private/mx/core/elements/PartAbbreviationDisplayAttributes.h +++ b/Sourcecode/private/mx/core/elements/PartAbbreviationDisplayAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasPrintObject; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PartAttributes.cpp b/Sourcecode/private/mx/core/elements/PartAttributes.cpp index 8aa07c026..d61c13d0a 100755 --- a/Sourcecode/private/mx/core/elements/PartAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PartAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool PartAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PartAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PartAttributes.h b/Sourcecode/private/mx/core/elements/PartAttributes.h index 8b133b2ea..7ab176564 100755 --- a/Sourcecode/private/mx/core/elements/PartAttributes.h +++ b/Sourcecode/private/mx/core/elements/PartAttributes.h @@ -29,7 +29,7 @@ namespace mx const bool hasId; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PartGroup.cpp b/Sourcecode/private/mx/core/elements/PartGroup.cpp index 2b605285f..91cef5edd 100755 --- a/Sourcecode/private/mx/core/elements/PartGroup.cpp +++ b/Sourcecode/private/mx/core/elements/PartGroup.cpp @@ -344,7 +344,7 @@ namespace mx } - bool PartGroup::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartGroup::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/PartGroup.h b/Sourcecode/private/mx/core/elements/PartGroup.h index 540c4271b..be9493039 100755 --- a/Sourcecode/private/mx/core/elements/PartGroup.h +++ b/Sourcecode/private/mx/core/elements/PartGroup.h @@ -90,7 +90,7 @@ namespace mx void setEditorialGroup( const EditorialGroupPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PartGroupAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/PartGroupAttributes.cpp b/Sourcecode/private/mx/core/elements/PartGroupAttributes.cpp index ba82e33e6..c2ac65ec5 100755 --- a/Sourcecode/private/mx/core/elements/PartGroupAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PartGroupAttributes.cpp @@ -36,7 +36,7 @@ namespace mx } - bool PartGroupAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartGroupAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PartGroupAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PartGroupAttributes.h b/Sourcecode/private/mx/core/elements/PartGroupAttributes.h index c50683e96..e696e716d 100755 --- a/Sourcecode/private/mx/core/elements/PartGroupAttributes.h +++ b/Sourcecode/private/mx/core/elements/PartGroupAttributes.h @@ -32,7 +32,7 @@ namespace mx bool hasNumber; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PartGroupOrScorePart.h b/Sourcecode/private/mx/core/elements/PartGroupOrScorePart.h index 22a2f41d3..6eeaf5806 100755 --- a/Sourcecode/private/mx/core/elements/PartGroupOrScorePart.h +++ b/Sourcecode/private/mx/core/elements/PartGroupOrScorePart.h @@ -51,7 +51,7 @@ namespace mx void setScorePart( const ScorePartPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/PartList.cpp b/Sourcecode/private/mx/core/elements/PartList.cpp index 437f21db8..a2b482992 100755 --- a/Sourcecode/private/mx/core/elements/PartList.cpp +++ b/Sourcecode/private/mx/core/elements/PartList.cpp @@ -160,7 +160,7 @@ namespace mx } - bool PartList::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartList::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isFirstScorePartEncountered = false; diff --git a/Sourcecode/private/mx/core/elements/PartList.h b/Sourcecode/private/mx/core/elements/PartList.h index b7e487c53..f3073d2ff 100755 --- a/Sourcecode/private/mx/core/elements/PartList.h +++ b/Sourcecode/private/mx/core/elements/PartList.h @@ -53,7 +53,7 @@ namespace mx PartGroupOrScorePartPtr getPartGroupOrScorePart( const PartGroupOrScorePartSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PartGroupSet myPartGroupSet; diff --git a/Sourcecode/private/mx/core/elements/PartName.cpp b/Sourcecode/private/mx/core/elements/PartName.cpp index 905a49a93..f12b24bce 100755 --- a/Sourcecode/private/mx/core/elements/PartName.cpp +++ b/Sourcecode/private/mx/core/elements/PartName.cpp @@ -87,7 +87,7 @@ namespace mx } - bool PartName::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartName::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/PartName.h b/Sourcecode/private/mx/core/elements/PartName.h index 1446953d5..291c85c02 100755 --- a/Sourcecode/private/mx/core/elements/PartName.h +++ b/Sourcecode/private/mx/core/elements/PartName.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/PartNameAttributes.cpp b/Sourcecode/private/mx/core/elements/PartNameAttributes.cpp index a410e78d0..2bb37ae65 100755 --- a/Sourcecode/private/mx/core/elements/PartNameAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PartNameAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool PartNameAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartNameAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PartNameAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PartNameAttributes.h b/Sourcecode/private/mx/core/elements/PartNameAttributes.h index e675d529a..f27cda831 100755 --- a/Sourcecode/private/mx/core/elements/PartNameAttributes.h +++ b/Sourcecode/private/mx/core/elements/PartNameAttributes.h @@ -53,7 +53,7 @@ namespace mx bool hasJustify; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PartNameDisplay.cpp b/Sourcecode/private/mx/core/elements/PartNameDisplay.cpp index 45bd29947..33c73fca9 100755 --- a/Sourcecode/private/mx/core/elements/PartNameDisplay.cpp +++ b/Sourcecode/private/mx/core/elements/PartNameDisplay.cpp @@ -123,7 +123,7 @@ namespace mx } - bool PartNameDisplay::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartNameDisplay::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/PartNameDisplay.h b/Sourcecode/private/mx/core/elements/PartNameDisplay.h index 9a69df3bc..4fdc20555 100755 --- a/Sourcecode/private/mx/core/elements/PartNameDisplay.h +++ b/Sourcecode/private/mx/core/elements/PartNameDisplay.h @@ -45,7 +45,7 @@ namespace mx const DisplayTextOrAccidentalTextSet& getDisplayTextOrAccidentalTextSet() const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PartNameDisplayAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/PartNameDisplayAttributes.cpp b/Sourcecode/private/mx/core/elements/PartNameDisplayAttributes.cpp index 433115634..0b1b412b3 100755 --- a/Sourcecode/private/mx/core/elements/PartNameDisplayAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PartNameDisplayAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool PartNameDisplayAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartNameDisplayAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PartNameDisplayAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PartNameDisplayAttributes.h b/Sourcecode/private/mx/core/elements/PartNameDisplayAttributes.h index 7f98b67e5..f511c9088 100755 --- a/Sourcecode/private/mx/core/elements/PartNameDisplayAttributes.h +++ b/Sourcecode/private/mx/core/elements/PartNameDisplayAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasPrintObject; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PartSymbol.cpp b/Sourcecode/private/mx/core/elements/PartSymbol.cpp index 298bf242c..82460e404 100755 --- a/Sourcecode/private/mx/core/elements/PartSymbol.cpp +++ b/Sourcecode/private/mx/core/elements/PartSymbol.cpp @@ -87,7 +87,7 @@ namespace mx } - bool PartSymbol::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartSymbol::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/PartSymbol.h b/Sourcecode/private/mx/core/elements/PartSymbol.h index 79caff449..9be5f0197 100755 --- a/Sourcecode/private/mx/core/elements/PartSymbol.h +++ b/Sourcecode/private/mx/core/elements/PartSymbol.h @@ -42,7 +42,7 @@ namespace mx void setValue( const GroupSymbolValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: GroupSymbolValue myValue; diff --git a/Sourcecode/private/mx/core/elements/PartSymbolAttributes.cpp b/Sourcecode/private/mx/core/elements/PartSymbolAttributes.cpp index 830e89cbd..aaf9a2279 100755 --- a/Sourcecode/private/mx/core/elements/PartSymbolAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PartSymbolAttributes.cpp @@ -52,7 +52,7 @@ namespace mx } - bool PartSymbolAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartSymbolAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PartSymbolAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PartSymbolAttributes.h b/Sourcecode/private/mx/core/elements/PartSymbolAttributes.h index 32db4a972..f150554ca 100755 --- a/Sourcecode/private/mx/core/elements/PartSymbolAttributes.h +++ b/Sourcecode/private/mx/core/elements/PartSymbolAttributes.h @@ -40,7 +40,7 @@ namespace mx bool hasRelativeY; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PartwiseMeasure.cpp b/Sourcecode/private/mx/core/elements/PartwiseMeasure.cpp index ff1287d5d..381a58265 100755 --- a/Sourcecode/private/mx/core/elements/PartwiseMeasure.cpp +++ b/Sourcecode/private/mx/core/elements/PartwiseMeasure.cpp @@ -105,7 +105,7 @@ namespace mx } - bool PartwiseMeasure::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartwiseMeasure::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isFirstMusicDataChoiceAdded = false; diff --git a/Sourcecode/private/mx/core/elements/PartwiseMeasure.h b/Sourcecode/private/mx/core/elements/PartwiseMeasure.h index af8849161..7e64dea6b 100755 --- a/Sourcecode/private/mx/core/elements/PartwiseMeasure.h +++ b/Sourcecode/private/mx/core/elements/PartwiseMeasure.h @@ -41,7 +41,7 @@ namespace mx void setMusicDataGroup( const MusicDataGroupPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MX_MUTEX diff --git a/Sourcecode/private/mx/core/elements/PartwisePart.cpp b/Sourcecode/private/mx/core/elements/PartwisePart.cpp index e0992fe6b..4030bad6e 100755 --- a/Sourcecode/private/mx/core/elements/PartwisePart.cpp +++ b/Sourcecode/private/mx/core/elements/PartwisePart.cpp @@ -122,7 +122,7 @@ namespace mx return PartwiseMeasurePtr(); } - bool PartwisePart::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PartwisePart::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/PartwisePart.h b/Sourcecode/private/mx/core/elements/PartwisePart.h index b3d5b852b..5f07ea5d6 100755 --- a/Sourcecode/private/mx/core/elements/PartwisePart.h +++ b/Sourcecode/private/mx/core/elements/PartwisePart.h @@ -44,7 +44,7 @@ namespace mx PartwiseMeasurePtr getPartwiseMeasure( const PartwiseMeasureSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PartAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Pedal.cpp b/Sourcecode/private/mx/core/elements/Pedal.cpp index 39e5bfa95..cbb91ecf5 100755 --- a/Sourcecode/private/mx/core/elements/Pedal.cpp +++ b/Sourcecode/private/mx/core/elements/Pedal.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Pedal::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Pedal::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Pedal.h b/Sourcecode/private/mx/core/elements/Pedal.h index 84a1cc14f..6e784913f 100755 --- a/Sourcecode/private/mx/core/elements/Pedal.h +++ b/Sourcecode/private/mx/core/elements/Pedal.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const PedalAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PedalAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/PedalAlter.cpp b/Sourcecode/private/mx/core/elements/PedalAlter.cpp index deba03a8d..1bfb939ec 100755 --- a/Sourcecode/private/mx/core/elements/PedalAlter.cpp +++ b/Sourcecode/private/mx/core/elements/PedalAlter.cpp @@ -66,7 +66,7 @@ namespace mx } - bool PedalAlter::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PedalAlter::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/PedalAlter.h b/Sourcecode/private/mx/core/elements/PedalAlter.h index d6c49690e..a97c38420 100755 --- a/Sourcecode/private/mx/core/elements/PedalAlter.h +++ b/Sourcecode/private/mx/core/elements/PedalAlter.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Semitones& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Semitones myValue; diff --git a/Sourcecode/private/mx/core/elements/PedalAttributes.cpp b/Sourcecode/private/mx/core/elements/PedalAttributes.cpp index 0822658cf..ae1602451 100755 --- a/Sourcecode/private/mx/core/elements/PedalAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PedalAttributes.cpp @@ -76,7 +76,7 @@ namespace mx } - bool PedalAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PedalAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PedalAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PedalAttributes.h b/Sourcecode/private/mx/core/elements/PedalAttributes.h index c3b57e510..d827e00fa 100755 --- a/Sourcecode/private/mx/core/elements/PedalAttributes.h +++ b/Sourcecode/private/mx/core/elements/PedalAttributes.h @@ -54,7 +54,7 @@ namespace mx bool hasHalign; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PedalStep.cpp b/Sourcecode/private/mx/core/elements/PedalStep.cpp index 33b86d3d2..b88562616 100755 --- a/Sourcecode/private/mx/core/elements/PedalStep.cpp +++ b/Sourcecode/private/mx/core/elements/PedalStep.cpp @@ -66,7 +66,7 @@ namespace mx } - bool PedalStep::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PedalStep::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseStepEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/PedalStep.h b/Sourcecode/private/mx/core/elements/PedalStep.h index 5e78cae2c..998b15337 100755 --- a/Sourcecode/private/mx/core/elements/PedalStep.h +++ b/Sourcecode/private/mx/core/elements/PedalStep.h @@ -38,7 +38,7 @@ namespace mx void setValue( const StepEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StepEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/PedalTuning.cpp b/Sourcecode/private/mx/core/elements/PedalTuning.cpp index ba8a4f0e1..f6632aeca 100755 --- a/Sourcecode/private/mx/core/elements/PedalTuning.cpp +++ b/Sourcecode/private/mx/core/elements/PedalTuning.cpp @@ -85,7 +85,7 @@ namespace mx } - bool PedalTuning::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PedalTuning::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isPedalStepFound = false; diff --git a/Sourcecode/private/mx/core/elements/PedalTuning.h b/Sourcecode/private/mx/core/elements/PedalTuning.h index c9b710913..9c0b4ccff 100755 --- a/Sourcecode/private/mx/core/elements/PedalTuning.h +++ b/Sourcecode/private/mx/core/elements/PedalTuning.h @@ -42,7 +42,7 @@ namespace mx void setPedalAlter( const PedalAlterPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PedalStepPtr myPedalStep; diff --git a/Sourcecode/private/mx/core/elements/PerMinute.cpp b/Sourcecode/private/mx/core/elements/PerMinute.cpp index afcb3364a..fc2bf6a91 100755 --- a/Sourcecode/private/mx/core/elements/PerMinute.cpp +++ b/Sourcecode/private/mx/core/elements/PerMinute.cpp @@ -87,7 +87,7 @@ namespace mx } - bool PerMinute::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PerMinute::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/PerMinute.h b/Sourcecode/private/mx/core/elements/PerMinute.h index 1f3f4f3cc..0c51e3e27 100755 --- a/Sourcecode/private/mx/core/elements/PerMinute.h +++ b/Sourcecode/private/mx/core/elements/PerMinute.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/PerMinuteAttributes.cpp b/Sourcecode/private/mx/core/elements/PerMinuteAttributes.cpp index 476a4aa63..4a1475ab3 100755 --- a/Sourcecode/private/mx/core/elements/PerMinuteAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PerMinuteAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool PerMinuteAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PerMinuteAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PerMinuteAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PerMinuteAttributes.h b/Sourcecode/private/mx/core/elements/PerMinuteAttributes.h index b476054f1..17c1da54b 100755 --- a/Sourcecode/private/mx/core/elements/PerMinuteAttributes.h +++ b/Sourcecode/private/mx/core/elements/PerMinuteAttributes.h @@ -37,7 +37,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PerMinuteOrBeatUnitChoice.cpp b/Sourcecode/private/mx/core/elements/PerMinuteOrBeatUnitChoice.cpp index 296d553fe..34fb5ee2d 100755 --- a/Sourcecode/private/mx/core/elements/PerMinuteOrBeatUnitChoice.cpp +++ b/Sourcecode/private/mx/core/elements/PerMinuteOrBeatUnitChoice.cpp @@ -107,7 +107,7 @@ namespace mx } - bool PerMinuteOrBeatUnitChoice::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PerMinuteOrBeatUnitChoice::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_CHOICE_IF( perMinute, "per-minute", PerMinute ); MX_CHOICE_IF( beatUnitGroup, "beat-unit-group", BeatUnitGroup ); diff --git a/Sourcecode/private/mx/core/elements/PerMinuteOrBeatUnitChoice.h b/Sourcecode/private/mx/core/elements/PerMinuteOrBeatUnitChoice.h index cc1d35294..a98a12cfe 100755 --- a/Sourcecode/private/mx/core/elements/PerMinuteOrBeatUnitChoice.h +++ b/Sourcecode/private/mx/core/elements/PerMinuteOrBeatUnitChoice.h @@ -45,7 +45,7 @@ namespace mx void setBeatUnitGroup( const BeatUnitGroupPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/Percussion.cpp b/Sourcecode/private/mx/core/elements/Percussion.cpp index c00d45027..689ecafde 100755 --- a/Sourcecode/private/mx/core/elements/Percussion.cpp +++ b/Sourcecode/private/mx/core/elements/Percussion.cpp @@ -82,7 +82,7 @@ namespace mx } - bool Percussion::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Percussion::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Percussion.h b/Sourcecode/private/mx/core/elements/Percussion.h index a1863f96c..cc944e742 100755 --- a/Sourcecode/private/mx/core/elements/Percussion.h +++ b/Sourcecode/private/mx/core/elements/Percussion.h @@ -39,7 +39,7 @@ namespace mx void setPercussionChoice( const PercussionChoicePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PercussionAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/PercussionAttributes.cpp b/Sourcecode/private/mx/core/elements/PercussionAttributes.cpp index 7203b7d36..2b14834b0 100755 --- a/Sourcecode/private/mx/core/elements/PercussionAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PercussionAttributes.cpp @@ -76,7 +76,7 @@ namespace mx } - bool PercussionAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PercussionAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PercussionAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PercussionAttributes.h b/Sourcecode/private/mx/core/elements/PercussionAttributes.h index e64809dcc..ee73fc62d 100755 --- a/Sourcecode/private/mx/core/elements/PercussionAttributes.h +++ b/Sourcecode/private/mx/core/elements/PercussionAttributes.h @@ -55,7 +55,7 @@ namespace mx bool hasEnclosure; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PercussionChoice.cpp b/Sourcecode/private/mx/core/elements/PercussionChoice.cpp index 269cdd1cb..a006ac768 100755 --- a/Sourcecode/private/mx/core/elements/PercussionChoice.cpp +++ b/Sourcecode/private/mx/core/elements/PercussionChoice.cpp @@ -351,7 +351,7 @@ namespace mx } - bool PercussionChoice::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PercussionChoice::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { if( xelement.getName() == "glass" ) { diff --git a/Sourcecode/private/mx/core/elements/PercussionChoice.h b/Sourcecode/private/mx/core/elements/PercussionChoice.h index b7731ca1d..2f42f55c6 100755 --- a/Sourcecode/private/mx/core/elements/PercussionChoice.h +++ b/Sourcecode/private/mx/core/elements/PercussionChoice.h @@ -115,7 +115,7 @@ namespace mx void setOtherPercussion( const OtherPercussionPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/Pitch.cpp b/Sourcecode/private/mx/core/elements/Pitch.cpp index 17938c26e..32b1d07a3 100755 --- a/Sourcecode/private/mx/core/elements/Pitch.cpp +++ b/Sourcecode/private/mx/core/elements/Pitch.cpp @@ -120,7 +120,7 @@ namespace mx } - bool Pitch::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Pitch::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isStepFound = false; diff --git a/Sourcecode/private/mx/core/elements/Pitch.h b/Sourcecode/private/mx/core/elements/Pitch.h index 37b9c2790..85eb4870b 100755 --- a/Sourcecode/private/mx/core/elements/Pitch.h +++ b/Sourcecode/private/mx/core/elements/Pitch.h @@ -49,7 +49,7 @@ namespace mx void setOctave( const OctavePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StepPtr myStep; diff --git a/Sourcecode/private/mx/core/elements/Pitched.cpp b/Sourcecode/private/mx/core/elements/Pitched.cpp index f3aab9851..27e15cf8e 100755 --- a/Sourcecode/private/mx/core/elements/Pitched.cpp +++ b/Sourcecode/private/mx/core/elements/Pitched.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Pitched::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Pitched::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Pitched.h b/Sourcecode/private/mx/core/elements/Pitched.h index b451bf6f5..a31af2377 100755 --- a/Sourcecode/private/mx/core/elements/Pitched.h +++ b/Sourcecode/private/mx/core/elements/Pitched.h @@ -38,7 +38,7 @@ namespace mx void setValue( const PitchedEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PitchedEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/Play.cpp b/Sourcecode/private/mx/core/elements/Play.cpp index 288c6ce3d..bd489ab85 100755 --- a/Sourcecode/private/mx/core/elements/Play.cpp +++ b/Sourcecode/private/mx/core/elements/Play.cpp @@ -170,7 +170,7 @@ namespace mx } - bool Play::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Play::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { if( xelement.getName() == "ipa" ) { diff --git a/Sourcecode/private/mx/core/elements/Play.h b/Sourcecode/private/mx/core/elements/Play.h index 8d53a1271..e939ed8e6 100755 --- a/Sourcecode/private/mx/core/elements/Play.h +++ b/Sourcecode/private/mx/core/elements/Play.h @@ -68,7 +68,7 @@ namespace mx private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PlayAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/PlayAttributes.cpp b/Sourcecode/private/mx/core/elements/PlayAttributes.cpp index 253bac297..e028efefa 100755 --- a/Sourcecode/private/mx/core/elements/PlayAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PlayAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool PlayAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PlayAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PlayAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PlayAttributes.h b/Sourcecode/private/mx/core/elements/PlayAttributes.h index f91300702..06f4f57f4 100755 --- a/Sourcecode/private/mx/core/elements/PlayAttributes.h +++ b/Sourcecode/private/mx/core/elements/PlayAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasId; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Plop.cpp b/Sourcecode/private/mx/core/elements/Plop.cpp index fe36d1630..96a0def57 100755 --- a/Sourcecode/private/mx/core/elements/Plop.cpp +++ b/Sourcecode/private/mx/core/elements/Plop.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Plop::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Plop::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Plop.h b/Sourcecode/private/mx/core/elements/Plop.h index 906ac9081..760e64505 100755 --- a/Sourcecode/private/mx/core/elements/Plop.h +++ b/Sourcecode/private/mx/core/elements/Plop.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyLineAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyLineAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Pluck.cpp b/Sourcecode/private/mx/core/elements/Pluck.cpp index 2d7b5f14e..ff394fd83 100755 --- a/Sourcecode/private/mx/core/elements/Pluck.cpp +++ b/Sourcecode/private/mx/core/elements/Pluck.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Pluck::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Pluck::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Pluck.h b/Sourcecode/private/mx/core/elements/Pluck.h index 99731214d..6bd721712 100755 --- a/Sourcecode/private/mx/core/elements/Pluck.h +++ b/Sourcecode/private/mx/core/elements/Pluck.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/PluckAttributes.cpp b/Sourcecode/private/mx/core/elements/PluckAttributes.cpp index b380e9093..a95059b2d 100755 --- a/Sourcecode/private/mx/core/elements/PluckAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PluckAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool PluckAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PluckAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PluckAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PluckAttributes.h b/Sourcecode/private/mx/core/elements/PluckAttributes.h index 104dc9b78..6029f3bef 100755 --- a/Sourcecode/private/mx/core/elements/PluckAttributes.h +++ b/Sourcecode/private/mx/core/elements/PluckAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PreBend.cpp b/Sourcecode/private/mx/core/elements/PreBend.cpp index 991ca826c..eb90e121b 100755 --- a/Sourcecode/private/mx/core/elements/PreBend.cpp +++ b/Sourcecode/private/mx/core/elements/PreBend.cpp @@ -27,7 +27,7 @@ namespace mx } - bool PreBend::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PreBend::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/PreBend.h b/Sourcecode/private/mx/core/elements/PreBend.h index e5a1ae51c..f4d0c2839 100755 --- a/Sourcecode/private/mx/core/elements/PreBend.h +++ b/Sourcecode/private/mx/core/elements/PreBend.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Prefix.cpp b/Sourcecode/private/mx/core/elements/Prefix.cpp index 2f26713b5..047a3077a 100755 --- a/Sourcecode/private/mx/core/elements/Prefix.cpp +++ b/Sourcecode/private/mx/core/elements/Prefix.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Prefix::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Prefix::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Prefix.h b/Sourcecode/private/mx/core/elements/Prefix.h index 8f17d7322..61ea3c6fb 100755 --- a/Sourcecode/private/mx/core/elements/Prefix.h +++ b/Sourcecode/private/mx/core/elements/Prefix.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/PrefixAttributes.cpp b/Sourcecode/private/mx/core/elements/PrefixAttributes.cpp index 6644c6ee1..d3ac584ca 100755 --- a/Sourcecode/private/mx/core/elements/PrefixAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PrefixAttributes.cpp @@ -60,7 +60,7 @@ namespace mx } - bool PrefixAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PrefixAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PrefixAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PrefixAttributes.h b/Sourcecode/private/mx/core/elements/PrefixAttributes.h index 94dd3e88e..aa8fde5bf 100755 --- a/Sourcecode/private/mx/core/elements/PrefixAttributes.h +++ b/Sourcecode/private/mx/core/elements/PrefixAttributes.h @@ -46,7 +46,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/PrincipalVoice.cpp b/Sourcecode/private/mx/core/elements/PrincipalVoice.cpp index 42cee6924..8e981dffc 100755 --- a/Sourcecode/private/mx/core/elements/PrincipalVoice.cpp +++ b/Sourcecode/private/mx/core/elements/PrincipalVoice.cpp @@ -87,7 +87,7 @@ namespace mx } - bool PrincipalVoice::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PrincipalVoice::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/PrincipalVoice.h b/Sourcecode/private/mx/core/elements/PrincipalVoice.h index ef68553b0..1fd5365af 100755 --- a/Sourcecode/private/mx/core/elements/PrincipalVoice.h +++ b/Sourcecode/private/mx/core/elements/PrincipalVoice.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/PrincipalVoiceAttributes.cpp b/Sourcecode/private/mx/core/elements/PrincipalVoiceAttributes.cpp index fd59b461e..41ec545cb 100755 --- a/Sourcecode/private/mx/core/elements/PrincipalVoiceAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PrincipalVoiceAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool PrincipalVoiceAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PrincipalVoiceAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PrincipalVoiceAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PrincipalVoiceAttributes.h b/Sourcecode/private/mx/core/elements/PrincipalVoiceAttributes.h index d7e466ad9..ffef74c7a 100755 --- a/Sourcecode/private/mx/core/elements/PrincipalVoiceAttributes.h +++ b/Sourcecode/private/mx/core/elements/PrincipalVoiceAttributes.h @@ -52,7 +52,7 @@ namespace mx bool hasHalign; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Print.cpp b/Sourcecode/private/mx/core/elements/Print.cpp index 2f3e3c684..69082f6e2 100755 --- a/Sourcecode/private/mx/core/elements/Print.cpp +++ b/Sourcecode/private/mx/core/elements/Print.cpp @@ -236,7 +236,7 @@ namespace mx } - bool Print::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Print::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Print.h b/Sourcecode/private/mx/core/elements/Print.h index 61b74714f..a89e87cff 100755 --- a/Sourcecode/private/mx/core/elements/Print.h +++ b/Sourcecode/private/mx/core/elements/Print.h @@ -69,7 +69,7 @@ namespace mx void setHasPartAbbreviationDisplay( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PrintAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/PrintAttributes.cpp b/Sourcecode/private/mx/core/elements/PrintAttributes.cpp index ad4f3d2d3..6fcf9dadb 100755 --- a/Sourcecode/private/mx/core/elements/PrintAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PrintAttributes.cpp @@ -48,7 +48,7 @@ namespace mx } - bool PrintAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PrintAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PrintAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PrintAttributes.h b/Sourcecode/private/mx/core/elements/PrintAttributes.h index c537dcb17..cd0cd2565 100755 --- a/Sourcecode/private/mx/core/elements/PrintAttributes.h +++ b/Sourcecode/private/mx/core/elements/PrintAttributes.h @@ -40,7 +40,7 @@ namespace mx bool hasPageNumber; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Properties.cpp b/Sourcecode/private/mx/core/elements/Properties.cpp index e38af0d7e..4b44fdcf5 100755 --- a/Sourcecode/private/mx/core/elements/Properties.cpp +++ b/Sourcecode/private/mx/core/elements/Properties.cpp @@ -558,10 +558,10 @@ namespace mx } - bool Properties::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Properties::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; - xml::XElementIterator end = xelement.end(); + ::ezxml::XElementIterator end = xelement.end(); bool hasFootnote = false; bool hasLevel = false; diff --git a/Sourcecode/private/mx/core/elements/Properties.h b/Sourcecode/private/mx/core/elements/Properties.h index 937029db9..8617bcd7e 100755 --- a/Sourcecode/private/mx/core/elements/Properties.h +++ b/Sourcecode/private/mx/core/elements/Properties.h @@ -121,7 +121,7 @@ namespace mx MeasureStylePtr getMeasureStyle( const MeasureStyleSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EditorialGroupPtr myEditorialGroup; diff --git a/Sourcecode/private/mx/core/elements/PullOff.cpp b/Sourcecode/private/mx/core/elements/PullOff.cpp index de09f8ae7..f18966ee8 100755 --- a/Sourcecode/private/mx/core/elements/PullOff.cpp +++ b/Sourcecode/private/mx/core/elements/PullOff.cpp @@ -87,7 +87,7 @@ namespace mx } - bool PullOff::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PullOff::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/PullOff.h b/Sourcecode/private/mx/core/elements/PullOff.h index 4e2602fba..735832d58 100755 --- a/Sourcecode/private/mx/core/elements/PullOff.h +++ b/Sourcecode/private/mx/core/elements/PullOff.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/PullOffAttributes.cpp b/Sourcecode/private/mx/core/elements/PullOffAttributes.cpp index d9d506f61..bffb05d0b 100755 --- a/Sourcecode/private/mx/core/elements/PullOffAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/PullOffAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool PullOffAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool PullOffAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "PullOffAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/PullOffAttributes.h b/Sourcecode/private/mx/core/elements/PullOffAttributes.h index d51a2a683..8ed996a52 100755 --- a/Sourcecode/private/mx/core/elements/PullOffAttributes.h +++ b/Sourcecode/private/mx/core/elements/PullOffAttributes.h @@ -53,7 +53,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Rehearsal.cpp b/Sourcecode/private/mx/core/elements/Rehearsal.cpp index 3923515f6..594613753 100755 --- a/Sourcecode/private/mx/core/elements/Rehearsal.cpp +++ b/Sourcecode/private/mx/core/elements/Rehearsal.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Rehearsal::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Rehearsal::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Rehearsal.h b/Sourcecode/private/mx/core/elements/Rehearsal.h index 108fd28d5..d53670eaf 100755 --- a/Sourcecode/private/mx/core/elements/Rehearsal.h +++ b/Sourcecode/private/mx/core/elements/Rehearsal.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/RehearsalAttributes.cpp b/Sourcecode/private/mx/core/elements/RehearsalAttributes.cpp index ede8eb4bd..5217fffac 100755 --- a/Sourcecode/private/mx/core/elements/RehearsalAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/RehearsalAttributes.cpp @@ -104,7 +104,7 @@ namespace mx } - bool RehearsalAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool RehearsalAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "RehearsalAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/RehearsalAttributes.h b/Sourcecode/private/mx/core/elements/RehearsalAttributes.h index de08b4dee..3c8d473ef 100755 --- a/Sourcecode/private/mx/core/elements/RehearsalAttributes.h +++ b/Sourcecode/private/mx/core/elements/RehearsalAttributes.h @@ -70,7 +70,7 @@ namespace mx bool hasEnclosure; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Relation.cpp b/Sourcecode/private/mx/core/elements/Relation.cpp index 727e78e8f..885bb92c2 100755 --- a/Sourcecode/private/mx/core/elements/Relation.cpp +++ b/Sourcecode/private/mx/core/elements/Relation.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Relation::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Relation::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Relation.h b/Sourcecode/private/mx/core/elements/Relation.h index a3cd01341..19c0970c7 100755 --- a/Sourcecode/private/mx/core/elements/Relation.h +++ b/Sourcecode/private/mx/core/elements/Relation.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/RelationAttributes.cpp b/Sourcecode/private/mx/core/elements/RelationAttributes.cpp index 69217b5c9..33de198bf 100755 --- a/Sourcecode/private/mx/core/elements/RelationAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/RelationAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool RelationAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool RelationAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "RelationAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/RelationAttributes.h b/Sourcecode/private/mx/core/elements/RelationAttributes.h index cfa82703c..5831d8ff0 100755 --- a/Sourcecode/private/mx/core/elements/RelationAttributes.h +++ b/Sourcecode/private/mx/core/elements/RelationAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasType; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Release.cpp b/Sourcecode/private/mx/core/elements/Release.cpp index 09625aae7..e7f3fde5e 100755 --- a/Sourcecode/private/mx/core/elements/Release.cpp +++ b/Sourcecode/private/mx/core/elements/Release.cpp @@ -27,7 +27,7 @@ namespace mx } - bool Release::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Release::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Release.h b/Sourcecode/private/mx/core/elements/Release.h index 08c25fc81..154439dd2 100755 --- a/Sourcecode/private/mx/core/elements/Release.h +++ b/Sourcecode/private/mx/core/elements/Release.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Repeat.cpp b/Sourcecode/private/mx/core/elements/Repeat.cpp index b123688af..deeac9bef 100755 --- a/Sourcecode/private/mx/core/elements/Repeat.cpp +++ b/Sourcecode/private/mx/core/elements/Repeat.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Repeat::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Repeat::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Repeat.h b/Sourcecode/private/mx/core/elements/Repeat.h index be5a8c700..7f697cea6 100755 --- a/Sourcecode/private/mx/core/elements/Repeat.h +++ b/Sourcecode/private/mx/core/elements/Repeat.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const RepeatAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: RepeatAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/RepeatAttributes.cpp b/Sourcecode/private/mx/core/elements/RepeatAttributes.cpp index 5e928a3fe..c3ae62638 100755 --- a/Sourcecode/private/mx/core/elements/RepeatAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/RepeatAttributes.cpp @@ -40,7 +40,7 @@ namespace mx } - bool RepeatAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool RepeatAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "RepeatAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/RepeatAttributes.h b/Sourcecode/private/mx/core/elements/RepeatAttributes.h index a4c03dd35..2501c627f 100755 --- a/Sourcecode/private/mx/core/elements/RepeatAttributes.h +++ b/Sourcecode/private/mx/core/elements/RepeatAttributes.h @@ -34,7 +34,7 @@ namespace mx bool hasWinged; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Rest.cpp b/Sourcecode/private/mx/core/elements/Rest.cpp index da8ab075c..6f9f445cf 100755 --- a/Sourcecode/private/mx/core/elements/Rest.cpp +++ b/Sourcecode/private/mx/core/elements/Rest.cpp @@ -102,7 +102,7 @@ namespace mx } - bool Rest::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Rest::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Rest.h b/Sourcecode/private/mx/core/elements/Rest.h index 1d52fbe42..7d95883b5 100755 --- a/Sourcecode/private/mx/core/elements/Rest.h +++ b/Sourcecode/private/mx/core/elements/Rest.h @@ -43,7 +43,7 @@ namespace mx void setHasDisplayStepOctaveGroup( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: RestAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/RestAttributes.cpp b/Sourcecode/private/mx/core/elements/RestAttributes.cpp index 83f5b791f..2fbcf6a23 100755 --- a/Sourcecode/private/mx/core/elements/RestAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/RestAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool RestAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool RestAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "RestAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/RestAttributes.h b/Sourcecode/private/mx/core/elements/RestAttributes.h index 7174724ca..ca5f7f508 100755 --- a/Sourcecode/private/mx/core/elements/RestAttributes.h +++ b/Sourcecode/private/mx/core/elements/RestAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasMeasure; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/RightDivider.cpp b/Sourcecode/private/mx/core/elements/RightDivider.cpp index 6ff999204..629532189 100755 --- a/Sourcecode/private/mx/core/elements/RightDivider.cpp +++ b/Sourcecode/private/mx/core/elements/RightDivider.cpp @@ -57,7 +57,7 @@ namespace mx } - bool RightDivider::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool RightDivider::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/RightDivider.h b/Sourcecode/private/mx/core/elements/RightDivider.h index f2678f7c9..ac7810c91 100755 --- a/Sourcecode/private/mx/core/elements/RightDivider.h +++ b/Sourcecode/private/mx/core/elements/RightDivider.h @@ -35,7 +35,7 @@ namespace mx void setAttributes( const EmptyPrintObjectStyleAlignAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPrintObjectStyleAlignAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/RightMargin.cpp b/Sourcecode/private/mx/core/elements/RightMargin.cpp index d16d95f15..d44e12fc6 100755 --- a/Sourcecode/private/mx/core/elements/RightMargin.cpp +++ b/Sourcecode/private/mx/core/elements/RightMargin.cpp @@ -66,7 +66,7 @@ namespace mx } - bool RightMargin::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool RightMargin::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/RightMargin.h b/Sourcecode/private/mx/core/elements/RightMargin.h index 13f919fca..5271ae076 100755 --- a/Sourcecode/private/mx/core/elements/RightMargin.h +++ b/Sourcecode/private/mx/core/elements/RightMargin.h @@ -38,7 +38,7 @@ namespace mx void setValue( const TenthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TenthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/Rights.cpp b/Sourcecode/private/mx/core/elements/Rights.cpp index 17a4d4431..094655d44 100755 --- a/Sourcecode/private/mx/core/elements/Rights.cpp +++ b/Sourcecode/private/mx/core/elements/Rights.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Rights::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Rights::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Rights.h b/Sourcecode/private/mx/core/elements/Rights.h index fb3c2c14d..e2ff6fd35 100755 --- a/Sourcecode/private/mx/core/elements/Rights.h +++ b/Sourcecode/private/mx/core/elements/Rights.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/RightsAttributes.cpp b/Sourcecode/private/mx/core/elements/RightsAttributes.cpp index 957975c06..e68fb5a7c 100755 --- a/Sourcecode/private/mx/core/elements/RightsAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/RightsAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool RightsAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool RightsAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "RightsAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/RightsAttributes.h b/Sourcecode/private/mx/core/elements/RightsAttributes.h index 0a25d8581..c73fbdb99 100755 --- a/Sourcecode/private/mx/core/elements/RightsAttributes.h +++ b/Sourcecode/private/mx/core/elements/RightsAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasType; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Root.cpp b/Sourcecode/private/mx/core/elements/Root.cpp index 1eae712e1..8e52e4c92 100755 --- a/Sourcecode/private/mx/core/elements/Root.cpp +++ b/Sourcecode/private/mx/core/elements/Root.cpp @@ -101,7 +101,7 @@ namespace mx } - bool Root::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Root::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isRootStepFound = false; diff --git a/Sourcecode/private/mx/core/elements/Root.h b/Sourcecode/private/mx/core/elements/Root.h index 60359604f..280d5c20b 100755 --- a/Sourcecode/private/mx/core/elements/Root.h +++ b/Sourcecode/private/mx/core/elements/Root.h @@ -44,7 +44,7 @@ namespace mx void setHasRootAlter( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: RootStepPtr myRootStep; diff --git a/Sourcecode/private/mx/core/elements/RootAlter.cpp b/Sourcecode/private/mx/core/elements/RootAlter.cpp index 0c6d69e46..22027774f 100755 --- a/Sourcecode/private/mx/core/elements/RootAlter.cpp +++ b/Sourcecode/private/mx/core/elements/RootAlter.cpp @@ -87,7 +87,7 @@ namespace mx } - bool RootAlter::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool RootAlter::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/RootAlter.h b/Sourcecode/private/mx/core/elements/RootAlter.h index a7bb40552..5c58bb0bc 100755 --- a/Sourcecode/private/mx/core/elements/RootAlter.h +++ b/Sourcecode/private/mx/core/elements/RootAlter.h @@ -42,7 +42,7 @@ namespace mx void setValue( const Semitones& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Semitones myValue; diff --git a/Sourcecode/private/mx/core/elements/RootAlterAttributes.cpp b/Sourcecode/private/mx/core/elements/RootAlterAttributes.cpp index 70ec34f26..494512873 100755 --- a/Sourcecode/private/mx/core/elements/RootAlterAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/RootAlterAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool RootAlterAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool RootAlterAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "RootAlterAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/RootAlterAttributes.h b/Sourcecode/private/mx/core/elements/RootAlterAttributes.h index 001bc9939..a752fb8fa 100755 --- a/Sourcecode/private/mx/core/elements/RootAlterAttributes.h +++ b/Sourcecode/private/mx/core/elements/RootAlterAttributes.h @@ -50,7 +50,7 @@ namespace mx bool hasLocation; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/RootStep.cpp b/Sourcecode/private/mx/core/elements/RootStep.cpp index a857a55b9..4ab6246db 100755 --- a/Sourcecode/private/mx/core/elements/RootStep.cpp +++ b/Sourcecode/private/mx/core/elements/RootStep.cpp @@ -87,7 +87,7 @@ namespace mx } - bool RootStep::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool RootStep::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/RootStep.h b/Sourcecode/private/mx/core/elements/RootStep.h index e2aab54cb..a8af32c3a 100755 --- a/Sourcecode/private/mx/core/elements/RootStep.h +++ b/Sourcecode/private/mx/core/elements/RootStep.h @@ -42,7 +42,7 @@ namespace mx void setValue( const StepEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StepEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/RootStepAttributes.cpp b/Sourcecode/private/mx/core/elements/RootStepAttributes.cpp index c94398afd..568bb3c5c 100755 --- a/Sourcecode/private/mx/core/elements/RootStepAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/RootStepAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool RootStepAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool RootStepAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "RootStepAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/RootStepAttributes.h b/Sourcecode/private/mx/core/elements/RootStepAttributes.h index cdbb210f2..5b0856e96 100755 --- a/Sourcecode/private/mx/core/elements/RootStepAttributes.h +++ b/Sourcecode/private/mx/core/elements/RootStepAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Scaling.cpp b/Sourcecode/private/mx/core/elements/Scaling.cpp index b23e86e88..959cc20bc 100755 --- a/Sourcecode/private/mx/core/elements/Scaling.cpp +++ b/Sourcecode/private/mx/core/elements/Scaling.cpp @@ -85,7 +85,7 @@ namespace mx } - bool Scaling::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Scaling::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isMillimetersFound = false; diff --git a/Sourcecode/private/mx/core/elements/Scaling.h b/Sourcecode/private/mx/core/elements/Scaling.h index 31d47c4ae..2b5249050 100755 --- a/Sourcecode/private/mx/core/elements/Scaling.h +++ b/Sourcecode/private/mx/core/elements/Scaling.h @@ -42,7 +42,7 @@ namespace mx void setTenths( const TenthsPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MillimetersPtr myMillimeters; diff --git a/Sourcecode/private/mx/core/elements/Schleifer.cpp b/Sourcecode/private/mx/core/elements/Schleifer.cpp index 8024b2553..aa9b31421 100755 --- a/Sourcecode/private/mx/core/elements/Schleifer.cpp +++ b/Sourcecode/private/mx/core/elements/Schleifer.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Schleifer::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Schleifer::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Schleifer.h b/Sourcecode/private/mx/core/elements/Schleifer.h index 9d01ba350..6efed5c80 100755 --- a/Sourcecode/private/mx/core/elements/Schleifer.h +++ b/Sourcecode/private/mx/core/elements/Schleifer.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Scoop.cpp b/Sourcecode/private/mx/core/elements/Scoop.cpp index 07d94fa52..a798856e0 100755 --- a/Sourcecode/private/mx/core/elements/Scoop.cpp +++ b/Sourcecode/private/mx/core/elements/Scoop.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Scoop::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Scoop::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Scoop.h b/Sourcecode/private/mx/core/elements/Scoop.h index 6a0a6178e..8ac5ff8b8 100755 --- a/Sourcecode/private/mx/core/elements/Scoop.h +++ b/Sourcecode/private/mx/core/elements/Scoop.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyLineAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyLineAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Scordatura.cpp b/Sourcecode/private/mx/core/elements/Scordatura.cpp index 3789554c8..c5359fe7f 100755 --- a/Sourcecode/private/mx/core/elements/Scordatura.cpp +++ b/Sourcecode/private/mx/core/elements/Scordatura.cpp @@ -100,7 +100,7 @@ namespace mx } - bool Scordatura::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Scordatura::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/Scordatura.h b/Sourcecode/private/mx/core/elements/Scordatura.h index 8500ef5ca..5bf8bb8b3 100755 --- a/Sourcecode/private/mx/core/elements/Scordatura.h +++ b/Sourcecode/private/mx/core/elements/Scordatura.h @@ -40,7 +40,7 @@ namespace mx AccordPtr getAccord( const AccordSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: AccordSet myAccordSet; diff --git a/Sourcecode/private/mx/core/elements/ScoreHeaderGroup.cpp b/Sourcecode/private/mx/core/elements/ScoreHeaderGroup.cpp index 96cd44016..76736415f 100755 --- a/Sourcecode/private/mx/core/elements/ScoreHeaderGroup.cpp +++ b/Sourcecode/private/mx/core/elements/ScoreHeaderGroup.cpp @@ -314,7 +314,7 @@ namespace mx } - bool ScoreHeaderGroup::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ScoreHeaderGroup::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isPartListFound = false; diff --git a/Sourcecode/private/mx/core/elements/ScoreHeaderGroup.h b/Sourcecode/private/mx/core/elements/ScoreHeaderGroup.h index 2cc66eb68..37249356a 100755 --- a/Sourcecode/private/mx/core/elements/ScoreHeaderGroup.h +++ b/Sourcecode/private/mx/core/elements/ScoreHeaderGroup.h @@ -80,7 +80,7 @@ namespace mx void setPartList( const PartListPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: WorkPtr myWork; diff --git a/Sourcecode/private/mx/core/elements/ScoreInstrument.cpp b/Sourcecode/private/mx/core/elements/ScoreInstrument.cpp index e0c91025a..afbd8f28b 100755 --- a/Sourcecode/private/mx/core/elements/ScoreInstrument.cpp +++ b/Sourcecode/private/mx/core/elements/ScoreInstrument.cpp @@ -224,7 +224,7 @@ namespace mx } - bool ScoreInstrument::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ScoreInstrument::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/ScoreInstrument.h b/Sourcecode/private/mx/core/elements/ScoreInstrument.h index d6ee1df80..1985a2b16 100755 --- a/Sourcecode/private/mx/core/elements/ScoreInstrument.h +++ b/Sourcecode/private/mx/core/elements/ScoreInstrument.h @@ -69,7 +69,7 @@ namespace mx void setHasVirtualInstrument( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ScoreInstrumentAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/ScoreInstrumentAttributes.cpp b/Sourcecode/private/mx/core/elements/ScoreInstrumentAttributes.cpp index 39e5419e9..e50b9d322 100755 --- a/Sourcecode/private/mx/core/elements/ScoreInstrumentAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/ScoreInstrumentAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool ScoreInstrumentAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ScoreInstrumentAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "ScoreInstrumentAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/ScoreInstrumentAttributes.h b/Sourcecode/private/mx/core/elements/ScoreInstrumentAttributes.h index be98343f7..32093d8b3 100755 --- a/Sourcecode/private/mx/core/elements/ScoreInstrumentAttributes.h +++ b/Sourcecode/private/mx/core/elements/ScoreInstrumentAttributes.h @@ -29,7 +29,7 @@ namespace mx const bool hasId; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/ScorePart.cpp b/Sourcecode/private/mx/core/elements/ScorePart.cpp index ef5698603..618294cd7 100755 --- a/Sourcecode/private/mx/core/elements/ScorePart.cpp +++ b/Sourcecode/private/mx/core/elements/ScorePart.cpp @@ -368,14 +368,14 @@ namespace mx } - bool ScorePart::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ScorePart::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); bool isPartNameFound = false; - xml::XElementIterator end = xelement.end(); + ::ezxml::XElementIterator end = xelement.end(); for( auto it = xelement.begin(); it != end; ++it ) { @@ -398,7 +398,7 @@ namespace mx } - void ScorePart::importMidiDeviceInstrumentGroupSet( std::ostream& message, xml::XElementIterator& iter, xml::XElementIterator& endIter, bool& isSuccess ) + void ScorePart::importMidiDeviceInstrumentGroupSet( std::ostream& message, ::ezxml::XElementIterator& iter, ::ezxml::XElementIterator& endIter, bool& isSuccess ) { bool doDecrementIter = false; while( iter != endIter && ( iter->getName() == "midi-device" || iter->getName() == "midi-instrument" ) ) diff --git a/Sourcecode/private/mx/core/elements/ScorePart.h b/Sourcecode/private/mx/core/elements/ScorePart.h index c9178066b..9de271cc0 100755 --- a/Sourcecode/private/mx/core/elements/ScorePart.h +++ b/Sourcecode/private/mx/core/elements/ScorePart.h @@ -12,14 +12,13 @@ #include #include +namespace ezxml +{ + class XElementIterator; +} + namespace mx { - - namespace xml - { - class XElementIterator; - } - namespace core { @@ -99,7 +98,7 @@ namespace mx MidiDeviceInstrumentGroupPtr getMidiDeviceInstrumentGroup( const MidiDeviceInstrumentGroupSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ScorePartAttributesPtr myAttributes; @@ -118,8 +117,8 @@ namespace mx void importMidiDeviceInstrumentGroupSet( std::ostream& message, - xml::XElementIterator& iter, - xml::XElementIterator& endIter, + ::ezxml::XElementIterator& iter, + ::ezxml::XElementIterator& endIter, bool& isSuccess ); }; } diff --git a/Sourcecode/private/mx/core/elements/ScorePartAttributes.cpp b/Sourcecode/private/mx/core/elements/ScorePartAttributes.cpp index 1b85ede4a..047032beb 100755 --- a/Sourcecode/private/mx/core/elements/ScorePartAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/ScorePartAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool ScorePartAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ScorePartAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "ScorePartAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/ScorePartAttributes.h b/Sourcecode/private/mx/core/elements/ScorePartAttributes.h index 29d40f3f0..a01fcb7d2 100755 --- a/Sourcecode/private/mx/core/elements/ScorePartAttributes.h +++ b/Sourcecode/private/mx/core/elements/ScorePartAttributes.h @@ -29,7 +29,7 @@ namespace mx const bool hasId; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/ScorePartwise.cpp b/Sourcecode/private/mx/core/elements/ScorePartwise.cpp index 506d25031..c10d52cdb 100755 --- a/Sourcecode/private/mx/core/elements/ScorePartwise.cpp +++ b/Sourcecode/private/mx/core/elements/ScorePartwise.cpp @@ -135,7 +135,7 @@ namespace mx } - bool ScorePartwise::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ScorePartwise::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isFirstPartAdded = false; diff --git a/Sourcecode/private/mx/core/elements/ScorePartwise.h b/Sourcecode/private/mx/core/elements/ScorePartwise.h index 27d5e9742..0fc3f2209 100755 --- a/Sourcecode/private/mx/core/elements/ScorePartwise.h +++ b/Sourcecode/private/mx/core/elements/ScorePartwise.h @@ -49,7 +49,7 @@ namespace mx PartwisePartPtr getPartwisePart( const PartwisePartSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ScorePartwiseAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/ScorePartwiseAttributes.cpp b/Sourcecode/private/mx/core/elements/ScorePartwiseAttributes.cpp index eb9a339c2..9daad9e45 100755 --- a/Sourcecode/private/mx/core/elements/ScorePartwiseAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/ScorePartwiseAttributes.cpp @@ -4,8 +4,8 @@ #include "mx/core/elements/ScorePartwiseAttributes.h" #include "mx/core/FromXElement.h" -#include "mx/xml/XElement.h" -#include "mx/xml/XAttributeIterator.h" +#include "ezxml/XElement.h" +#include "ezxml/XAttributeIterator.h" #include @@ -35,7 +35,7 @@ namespace mx } - bool ScorePartwiseAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ScorePartwiseAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "ScorePartwiseAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/ScorePartwiseAttributes.h b/Sourcecode/private/mx/core/elements/ScorePartwiseAttributes.h index 22dfcf029..ac49fb177 100755 --- a/Sourcecode/private/mx/core/elements/ScorePartwiseAttributes.h +++ b/Sourcecode/private/mx/core/elements/ScorePartwiseAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasVersion; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/ScoreTimewise.cpp b/Sourcecode/private/mx/core/elements/ScoreTimewise.cpp index f03e08b66..785757ac2 100755 --- a/Sourcecode/private/mx/core/elements/ScoreTimewise.cpp +++ b/Sourcecode/private/mx/core/elements/ScoreTimewise.cpp @@ -6,8 +6,8 @@ #include "mx/core/elements/ScoreHeaderGroup.h" #include "mx/core/elements/TimewiseMeasure.h" #include "mx/core/FromXElement.h" -#include "mx/xml/XElement.h" -#include "mx/xml/XElementIterator.h" +#include "ezxml/XElement.h" +#include "ezxml/XElementIterator.h" #include namespace mx @@ -136,7 +136,7 @@ namespace mx return TimewiseMeasurePtr(); } - bool ScoreTimewise::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ScoreTimewise::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isFirstMeasureAdded = false; diff --git a/Sourcecode/private/mx/core/elements/ScoreTimewise.h b/Sourcecode/private/mx/core/elements/ScoreTimewise.h index 178840e72..bd8bee8c9 100755 --- a/Sourcecode/private/mx/core/elements/ScoreTimewise.h +++ b/Sourcecode/private/mx/core/elements/ScoreTimewise.h @@ -48,7 +48,7 @@ namespace mx void clearTimewiseMeasureSet(); TimewiseMeasurePtr getTimewiseMeasure( const TimewiseMeasureSetIterConst& setIterator ) const; - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ScoreTimewiseAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/ScoreTimewiseAttributes.cpp b/Sourcecode/private/mx/core/elements/ScoreTimewiseAttributes.cpp index cb2584ae5..502e292cb 100755 --- a/Sourcecode/private/mx/core/elements/ScoreTimewiseAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/ScoreTimewiseAttributes.cpp @@ -4,8 +4,8 @@ #include "mx/core/elements/ScoreTimewiseAttributes.h" #include "mx/core/FromXElement.h" -#include "mx/xml/XElement.h" -#include "mx/xml/XAttributeIterator.h" +#include "ezxml/XElement.h" +#include "ezxml/XAttributeIterator.h" #include namespace mx @@ -34,7 +34,7 @@ namespace mx } - bool ScoreTimewiseAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ScoreTimewiseAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "ScoreTimewiseAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/ScoreTimewiseAttributes.h b/Sourcecode/private/mx/core/elements/ScoreTimewiseAttributes.h index aa7d34ca7..5f5fc2570 100755 --- a/Sourcecode/private/mx/core/elements/ScoreTimewiseAttributes.h +++ b/Sourcecode/private/mx/core/elements/ScoreTimewiseAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasVersion; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Segno.cpp b/Sourcecode/private/mx/core/elements/Segno.cpp index abe7c9dca..f9b5178f1 100755 --- a/Sourcecode/private/mx/core/elements/Segno.cpp +++ b/Sourcecode/private/mx/core/elements/Segno.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Segno::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Segno::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Segno.h b/Sourcecode/private/mx/core/elements/Segno.h index 710e148b8..ddc059486 100755 --- a/Sourcecode/private/mx/core/elements/Segno.h +++ b/Sourcecode/private/mx/core/elements/Segno.h @@ -35,7 +35,7 @@ namespace mx void setAttributes( const EmptyPrintObjectStyleAlignAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPrintObjectStyleAlignAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/SemiPitched.cpp b/Sourcecode/private/mx/core/elements/SemiPitched.cpp index a1e9f4719..8e5933d2d 100755 --- a/Sourcecode/private/mx/core/elements/SemiPitched.cpp +++ b/Sourcecode/private/mx/core/elements/SemiPitched.cpp @@ -66,7 +66,7 @@ namespace mx } - bool SemiPitched::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SemiPitched::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseSemiPitchedEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/SemiPitched.h b/Sourcecode/private/mx/core/elements/SemiPitched.h index f18cc6677..01b32805f 100755 --- a/Sourcecode/private/mx/core/elements/SemiPitched.h +++ b/Sourcecode/private/mx/core/elements/SemiPitched.h @@ -38,7 +38,7 @@ namespace mx void setValue( const SemiPitchedEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: SemiPitchedEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/SenzaMisura.cpp b/Sourcecode/private/mx/core/elements/SenzaMisura.cpp index 1e9adfa98..f4fe7f082 100755 --- a/Sourcecode/private/mx/core/elements/SenzaMisura.cpp +++ b/Sourcecode/private/mx/core/elements/SenzaMisura.cpp @@ -66,7 +66,7 @@ namespace mx } - bool SenzaMisura::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SenzaMisura::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/SenzaMisura.h b/Sourcecode/private/mx/core/elements/SenzaMisura.h index 4ac13b923..b8f8f0a77 100755 --- a/Sourcecode/private/mx/core/elements/SenzaMisura.h +++ b/Sourcecode/private/mx/core/elements/SenzaMisura.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/Shake.cpp b/Sourcecode/private/mx/core/elements/Shake.cpp index 52bf726b5..17bb7d589 100755 --- a/Sourcecode/private/mx/core/elements/Shake.cpp +++ b/Sourcecode/private/mx/core/elements/Shake.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Shake::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Shake::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Shake.h b/Sourcecode/private/mx/core/elements/Shake.h index d8eb05ad9..e519b4e06 100755 --- a/Sourcecode/private/mx/core/elements/Shake.h +++ b/Sourcecode/private/mx/core/elements/Shake.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyTrillSoundAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyTrillSoundAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Sign.cpp b/Sourcecode/private/mx/core/elements/Sign.cpp index 439a52078..5b0134281 100755 --- a/Sourcecode/private/mx/core/elements/Sign.cpp +++ b/Sourcecode/private/mx/core/elements/Sign.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Sign::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Sign::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseClefSign( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/Sign.h b/Sourcecode/private/mx/core/elements/Sign.h index 922e3ec66..fedf5c055 100755 --- a/Sourcecode/private/mx/core/elements/Sign.h +++ b/Sourcecode/private/mx/core/elements/Sign.h @@ -38,7 +38,7 @@ namespace mx void setValue( const ClefSign& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ClefSign myValue; diff --git a/Sourcecode/private/mx/core/elements/Slash.cpp b/Sourcecode/private/mx/core/elements/Slash.cpp index 1506436fe..b731611f7 100755 --- a/Sourcecode/private/mx/core/elements/Slash.cpp +++ b/Sourcecode/private/mx/core/elements/Slash.cpp @@ -122,7 +122,7 @@ namespace mx } - bool Slash::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Slash::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Slash.h b/Sourcecode/private/mx/core/elements/Slash.h index 373dcaf8a..e70165a4e 100755 --- a/Sourcecode/private/mx/core/elements/Slash.h +++ b/Sourcecode/private/mx/core/elements/Slash.h @@ -48,7 +48,7 @@ namespace mx void clearSlashDotSet(); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: SlashAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/SlashAttributes.cpp b/Sourcecode/private/mx/core/elements/SlashAttributes.cpp index f1996edc4..81e75b2ed 100755 --- a/Sourcecode/private/mx/core/elements/SlashAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/SlashAttributes.cpp @@ -40,7 +40,7 @@ namespace mx } - bool SlashAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SlashAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "SlashAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/SlashAttributes.h b/Sourcecode/private/mx/core/elements/SlashAttributes.h index 9d0304635..c3956c72c 100755 --- a/Sourcecode/private/mx/core/elements/SlashAttributes.h +++ b/Sourcecode/private/mx/core/elements/SlashAttributes.h @@ -33,7 +33,7 @@ namespace mx bool hasUseStems; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/SlashDot.cpp b/Sourcecode/private/mx/core/elements/SlashDot.cpp index f3fcc58ed..8751c89cd 100755 --- a/Sourcecode/private/mx/core/elements/SlashDot.cpp +++ b/Sourcecode/private/mx/core/elements/SlashDot.cpp @@ -27,7 +27,7 @@ namespace mx } - bool SlashDot::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SlashDot::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/SlashDot.h b/Sourcecode/private/mx/core/elements/SlashDot.h index 45b919ebe..4d920b910 100755 --- a/Sourcecode/private/mx/core/elements/SlashDot.h +++ b/Sourcecode/private/mx/core/elements/SlashDot.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/SlashType.cpp b/Sourcecode/private/mx/core/elements/SlashType.cpp index a634e12ef..84135872b 100755 --- a/Sourcecode/private/mx/core/elements/SlashType.cpp +++ b/Sourcecode/private/mx/core/elements/SlashType.cpp @@ -66,7 +66,7 @@ namespace mx } - bool SlashType::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SlashType::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseNoteTypeValue( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/SlashType.h b/Sourcecode/private/mx/core/elements/SlashType.h index e30a6655e..d8c120489 100755 --- a/Sourcecode/private/mx/core/elements/SlashType.h +++ b/Sourcecode/private/mx/core/elements/SlashType.h @@ -38,7 +38,7 @@ namespace mx void setValue( const NoteTypeValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NoteTypeValue myValue; diff --git a/Sourcecode/private/mx/core/elements/Slide.cpp b/Sourcecode/private/mx/core/elements/Slide.cpp index 4e0481c0b..718d1cba4 100755 --- a/Sourcecode/private/mx/core/elements/Slide.cpp +++ b/Sourcecode/private/mx/core/elements/Slide.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Slide::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Slide::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Slide.h b/Sourcecode/private/mx/core/elements/Slide.h index 50ce35ee7..46df68fea 100755 --- a/Sourcecode/private/mx/core/elements/Slide.h +++ b/Sourcecode/private/mx/core/elements/Slide.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/SlideAttributes.cpp b/Sourcecode/private/mx/core/elements/SlideAttributes.cpp index 8f4e14e09..673ddc3f3 100755 --- a/Sourcecode/private/mx/core/elements/SlideAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/SlideAttributes.cpp @@ -96,7 +96,7 @@ namespace mx } - bool SlideAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SlideAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "SlideAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/SlideAttributes.h b/Sourcecode/private/mx/core/elements/SlideAttributes.h index a730c671d..d6b07f82d 100755 --- a/Sourcecode/private/mx/core/elements/SlideAttributes.h +++ b/Sourcecode/private/mx/core/elements/SlideAttributes.h @@ -65,7 +65,7 @@ namespace mx bool hasLastBeat; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Slur.cpp b/Sourcecode/private/mx/core/elements/Slur.cpp index 2be93230e..b60e1e0d1 100755 --- a/Sourcecode/private/mx/core/elements/Slur.cpp +++ b/Sourcecode/private/mx/core/elements/Slur.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Slur::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Slur::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Slur.h b/Sourcecode/private/mx/core/elements/Slur.h index a33607714..c356bb926 100755 --- a/Sourcecode/private/mx/core/elements/Slur.h +++ b/Sourcecode/private/mx/core/elements/Slur.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const SlurAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: SlurAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/SlurAttributes.cpp b/Sourcecode/private/mx/core/elements/SlurAttributes.cpp index 4e4f723f1..47864ee9b 100755 --- a/Sourcecode/private/mx/core/elements/SlurAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/SlurAttributes.cpp @@ -98,7 +98,7 @@ namespace mx } - bool SlurAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SlurAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "SlurAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/SlurAttributes.h b/Sourcecode/private/mx/core/elements/SlurAttributes.h index fe8da723b..29be72be6 100755 --- a/Sourcecode/private/mx/core/elements/SlurAttributes.h +++ b/Sourcecode/private/mx/core/elements/SlurAttributes.h @@ -89,7 +89,7 @@ namespace mx bool hasColor; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/SnapPizzicato.cpp b/Sourcecode/private/mx/core/elements/SnapPizzicato.cpp index 41848aa89..4988439bf 100755 --- a/Sourcecode/private/mx/core/elements/SnapPizzicato.cpp +++ b/Sourcecode/private/mx/core/elements/SnapPizzicato.cpp @@ -57,7 +57,7 @@ namespace mx } - bool SnapPizzicato::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SnapPizzicato::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/SnapPizzicato.h b/Sourcecode/private/mx/core/elements/SnapPizzicato.h index cbb159ca2..91dbce55d 100755 --- a/Sourcecode/private/mx/core/elements/SnapPizzicato.h +++ b/Sourcecode/private/mx/core/elements/SnapPizzicato.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Software.cpp b/Sourcecode/private/mx/core/elements/Software.cpp index 6c7b8006e..8c3421beb 100755 --- a/Sourcecode/private/mx/core/elements/Software.cpp +++ b/Sourcecode/private/mx/core/elements/Software.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Software::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Software::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Software.h b/Sourcecode/private/mx/core/elements/Software.h index a39a25eac..d5ec11a7d 100755 --- a/Sourcecode/private/mx/core/elements/Software.h +++ b/Sourcecode/private/mx/core/elements/Software.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/Solo.cpp b/Sourcecode/private/mx/core/elements/Solo.cpp index c0a3fef48..f49560a71 100755 --- a/Sourcecode/private/mx/core/elements/Solo.cpp +++ b/Sourcecode/private/mx/core/elements/Solo.cpp @@ -27,7 +27,7 @@ namespace mx } - bool Solo::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Solo::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( xelement ); MX_UNUSED( message ); diff --git a/Sourcecode/private/mx/core/elements/Solo.h b/Sourcecode/private/mx/core/elements/Solo.h index 94acd5666..e9c6118b8 100755 --- a/Sourcecode/private/mx/core/elements/Solo.h +++ b/Sourcecode/private/mx/core/elements/Solo.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/SoloOrEnsembleChoice.h b/Sourcecode/private/mx/core/elements/SoloOrEnsembleChoice.h index 7875ebb47..304edc690 100755 --- a/Sourcecode/private/mx/core/elements/SoloOrEnsembleChoice.h +++ b/Sourcecode/private/mx/core/elements/SoloOrEnsembleChoice.h @@ -51,7 +51,7 @@ namespace mx void setEnsemble( const EnsemblePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/Sound.cpp b/Sourcecode/private/mx/core/elements/Sound.cpp index e724d990f..eedab009a 100755 --- a/Sourcecode/private/mx/core/elements/Sound.cpp +++ b/Sourcecode/private/mx/core/elements/Sound.cpp @@ -175,7 +175,7 @@ namespace mx } - bool Sound::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Sound::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Sound.h b/Sourcecode/private/mx/core/elements/Sound.h index 034dd6664..b901fddfe 100755 --- a/Sourcecode/private/mx/core/elements/Sound.h +++ b/Sourcecode/private/mx/core/elements/Sound.h @@ -57,7 +57,7 @@ namespace mx void setHasPlay( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: SoundAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/SoundAttributes.cpp b/Sourcecode/private/mx/core/elements/SoundAttributes.cpp index 1d572c671..25496d81a 100755 --- a/Sourcecode/private/mx/core/elements/SoundAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/SoundAttributes.cpp @@ -96,7 +96,7 @@ namespace mx } - bool SoundAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SoundAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "SoundAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/SoundAttributes.h b/Sourcecode/private/mx/core/elements/SoundAttributes.h index 2cf53ba50..0afcbce01 100755 --- a/Sourcecode/private/mx/core/elements/SoundAttributes.h +++ b/Sourcecode/private/mx/core/elements/SoundAttributes.h @@ -64,7 +64,7 @@ namespace mx bool hasSostenutoPedal; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/SoundingPitch.cpp b/Sourcecode/private/mx/core/elements/SoundingPitch.cpp index f9ea963ea..c3e86344f 100755 --- a/Sourcecode/private/mx/core/elements/SoundingPitch.cpp +++ b/Sourcecode/private/mx/core/elements/SoundingPitch.cpp @@ -27,7 +27,7 @@ namespace mx } - bool SoundingPitch::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SoundingPitch::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/SoundingPitch.h b/Sourcecode/private/mx/core/elements/SoundingPitch.h index d995892d2..c8d19a372 100755 --- a/Sourcecode/private/mx/core/elements/SoundingPitch.h +++ b/Sourcecode/private/mx/core/elements/SoundingPitch.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Source.cpp b/Sourcecode/private/mx/core/elements/Source.cpp index 5a205947a..68df179e0 100755 --- a/Sourcecode/private/mx/core/elements/Source.cpp +++ b/Sourcecode/private/mx/core/elements/Source.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Source::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Source::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Source.h b/Sourcecode/private/mx/core/elements/Source.h index 82741dced..949b76ab5 100755 --- a/Sourcecode/private/mx/core/elements/Source.h +++ b/Sourcecode/private/mx/core/elements/Source.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/Spiccato.cpp b/Sourcecode/private/mx/core/elements/Spiccato.cpp index d6f134260..b81e1d9e8 100755 --- a/Sourcecode/private/mx/core/elements/Spiccato.cpp +++ b/Sourcecode/private/mx/core/elements/Spiccato.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Spiccato::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Spiccato::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Spiccato.h b/Sourcecode/private/mx/core/elements/Spiccato.h index ae37faf43..eb8fbb457 100755 --- a/Sourcecode/private/mx/core/elements/Spiccato.h +++ b/Sourcecode/private/mx/core/elements/Spiccato.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Staccatissimo.cpp b/Sourcecode/private/mx/core/elements/Staccatissimo.cpp index 54ed2e643..5e7f994bc 100755 --- a/Sourcecode/private/mx/core/elements/Staccatissimo.cpp +++ b/Sourcecode/private/mx/core/elements/Staccatissimo.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Staccatissimo::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Staccatissimo::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Staccatissimo.h b/Sourcecode/private/mx/core/elements/Staccatissimo.h index c3afe542a..9ce7a54cc 100755 --- a/Sourcecode/private/mx/core/elements/Staccatissimo.h +++ b/Sourcecode/private/mx/core/elements/Staccatissimo.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Staccato.cpp b/Sourcecode/private/mx/core/elements/Staccato.cpp index 57c262ea6..58f82be2d 100755 --- a/Sourcecode/private/mx/core/elements/Staccato.cpp +++ b/Sourcecode/private/mx/core/elements/Staccato.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Staccato::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Staccato::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Staccato.h b/Sourcecode/private/mx/core/elements/Staccato.h index 0ed6eb993..238c6abd6 100755 --- a/Sourcecode/private/mx/core/elements/Staccato.h +++ b/Sourcecode/private/mx/core/elements/Staccato.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Staff.cpp b/Sourcecode/private/mx/core/elements/Staff.cpp index 78e629d94..fe045eccb 100755 --- a/Sourcecode/private/mx/core/elements/Staff.cpp +++ b/Sourcecode/private/mx/core/elements/Staff.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Staff::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Staff::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Staff.h b/Sourcecode/private/mx/core/elements/Staff.h index 138242dd9..66479e044 100755 --- a/Sourcecode/private/mx/core/elements/Staff.h +++ b/Sourcecode/private/mx/core/elements/Staff.h @@ -38,7 +38,7 @@ namespace mx void setValue( const PositiveInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PositiveInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/StaffDetails.cpp b/Sourcecode/private/mx/core/elements/StaffDetails.cpp index 744489998..c0f9624e7 100755 --- a/Sourcecode/private/mx/core/elements/StaffDetails.cpp +++ b/Sourcecode/private/mx/core/elements/StaffDetails.cpp @@ -251,7 +251,7 @@ namespace mx } - bool StaffDetails::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StaffDetails::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/StaffDetails.h b/Sourcecode/private/mx/core/elements/StaffDetails.h index 7165142cf..ec60545b4 100755 --- a/Sourcecode/private/mx/core/elements/StaffDetails.h +++ b/Sourcecode/private/mx/core/elements/StaffDetails.h @@ -73,7 +73,7 @@ namespace mx void setHasStaffSize( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StaffDetailsAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/StaffDetailsAttributes.cpp b/Sourcecode/private/mx/core/elements/StaffDetailsAttributes.cpp index e2bbd1794..d7b215dce 100755 --- a/Sourcecode/private/mx/core/elements/StaffDetailsAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/StaffDetailsAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool StaffDetailsAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StaffDetailsAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "StaffDetailsAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/StaffDetailsAttributes.h b/Sourcecode/private/mx/core/elements/StaffDetailsAttributes.h index a9699e6dd..2fee30e3e 100755 --- a/Sourcecode/private/mx/core/elements/StaffDetailsAttributes.h +++ b/Sourcecode/private/mx/core/elements/StaffDetailsAttributes.h @@ -36,7 +36,7 @@ namespace mx bool hasPrintSpacing; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/StaffDistance.cpp b/Sourcecode/private/mx/core/elements/StaffDistance.cpp index 31ca3808f..c23d022f1 100755 --- a/Sourcecode/private/mx/core/elements/StaffDistance.cpp +++ b/Sourcecode/private/mx/core/elements/StaffDistance.cpp @@ -66,7 +66,7 @@ namespace mx } - bool StaffDistance::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StaffDistance::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/StaffDistance.h b/Sourcecode/private/mx/core/elements/StaffDistance.h index 95cd6286f..11af07bb1 100755 --- a/Sourcecode/private/mx/core/elements/StaffDistance.h +++ b/Sourcecode/private/mx/core/elements/StaffDistance.h @@ -38,7 +38,7 @@ namespace mx void setValue( const TenthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TenthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/StaffLayout.cpp b/Sourcecode/private/mx/core/elements/StaffLayout.cpp index 378b0d7a0..1b7fd99d4 100755 --- a/Sourcecode/private/mx/core/elements/StaffLayout.cpp +++ b/Sourcecode/private/mx/core/elements/StaffLayout.cpp @@ -101,7 +101,7 @@ namespace mx } - bool StaffLayout::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StaffLayout::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/StaffLayout.h b/Sourcecode/private/mx/core/elements/StaffLayout.h index 644eef9dd..c03995394 100755 --- a/Sourcecode/private/mx/core/elements/StaffLayout.h +++ b/Sourcecode/private/mx/core/elements/StaffLayout.h @@ -43,7 +43,7 @@ namespace mx void setHasStaffDistance( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StaffLayoutAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/StaffLayoutAttributes.cpp b/Sourcecode/private/mx/core/elements/StaffLayoutAttributes.cpp index 6c527e94c..2b40aea8a 100755 --- a/Sourcecode/private/mx/core/elements/StaffLayoutAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/StaffLayoutAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool StaffLayoutAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StaffLayoutAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "StaffLayoutAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/StaffLayoutAttributes.h b/Sourcecode/private/mx/core/elements/StaffLayoutAttributes.h index c01997797..f291be90f 100755 --- a/Sourcecode/private/mx/core/elements/StaffLayoutAttributes.h +++ b/Sourcecode/private/mx/core/elements/StaffLayoutAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasNumber; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/StaffLines.cpp b/Sourcecode/private/mx/core/elements/StaffLines.cpp index 5fcb2d67d..253276a1d 100755 --- a/Sourcecode/private/mx/core/elements/StaffLines.cpp +++ b/Sourcecode/private/mx/core/elements/StaffLines.cpp @@ -66,7 +66,7 @@ namespace mx } - bool StaffLines::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StaffLines::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/StaffLines.h b/Sourcecode/private/mx/core/elements/StaffLines.h index 9e45be42d..611f6b2c8 100755 --- a/Sourcecode/private/mx/core/elements/StaffLines.h +++ b/Sourcecode/private/mx/core/elements/StaffLines.h @@ -38,7 +38,7 @@ namespace mx void setValue( const NonNegativeInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NonNegativeInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/StaffSize.cpp b/Sourcecode/private/mx/core/elements/StaffSize.cpp index a48e9f18b..64e39ca15 100755 --- a/Sourcecode/private/mx/core/elements/StaffSize.cpp +++ b/Sourcecode/private/mx/core/elements/StaffSize.cpp @@ -66,7 +66,7 @@ namespace mx } - bool StaffSize::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StaffSize::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/StaffSize.h b/Sourcecode/private/mx/core/elements/StaffSize.h index af5636c52..bcb6f9848 100755 --- a/Sourcecode/private/mx/core/elements/StaffSize.h +++ b/Sourcecode/private/mx/core/elements/StaffSize.h @@ -38,7 +38,7 @@ namespace mx void setValue( const NonNegativeDecimal& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NonNegativeDecimal myValue; diff --git a/Sourcecode/private/mx/core/elements/StaffTuning.cpp b/Sourcecode/private/mx/core/elements/StaffTuning.cpp index cc0c3d6bc..964eec492 100755 --- a/Sourcecode/private/mx/core/elements/StaffTuning.cpp +++ b/Sourcecode/private/mx/core/elements/StaffTuning.cpp @@ -136,7 +136,7 @@ namespace mx } - bool StaffTuning::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StaffTuning::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/StaffTuning.h b/Sourcecode/private/mx/core/elements/StaffTuning.h index b46a3a5fc..509a0bd6f 100755 --- a/Sourcecode/private/mx/core/elements/StaffTuning.h +++ b/Sourcecode/private/mx/core/elements/StaffTuning.h @@ -53,7 +53,7 @@ namespace mx void setTuningOctave( const TuningOctavePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StaffTuningAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/StaffTuningAttributes.cpp b/Sourcecode/private/mx/core/elements/StaffTuningAttributes.cpp index 702d98494..eab65f7af 100755 --- a/Sourcecode/private/mx/core/elements/StaffTuningAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/StaffTuningAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool StaffTuningAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StaffTuningAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "StaffTuningAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/StaffTuningAttributes.h b/Sourcecode/private/mx/core/elements/StaffTuningAttributes.h index 36d758871..1225dbea0 100755 --- a/Sourcecode/private/mx/core/elements/StaffTuningAttributes.h +++ b/Sourcecode/private/mx/core/elements/StaffTuningAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasLine; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/StaffType.cpp b/Sourcecode/private/mx/core/elements/StaffType.cpp index ad06a5346..d01175555 100755 --- a/Sourcecode/private/mx/core/elements/StaffType.cpp +++ b/Sourcecode/private/mx/core/elements/StaffType.cpp @@ -66,7 +66,7 @@ namespace mx } - bool StaffType::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StaffType::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/StaffType.h b/Sourcecode/private/mx/core/elements/StaffType.h index 3be53c177..3179a478d 100755 --- a/Sourcecode/private/mx/core/elements/StaffType.h +++ b/Sourcecode/private/mx/core/elements/StaffType.h @@ -38,7 +38,7 @@ namespace mx void setValue( const StaffTypeEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StaffTypeEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/Staves.cpp b/Sourcecode/private/mx/core/elements/Staves.cpp index d72e4ab27..b03d79ec8 100755 --- a/Sourcecode/private/mx/core/elements/Staves.cpp +++ b/Sourcecode/private/mx/core/elements/Staves.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Staves::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Staves::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Staves.h b/Sourcecode/private/mx/core/elements/Staves.h index 9c1899c3f..8ede1bbe5 100755 --- a/Sourcecode/private/mx/core/elements/Staves.h +++ b/Sourcecode/private/mx/core/elements/Staves.h @@ -38,7 +38,7 @@ namespace mx void setValue( const NonNegativeInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NonNegativeInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/Stem.cpp b/Sourcecode/private/mx/core/elements/Stem.cpp index deb56ccdd..9722fbf7e 100755 --- a/Sourcecode/private/mx/core/elements/Stem.cpp +++ b/Sourcecode/private/mx/core/elements/Stem.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Stem::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Stem::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Stem.h b/Sourcecode/private/mx/core/elements/Stem.h index 09e3c4199..0dfe17f39 100755 --- a/Sourcecode/private/mx/core/elements/Stem.h +++ b/Sourcecode/private/mx/core/elements/Stem.h @@ -42,7 +42,7 @@ namespace mx void setValue( const StemValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StemValue myValue; diff --git a/Sourcecode/private/mx/core/elements/StemAttributes.cpp b/Sourcecode/private/mx/core/elements/StemAttributes.cpp index ed26f36e7..4e3df15b1 100755 --- a/Sourcecode/private/mx/core/elements/StemAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/StemAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool StemAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StemAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "StemAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/StemAttributes.h b/Sourcecode/private/mx/core/elements/StemAttributes.h index 26d7dc839..586b89c05 100755 --- a/Sourcecode/private/mx/core/elements/StemAttributes.h +++ b/Sourcecode/private/mx/core/elements/StemAttributes.h @@ -35,7 +35,7 @@ namespace mx bool hasRelativeY; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Step.cpp b/Sourcecode/private/mx/core/elements/Step.cpp index 86d9ecd63..5fcadedfd 100755 --- a/Sourcecode/private/mx/core/elements/Step.cpp +++ b/Sourcecode/private/mx/core/elements/Step.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Step::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Step::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseStepEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/Step.h b/Sourcecode/private/mx/core/elements/Step.h index f387ba220..1628511f1 100755 --- a/Sourcecode/private/mx/core/elements/Step.h +++ b/Sourcecode/private/mx/core/elements/Step.h @@ -38,7 +38,7 @@ namespace mx void setValue( const StepEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StepEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/Stick.cpp b/Sourcecode/private/mx/core/elements/Stick.cpp index 75b1e1b3b..f6c6dc5a2 100755 --- a/Sourcecode/private/mx/core/elements/Stick.cpp +++ b/Sourcecode/private/mx/core/elements/Stick.cpp @@ -101,7 +101,7 @@ namespace mx } - bool Stick::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Stick::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Stick.h b/Sourcecode/private/mx/core/elements/Stick.h index 7d0d86eea..2d01441da 100755 --- a/Sourcecode/private/mx/core/elements/Stick.h +++ b/Sourcecode/private/mx/core/elements/Stick.h @@ -46,7 +46,7 @@ namespace mx void setStickMaterial( const StickMaterialPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StickAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/StickAttributes.cpp b/Sourcecode/private/mx/core/elements/StickAttributes.cpp index 68f98ac2c..6361b39bc 100755 --- a/Sourcecode/private/mx/core/elements/StickAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/StickAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool StickAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StickAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "StickAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/StickAttributes.h b/Sourcecode/private/mx/core/elements/StickAttributes.h index bb9d2e1be..4cbc6c34f 100755 --- a/Sourcecode/private/mx/core/elements/StickAttributes.h +++ b/Sourcecode/private/mx/core/elements/StickAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasTip; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/StickLocation.cpp b/Sourcecode/private/mx/core/elements/StickLocation.cpp index d50ce5a6f..a46c7a26a 100755 --- a/Sourcecode/private/mx/core/elements/StickLocation.cpp +++ b/Sourcecode/private/mx/core/elements/StickLocation.cpp @@ -66,7 +66,7 @@ namespace mx } - bool StickLocation::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StickLocation::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseStickLocationEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/StickLocation.h b/Sourcecode/private/mx/core/elements/StickLocation.h index 2d95d4930..138a493b0 100755 --- a/Sourcecode/private/mx/core/elements/StickLocation.h +++ b/Sourcecode/private/mx/core/elements/StickLocation.h @@ -38,7 +38,7 @@ namespace mx void setValue( const StickLocationEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StickLocationEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/StickMaterial.cpp b/Sourcecode/private/mx/core/elements/StickMaterial.cpp index fb3787d4d..bdc48984a 100755 --- a/Sourcecode/private/mx/core/elements/StickMaterial.cpp +++ b/Sourcecode/private/mx/core/elements/StickMaterial.cpp @@ -66,7 +66,7 @@ namespace mx } - bool StickMaterial::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StickMaterial::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseStickMaterialEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/StickMaterial.h b/Sourcecode/private/mx/core/elements/StickMaterial.h index 8fc69a032..35c3acb33 100755 --- a/Sourcecode/private/mx/core/elements/StickMaterial.h +++ b/Sourcecode/private/mx/core/elements/StickMaterial.h @@ -38,7 +38,7 @@ namespace mx void setValue( const StickMaterialEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StickMaterialEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/StickType.cpp b/Sourcecode/private/mx/core/elements/StickType.cpp index 8087dbff3..4491855dd 100755 --- a/Sourcecode/private/mx/core/elements/StickType.cpp +++ b/Sourcecode/private/mx/core/elements/StickType.cpp @@ -66,7 +66,7 @@ namespace mx } - bool StickType::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StickType::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseStickTypeEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/StickType.h b/Sourcecode/private/mx/core/elements/StickType.h index 5c100bb0d..ad8c69140 100755 --- a/Sourcecode/private/mx/core/elements/StickType.h +++ b/Sourcecode/private/mx/core/elements/StickType.h @@ -38,7 +38,7 @@ namespace mx void setValue( const StickTypeEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StickTypeEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/Stopped.cpp b/Sourcecode/private/mx/core/elements/Stopped.cpp index fcf3e0d34..7d755e244 100755 --- a/Sourcecode/private/mx/core/elements/Stopped.cpp +++ b/Sourcecode/private/mx/core/elements/Stopped.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Stopped::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Stopped::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Stopped.h b/Sourcecode/private/mx/core/elements/Stopped.h index 78cbd9ff8..361f92a39 100755 --- a/Sourcecode/private/mx/core/elements/Stopped.h +++ b/Sourcecode/private/mx/core/elements/Stopped.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Stress.cpp b/Sourcecode/private/mx/core/elements/Stress.cpp index 806c9ea07..0c813af15 100755 --- a/Sourcecode/private/mx/core/elements/Stress.cpp +++ b/Sourcecode/private/mx/core/elements/Stress.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Stress::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Stress::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Stress.h b/Sourcecode/private/mx/core/elements/Stress.h index c8d677b09..e8534582e 100755 --- a/Sourcecode/private/mx/core/elements/Stress.h +++ b/Sourcecode/private/mx/core/elements/Stress.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/String.cpp b/Sourcecode/private/mx/core/elements/String.cpp index 49c342ee3..f9c14a04e 100755 --- a/Sourcecode/private/mx/core/elements/String.cpp +++ b/Sourcecode/private/mx/core/elements/String.cpp @@ -87,7 +87,7 @@ namespace mx } - bool String::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool String::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/String.h b/Sourcecode/private/mx/core/elements/String.h index b19d75307..f8be3c7d9 100755 --- a/Sourcecode/private/mx/core/elements/String.h +++ b/Sourcecode/private/mx/core/elements/String.h @@ -43,7 +43,7 @@ namespace mx void setValue( const StringNumber& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StringAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/StringAttributes.cpp b/Sourcecode/private/mx/core/elements/StringAttributes.cpp index 138239c12..ead8b8bfe 100755 --- a/Sourcecode/private/mx/core/elements/StringAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/StringAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool StringAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StringAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "StringAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/StringAttributes.h b/Sourcecode/private/mx/core/elements/StringAttributes.h index 08c9417d0..099e65820 100755 --- a/Sourcecode/private/mx/core/elements/StringAttributes.h +++ b/Sourcecode/private/mx/core/elements/StringAttributes.h @@ -51,7 +51,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/StringMute.cpp b/Sourcecode/private/mx/core/elements/StringMute.cpp index 501e8291d..0d2e8c716 100755 --- a/Sourcecode/private/mx/core/elements/StringMute.cpp +++ b/Sourcecode/private/mx/core/elements/StringMute.cpp @@ -57,7 +57,7 @@ namespace mx } - bool StringMute::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StringMute::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/StringMute.h b/Sourcecode/private/mx/core/elements/StringMute.h index 23e0360d6..f7acec20b 100755 --- a/Sourcecode/private/mx/core/elements/StringMute.h +++ b/Sourcecode/private/mx/core/elements/StringMute.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const StringMuteAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StringMuteAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/StringMuteAttributes.cpp b/Sourcecode/private/mx/core/elements/StringMuteAttributes.cpp index 77f5a70de..33434f8ba 100755 --- a/Sourcecode/private/mx/core/elements/StringMuteAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/StringMuteAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool StringMuteAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StringMuteAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "StringMuteAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/StringMuteAttributes.h b/Sourcecode/private/mx/core/elements/StringMuteAttributes.h index 9b558b564..3ef6e9df5 100755 --- a/Sourcecode/private/mx/core/elements/StringMuteAttributes.h +++ b/Sourcecode/private/mx/core/elements/StringMuteAttributes.h @@ -50,7 +50,7 @@ namespace mx bool hasHalign; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/StrongAccent.cpp b/Sourcecode/private/mx/core/elements/StrongAccent.cpp index 43f6321ca..7c581f891 100755 --- a/Sourcecode/private/mx/core/elements/StrongAccent.cpp +++ b/Sourcecode/private/mx/core/elements/StrongAccent.cpp @@ -63,7 +63,7 @@ namespace mx } - bool StrongAccent::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StrongAccent::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/StrongAccent.h b/Sourcecode/private/mx/core/elements/StrongAccent.h index 23e005a76..bdf9d0785 100755 --- a/Sourcecode/private/mx/core/elements/StrongAccent.h +++ b/Sourcecode/private/mx/core/elements/StrongAccent.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const StrongAccentAttributesPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StrongAccentAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/StrongAccentAttributes.cpp b/Sourcecode/private/mx/core/elements/StrongAccentAttributes.cpp index 3414c34e4..c6230e564 100755 --- a/Sourcecode/private/mx/core/elements/StrongAccentAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/StrongAccentAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool StrongAccentAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool StrongAccentAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "StrongAccentAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/StrongAccentAttributes.h b/Sourcecode/private/mx/core/elements/StrongAccentAttributes.h index 928db0db2..d11aeb883 100755 --- a/Sourcecode/private/mx/core/elements/StrongAccentAttributes.h +++ b/Sourcecode/private/mx/core/elements/StrongAccentAttributes.h @@ -53,7 +53,7 @@ namespace mx bool hasType; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Suffix.cpp b/Sourcecode/private/mx/core/elements/Suffix.cpp index d51b5460c..ef16e6a94 100755 --- a/Sourcecode/private/mx/core/elements/Suffix.cpp +++ b/Sourcecode/private/mx/core/elements/Suffix.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Suffix::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Suffix::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Suffix.h b/Sourcecode/private/mx/core/elements/Suffix.h index 596479aa0..102e3530a 100755 --- a/Sourcecode/private/mx/core/elements/Suffix.h +++ b/Sourcecode/private/mx/core/elements/Suffix.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/SuffixAttributes.cpp b/Sourcecode/private/mx/core/elements/SuffixAttributes.cpp index da727c6d2..02ac2a1e9 100755 --- a/Sourcecode/private/mx/core/elements/SuffixAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/SuffixAttributes.cpp @@ -60,7 +60,7 @@ namespace mx } - bool SuffixAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SuffixAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "SuffixAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/SuffixAttributes.h b/Sourcecode/private/mx/core/elements/SuffixAttributes.h index 6edc6c707..d8d5256ea 100755 --- a/Sourcecode/private/mx/core/elements/SuffixAttributes.h +++ b/Sourcecode/private/mx/core/elements/SuffixAttributes.h @@ -46,7 +46,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Supports.cpp b/Sourcecode/private/mx/core/elements/Supports.cpp index 4f9ff53b0..86b56b9d7 100755 --- a/Sourcecode/private/mx/core/elements/Supports.cpp +++ b/Sourcecode/private/mx/core/elements/Supports.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Supports::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Supports::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Supports.h b/Sourcecode/private/mx/core/elements/Supports.h index 32030c742..bdacda54c 100755 --- a/Sourcecode/private/mx/core/elements/Supports.h +++ b/Sourcecode/private/mx/core/elements/Supports.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const SupportsAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: SupportsAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/SupportsAttributes.cpp b/Sourcecode/private/mx/core/elements/SupportsAttributes.cpp index cd54b3b01..c3b7dbda0 100755 --- a/Sourcecode/private/mx/core/elements/SupportsAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/SupportsAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool SupportsAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SupportsAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "SupportsAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/SupportsAttributes.h b/Sourcecode/private/mx/core/elements/SupportsAttributes.h index 194823097..7dcf9b6fd 100755 --- a/Sourcecode/private/mx/core/elements/SupportsAttributes.h +++ b/Sourcecode/private/mx/core/elements/SupportsAttributes.h @@ -36,7 +36,7 @@ namespace mx bool hasValue; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Syllabic.cpp b/Sourcecode/private/mx/core/elements/Syllabic.cpp index 7d907eca8..c0cbf2802 100755 --- a/Sourcecode/private/mx/core/elements/Syllabic.cpp +++ b/Sourcecode/private/mx/core/elements/Syllabic.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Syllabic::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Syllabic::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Syllabic.h b/Sourcecode/private/mx/core/elements/Syllabic.h index 6e25be731..de8846ee8 100755 --- a/Sourcecode/private/mx/core/elements/Syllabic.h +++ b/Sourcecode/private/mx/core/elements/Syllabic.h @@ -38,7 +38,7 @@ namespace mx void setValue( const SyllabicEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: SyllabicEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/SyllabicTextGroup.h b/Sourcecode/private/mx/core/elements/SyllabicTextGroup.h index a3127dc0e..0498c151a 100755 --- a/Sourcecode/private/mx/core/elements/SyllabicTextGroup.h +++ b/Sourcecode/private/mx/core/elements/SyllabicTextGroup.h @@ -59,7 +59,7 @@ namespace mx void setHasExtend( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: SyllabicPtr mySyllabic; diff --git a/Sourcecode/private/mx/core/elements/SystemDistance.cpp b/Sourcecode/private/mx/core/elements/SystemDistance.cpp index 392ef5cb5..c9dffd4bd 100755 --- a/Sourcecode/private/mx/core/elements/SystemDistance.cpp +++ b/Sourcecode/private/mx/core/elements/SystemDistance.cpp @@ -66,7 +66,7 @@ namespace mx } - bool SystemDistance::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SystemDistance::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/SystemDistance.h b/Sourcecode/private/mx/core/elements/SystemDistance.h index b19153a55..6937b0c8e 100755 --- a/Sourcecode/private/mx/core/elements/SystemDistance.h +++ b/Sourcecode/private/mx/core/elements/SystemDistance.h @@ -38,7 +38,7 @@ namespace mx void setValue( const TenthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TenthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/SystemDividers.cpp b/Sourcecode/private/mx/core/elements/SystemDividers.cpp index bbb632820..1b897443b 100755 --- a/Sourcecode/private/mx/core/elements/SystemDividers.cpp +++ b/Sourcecode/private/mx/core/elements/SystemDividers.cpp @@ -85,7 +85,7 @@ namespace mx } - bool SystemDividers::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SystemDividers::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isLeftDividerFound = false; diff --git a/Sourcecode/private/mx/core/elements/SystemDividers.h b/Sourcecode/private/mx/core/elements/SystemDividers.h index 9432c5603..f4714b0dc 100755 --- a/Sourcecode/private/mx/core/elements/SystemDividers.h +++ b/Sourcecode/private/mx/core/elements/SystemDividers.h @@ -42,7 +42,7 @@ namespace mx void setRightDivider( const RightDividerPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: LeftDividerPtr myLeftDivider; diff --git a/Sourcecode/private/mx/core/elements/SystemLayout.cpp b/Sourcecode/private/mx/core/elements/SystemLayout.cpp index 0a73dedbd..4ab47d38e 100755 --- a/Sourcecode/private/mx/core/elements/SystemLayout.cpp +++ b/Sourcecode/private/mx/core/elements/SystemLayout.cpp @@ -193,7 +193,7 @@ namespace mx } - bool SystemLayout::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SystemLayout::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/SystemLayout.h b/Sourcecode/private/mx/core/elements/SystemLayout.h index 7eeb5fa4e..03142f35e 100755 --- a/Sourcecode/private/mx/core/elements/SystemLayout.h +++ b/Sourcecode/private/mx/core/elements/SystemLayout.h @@ -58,7 +58,7 @@ namespace mx void setHasSystemDividers( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: SystemMarginsPtr mySystemMargins; diff --git a/Sourcecode/private/mx/core/elements/SystemMargins.cpp b/Sourcecode/private/mx/core/elements/SystemMargins.cpp index a6cb53b67..2bd3c8243 100755 --- a/Sourcecode/private/mx/core/elements/SystemMargins.cpp +++ b/Sourcecode/private/mx/core/elements/SystemMargins.cpp @@ -85,7 +85,7 @@ namespace mx } - bool SystemMargins::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool SystemMargins::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isLeftMarginFound = false; diff --git a/Sourcecode/private/mx/core/elements/SystemMargins.h b/Sourcecode/private/mx/core/elements/SystemMargins.h index 3ab80c718..d84dbbeb8 100755 --- a/Sourcecode/private/mx/core/elements/SystemMargins.h +++ b/Sourcecode/private/mx/core/elements/SystemMargins.h @@ -42,7 +42,7 @@ namespace mx void setRightMargin( const RightMarginPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: LeftMarginPtr myLeftMargin; diff --git a/Sourcecode/private/mx/core/elements/Tap.cpp b/Sourcecode/private/mx/core/elements/Tap.cpp index 7526931e5..a4dedf9bf 100755 --- a/Sourcecode/private/mx/core/elements/Tap.cpp +++ b/Sourcecode/private/mx/core/elements/Tap.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Tap::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Tap::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Tap.h b/Sourcecode/private/mx/core/elements/Tap.h index 4936d1882..cb6e9bfde 100755 --- a/Sourcecode/private/mx/core/elements/Tap.h +++ b/Sourcecode/private/mx/core/elements/Tap.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/TapAttributes.cpp b/Sourcecode/private/mx/core/elements/TapAttributes.cpp index 83d6738b6..1ad885e79 100755 --- a/Sourcecode/private/mx/core/elements/TapAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/TapAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool TapAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TapAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "TapAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TapAttributes.h b/Sourcecode/private/mx/core/elements/TapAttributes.h index 53131baa3..20058bc5f 100755 --- a/Sourcecode/private/mx/core/elements/TapAttributes.h +++ b/Sourcecode/private/mx/core/elements/TapAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Technical.cpp b/Sourcecode/private/mx/core/elements/Technical.cpp index c729d8e8d..beeebb508 100755 --- a/Sourcecode/private/mx/core/elements/Technical.cpp +++ b/Sourcecode/private/mx/core/elements/Technical.cpp @@ -124,10 +124,10 @@ namespace mx } - bool Technical::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Technical::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; - xml::XElementIterator end = xelement.end(); + ::ezxml::XElementIterator end = xelement.end(); for( auto it = xelement.begin(); it != end; ++it ) { diff --git a/Sourcecode/private/mx/core/elements/Technical.h b/Sourcecode/private/mx/core/elements/Technical.h index b4501a378..50e7fa06c 100755 --- a/Sourcecode/private/mx/core/elements/Technical.h +++ b/Sourcecode/private/mx/core/elements/Technical.h @@ -40,7 +40,7 @@ namespace mx TechnicalChoicePtr getTechnicalChoice( const TechnicalChoiceSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TechnicalChoiceSet myTechnicalChoiceSet; diff --git a/Sourcecode/private/mx/core/elements/TechnicalChoice.h b/Sourcecode/private/mx/core/elements/TechnicalChoice.h index ee41c2862..df45d47cc 100755 --- a/Sourcecode/private/mx/core/elements/TechnicalChoice.h +++ b/Sourcecode/private/mx/core/elements/TechnicalChoice.h @@ -183,7 +183,7 @@ namespace mx void setOtherTechnical( const OtherTechnicalPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/Tenths.cpp b/Sourcecode/private/mx/core/elements/Tenths.cpp index 843bed140..3c648e063 100755 --- a/Sourcecode/private/mx/core/elements/Tenths.cpp +++ b/Sourcecode/private/mx/core/elements/Tenths.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Tenths::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Tenths::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Tenths.h b/Sourcecode/private/mx/core/elements/Tenths.h index a5fa6510a..8fbdba281 100755 --- a/Sourcecode/private/mx/core/elements/Tenths.h +++ b/Sourcecode/private/mx/core/elements/Tenths.h @@ -38,7 +38,7 @@ namespace mx void setValue( const TenthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TenthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/Tenuto.cpp b/Sourcecode/private/mx/core/elements/Tenuto.cpp index 6228cb763..e1f281e20 100755 --- a/Sourcecode/private/mx/core/elements/Tenuto.cpp +++ b/Sourcecode/private/mx/core/elements/Tenuto.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Tenuto::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Tenuto::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Tenuto.h b/Sourcecode/private/mx/core/elements/Tenuto.h index 64aed4517..bc8481eea 100755 --- a/Sourcecode/private/mx/core/elements/Tenuto.h +++ b/Sourcecode/private/mx/core/elements/Tenuto.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Text.cpp b/Sourcecode/private/mx/core/elements/Text.cpp index b08a12d40..40a2f92fb 100755 --- a/Sourcecode/private/mx/core/elements/Text.cpp +++ b/Sourcecode/private/mx/core/elements/Text.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Text::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Text::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Text.h b/Sourcecode/private/mx/core/elements/Text.h index 31b542e06..59e6bc2f7 100755 --- a/Sourcecode/private/mx/core/elements/Text.h +++ b/Sourcecode/private/mx/core/elements/Text.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/TextAttributes.cpp b/Sourcecode/private/mx/core/elements/TextAttributes.cpp index 556ba97f7..530da0831 100755 --- a/Sourcecode/private/mx/core/elements/TextAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/TextAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool TextAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TextAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "TextAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TextAttributes.h b/Sourcecode/private/mx/core/elements/TextAttributes.h index fc0206ba8..707b99b62 100755 --- a/Sourcecode/private/mx/core/elements/TextAttributes.h +++ b/Sourcecode/private/mx/core/elements/TextAttributes.h @@ -52,7 +52,7 @@ namespace mx bool hasLang; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/ThumbPosition.cpp b/Sourcecode/private/mx/core/elements/ThumbPosition.cpp index acc5d5239..a6b7886b0 100755 --- a/Sourcecode/private/mx/core/elements/ThumbPosition.cpp +++ b/Sourcecode/private/mx/core/elements/ThumbPosition.cpp @@ -57,7 +57,7 @@ namespace mx } - bool ThumbPosition::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ThumbPosition::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/ThumbPosition.h b/Sourcecode/private/mx/core/elements/ThumbPosition.h index 51d7c3019..c1475e3ab 100755 --- a/Sourcecode/private/mx/core/elements/ThumbPosition.h +++ b/Sourcecode/private/mx/core/elements/ThumbPosition.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Tie.cpp b/Sourcecode/private/mx/core/elements/Tie.cpp index fbb210f71..a1385ace3 100755 --- a/Sourcecode/private/mx/core/elements/Tie.cpp +++ b/Sourcecode/private/mx/core/elements/Tie.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Tie::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Tie::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Tie.h b/Sourcecode/private/mx/core/elements/Tie.h index 0b2dd12a9..bd649587c 100755 --- a/Sourcecode/private/mx/core/elements/Tie.h +++ b/Sourcecode/private/mx/core/elements/Tie.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const TieAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TieAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/TieAttributes.cpp b/Sourcecode/private/mx/core/elements/TieAttributes.cpp index 46965d365..faf812469 100755 --- a/Sourcecode/private/mx/core/elements/TieAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/TieAttributes.cpp @@ -36,7 +36,7 @@ namespace mx } - bool TieAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TieAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "TieAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TieAttributes.h b/Sourcecode/private/mx/core/elements/TieAttributes.h index 4ba471cff..7f1768402 100755 --- a/Sourcecode/private/mx/core/elements/TieAttributes.h +++ b/Sourcecode/private/mx/core/elements/TieAttributes.h @@ -32,7 +32,7 @@ namespace mx bool hasTimeOnly; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Tied.cpp b/Sourcecode/private/mx/core/elements/Tied.cpp index 7ac05a25c..dce63994e 100755 --- a/Sourcecode/private/mx/core/elements/Tied.cpp +++ b/Sourcecode/private/mx/core/elements/Tied.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Tied::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Tied::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Tied.h b/Sourcecode/private/mx/core/elements/Tied.h index 2ad89d65e..9d785c3a0 100755 --- a/Sourcecode/private/mx/core/elements/Tied.h +++ b/Sourcecode/private/mx/core/elements/Tied.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const TiedAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TiedAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/TiedAttributes.cpp b/Sourcecode/private/mx/core/elements/TiedAttributes.cpp index 090c26565..abd228bc4 100755 --- a/Sourcecode/private/mx/core/elements/TiedAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/TiedAttributes.cpp @@ -100,7 +100,7 @@ namespace mx } - bool TiedAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TiedAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "TiedAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TiedAttributes.h b/Sourcecode/private/mx/core/elements/TiedAttributes.h index 473b4329e..e1d31edcc 100755 --- a/Sourcecode/private/mx/core/elements/TiedAttributes.h +++ b/Sourcecode/private/mx/core/elements/TiedAttributes.h @@ -66,7 +66,7 @@ namespace mx bool hasColor; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Time.cpp b/Sourcecode/private/mx/core/elements/Time.cpp index 6396abb7c..ebb7e625d 100755 --- a/Sourcecode/private/mx/core/elements/Time.cpp +++ b/Sourcecode/private/mx/core/elements/Time.cpp @@ -81,7 +81,7 @@ namespace mx } - bool Time::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Time::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Time.h b/Sourcecode/private/mx/core/elements/Time.h index d135f79f1..f951f6758 100755 --- a/Sourcecode/private/mx/core/elements/Time.h +++ b/Sourcecode/private/mx/core/elements/Time.h @@ -39,7 +39,7 @@ namespace mx void setTimeChoice( const TimeChoicePtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TimeAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/TimeAttributes.cpp b/Sourcecode/private/mx/core/elements/TimeAttributes.cpp index dd978cbb4..0f5a3049f 100755 --- a/Sourcecode/private/mx/core/elements/TimeAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/TimeAttributes.cpp @@ -88,7 +88,7 @@ namespace mx } - bool TimeAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TimeAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "TimeAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TimeAttributes.h b/Sourcecode/private/mx/core/elements/TimeAttributes.h index ae3ab3102..da1ee3363 100755 --- a/Sourcecode/private/mx/core/elements/TimeAttributes.h +++ b/Sourcecode/private/mx/core/elements/TimeAttributes.h @@ -62,7 +62,7 @@ namespace mx bool hasPrintObject; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/TimeChoice.h b/Sourcecode/private/mx/core/elements/TimeChoice.h index f08ad89f0..aee7271ba 100755 --- a/Sourcecode/private/mx/core/elements/TimeChoice.h +++ b/Sourcecode/private/mx/core/elements/TimeChoice.h @@ -52,7 +52,7 @@ namespace mx void setSenzaMisura( const SenzaMisuraPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Choice myChoice; diff --git a/Sourcecode/private/mx/core/elements/TimeModification.cpp b/Sourcecode/private/mx/core/elements/TimeModification.cpp index e2d2f7836..54c277a06 100755 --- a/Sourcecode/private/mx/core/elements/TimeModification.cpp +++ b/Sourcecode/private/mx/core/elements/TimeModification.cpp @@ -122,7 +122,7 @@ namespace mx } - bool TimeModification::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TimeModification::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isActualNotesFound = false; diff --git a/Sourcecode/private/mx/core/elements/TimeModification.h b/Sourcecode/private/mx/core/elements/TimeModification.h index 53cf4879e..19e048375 100755 --- a/Sourcecode/private/mx/core/elements/TimeModification.h +++ b/Sourcecode/private/mx/core/elements/TimeModification.h @@ -49,7 +49,7 @@ namespace mx void setHasNormalTypeNormalDotGroup( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ActualNotesPtr myActualNotes; diff --git a/Sourcecode/private/mx/core/elements/TimeModificationNormalTypeNormalDot.cpp b/Sourcecode/private/mx/core/elements/TimeModificationNormalTypeNormalDot.cpp index b15bae251..707335faf 100755 --- a/Sourcecode/private/mx/core/elements/TimeModificationNormalTypeNormalDot.cpp +++ b/Sourcecode/private/mx/core/elements/TimeModificationNormalTypeNormalDot.cpp @@ -110,7 +110,7 @@ namespace mx } - bool TimeModificationNormalTypeNormalDot::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TimeModificationNormalTypeNormalDot::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isNormalTypeFound = false; diff --git a/Sourcecode/private/mx/core/elements/TimeModificationNormalTypeNormalDot.h b/Sourcecode/private/mx/core/elements/TimeModificationNormalTypeNormalDot.h index 0783cb511..afa40baae 100755 --- a/Sourcecode/private/mx/core/elements/TimeModificationNormalTypeNormalDot.h +++ b/Sourcecode/private/mx/core/elements/TimeModificationNormalTypeNormalDot.h @@ -45,7 +45,7 @@ namespace mx NormalDotPtr getNormalDot( const NormalDotSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NormalTypePtr myNormalType; diff --git a/Sourcecode/private/mx/core/elements/TimeRelation.cpp b/Sourcecode/private/mx/core/elements/TimeRelation.cpp index ebe66876e..70c40d372 100755 --- a/Sourcecode/private/mx/core/elements/TimeRelation.cpp +++ b/Sourcecode/private/mx/core/elements/TimeRelation.cpp @@ -66,7 +66,7 @@ namespace mx } - bool TimeRelation::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TimeRelation::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseTimeRelationEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/TimeRelation.h b/Sourcecode/private/mx/core/elements/TimeRelation.h index bf36b0002..cfb26373f 100755 --- a/Sourcecode/private/mx/core/elements/TimeRelation.h +++ b/Sourcecode/private/mx/core/elements/TimeRelation.h @@ -38,7 +38,7 @@ namespace mx void setValue( const TimeRelationEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TimeRelationEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/TimeSignatureGroup.h b/Sourcecode/private/mx/core/elements/TimeSignatureGroup.h index 363dc38aa..2590ae1d1 100755 --- a/Sourcecode/private/mx/core/elements/TimeSignatureGroup.h +++ b/Sourcecode/private/mx/core/elements/TimeSignatureGroup.h @@ -43,7 +43,7 @@ namespace mx void setHasInterchangeable( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: BeatsPtr myBeats; diff --git a/Sourcecode/private/mx/core/elements/TimewiseMeasure.cpp b/Sourcecode/private/mx/core/elements/TimewiseMeasure.cpp index d6dfaa009..bd546f58e 100755 --- a/Sourcecode/private/mx/core/elements/TimewiseMeasure.cpp +++ b/Sourcecode/private/mx/core/elements/TimewiseMeasure.cpp @@ -119,7 +119,7 @@ namespace mx } - bool TimewiseMeasure::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TimewiseMeasure::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/TimewiseMeasure.h b/Sourcecode/private/mx/core/elements/TimewiseMeasure.h index 549b097fc..9292906e1 100755 --- a/Sourcecode/private/mx/core/elements/TimewiseMeasure.h +++ b/Sourcecode/private/mx/core/elements/TimewiseMeasure.h @@ -44,7 +44,7 @@ namespace mx TimewisePartPtr getTimewisePart( const TimewisePartSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: MeasureAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/TimewisePart.cpp b/Sourcecode/private/mx/core/elements/TimewisePart.cpp index 13e6ad274..86d8c8ebd 100755 --- a/Sourcecode/private/mx/core/elements/TimewisePart.cpp +++ b/Sourcecode/private/mx/core/elements/TimewisePart.cpp @@ -104,7 +104,7 @@ namespace mx } - bool TimewisePart::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TimewisePart::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isFirstMusicDataChoiceAdded = false; diff --git a/Sourcecode/private/mx/core/elements/TimewisePart.h b/Sourcecode/private/mx/core/elements/TimewisePart.h index 35fabbced..16c1bcfb3 100755 --- a/Sourcecode/private/mx/core/elements/TimewisePart.h +++ b/Sourcecode/private/mx/core/elements/TimewisePart.h @@ -41,7 +41,7 @@ namespace mx void setMusicDataGroup( const MusicDataGroupPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: PartAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Timpani.cpp b/Sourcecode/private/mx/core/elements/Timpani.cpp index f9161fc79..2efc90941 100755 --- a/Sourcecode/private/mx/core/elements/Timpani.cpp +++ b/Sourcecode/private/mx/core/elements/Timpani.cpp @@ -27,7 +27,7 @@ namespace mx } - bool Timpani::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Timpani::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Timpani.h b/Sourcecode/private/mx/core/elements/Timpani.h index e24b4c9e2..741a49755 100755 --- a/Sourcecode/private/mx/core/elements/Timpani.h +++ b/Sourcecode/private/mx/core/elements/Timpani.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Toe.cpp b/Sourcecode/private/mx/core/elements/Toe.cpp index d11fb95a3..fb4ebb857 100755 --- a/Sourcecode/private/mx/core/elements/Toe.cpp +++ b/Sourcecode/private/mx/core/elements/Toe.cpp @@ -63,7 +63,7 @@ namespace mx } - bool Toe::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Toe::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Toe.h b/Sourcecode/private/mx/core/elements/Toe.h index ea0dd013b..572cf69f7 100755 --- a/Sourcecode/private/mx/core/elements/Toe.h +++ b/Sourcecode/private/mx/core/elements/Toe.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const ToeAttributesPtr& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: ToeAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/ToeAttributes.cpp b/Sourcecode/private/mx/core/elements/ToeAttributes.cpp index 953d5047a..c553b1627 100755 --- a/Sourcecode/private/mx/core/elements/ToeAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/ToeAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool ToeAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool ToeAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "ToeAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/ToeAttributes.h b/Sourcecode/private/mx/core/elements/ToeAttributes.h index c8350aa80..57896f62c 100755 --- a/Sourcecode/private/mx/core/elements/ToeAttributes.h +++ b/Sourcecode/private/mx/core/elements/ToeAttributes.h @@ -53,7 +53,7 @@ namespace mx bool hasSubstitution; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/TopMargin.cpp b/Sourcecode/private/mx/core/elements/TopMargin.cpp index 0bed68d7f..410302a72 100755 --- a/Sourcecode/private/mx/core/elements/TopMargin.cpp +++ b/Sourcecode/private/mx/core/elements/TopMargin.cpp @@ -66,7 +66,7 @@ namespace mx } - bool TopMargin::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TopMargin::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/TopMargin.h b/Sourcecode/private/mx/core/elements/TopMargin.h index 66f342a4b..f37d3d056 100755 --- a/Sourcecode/private/mx/core/elements/TopMargin.h +++ b/Sourcecode/private/mx/core/elements/TopMargin.h @@ -38,7 +38,7 @@ namespace mx void setValue( const TenthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TenthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/TopSystemDistance.cpp b/Sourcecode/private/mx/core/elements/TopSystemDistance.cpp index d57ba44d5..a5ed0198a 100755 --- a/Sourcecode/private/mx/core/elements/TopSystemDistance.cpp +++ b/Sourcecode/private/mx/core/elements/TopSystemDistance.cpp @@ -66,7 +66,7 @@ namespace mx } - bool TopSystemDistance::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TopSystemDistance::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/TopSystemDistance.h b/Sourcecode/private/mx/core/elements/TopSystemDistance.h index b1e588ab4..1fb69d24c 100755 --- a/Sourcecode/private/mx/core/elements/TopSystemDistance.h +++ b/Sourcecode/private/mx/core/elements/TopSystemDistance.h @@ -38,7 +38,7 @@ namespace mx void setValue( const TenthsValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TenthsValue myValue; diff --git a/Sourcecode/private/mx/core/elements/TouchingPitch.cpp b/Sourcecode/private/mx/core/elements/TouchingPitch.cpp index ae8b1344d..db8b0e007 100755 --- a/Sourcecode/private/mx/core/elements/TouchingPitch.cpp +++ b/Sourcecode/private/mx/core/elements/TouchingPitch.cpp @@ -27,7 +27,7 @@ namespace mx } - bool TouchingPitch::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TouchingPitch::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/TouchingPitch.h b/Sourcecode/private/mx/core/elements/TouchingPitch.h index 6eca9681f..f6d778b9d 100755 --- a/Sourcecode/private/mx/core/elements/TouchingPitch.h +++ b/Sourcecode/private/mx/core/elements/TouchingPitch.h @@ -32,7 +32,7 @@ namespace mx virtual std::ostream& streamContents( std::ostream& os, const int indentLevel, bool& isOneLineOnly ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/TraditionalKey.cpp b/Sourcecode/private/mx/core/elements/TraditionalKey.cpp index 44b378584..f1b6376a0 100755 --- a/Sourcecode/private/mx/core/elements/TraditionalKey.cpp +++ b/Sourcecode/private/mx/core/elements/TraditionalKey.cpp @@ -137,7 +137,7 @@ namespace mx } - bool TraditionalKey::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TraditionalKey::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; bool isFifthsFound = false; diff --git a/Sourcecode/private/mx/core/elements/TraditionalKey.h b/Sourcecode/private/mx/core/elements/TraditionalKey.h index 7aff1a69a..09d6b8e8b 100755 --- a/Sourcecode/private/mx/core/elements/TraditionalKey.h +++ b/Sourcecode/private/mx/core/elements/TraditionalKey.h @@ -45,7 +45,7 @@ namespace mx void setHasMode( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: CancelPtr myCancel; diff --git a/Sourcecode/private/mx/core/elements/Transpose.cpp b/Sourcecode/private/mx/core/elements/Transpose.cpp index 89075ce3b..14f7f20ed 100755 --- a/Sourcecode/private/mx/core/elements/Transpose.cpp +++ b/Sourcecode/private/mx/core/elements/Transpose.cpp @@ -187,7 +187,7 @@ namespace mx } - bool Transpose::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Transpose::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Transpose.h b/Sourcecode/private/mx/core/elements/Transpose.h index e58d2a2c6..702dc1700 100755 --- a/Sourcecode/private/mx/core/elements/Transpose.h +++ b/Sourcecode/private/mx/core/elements/Transpose.h @@ -62,7 +62,7 @@ namespace mx void setHasDouble( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TransposeAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/TransposeAttributes.cpp b/Sourcecode/private/mx/core/elements/TransposeAttributes.cpp index 37066098c..dbd711426 100755 --- a/Sourcecode/private/mx/core/elements/TransposeAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/TransposeAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool TransposeAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TransposeAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "TransposeAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TransposeAttributes.h b/Sourcecode/private/mx/core/elements/TransposeAttributes.h index 999947e07..ad14c0a71 100755 --- a/Sourcecode/private/mx/core/elements/TransposeAttributes.h +++ b/Sourcecode/private/mx/core/elements/TransposeAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasNumber; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Tremolo.cpp b/Sourcecode/private/mx/core/elements/Tremolo.cpp index 32d1d8bf0..736923ccb 100755 --- a/Sourcecode/private/mx/core/elements/Tremolo.cpp +++ b/Sourcecode/private/mx/core/elements/Tremolo.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Tremolo::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Tremolo::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Tremolo.h b/Sourcecode/private/mx/core/elements/Tremolo.h index 0348594b0..7f9fb047c 100755 --- a/Sourcecode/private/mx/core/elements/Tremolo.h +++ b/Sourcecode/private/mx/core/elements/Tremolo.h @@ -42,7 +42,7 @@ namespace mx void setValue( const TremoloMarks& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TremoloMarks myValue; diff --git a/Sourcecode/private/mx/core/elements/TremoloAttributes.cpp b/Sourcecode/private/mx/core/elements/TremoloAttributes.cpp index b1c828e19..46e456681 100755 --- a/Sourcecode/private/mx/core/elements/TremoloAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/TremoloAttributes.cpp @@ -68,7 +68,7 @@ namespace mx } - bool TremoloAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TremoloAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "TremoloAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TremoloAttributes.h b/Sourcecode/private/mx/core/elements/TremoloAttributes.h index f21ca0eef..5f3012c30 100755 --- a/Sourcecode/private/mx/core/elements/TremoloAttributes.h +++ b/Sourcecode/private/mx/core/elements/TremoloAttributes.h @@ -50,7 +50,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/TrillMark.cpp b/Sourcecode/private/mx/core/elements/TrillMark.cpp index b16ec819e..acf0280c0 100755 --- a/Sourcecode/private/mx/core/elements/TrillMark.cpp +++ b/Sourcecode/private/mx/core/elements/TrillMark.cpp @@ -57,7 +57,7 @@ namespace mx } - bool TrillMark::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TrillMark::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/TrillMark.h b/Sourcecode/private/mx/core/elements/TrillMark.h index 6619cbde0..43f9e7077 100755 --- a/Sourcecode/private/mx/core/elements/TrillMark.h +++ b/Sourcecode/private/mx/core/elements/TrillMark.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyTrillSoundAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyTrillSoundAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/TripleTongue.cpp b/Sourcecode/private/mx/core/elements/TripleTongue.cpp index 27d85ce2c..bfa32f3a8 100755 --- a/Sourcecode/private/mx/core/elements/TripleTongue.cpp +++ b/Sourcecode/private/mx/core/elements/TripleTongue.cpp @@ -57,7 +57,7 @@ namespace mx } - bool TripleTongue::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TripleTongue::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/TripleTongue.h b/Sourcecode/private/mx/core/elements/TripleTongue.h index fd3563dbc..9ed9cf605 100755 --- a/Sourcecode/private/mx/core/elements/TripleTongue.h +++ b/Sourcecode/private/mx/core/elements/TripleTongue.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/TuningAlter.cpp b/Sourcecode/private/mx/core/elements/TuningAlter.cpp index f299a9ca8..b587b7130 100755 --- a/Sourcecode/private/mx/core/elements/TuningAlter.cpp +++ b/Sourcecode/private/mx/core/elements/TuningAlter.cpp @@ -66,7 +66,7 @@ namespace mx } - bool TuningAlter::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TuningAlter::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/TuningAlter.h b/Sourcecode/private/mx/core/elements/TuningAlter.h index de7ea31e3..9e8befa94 100755 --- a/Sourcecode/private/mx/core/elements/TuningAlter.h +++ b/Sourcecode/private/mx/core/elements/TuningAlter.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Semitones& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Semitones myValue; diff --git a/Sourcecode/private/mx/core/elements/TuningOctave.cpp b/Sourcecode/private/mx/core/elements/TuningOctave.cpp index a5aedf088..e95ae45f8 100755 --- a/Sourcecode/private/mx/core/elements/TuningOctave.cpp +++ b/Sourcecode/private/mx/core/elements/TuningOctave.cpp @@ -66,7 +66,7 @@ namespace mx } - bool TuningOctave::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TuningOctave::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/TuningOctave.h b/Sourcecode/private/mx/core/elements/TuningOctave.h index 372a567c2..d90af2318 100755 --- a/Sourcecode/private/mx/core/elements/TuningOctave.h +++ b/Sourcecode/private/mx/core/elements/TuningOctave.h @@ -38,7 +38,7 @@ namespace mx void setValue( const OctaveValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: OctaveValue myValue; diff --git a/Sourcecode/private/mx/core/elements/TuningStep.cpp b/Sourcecode/private/mx/core/elements/TuningStep.cpp index bb4ad2133..6edfb1ef2 100755 --- a/Sourcecode/private/mx/core/elements/TuningStep.cpp +++ b/Sourcecode/private/mx/core/elements/TuningStep.cpp @@ -66,7 +66,7 @@ namespace mx } - bool TuningStep::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TuningStep::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue = parseStepEnum( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/TuningStep.h b/Sourcecode/private/mx/core/elements/TuningStep.h index 01226a928..4ad1bc29f 100755 --- a/Sourcecode/private/mx/core/elements/TuningStep.h +++ b/Sourcecode/private/mx/core/elements/TuningStep.h @@ -38,7 +38,7 @@ namespace mx void setValue( const StepEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: StepEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/Tuplet.cpp b/Sourcecode/private/mx/core/elements/Tuplet.cpp index 8c208c63b..c918dae40 100755 --- a/Sourcecode/private/mx/core/elements/Tuplet.cpp +++ b/Sourcecode/private/mx/core/elements/Tuplet.cpp @@ -136,7 +136,7 @@ namespace mx } - bool Tuplet::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Tuplet::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Tuplet.h b/Sourcecode/private/mx/core/elements/Tuplet.h index 67b2f521f..cb0bd050e 100755 --- a/Sourcecode/private/mx/core/elements/Tuplet.h +++ b/Sourcecode/private/mx/core/elements/Tuplet.h @@ -50,7 +50,7 @@ namespace mx void setHasTupletNormal( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TupletAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/TupletActual.cpp b/Sourcecode/private/mx/core/elements/TupletActual.cpp index 794e44076..90886f14f 100755 --- a/Sourcecode/private/mx/core/elements/TupletActual.cpp +++ b/Sourcecode/private/mx/core/elements/TupletActual.cpp @@ -171,7 +171,7 @@ namespace mx } - bool TupletActual::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TupletActual::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TupletActual.h b/Sourcecode/private/mx/core/elements/TupletActual.h index 0a3816ed3..e4dc94eb5 100755 --- a/Sourcecode/private/mx/core/elements/TupletActual.h +++ b/Sourcecode/private/mx/core/elements/TupletActual.h @@ -54,7 +54,7 @@ namespace mx TupletDotPtr getTupletDot( const TupletDotSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TupletNumberPtr myTupletNumber; diff --git a/Sourcecode/private/mx/core/elements/TupletAttributes.cpp b/Sourcecode/private/mx/core/elements/TupletAttributes.cpp index 5a45069d7..894dd1316 100755 --- a/Sourcecode/private/mx/core/elements/TupletAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/TupletAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool TupletAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TupletAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "TupletAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TupletAttributes.h b/Sourcecode/private/mx/core/elements/TupletAttributes.h index c29073bd6..4177bd0d0 100755 --- a/Sourcecode/private/mx/core/elements/TupletAttributes.h +++ b/Sourcecode/private/mx/core/elements/TupletAttributes.h @@ -51,7 +51,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/TupletDot.cpp b/Sourcecode/private/mx/core/elements/TupletDot.cpp index 6e3bf7e63..56a02e0a3 100755 --- a/Sourcecode/private/mx/core/elements/TupletDot.cpp +++ b/Sourcecode/private/mx/core/elements/TupletDot.cpp @@ -57,7 +57,7 @@ namespace mx } - bool TupletDot::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TupletDot::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/TupletDot.h b/Sourcecode/private/mx/core/elements/TupletDot.h index d62f1fae9..f8b7ccc74 100755 --- a/Sourcecode/private/mx/core/elements/TupletDot.h +++ b/Sourcecode/private/mx/core/elements/TupletDot.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const TupletDotAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TupletDotAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/TupletDotAttributes.cpp b/Sourcecode/private/mx/core/elements/TupletDotAttributes.cpp index 72ef15c3f..7b23bc7ca 100755 --- a/Sourcecode/private/mx/core/elements/TupletDotAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/TupletDotAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool TupletDotAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TupletDotAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "TupletDotAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TupletDotAttributes.h b/Sourcecode/private/mx/core/elements/TupletDotAttributes.h index 4176e38ae..b82ffcbba 100755 --- a/Sourcecode/private/mx/core/elements/TupletDotAttributes.h +++ b/Sourcecode/private/mx/core/elements/TupletDotAttributes.h @@ -37,7 +37,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/TupletNormal.cpp b/Sourcecode/private/mx/core/elements/TupletNormal.cpp index 180751610..079447a7e 100755 --- a/Sourcecode/private/mx/core/elements/TupletNormal.cpp +++ b/Sourcecode/private/mx/core/elements/TupletNormal.cpp @@ -171,7 +171,7 @@ namespace mx } - bool TupletNormal::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TupletNormal::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TupletNormal.h b/Sourcecode/private/mx/core/elements/TupletNormal.h index 21e81b1ae..f2879df58 100755 --- a/Sourcecode/private/mx/core/elements/TupletNormal.h +++ b/Sourcecode/private/mx/core/elements/TupletNormal.h @@ -54,7 +54,7 @@ namespace mx TupletDotPtr getTupletDot( const TupletDotSetIterConst& setIterator ) const; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TupletNumberPtr myTupletNumber; diff --git a/Sourcecode/private/mx/core/elements/TupletNumber.cpp b/Sourcecode/private/mx/core/elements/TupletNumber.cpp index 61ff6adc7..3aaada680 100755 --- a/Sourcecode/private/mx/core/elements/TupletNumber.cpp +++ b/Sourcecode/private/mx/core/elements/TupletNumber.cpp @@ -87,7 +87,7 @@ namespace mx } - bool TupletNumber::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TupletNumber::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/TupletNumber.h b/Sourcecode/private/mx/core/elements/TupletNumber.h index 58ad1ec29..07186612c 100755 --- a/Sourcecode/private/mx/core/elements/TupletNumber.h +++ b/Sourcecode/private/mx/core/elements/TupletNumber.h @@ -42,7 +42,7 @@ namespace mx void setValue( const NonNegativeInteger& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NonNegativeInteger myValue; diff --git a/Sourcecode/private/mx/core/elements/TupletNumberAttributes.cpp b/Sourcecode/private/mx/core/elements/TupletNumberAttributes.cpp index b31f7bdf0..b27897913 100755 --- a/Sourcecode/private/mx/core/elements/TupletNumberAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/TupletNumberAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool TupletNumberAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TupletNumberAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "TupletNumberAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TupletNumberAttributes.h b/Sourcecode/private/mx/core/elements/TupletNumberAttributes.h index 55417541f..8d9e3ce3c 100755 --- a/Sourcecode/private/mx/core/elements/TupletNumberAttributes.h +++ b/Sourcecode/private/mx/core/elements/TupletNumberAttributes.h @@ -37,7 +37,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/TupletType.cpp b/Sourcecode/private/mx/core/elements/TupletType.cpp index bbe19f783..bdebbf48e 100755 --- a/Sourcecode/private/mx/core/elements/TupletType.cpp +++ b/Sourcecode/private/mx/core/elements/TupletType.cpp @@ -87,7 +87,7 @@ namespace mx } - bool TupletType::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TupletType::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/TupletType.h b/Sourcecode/private/mx/core/elements/TupletType.h index 8191a4db4..6af92a992 100755 --- a/Sourcecode/private/mx/core/elements/TupletType.h +++ b/Sourcecode/private/mx/core/elements/TupletType.h @@ -42,7 +42,7 @@ namespace mx void setValue( const NoteTypeValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NoteTypeValue myValue; diff --git a/Sourcecode/private/mx/core/elements/TupletTypeAttributes.cpp b/Sourcecode/private/mx/core/elements/TupletTypeAttributes.cpp index 254dbc3f6..3ee899ac9 100755 --- a/Sourcecode/private/mx/core/elements/TupletTypeAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/TupletTypeAttributes.cpp @@ -44,7 +44,7 @@ namespace mx } - bool TupletTypeAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TupletTypeAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "TupletTypeAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TupletTypeAttributes.h b/Sourcecode/private/mx/core/elements/TupletTypeAttributes.h index 415c078ea..21d57f91c 100755 --- a/Sourcecode/private/mx/core/elements/TupletTypeAttributes.h +++ b/Sourcecode/private/mx/core/elements/TupletTypeAttributes.h @@ -37,7 +37,7 @@ namespace mx bool hasFontWeight; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Turn.cpp b/Sourcecode/private/mx/core/elements/Turn.cpp index 13543445c..0ab8a1697 100755 --- a/Sourcecode/private/mx/core/elements/Turn.cpp +++ b/Sourcecode/private/mx/core/elements/Turn.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Turn::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Turn::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Turn.h b/Sourcecode/private/mx/core/elements/Turn.h index 8a502a697..f5a909aa4 100755 --- a/Sourcecode/private/mx/core/elements/Turn.h +++ b/Sourcecode/private/mx/core/elements/Turn.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const TurnAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: TurnAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/TurnAttributes.cpp b/Sourcecode/private/mx/core/elements/TurnAttributes.cpp index 95412de61..9598db5c1 100755 --- a/Sourcecode/private/mx/core/elements/TurnAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/TurnAttributes.cpp @@ -96,7 +96,7 @@ namespace mx } - bool TurnAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TurnAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "TurnAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TurnAttributes.h b/Sourcecode/private/mx/core/elements/TurnAttributes.h index b505891ff..dc1921c3e 100755 --- a/Sourcecode/private/mx/core/elements/TurnAttributes.h +++ b/Sourcecode/private/mx/core/elements/TurnAttributes.h @@ -64,7 +64,7 @@ namespace mx bool hasSlash; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Type.cpp b/Sourcecode/private/mx/core/elements/Type.cpp index 6cedf073c..ee0d92bea 100755 --- a/Sourcecode/private/mx/core/elements/Type.cpp +++ b/Sourcecode/private/mx/core/elements/Type.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Type::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Type::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Type.h b/Sourcecode/private/mx/core/elements/Type.h index 64ed6f61e..00f5cc929 100755 --- a/Sourcecode/private/mx/core/elements/Type.h +++ b/Sourcecode/private/mx/core/elements/Type.h @@ -42,7 +42,7 @@ namespace mx void setValue( const NoteTypeValue& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: NoteTypeValue myValue; diff --git a/Sourcecode/private/mx/core/elements/TypeAttributes.cpp b/Sourcecode/private/mx/core/elements/TypeAttributes.cpp index 5d6becb70..dee3d8484 100755 --- a/Sourcecode/private/mx/core/elements/TypeAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/TypeAttributes.cpp @@ -32,7 +32,7 @@ namespace mx } - bool TypeAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool TypeAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "TypeAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/TypeAttributes.h b/Sourcecode/private/mx/core/elements/TypeAttributes.h index 2ab39fea7..4a242a563 100755 --- a/Sourcecode/private/mx/core/elements/TypeAttributes.h +++ b/Sourcecode/private/mx/core/elements/TypeAttributes.h @@ -29,7 +29,7 @@ namespace mx bool hasSize; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Unpitched.cpp b/Sourcecode/private/mx/core/elements/Unpitched.cpp index 376808fa2..e9ecc3628 100755 --- a/Sourcecode/private/mx/core/elements/Unpitched.cpp +++ b/Sourcecode/private/mx/core/elements/Unpitched.cpp @@ -86,7 +86,7 @@ namespace mx } - bool Unpitched::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Unpitched::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/Unpitched.h b/Sourcecode/private/mx/core/elements/Unpitched.h index 4ccbd3eac..b276a5ded 100755 --- a/Sourcecode/private/mx/core/elements/Unpitched.h +++ b/Sourcecode/private/mx/core/elements/Unpitched.h @@ -39,7 +39,7 @@ namespace mx void setHasDisplayStepOctaveGroup( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: DisplayStepOctaveGroupPtr myDisplayStepOctaveGroup; diff --git a/Sourcecode/private/mx/core/elements/Unstress.cpp b/Sourcecode/private/mx/core/elements/Unstress.cpp index f4cf30438..f0079ca7c 100755 --- a/Sourcecode/private/mx/core/elements/Unstress.cpp +++ b/Sourcecode/private/mx/core/elements/Unstress.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Unstress::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Unstress::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Unstress.h b/Sourcecode/private/mx/core/elements/Unstress.h index adb97abf8..da5bc9bcd 100755 --- a/Sourcecode/private/mx/core/elements/Unstress.h +++ b/Sourcecode/private/mx/core/elements/Unstress.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/UpBow.cpp b/Sourcecode/private/mx/core/elements/UpBow.cpp index 8b08b21b8..f6db1dccf 100755 --- a/Sourcecode/private/mx/core/elements/UpBow.cpp +++ b/Sourcecode/private/mx/core/elements/UpBow.cpp @@ -57,7 +57,7 @@ namespace mx } - bool UpBow::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool UpBow::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/UpBow.h b/Sourcecode/private/mx/core/elements/UpBow.h index 790478f54..a6ea8b1c3 100755 --- a/Sourcecode/private/mx/core/elements/UpBow.h +++ b/Sourcecode/private/mx/core/elements/UpBow.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyPlacementAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyPlacementAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/VerticalTurn.cpp b/Sourcecode/private/mx/core/elements/VerticalTurn.cpp index 59202820d..1b220d375 100755 --- a/Sourcecode/private/mx/core/elements/VerticalTurn.cpp +++ b/Sourcecode/private/mx/core/elements/VerticalTurn.cpp @@ -57,7 +57,7 @@ namespace mx } - bool VerticalTurn::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool VerticalTurn::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/VerticalTurn.h b/Sourcecode/private/mx/core/elements/VerticalTurn.h index f19574ba3..fd9210f49 100755 --- a/Sourcecode/private/mx/core/elements/VerticalTurn.h +++ b/Sourcecode/private/mx/core/elements/VerticalTurn.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyTrillSoundAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyTrillSoundAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/VirtualInstrument.cpp b/Sourcecode/private/mx/core/elements/VirtualInstrument.cpp index 5900cf6cd..50545fabe 100755 --- a/Sourcecode/private/mx/core/elements/VirtualInstrument.cpp +++ b/Sourcecode/private/mx/core/elements/VirtualInstrument.cpp @@ -120,7 +120,7 @@ namespace mx } - bool VirtualInstrument::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool VirtualInstrument::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/VirtualInstrument.h b/Sourcecode/private/mx/core/elements/VirtualInstrument.h index 0c1525acd..2dbd6ff24 100755 --- a/Sourcecode/private/mx/core/elements/VirtualInstrument.h +++ b/Sourcecode/private/mx/core/elements/VirtualInstrument.h @@ -46,7 +46,7 @@ namespace mx void setHasVirtualName( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: VirtualLibraryPtr myVirtualLibrary; diff --git a/Sourcecode/private/mx/core/elements/VirtualLibrary.cpp b/Sourcecode/private/mx/core/elements/VirtualLibrary.cpp index ce57a9950..2f34a1012 100755 --- a/Sourcecode/private/mx/core/elements/VirtualLibrary.cpp +++ b/Sourcecode/private/mx/core/elements/VirtualLibrary.cpp @@ -66,7 +66,7 @@ namespace mx } - bool VirtualLibrary::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool VirtualLibrary::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/VirtualLibrary.h b/Sourcecode/private/mx/core/elements/VirtualLibrary.h index 58a35cedd..9706912d8 100755 --- a/Sourcecode/private/mx/core/elements/VirtualLibrary.h +++ b/Sourcecode/private/mx/core/elements/VirtualLibrary.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/VirtualName.cpp b/Sourcecode/private/mx/core/elements/VirtualName.cpp index 6380f9a01..3463df9f9 100755 --- a/Sourcecode/private/mx/core/elements/VirtualName.cpp +++ b/Sourcecode/private/mx/core/elements/VirtualName.cpp @@ -66,7 +66,7 @@ namespace mx } - bool VirtualName::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool VirtualName::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/VirtualName.h b/Sourcecode/private/mx/core/elements/VirtualName.h index 73cf19a95..1da103246 100755 --- a/Sourcecode/private/mx/core/elements/VirtualName.h +++ b/Sourcecode/private/mx/core/elements/VirtualName.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/Voice.cpp b/Sourcecode/private/mx/core/elements/Voice.cpp index 2f1b8506f..ccbb39273 100755 --- a/Sourcecode/private/mx/core/elements/Voice.cpp +++ b/Sourcecode/private/mx/core/elements/Voice.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Voice::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Voice::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Voice.h b/Sourcecode/private/mx/core/elements/Voice.h index aacf32c29..04c7f1ad9 100755 --- a/Sourcecode/private/mx/core/elements/Voice.h +++ b/Sourcecode/private/mx/core/elements/Voice.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/Volume.cpp b/Sourcecode/private/mx/core/elements/Volume.cpp index d031f0d01..784b766c7 100755 --- a/Sourcecode/private/mx/core/elements/Volume.cpp +++ b/Sourcecode/private/mx/core/elements/Volume.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Volume::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Volume::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); myValue.parse( xelement.getValue() ); diff --git a/Sourcecode/private/mx/core/elements/Volume.h b/Sourcecode/private/mx/core/elements/Volume.h index 650032f94..3ed29012e 100755 --- a/Sourcecode/private/mx/core/elements/Volume.h +++ b/Sourcecode/private/mx/core/elements/Volume.h @@ -38,7 +38,7 @@ namespace mx void setValue( const Percent& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: Percent myValue; diff --git a/Sourcecode/private/mx/core/elements/WavyLine.cpp b/Sourcecode/private/mx/core/elements/WavyLine.cpp index b5640c05d..4a5543d9a 100755 --- a/Sourcecode/private/mx/core/elements/WavyLine.cpp +++ b/Sourcecode/private/mx/core/elements/WavyLine.cpp @@ -57,7 +57,7 @@ namespace mx } - bool WavyLine::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool WavyLine::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/WavyLine.h b/Sourcecode/private/mx/core/elements/WavyLine.h index d9131eb2a..2419ddef7 100755 --- a/Sourcecode/private/mx/core/elements/WavyLine.h +++ b/Sourcecode/private/mx/core/elements/WavyLine.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const WavyLineAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: WavyLineAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/WavyLineAttributes.cpp b/Sourcecode/private/mx/core/elements/WavyLineAttributes.cpp index 2f6c688fa..2507849b1 100755 --- a/Sourcecode/private/mx/core/elements/WavyLineAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/WavyLineAttributes.cpp @@ -84,7 +84,7 @@ namespace mx } - bool WavyLineAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool WavyLineAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "WavyLineAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/WavyLineAttributes.h b/Sourcecode/private/mx/core/elements/WavyLineAttributes.h index ae8a1c9c6..6b22c6e1a 100755 --- a/Sourcecode/private/mx/core/elements/WavyLineAttributes.h +++ b/Sourcecode/private/mx/core/elements/WavyLineAttributes.h @@ -57,7 +57,7 @@ namespace mx bool hasLastBeat; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Wedge.cpp b/Sourcecode/private/mx/core/elements/Wedge.cpp index 09e2eb4cc..2225f06ef 100755 --- a/Sourcecode/private/mx/core/elements/Wedge.cpp +++ b/Sourcecode/private/mx/core/elements/Wedge.cpp @@ -57,7 +57,7 @@ namespace mx } - bool Wedge::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Wedge::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/Wedge.h b/Sourcecode/private/mx/core/elements/Wedge.h index 7d1f4b4f6..c34c585dd 100755 --- a/Sourcecode/private/mx/core/elements/Wedge.h +++ b/Sourcecode/private/mx/core/elements/Wedge.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const WedgeAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: WedgeAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/WedgeAttributes.cpp b/Sourcecode/private/mx/core/elements/WedgeAttributes.cpp index ad3cd44c5..f5d704955 100755 --- a/Sourcecode/private/mx/core/elements/WedgeAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/WedgeAttributes.cpp @@ -72,7 +72,7 @@ namespace mx } - bool WedgeAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool WedgeAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "WedgeAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/WedgeAttributes.h b/Sourcecode/private/mx/core/elements/WedgeAttributes.h index 543aafca6..73cee9426 100755 --- a/Sourcecode/private/mx/core/elements/WedgeAttributes.h +++ b/Sourcecode/private/mx/core/elements/WedgeAttributes.h @@ -51,7 +51,7 @@ namespace mx bool hasRelativeY; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/WithBar.cpp b/Sourcecode/private/mx/core/elements/WithBar.cpp index 8c4bcfc11..d0ded7ef9 100755 --- a/Sourcecode/private/mx/core/elements/WithBar.cpp +++ b/Sourcecode/private/mx/core/elements/WithBar.cpp @@ -87,7 +87,7 @@ namespace mx } - bool WithBar::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool WithBar::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/WithBar.h b/Sourcecode/private/mx/core/elements/WithBar.h index 37e03e8da..3b510efa0 100755 --- a/Sourcecode/private/mx/core/elements/WithBar.h +++ b/Sourcecode/private/mx/core/elements/WithBar.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/WithBarAttributes.cpp b/Sourcecode/private/mx/core/elements/WithBarAttributes.cpp index d994ec029..16d3f4ad7 100755 --- a/Sourcecode/private/mx/core/elements/WithBarAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/WithBarAttributes.cpp @@ -64,7 +64,7 @@ namespace mx } - bool WithBarAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool WithBarAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "WithBarAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/WithBarAttributes.h b/Sourcecode/private/mx/core/elements/WithBarAttributes.h index a5aacef28..8e637f33c 100755 --- a/Sourcecode/private/mx/core/elements/WithBarAttributes.h +++ b/Sourcecode/private/mx/core/elements/WithBarAttributes.h @@ -48,7 +48,7 @@ namespace mx bool hasPlacement; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Wood.cpp b/Sourcecode/private/mx/core/elements/Wood.cpp index 44039fade..84efb4427 100755 --- a/Sourcecode/private/mx/core/elements/Wood.cpp +++ b/Sourcecode/private/mx/core/elements/Wood.cpp @@ -66,7 +66,7 @@ namespace mx } - bool Wood::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Wood::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/Wood.h b/Sourcecode/private/mx/core/elements/Wood.h index dd4dc39cc..b531d7d77 100755 --- a/Sourcecode/private/mx/core/elements/Wood.h +++ b/Sourcecode/private/mx/core/elements/Wood.h @@ -38,7 +38,7 @@ namespace mx void setValue( const WoodEnum& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: WoodEnum myValue; diff --git a/Sourcecode/private/mx/core/elements/WordFont.cpp b/Sourcecode/private/mx/core/elements/WordFont.cpp index 1abc852ae..acbc48e0c 100755 --- a/Sourcecode/private/mx/core/elements/WordFont.cpp +++ b/Sourcecode/private/mx/core/elements/WordFont.cpp @@ -57,7 +57,7 @@ namespace mx } - bool WordFont::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool WordFont::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { return myAttributes->fromXElement( message, xelement ); } diff --git a/Sourcecode/private/mx/core/elements/WordFont.h b/Sourcecode/private/mx/core/elements/WordFont.h index 4d613b5d0..f6a282d4f 100755 --- a/Sourcecode/private/mx/core/elements/WordFont.h +++ b/Sourcecode/private/mx/core/elements/WordFont.h @@ -36,7 +36,7 @@ namespace mx void setAttributes( const EmptyFontAttributesPtr& attributes ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: EmptyFontAttributesPtr myAttributes; diff --git a/Sourcecode/private/mx/core/elements/Words.cpp b/Sourcecode/private/mx/core/elements/Words.cpp index 7d657dcfc..69bc8ead1 100755 --- a/Sourcecode/private/mx/core/elements/Words.cpp +++ b/Sourcecode/private/mx/core/elements/Words.cpp @@ -87,7 +87,7 @@ namespace mx } - bool Words::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Words::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; isSuccess &= myAttributes->fromXElement( message, xelement ); diff --git a/Sourcecode/private/mx/core/elements/Words.h b/Sourcecode/private/mx/core/elements/Words.h index c77c20410..92d3208f5 100755 --- a/Sourcecode/private/mx/core/elements/Words.h +++ b/Sourcecode/private/mx/core/elements/Words.h @@ -42,7 +42,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/WordsAttributes.cpp b/Sourcecode/private/mx/core/elements/WordsAttributes.cpp index b9d6d41b9..fc18220b6 100755 --- a/Sourcecode/private/mx/core/elements/WordsAttributes.cpp +++ b/Sourcecode/private/mx/core/elements/WordsAttributes.cpp @@ -104,7 +104,7 @@ namespace mx } - bool WordsAttributes::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool WordsAttributes::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { const char* const className = "WordsAttributes"; bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/WordsAttributes.h b/Sourcecode/private/mx/core/elements/WordsAttributes.h index e965d8186..63dc13015 100755 --- a/Sourcecode/private/mx/core/elements/WordsAttributes.h +++ b/Sourcecode/private/mx/core/elements/WordsAttributes.h @@ -70,7 +70,7 @@ namespace mx bool hasEnclosure; private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); }; } } diff --git a/Sourcecode/private/mx/core/elements/Work.cpp b/Sourcecode/private/mx/core/elements/Work.cpp index a7a582cc5..a67056e79 100755 --- a/Sourcecode/private/mx/core/elements/Work.cpp +++ b/Sourcecode/private/mx/core/elements/Work.cpp @@ -155,7 +155,7 @@ namespace mx } - bool Work::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool Work::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { bool isSuccess = true; diff --git a/Sourcecode/private/mx/core/elements/Work.h b/Sourcecode/private/mx/core/elements/Work.h index eac65e844..39f3bbb65 100755 --- a/Sourcecode/private/mx/core/elements/Work.h +++ b/Sourcecode/private/mx/core/elements/Work.h @@ -53,7 +53,7 @@ namespace mx void setHasOpus( const bool value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: WorkNumberPtr myWorkNumber; diff --git a/Sourcecode/private/mx/core/elements/WorkNumber.cpp b/Sourcecode/private/mx/core/elements/WorkNumber.cpp index 012563ae4..3925c5715 100755 --- a/Sourcecode/private/mx/core/elements/WorkNumber.cpp +++ b/Sourcecode/private/mx/core/elements/WorkNumber.cpp @@ -66,7 +66,7 @@ namespace mx } - bool WorkNumber::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool WorkNumber::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/WorkNumber.h b/Sourcecode/private/mx/core/elements/WorkNumber.h index 8fe1d1546..7148544ef 100755 --- a/Sourcecode/private/mx/core/elements/WorkNumber.h +++ b/Sourcecode/private/mx/core/elements/WorkNumber.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/core/elements/WorkTitle.cpp b/Sourcecode/private/mx/core/elements/WorkTitle.cpp index 7696f41d0..21b6a6e79 100755 --- a/Sourcecode/private/mx/core/elements/WorkTitle.cpp +++ b/Sourcecode/private/mx/core/elements/WorkTitle.cpp @@ -66,7 +66,7 @@ namespace mx } - bool WorkTitle::fromXElementImpl( std::ostream& message, xml::XElement& xelement ) + bool WorkTitle::fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ) { MX_UNUSED( message ); MX_UNUSED( xelement ); diff --git a/Sourcecode/private/mx/core/elements/WorkTitle.h b/Sourcecode/private/mx/core/elements/WorkTitle.h index 3b65b4432..1834da54e 100755 --- a/Sourcecode/private/mx/core/elements/WorkTitle.h +++ b/Sourcecode/private/mx/core/elements/WorkTitle.h @@ -38,7 +38,7 @@ namespace mx void setValue( const XsString& value ); private: - virtual bool fromXElementImpl( std::ostream& message, xml::XElement& xelement ); + virtual bool fromXElementImpl( std::ostream& message, ::ezxml::XElement& xelement ); private: XsString myValue; diff --git a/Sourcecode/private/mx/impl/AccidentalMarkFunctions.h b/Sourcecode/private/mx/impl/AccidentalMarkFunctions.h index 0a6d878f2..29ed63923 100644 --- a/Sourcecode/private/mx/impl/AccidentalMarkFunctions.h +++ b/Sourcecode/private/mx/impl/AccidentalMarkFunctions.h @@ -23,10 +23,7 @@ namespace mx AccidentalMarkFunctions( const core::AccidentalMark& inAccidentalMark, impl::Cursor inCursor ); ~AccidentalMarkFunctions() = default; AccidentalMarkFunctions( const AccidentalMarkFunctions& ) = default; - AccidentalMarkFunctions( AccidentalMarkFunctions&& ) = default; - AccidentalMarkFunctions& operator=( const AccidentalMarkFunctions& ) = default; - AccidentalMarkFunctions& operator=( AccidentalMarkFunctions&& ) = default; - + AccidentalMarkFunctions( AccidentalMarkFunctions&& ) = default; api::MarkData parseAccidentalMark() const; private: diff --git a/Sourcecode/private/mx/impl/MxVersionDefines.h b/Sourcecode/private/mx/impl/MxVersionDefines.h index 132ad6071..914f79628 100644 --- a/Sourcecode/private/mx/impl/MxVersionDefines.h +++ b/Sourcecode/private/mx/impl/MxVersionDefines.h @@ -1,4 +1,4 @@ #define MX_VERSION_MAJOR 1 #define MX_VERSION_MINOR 0 -#define MX_VERSION_PATCH 0 -#define MX_VERSION_BUILD 37 +#define MX_VERSION_PATCH 1 +#define MX_VERSION_BUILD 38 diff --git a/Sourcecode/private/mx/impl/NoteFunctions.h b/Sourcecode/private/mx/impl/NoteFunctions.h index 872d5aea5..790670446 100755 --- a/Sourcecode/private/mx/impl/NoteFunctions.h +++ b/Sourcecode/private/mx/impl/NoteFunctions.h @@ -39,12 +39,7 @@ namespace mx { public: NoteFunctions( const core::Note& inMxNote, impl::Cursor cursor ); - ~NoteFunctions() = default; - NoteFunctions( const NoteFunctions& ) = default; - NoteFunctions( NoteFunctions&& ) = default; - NoteFunctions& operator=( const NoteFunctions& ) = default; - NoteFunctions& operator=( NoteFunctions&& ) = default; - + ~NoteFunctions() = default; api::NoteData parseNote() const; private: diff --git a/Sourcecode/private/mx/impl/OrnamentsFunctions.h b/Sourcecode/private/mx/impl/OrnamentsFunctions.h index f0e260ad9..e37a311e5 100644 --- a/Sourcecode/private/mx/impl/OrnamentsFunctions.h +++ b/Sourcecode/private/mx/impl/OrnamentsFunctions.h @@ -28,10 +28,7 @@ namespace mx OrnamentsFunctions( const core::Ornaments& inOrnaments, impl::Cursor inCursor ); ~OrnamentsFunctions() = default; OrnamentsFunctions( const OrnamentsFunctions& ) = default; - OrnamentsFunctions( OrnamentsFunctions&& ) = default; - OrnamentsFunctions& operator=( const OrnamentsFunctions& ) = default; - OrnamentsFunctions& operator=( OrnamentsFunctions&& ) = default; - + OrnamentsFunctions( OrnamentsFunctions&& ) = default; void parseOrnaments( std::vector& outMarks ) const; private: diff --git a/Sourcecode/private/mx/xml/PugiAttribute.cpp b/Sourcecode/private/mx/xml/PugiAttribute.cpp deleted file mode 100755 index 0e599a051..000000000 --- a/Sourcecode/private/mx/xml/PugiAttribute.cpp +++ /dev/null @@ -1,76 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#include "mx/xml/PugiAttribute.h" -#include "mx/xml/PugiAttributeIterImpl.h" -#include "mx/xml/XDoc.h" - -namespace mx -{ - namespace xml - { - PugiAttribute::PugiAttribute() - : myAttribute() - , myParentElement() - , myXDoc() - { - - } - - - PugiAttribute::PugiAttribute( - const pugi::xml_attribute& attribute, - const pugi::xml_node& parentElement, - const XDocCPtr& parentXDoc ) - : myAttribute( attribute ) - , myParentElement( parentElement ) - , myXDoc( parentXDoc ) - { - - } - - - bool PugiAttribute::getIsNull() const - { - auto ptr = myXDoc.lock(); - - if( !ptr ) - { - return true; - } - - if( myParentElement.type() != pugi::node_element ) - { - return true; - } - - return false; - } - - - std::string PugiAttribute::getName() const - { - return myAttribute.name(); - } - - - std::string PugiAttribute::getValue() const - { - return myAttribute.value(); - } - - - void PugiAttribute::setName( const std::string& name ) - { - myAttribute.set_name( name.c_str() ); - } - - - void PugiAttribute::setValue( const std::string& value ) - { - myAttribute.set_value( value.c_str() ); - } - - } -} diff --git a/Sourcecode/private/mx/xml/PugiAttribute.h b/Sourcecode/private/mx/xml/PugiAttribute.h deleted file mode 100755 index dbf56db30..000000000 --- a/Sourcecode/private/mx/xml/PugiAttribute.h +++ /dev/null @@ -1,52 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once - -#include "mx/xml/XAttribute.h" -#include "mx/pugixml/pugixml.hpp" - -#include - - -namespace mx -{ - namespace xml - { - class PugiAttribute; - using PugiAttributePtr = std::shared_ptr; - - class XDoc; - using XDocCPtr = std::shared_ptr; - using XDocCWPtr = std::weak_ptr; - - class PugiAttribute : public XAttribute - { - public: - PugiAttribute(); - - PugiAttribute( - const pugi::xml_attribute& attribute, - const pugi::xml_node& parentElement, - const XDocCPtr& parentXDoc ); - - PugiAttribute( const PugiAttribute& other ) = default; - PugiAttribute( PugiAttribute&& other ) = default; - PugiAttribute& operator=( const PugiAttribute& other ) = default; - PugiAttribute& operator=( PugiAttribute&& other ) = default; - - virtual bool getIsNull() const override; - virtual std::string getName() const override; - virtual std::string getValue() const override; - - virtual void setName( const std::string& name ) override; - virtual void setValue( const std::string& name ) override; - - private: - pugi::xml_attribute myAttribute; - pugi::xml_node myParentElement; - XDocCWPtr myXDoc; - }; - } -} diff --git a/Sourcecode/private/mx/xml/PugiAttributeIterImpl.cpp b/Sourcecode/private/mx/xml/PugiAttributeIterImpl.cpp deleted file mode 100755 index 95ccdacab..000000000 --- a/Sourcecode/private/mx/xml/PugiAttributeIterImpl.cpp +++ /dev/null @@ -1,135 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#include "mx/xml/PugiAttributeIterImpl.h" -#include "mx/xml/XDoc.h" -#include "mx/xml/XThrow.h" - -namespace mx -{ - namespace xml - { - PugiAttributeIterImpl::PugiAttributeIterImpl() - : myIter() - , myParentElement() - , myXDoc() - , myReturnableAttribute() - { - - } - - - PugiAttributeIterImpl::PugiAttributeIterImpl( - const pugi::xml_attribute_iterator& iter, - const pugi::xml_node& iterParentElement, - const XDocCPtr& parentXDoc ) - : myIter( iter ) - , myParentElement( iterParentElement ) - , myXDoc( parentXDoc ) - , myReturnableAttribute() - { - if( myParentElement.type() != pugi::node_element && myParentElement.type() != pugi::node_pi ) - { - MX_THROW( "improperly constructed, parent should be of element type" ); - } - } - - - bool PugiAttributeIterImpl::getIsPayloadNull() const - { - auto ptr = myXDoc.lock(); - - if( !ptr ) - { - return true; - } - else if( myParentElement.type() != pugi::node_element ) - { - return true; - } - - return false; - } - - - bool PugiAttributeIterImpl::getIsEndIter() const - { - if ( myIter == myParentElement.attributes_end() ) - { - return true; - } - - return false; - } - - - XAttributeIterImplUP PugiAttributeIterImpl::clone() const - { - return XAttributeIterImplUP{ new PugiAttributeIterImpl{ *this } }; - } - - - bool PugiAttributeIterImpl::equals( const XAttributeIterator& other ) const - { - const auto& otherImpl = other.reveal(); - if( !otherImpl ) - { - return false; - } - auto pugi = dynamic_cast( otherImpl.get() ); - if( !pugi ) - { - throw std::runtime_error( "PugiAttributeIterImpl::equals - a downcast failed" ); - } - return this->myIter == pugi->myIter; - } - - - XAttribute& PugiAttributeIterImpl::getRef() const - { - if( getIsPayloadNull() ) - { - MX_THROW_XNULL; - } - - if ( getIsEndIter() ) - { - MX_THROW( "XAttributeIterator attempted to dereference an 'end' iterator" ); - } - - myReturnableAttribute = PugiAttribute{ *myIter, myParentElement, myXDoc.lock() }; - return myReturnableAttribute; - } - - - XAttribute* PugiAttributeIterImpl::getPtr() const - { - if( getIsPayloadNull() ) - { - MX_THROW_XNULL; - } - - if ( getIsEndIter() ) - { - MX_THROW( "XAttributeIterator attempted to dereference an 'end' iterator" ); - } - - myReturnableAttribute = PugiAttribute{ *myIter, myParentElement, myXDoc.lock() }; - return &myReturnableAttribute; - } - - const PugiAttributeIterImpl& PugiAttributeIterImpl::increment() - { - ++myIter; - return *this; - } - - - const PugiAttributeIterImpl& PugiAttributeIterImpl::decrement() - { - --myIter; - return *this; - } - } -} diff --git a/Sourcecode/private/mx/xml/PugiAttributeIterImpl.h b/Sourcecode/private/mx/xml/PugiAttributeIterImpl.h deleted file mode 100755 index 7a1c0e9cf..000000000 --- a/Sourcecode/private/mx/xml/PugiAttributeIterImpl.h +++ /dev/null @@ -1,54 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once - - -#include "mx/xml/XAttributeIterator.h" -#include "mx/xml/XAttributeIterImpl.h" -#include "mx/xml/PugiAttribute.h" -#include "mx/pugixml/pugixml.hpp" - -namespace mx -{ - namespace xml - { - class XDoc; - using XDocCPtr = std::shared_ptr; - using XDocCWPtr = std::weak_ptr; - - class PugiAttributeIterImpl : public XAttributeIterImpl - { - public: - - PugiAttributeIterImpl(); - - PugiAttributeIterImpl( - const pugi::xml_attribute_iterator& iter, - const pugi::xml_node& iterParentElement, - const XDocCPtr& parentXDoc ); - - virtual ~PugiAttributeIterImpl() = default; - - virtual bool getIsPayloadNull() const override; - virtual bool getIsEndIter() const override; - - virtual XAttributeIterImplUP clone() const override; - virtual bool equals( const XAttributeIterator& other ) const override; - - virtual XAttribute& getRef() const override; - virtual XAttribute* getPtr() const override; - - virtual const PugiAttributeIterImpl& increment() override; - virtual const PugiAttributeIterImpl& decrement() override; - - public: - pugi::xml_attribute_iterator myIter; - pugi::xml_node myParentElement; - XDocCWPtr myXDoc; - mutable PugiAttribute myReturnableAttribute; - }; - } -} -//PugiAttributeIterImpl{ myParentElement.attributes_begin(), myParentElement, myXDoc.lock() } diff --git a/Sourcecode/private/mx/xml/PugiDoc.cpp b/Sourcecode/private/mx/xml/PugiDoc.cpp deleted file mode 100755 index 4048320b7..000000000 --- a/Sourcecode/private/mx/xml/PugiDoc.cpp +++ /dev/null @@ -1,593 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#include "mx/xml/PugiDoc.h" -#include "mx/xml/PugiElement.h" -#include "mx/utility/Throw.h" - -#include - -namespace mx -{ - namespace xml - { - static const unsigned int standardOptions = pugi::parse_default | pugi::parse_declaration | pugi::parse_doctype | pugi::parse_pi; - - PugiDoc::PugiDoc() - : myDoc() - , myXmlVersion( DEFAULT_XML_VERSION ) - , myEncoding( DEFAULT_ENCODING ) - , myIsStandalone( false ) - , myDoWriteBom( false ) - { - std::istringstream is( R"()" ); - auto options = standardOptions; - myDoc.load( is, options ); - } - - // Don't look at me, I'm ugly. - - void PugiDoc::loadStream( std::istream& is ) - { - auto options = standardOptions; - auto parseResult = myDoc.load( is, options ); - if( parseResult.status != pugi::status_ok ) - { - std::stringstream ss; - ss << "pugixml parsing failed - '"; - switch ( parseResult.status ) - { - case pugi::status_file_not_found: - ss << "status_file_not_found'"; - break; - - case pugi::status_io_error: - ss << "status_io_error'"; - break; - - case pugi::status_out_of_memory: - ss << "status_out_of_memory'"; - break; - - case pugi::status_internal_error: - ss << "status_internal_error'"; - break; - - case pugi::status_unrecognized_tag: - ss << "status_unrecognized_tag'"; - break; - - case pugi::status_bad_pi: - ss << "status_bad_pi'"; - break; - - case pugi::status_bad_comment: - ss << "status_bad_comment'"; - break; - - case pugi::status_bad_cdata: - ss << "status_bad_cdata'"; - break; - - case pugi::status_bad_doctype: - ss << "status_bad_doctype'"; - break; - - case pugi::status_bad_pcdata: - ss << "status_bad_pcdata'"; - break; - - case pugi::status_bad_start_element: - ss << "status_bad_start_element'"; - break; - - case pugi::status_bad_attribute: - ss << "status_bad_attribute'"; - break; - - case pugi::status_end_element_mismatch: - ss << "status_end_element_mismatch'"; - break; - - case pugi::status_append_invalid_root: - ss << "status_append_invalid_root'"; - break; - - case pugi::status_no_document_element: - ss << "status_no_document_element'"; - break; - - default: - break; - } - ss << " - " << parseResult.description(); - MX_THROW( ss.str() ); - } - else if( myDoc.begin() == myDoc.end() ) - { - MX_THROW( "pugixml parse created an empty document" ); - } - else if( myDoc.begin()->type() != pugi::node_declaration ) - { - auto xmlDeclaration = myDoc.prepend_child( pugi::node_declaration ); - xmlDeclaration.set_name( "xml" ); - auto ver = xmlDeclaration.append_attribute( "version" ); - ver.set_value( "1.0" ); - ver = xmlDeclaration.append_attribute( "encoding" ); - ver.set_value( "UTF-8" ); - } - else - { - auto xmlDec = *( myDoc.begin() ); - if( xmlDec.attributes_begin() == xmlDec.attributes_end() ) - { - auto attr = xmlDec.append_attribute( "version" ); - attr.set_value( "1.0" ); - attr = xmlDec.append_attribute( "encoding" ); - attr.set_value( "UTF-8" ); - } - else - { - auto it = xmlDec.attributes_begin(); - auto end = xmlDec.attributes_end(); - if( !utility::compareCaseInsensitive( "version", it->name() ) ) - { - auto attr = xmlDec.prepend_attribute( "version" ); - attr.set_value( "1.0" ); - } - auto verAttr = xmlDec.attributes_begin(); - it = xmlDec.attributes_begin(); - ++it; - if( it == end || !utility::compareCaseInsensitive( "encoding", it->name() ) ) - { - auto encodingAttr = xmlDec.insert_attribute_after( "encoding", *verAttr ); - encodingAttr.set_value( "UTF-8" ); - } - } - } - parseXmlDeclarationValues(); - - // if the detected encoding doesn't match the encoding tag, take the actual encoding ?? - switch ( parseResult.encoding ) - { - case pugi::encoding_auto: - case pugi::encoding_utf8: - case pugi::encoding_utf16_le: - case pugi::encoding_utf16_be: - setEncoding( Encoding::utfEight ); - break; - case pugi::encoding_utf16: - setEncoding( Encoding::utfSixteen ); - break; - case pugi::encoding_utf32_le: - case pugi::encoding_utf32_be: - case pugi::encoding_utf32: - case pugi::encoding_wchar: - case pugi::encoding_latin1: - default: - setEncoding( Encoding::utfEight ); - break; - } - } - - - void PugiDoc::saveStream( std::ostream& os ) const - { - auto pugiEncoding = pugi::encoding_utf8; - switch( myEncoding ) - { - case Encoding::utfEight: - pugiEncoding = pugi::encoding_utf8; - break; - case Encoding::utfSixteen: - pugiEncoding = pugi::encoding_utf16; - break; - default: - pugiEncoding = pugi::encoding_utf8; - break; - } - auto flags = pugi::format_indent; - - if( myDoWriteBom ) - { - flags = pugi::format_indent | pugi::format_write_bom; - } - - pugi::xml_writer_stream writer( os ); - myDoc.save( writer, " ", flags, pugiEncoding ); - } - - - void PugiDoc::loadFile( const std::string& filename ) - { - std::ifstream infile( filename.c_str() ); - if( !infile.is_open() ) - { - std::string message = std::string{ "error opening input file: " } + filename; - throw std::runtime_error( message ); - } - - loadStream( infile ); - infile.close(); - } - - - void PugiDoc::saveFile( const std::string& filename ) const - { - std::ofstream outfile( filename.c_str() ); - if( !outfile.is_open() ) - { - std::string message = std::string{ "error opening file for writing: " } + filename; - throw std::runtime_error( message ); - } - - saveStream( outfile ); - outfile.close(); - } - - - XmlVersion PugiDoc::getXmlVersion() const - { - return myXmlVersion; - } - - - void PugiDoc::setXmlVersion( XmlVersion value ) - { - if( value == XmlVersion::unknown ) - { - MX_THROW( "cannot set the XmlVersion to 'unknown'" ); - } - if( myDoc.begin() == myDoc.end() ) - { - MX_THROW( "the xml document does not have an xml declaration - bad state" ); - } - else if ( myDoc.begin()->type() != pugi::node_declaration ) - { - MX_THROW( "the first node in the xml document should be an xml declaration - bad state" ); - } - else - { - auto node = *( myDoc.begin() ); - if( node.attributes_begin() == node.attributes_end() ) - { - node.prepend_attribute( "version" ); - } - auto attr = node.attributes_begin(); - if( attr == node.attributes_end() ) - { - MX_THROW( "something bad happened - this line should be unreachable" ); - } - if( !utility::compareCaseInsensitive( "version", attr->name() ) ) - { - MX_THROW( "the first attribute of the xml declaration must be 'version'" ); - } - attr->set_value( toString( value ).c_str() ); - } - myXmlVersion = value; - } - - - Encoding PugiDoc::getEncoding() const - { - return myEncoding; - } - - - void PugiDoc::setEncoding( Encoding value ) - { - if( value == Encoding::unknown ) - { - MX_THROW( "the encoding cannot be unknown" ); - } - auto attr = getXmlDeclarationAttribute( "encoding" ); - if( ! utility::compareCaseInsensitive( "encoding", attr.name() ) ) - { - MX_THROW( "the 'encoding' attribute could not be found" ); - } - attr.set_value( toString( value ).c_str() ); - myEncoding = value; - } - - - bool PugiDoc::getHasStandaloneAttribute() const - { - auto standalone = getXmlDeclarationAttribute( "standalone" ); - if( mx::utility::compareCaseInsensitive( standalone.name(), "standalone" ) ) - { - return true; - } - return false; - } - - - void PugiDoc::setHasStandaloneAttribute( bool value ) - { - bool isStandaloneCurrentlyPresent = getHasStandaloneAttribute(); - if( isStandaloneCurrentlyPresent && value ) - { - return; - } - else if ( !isStandaloneCurrentlyPresent && !value ) - { - return; - } - else if ( value ) - { - auto xmlDeclarationNode = getXmlDeclarationNode(); - auto it = xmlDeclarationNode.attributes_begin(); - if( it == xmlDeclarationNode.attributes_end() ) - { - MX_THROW( "the xml declaration node must have attributes" ); - } - if( !utility::compareCaseInsensitive( "version", it->name() ) ) - { - MX_THROW( "the first xml declaration attribute must be 'version'" ); - } - ++it; - if( it == xmlDeclarationNode.attributes_end() ) - { - MX_THROW( "the xml declaration node must have an 'encoding' attribute" ); - } - if( !utility::compareCaseInsensitive( "encoding", it->name() ) ) - { - MX_THROW( "the second attribute of the xml declaration node must be 'encoding'" ); - } - auto attr = xmlDeclarationNode.insert_attribute_after( "standalone", *it ); - if( myIsStandalone ) - { - attr.set_value( "yes" ); - } - else - { - attr.set_value( "no" ); - } - return; - } - else if ( !value ) - { - auto xmlDeclarationNode = getXmlDeclarationNode(); - for( auto it = xmlDeclarationNode.attributes_begin(); - it != xmlDeclarationNode.attributes_end(); ++it ) - { - if( utility::compareCaseInsensitive( "standalone", it->name() ) ) - { - xmlDeclarationNode.remove_attribute( *it ); - myIsStandalone = false; - return; - } - } - } - } - - - bool PugiDoc::getIsStandalone() const - { - return myIsStandalone; - } - - - void PugiDoc::setIsStandalone( bool value ) - { - setHasStandaloneAttribute( true ); - auto attr = getXmlDeclarationAttribute( "standalone" ); - if( value ) - { - attr.set_value( "yes" ); - } - else - { - attr.set_value( "no" ); - } - myIsStandalone = value; - } - - - bool PugiDoc::getHasDoctypeDeclaration() const - { - auto doctype = getDoctypeNode(); - if( doctype.type() != pugi::node_doctype ) - { - return false; - } - return true; - } - - - void PugiDoc::setHasDoctypeDeclaration( bool value ) - { - bool isDoctypeCurrentlyPresent = getHasDoctypeDeclaration(); - if( value && isDoctypeCurrentlyPresent ) - { - // is requested and already exists, nothing to do - return; - } - else if( !isDoctypeCurrentlyPresent && !value ) - { - // is not requested and doesn't exist, nothing to do - return; - } - else if ( value ) - { - // add doctype - if( myDoc.begin() == myDoc.end() ) - { - MX_THROW( "empty documet" ); - } - auto xmlDeclarationNode = *( myDoc.begin() ); - if( xmlDeclarationNode.type() != pugi::node_declaration ) - { - MX_THROW( "bad xml document state" ); - } - myDoc.insert_child_after( pugi::node_doctype, xmlDeclarationNode ); - return; - } - else if ( !value ) - { - // delete doctype - for( auto it = myDoc.begin(); it != myDoc.end(); ++it ) - { - if( it->type() == pugi::node_doctype ) - { - myDoc.remove_child( *it ); - return; - } - } - } - } - - - std::string PugiDoc::getDoctypeValue() const - { - auto doctypeNode = getDoctypeNode(); - return doctypeNode.value(); - } - - - void PugiDoc::setDoctypeValue( const std::string& value ) - { - setHasDoctypeDeclaration( true ); - auto doctypeNode = getDoctypeNode(); - doctypeNode.set_value( value.c_str() ); - } - - - XElementPtr PugiDoc::getRoot() const - { - for( auto it = myDoc.begin(); - it != myDoc.end(); ++ it ) - { - if( it->type() == pugi::node_element ) - { - return std::make_shared( *it, XDoc::shared_from_this() ); - } - } - return XElementPtr{}; - } - - - void PugiDoc::parseXmlDeclarationValues() - { - parseXmlVersionFromDoc(); - parseEncodingFromDoc(); - parseStandalone(); - } - - - void PugiDoc::parseXmlVersionFromDoc() - { - auto xmlDeclaration = getXmlDeclarationNode(); - if( xmlDeclaration.type() != pugi::node_declaration ) - { - MX_THROW( "the xml document must have an xml declaration as its first node" ); - } - - auto version = xmlDeclaration.attribute( "version" ); - std::string value{ version.value() }; - if( value == "" ) - { - myXmlVersion = DEFAULT_XML_VERSION; - setXmlVersion( DEFAULT_XML_VERSION ); - return; - } - - myXmlVersion = parseXmlVersion( value ); - } - - - void PugiDoc::parseEncodingFromDoc() - { - auto attr = getXmlDeclarationAttribute( "encoding" ); - if( !utility::compareCaseInsensitive( "encoding", attr.name() ) ) - { - MX_THROW( "encoding value was not found" ); - } - myEncoding = parseEncoding( attr.value() ); - attr.set_value( toString( myEncoding ).c_str() ); - } - - - void PugiDoc::parseStandalone() - { - - if( !getHasStandaloneAttribute() ) - { - myIsStandalone = false; - return; - } - auto standalone = getXmlDeclarationAttribute( "standalone" ); - if( std::string{ standalone.value() } == std::string{ "yes" } ) - { - myIsStandalone = true; - return; - } - myIsStandalone = false; - } - - - pugi::xml_node PugiDoc::getDoctypeNode() const - { - if( myDoc.empty() ) - { - return pugi::xml_node{}; - } - - auto childrenIter = myDoc.begin(); - if( childrenIter == myDoc.end() ) - { - return pugi::xml_node{}; - } - if( childrenIter->type() == pugi::node_declaration ) - { - ++childrenIter; - } - if( childrenIter == myDoc.end() || - childrenIter->type() != pugi::node_doctype ) - { - return pugi::xml_node{}; - } - else return *childrenIter; - } - - - pugi::xml_node PugiDoc::getXmlDeclarationNode() const - { - if( myDoc.empty() ) - { - return pugi::xml_node{}; - } - - auto firstNode = myDoc.first_child(); - - if( firstNode.type() != pugi::node_declaration ) - { - return pugi::xml_node{}; - } - std::string nodeName{ firstNode.name() }; - if( !mx::utility::compareCaseInsensitive( nodeName, "xml" ) ) - { - return pugi::xml_node{}; - } - - return firstNode; - } - - - pugi::xml_attribute PugiDoc::getXmlDeclarationAttribute( const char* const name ) const - { - auto declaration = getXmlDeclarationNode(); - if( declaration.type() != pugi::node_declaration ) - { - return pugi::xml_attribute{}; - } - return declaration.attribute( name ); - } - - - void PugiDoc::setDoWriteByteOrderMark( bool value ) - { - myDoWriteBom = value; - } - } -} diff --git a/Sourcecode/private/mx/xml/PugiDoc.h b/Sourcecode/private/mx/xml/PugiDoc.h deleted file mode 100755 index 1148067e8..000000000 --- a/Sourcecode/private/mx/xml/PugiDoc.h +++ /dev/null @@ -1,71 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once - -#include "mx/xml/XDoc.h" -#include "mx/pugixml/pugixml.hpp" - -namespace mx -{ - namespace xml - { - - class PugiDoc; - using PugiDocPtr = std::shared_ptr; - - class PugiDoc : public XDoc - { - public: - virtual ~PugiDoc() = default; - PugiDoc(); - PugiDoc( const PugiDoc& other ) = delete; - PugiDoc( PugiDoc&& other ) = default; - PugiDoc& operator=( const PugiDoc& other ) = delete; - PugiDoc& operator=( PugiDoc&& other ) = default; - - virtual void loadStream( std::istream& is ) override; - virtual void saveStream( std::ostream& os ) const override; - - virtual void loadFile( const std::string& filename ) override; - virtual void saveFile( const std::string& filename ) const override; - - // Xml Declaration - virtual XmlVersion getXmlVersion() const override; - virtual void setXmlVersion( XmlVersion value ) override; - virtual Encoding getEncoding() const override; - virtual void setEncoding( Encoding value ) override; - virtual bool getHasStandaloneAttribute() const override; - virtual void setHasStandaloneAttribute( bool value ) override; - virtual bool getIsStandalone() const override; - virtual void setIsStandalone( bool value ) override; - - // Doctype Declaration - virtual bool getHasDoctypeDeclaration() const override; - virtual void setHasDoctypeDeclaration( bool value ) override; - virtual std::string getDoctypeValue() const override; - virtual void setDoctypeValue( const std::string& value ) override; - - // Node Access - virtual XElementPtr getRoot() const override; - - virtual void setDoWriteByteOrderMark( bool value ) override; - - private: - pugi::xml_document myDoc; - XmlVersion myXmlVersion; - Encoding myEncoding; - bool myIsStandalone; - bool myDoWriteBom; - - void parseXmlDeclarationValues(); - void parseXmlVersionFromDoc(); - void parseEncodingFromDoc(); - void parseStandalone(); - pugi::xml_node getDoctypeNode() const; - pugi::xml_node getXmlDeclarationNode() const; - pugi::xml_attribute getXmlDeclarationAttribute( const char* const name ) const; - }; - } -} diff --git a/Sourcecode/private/mx/xml/PugiElement.cpp b/Sourcecode/private/mx/xml/PugiElement.cpp deleted file mode 100755 index ca4efc859..000000000 --- a/Sourcecode/private/mx/xml/PugiElement.cpp +++ /dev/null @@ -1,359 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#include "mx/xml/PugiElement.h" -#include "mx/xml/PugiElementIterImpl.h" -#include "mx/xml/XAttributeIterImpl.h" -#include "mx/xml/PugiAttributeIterImpl.h" -#include "mx/xml/XThrow.h" - -#define MX_CHECK_NULL_NODE if( getIsNull() ) { MX_THROW_XNULL; } -#define MX_CHECK_NODE_ELEMENT if ( myNodeType != pugi::node_element && myNodeType != pugi::node_pi ) { MX_THROW( "bad internal state, node should be an element" ); } - -namespace mx -{ - namespace xml - { - PugiElement::PugiElement() - : myNode() - , myXDoc( XDocCPtr{ nullptr} ) - , myNodeType{ pugi::xml_node_type::node_null } - , myEndIter{} - { - update(); - } - - - PugiElement::PugiElement( - const pugi::xml_node& node, - const XDocCPtr& xdoc ) - : myNode( node ) - , myXDoc( xdoc ) - , myNodeType{ pugi::xml_node_type::node_null } - , myEndIter{} - { - update(); - const bool isElement = myNodeType == pugi::node_element; - const bool isProcessingInstruction = myNodeType == pugi::node_pi; - - if( ( !isElement ) && ( !isProcessingInstruction ) ) - { - MX_THROW( "bad internal state, node should be an element" ); - } - } - - - XElementPtr PugiElement::clone() const - { - return XElementPtr( new PugiElement{ myNode, myXDoc.lock() } ); - } - - - XElementType PugiElement::getType() const - { - if( getIsNull() ) - { - return XElementType::null; - } - - if( std::string{ myNode.text().as_string() }.length() > 0 ) - { - return XElementType::text; - } - - if( begin() == end() ) - { - return XElementType::empty; - } - - return XElementType::element; - } - - - bool PugiElement::getIsNull() const - { - auto ptr = myXDoc.lock(); - - if( !ptr ) - { - return true; - } - else if( myNodeType != pugi::node_element ) - { - if( myNodeType != pugi::node_pi ) - { - return true; - } - } - - return false; - } - - - bool PugiElement::getIsProcessingInstruction() const - { - if( myNodeType == pugi::node_pi ) - { - return true; - } - - return false; - } - - - std::string PugiElement::getName() const - { - if( getIsNull() ) - { - return ""; - } - return std::string{ myNode.name() }; - } - - - std::string PugiElement::getValue() const - { - if( getIsNull() ) - { - return std::string{}; - } - - if (getIsProcessingInstruction()) - { - return std::string{ myNode.value() }; - } - else - { - return std::string{ myNode.text().as_string() }; - } - } - - - void PugiElement::setName( const std::string& name ) - { - if( getIsNull() ) - { - return; - } - myNode.set_name( name.c_str() ); - update(); - } - - - void PugiElement::setValue( const std::string& value ) - { - if( getIsNull() ) - { - return; - } - XElementType xetype = getType(); - - if( xetype == XElementType::element ) - { - MX_THROW( "the object cannot hold both elements and text" ); - } - else if( xetype == XElementType::empty ) - { - auto newnode = myNode.prepend_child( pugi::node_pcdata ); - newnode.set_value( value.c_str() ); - update(); - return; - } - else if( xetype == XElementType::text ) - { - auto it = myNode.begin(); - it->set_value( value.c_str() ); - update(); - return; - } - } - - - XDocCPtr PugiElement::getDoc() const - { - return myXDoc.lock(); - } - - - XElementPtr PugiElement::getParent() const - { - MX_CHECK_NULL_NODE; - MX_CHECK_NODE_ELEMENT; - return XElementPtr{ new PugiElement{ myNode.parent(), myXDoc.lock() } }; - } - - - XElementPtr PugiElement::getNextSibling() const - { - MX_CHECK_NULL_NODE; - MX_CHECK_NODE_ELEMENT; - const auto nextSibling = myNode.next_sibling(); - - if( nextSibling.type() == pugi::node_null ) - { - return XElementPtr{}; - } - - if( nextSibling.type() == pugi::node_element ) - { - return XElementPtr{ new PugiElement{ nextSibling, myXDoc.lock() } }; - } - - if( nextSibling.type() == pugi::node_pi ) - { - return XElementPtr{ new PugiElement{ nextSibling, myXDoc.lock() } }; - } - - return XElementPtr{}; - } - - - XElementIterator PugiElement::begin() const - { - auto iter = beginWithProcessingInstructions(); - iter.setSkipProcessingInstructions( true ); - - if( iter.getSkipProcessingInstructions() && - iter != end() && - iter->getIsProcessingInstruction() ) - { - ++iter; - } - - return iter; - } - - - XElementIterator PugiElement::beginWithProcessingInstructions() const - { - MX_CHECK_NULL_NODE; - MX_CHECK_NODE_ELEMENT; - const auto beginIter = myNode.begin(); - - if( beginIter == myNode.end() ) - { - return this->end(); - } - - const auto type = beginIter->type(); - - if( type == pugi::node_element || - type == pugi::node_pi ) - { - auto result = XElementIterator( PugiElementIterImpl{ myNode.begin(), myNode, myXDoc.lock() } ); - result.setSkipProcessingInstructions( false ); - return result; - } - - return this->end(); - } - - - XElementIterator PugiElement::end() const - { - MX_CHECK_NULL_NODE; - MX_CHECK_NODE_ELEMENT; - return myEndIter; - } - - - XAttributeIterator PugiElement::attributesBegin() const - { - MX_CHECK_NULL_NODE; - MX_CHECK_NODE_ELEMENT; - return XAttributeIterator( PugiAttributeIterImpl{ myNode.attributes_begin(), myNode, myXDoc.lock() } ); - } - - - XAttributeIterator PugiElement::attributesEnd() const - { - MX_CHECK_NULL_NODE; - MX_CHECK_NODE_ELEMENT; - return XAttributeIterator( PugiAttributeIterImpl{ myNode.attributes_end(), myNode, myXDoc.lock() } ); - } - - - - XElementPtr PugiElement::appendChild( const std::string& name ) - { - MX_CHECK_NULL_NODE; - MX_CHECK_NODE_ELEMENT; - const auto result = XElementPtr{ new PugiElement{ myNode.append_child( name.c_str() ), myXDoc.lock() } }; - update(); - return result; - } - - - XElementPtr PugiElement::prependChild( const std::string& name ) - { - MX_CHECK_NULL_NODE; - MX_CHECK_NODE_ELEMENT; - const auto result = XElementPtr{ new PugiElement{ myNode.prepend_child( name.c_str() ), myXDoc.lock() } }; - update(); - return result; - } - - - XElementPtr PugiElement::insertSiblingAfter( const std::string& newElementName ) - { - MX_CHECK_NULL_NODE; - MX_CHECK_NODE_ELEMENT; - auto newNode = myNode.parent().insert_child_after( newElementName.c_str(), myNode ); - const auto result = XElementPtr{ new PugiElement{ newNode, myXDoc.lock() } }; - update(); - return result; - } - - - bool PugiElement::removeChild( const std::string& elementName ) - { - const auto result = myNode.remove_child( elementName.c_str() ); - update(); - return result; - } - - - XAttributePtr PugiElement::appendAttribute( const std::string & name ) - { - MX_CHECK_NULL_NODE; - MX_CHECK_NODE_ELEMENT; - const auto result = XAttributePtr{ new PugiAttribute{ myNode.append_attribute( name.c_str() ), myNode, myXDoc.lock() } }; - update(); - return result; - } - - - XAttributePtr PugiElement::prependAttribute( const std::string & name ) - { - MX_CHECK_NULL_NODE; - MX_CHECK_NODE_ELEMENT; - const auto result = XAttributePtr{ new PugiAttribute{ myNode.prepend_attribute( name.c_str() ), myNode, myXDoc.lock() } }; - update(); - return result; - } - - - void PugiElement::removeAttribute( const XAttributeIterator& iter ) - { - auto it = myNode.attributes_begin(); - auto e = myNode.attributes_end(); - for( ; it != e; ++ it ) - { - if( iter->getName() == it->name() ) - { - myNode.remove_attribute( *it ); - update(); - return; - } - } - } - - - void PugiElement::update() - { - myNodeType = myNode.type(); - myEndIter = XElementIterator( PugiElementIterImpl{ myNode.end(), myNode, myXDoc.lock() } ); - } - } -} diff --git a/Sourcecode/private/mx/xml/PugiElement.h b/Sourcecode/private/mx/xml/PugiElement.h deleted file mode 100755 index c1a32a856..000000000 --- a/Sourcecode/private/mx/xml/PugiElement.h +++ /dev/null @@ -1,88 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once - -#include "mx/xml/XElement.h" -#include "mx/pugixml/pugixml.hpp" -#include "mx/xml/XElementIterator.h" - -#include - - -namespace mx -{ - namespace xml - { - class PugiElement; - using PugiElementPtr = std::shared_ptr; - - class XDoc; - using XDocCPtr = std::shared_ptr; - using XDocCWPtr = std::weak_ptr; - - class PugiElement : public XElement - { - public: - PugiElement(); - - PugiElement( - const pugi::xml_node& node, - const XDocCPtr& xdoc ); - - ~PugiElement() = default; - - // copy - PugiElement( const PugiElement& other ) = default; - PugiElement& operator=( const PugiElement& other ) = default; - - // move - PugiElement( PugiElement&& other ) noexcept = default; - PugiElement& operator=( PugiElement&& other ) noexcept = default; - - virtual XElementPtr clone() const override; - - virtual XElementType getType() const override; - virtual bool getIsNull() const override; - - virtual bool getIsProcessingInstruction() const override; - - virtual std::string getName() const override; - virtual std::string getValue() const override; - - virtual void setName( const std::string& name ) override; - virtual void setValue( const std::string& name ) override; - - virtual XDocCPtr getDoc() const override; - virtual XElementPtr getParent() const override; - virtual XElementPtr getNextSibling() const override; - - virtual XElementIterator begin() const override; - virtual XElementIterator beginWithProcessingInstructions() const override; - virtual XElementIterator end() const override; - - virtual XAttributeIterator attributesBegin() const override; - virtual XAttributeIterator attributesEnd() const override; - - virtual XElementPtr appendChild( const std::string& name ) override; - virtual XElementPtr prependChild( const std::string& name ) override; - - virtual XElementPtr insertSiblingAfter( const std::string& newElementName ) override; - virtual bool removeChild( const std::string& elementName ) override; - - virtual XAttributePtr appendAttribute( const std::string& name ) override; - virtual XAttributePtr prependAttribute( const std::string& name ) override; - virtual void removeAttribute( const XAttributeIterator& iter ) override; - - private: - pugi::xml_node myNode; - XDocCWPtr myXDoc; - pugi::xml_node_type myNodeType; - XElementIterator myEndIter; - - private: - void update(); - }; - } -} diff --git a/Sourcecode/private/mx/xml/PugiElementIterImpl.cpp b/Sourcecode/private/mx/xml/PugiElementIterImpl.cpp deleted file mode 100755 index c0fe7f1b1..000000000 --- a/Sourcecode/private/mx/xml/PugiElementIterImpl.cpp +++ /dev/null @@ -1,253 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#include "mx/xml/PugiElementIterImpl.h" -#include "mx/xml/XThrow.h" - -namespace mx -{ - namespace xml - { - PugiElementIterImpl::PugiElementIterImpl() - : myIter() - , myIterParent() - , myXDoc() - , mySkipProcessingInstructions{ true } - , myReturnableElement{ nullptr } - { - - } - - - PugiElementIterImpl::PugiElementIterImpl( - const pugi::xml_node_iterator& iter, - const pugi::xml_node& iterParent, - const XDocCPtr& parentDoc ) - : myIter( iter ) - , myIterParent( iterParent ) - , myXDoc( parentDoc ) - , mySkipProcessingInstructions{ true } - , myReturnableElement{ nullptr } - { - - } - - PugiElementIterImpl::PugiElementIterImpl( const PugiElementIterImpl& inOther ) - : myIter( inOther.myIter ) - , myIterParent( inOther.myIterParent ) - , myXDoc( inOther.myXDoc ) - , mySkipProcessingInstructions{ inOther.mySkipProcessingInstructions } - , myReturnableElement{ inOther.myReturnableElement == nullptr ? nullptr : std::make_unique( *inOther.myReturnableElement ) } - { - - } - - - PugiElementIterImpl& PugiElementIterImpl::operator=( const PugiElementIterImpl& inOther ) - { - myIter = inOther.myIter; - myIterParent = inOther.myIterParent; - myXDoc = inOther.myXDoc; - mySkipProcessingInstructions = inOther.mySkipProcessingInstructions; - myReturnableElement = inOther.myReturnableElement == nullptr ? nullptr : std::make_unique( *inOther.myReturnableElement ); - return *this; - } - - - XElementIterImplUP PugiElementIterImpl::clone() const - { - return XElementIterImplUP{ new PugiElementIterImpl{ *this } }; - } - - - bool PugiElementIterImpl::getIsPayloadNull() const - { - auto ptr = myXDoc.lock(); - - if( !ptr ) - { - return true; - } - - const auto type = myIterParent.type(); - const auto isElement = type == pugi::node_element; - const auto isProcessingInstruction = type == pugi::node_pi; - - if( ( !isElement ) && ( !isProcessingInstruction ) ) - { - return true; - } - - return false; - } - - - bool PugiElementIterImpl::getIsEndIter() const - { - if ( myIter == myIterParent.end() ) - { - return true; - } - - return false; - } - - - bool PugiElementIterImpl::getIsBeginIter() const - { - if ( myIter == myIterParent.begin() ) - { - return true; - } - - return false; - } - - - bool PugiElementIterImpl::getIsProcessingInstruction() const - { - if( this->getIsEndIter() ) - { - return false; - } - else if( this->getIsPayloadNull() ) - { - return false; - } - - const auto type = myIter->type(); - - if( type == pugi::node_pi ) - { - return true; - } - - return false; - } - - - bool PugiElementIterImpl::getSkipProcessingInstructions() const - { - return mySkipProcessingInstructions; - } - - - void PugiElementIterImpl::setSkipProcessingInstructions( bool inValue ) - { - mySkipProcessingInstructions = inValue; - } - - - bool PugiElementIterImpl::equals( const XElementIterator& other ) const - { - - auto& otherXImplPtr = other.reveal(); - - if( !otherXImplPtr ) - { - return false; - } - - auto otherPtr = dynamic_cast( otherXImplPtr.get() ); - - - return myIter == otherPtr->myIter; - } - - - XElement& PugiElementIterImpl::getRef() const - { - if( getIsPayloadNull() ) - { - MX_THROW_XNULL; - } - - if ( getIsEndIter() ) - { - MX_THROW( "XElementIterator attempted to dereference an 'end' iterator" ); - } - - myReturnableElement = std::make_unique( *myIter, myXDoc.lock() ); - return *myReturnableElement; - } - - - XElement* PugiElementIterImpl::getPtr() const - { - if( getIsPayloadNull() ) - { - MX_THROW_XNULL; - } - - if ( getIsEndIter() ) - { - MX_THROW( "XElementIterator attempted to dereference an 'end' iterator" ); - } - - myReturnableElement = std::make_unique( *myIter, myXDoc.lock() ); - return myReturnableElement.get(); - } - - - const PugiElementIterImpl& PugiElementIterImpl::increment() - { - ++myIter; - - if (mySkipProcessingInstructions) - { - bool isEnd = getIsEndIter(); - bool isPi = getIsProcessingInstruction(); - - while( !isEnd && isPi ) - { - ++myIter; - isEnd = getIsEndIter(); - isPi = getIsProcessingInstruction(); - } - } - return *this; - } - - - const PugiElementIterImpl& PugiElementIterImpl::decrement() - { - --myIter; - - if (mySkipProcessingInstructions) - { - bool isBegin = getIsBeginIter(); - bool isPi = getIsProcessingInstruction(); - - while( !isBegin && isPi ) - { - --myIter; - isBegin = getIsBeginIter(); - isPi = getIsProcessingInstruction(); - } - } - return *this; - } - - - pugi::xml_node_type PugiElementIterImpl::getPugiXmlNodeType() const - { - if( getIsPayloadNull() ) - { - return pugi::node_null; - } - return myIter->type(); - } - - - bool PugiElementIterImpl::hasTextData() const - { - if( getIsPayloadNull() ) - { - return false; - } - return std::string{ myIter->child_value() }.size() > 0; - } - - } -} diff --git a/Sourcecode/private/mx/xml/PugiElementIterImpl.h b/Sourcecode/private/mx/xml/PugiElementIterImpl.h deleted file mode 100755 index f0e6f1e18..000000000 --- a/Sourcecode/private/mx/xml/PugiElementIterImpl.h +++ /dev/null @@ -1,66 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once - - -#include "mx/xml/XElementIterator.h" -#include "mx/xml/XElementIterImpl.h" -#include "mx/xml/XDoc.h" -#include "mx/xml/PugiElement.h" -#include "mx/pugixml/pugixml.hpp" - -namespace mx -{ - namespace xml - { - class PugiElementIterImpl : public XElementIterImpl - { - public: - ~PugiElementIterImpl() = default; - - PugiElementIterImpl(); - - PugiElementIterImpl( - const pugi::xml_node_iterator& iter, - const pugi::xml_node& iterParent, - const XDocCPtr& parentDoc ); - - PugiElementIterImpl( const PugiElementIterImpl& ); - PugiElementIterImpl( PugiElementIterImpl&& ) = default; - - PugiElementIterImpl& operator=( const PugiElementIterImpl& ); - PugiElementIterImpl& operator=( PugiElementIterImpl&& ) = default; - - virtual bool getIsPayloadNull() const override; - virtual bool getIsEndIter() const override; - virtual bool getIsProcessingInstruction() const override; - virtual bool getSkipProcessingInstructions() const override; - virtual void setSkipProcessingInstructions( bool inValue ) override; - - virtual XElementIterImplUP clone() const override; - virtual bool equals( const XElementIterator& other ) const override; - - virtual XElement& getRef() const override; - virtual XElement* getPtr() const override; - - virtual const PugiElementIterImpl& increment() override; - virtual const PugiElementIterImpl& decrement() override; - - // not part of inherited interface - virtual pugi::xml_node_type getPugiXmlNodeType() const final; - virtual bool hasTextData() const final; - - public: - pugi::xml_node_iterator myIter; - pugi::xml_node myIterParent; - XDocCWPtr myXDoc; - bool mySkipProcessingInstructions; - mutable std::unique_ptr myReturnableElement; - - private: - bool getIsBeginIter() const; - }; - } -} diff --git a/Sourcecode/private/mx/xml/XAttribute.h b/Sourcecode/private/mx/xml/XAttribute.h deleted file mode 100755 index 3d25f2f43..000000000 --- a/Sourcecode/private/mx/xml/XAttribute.h +++ /dev/null @@ -1,46 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once - -#include -#include -#include -#include - -namespace mx -{ - namespace xml - { - - class XAttribute; - using XAttributePtr = std::shared_ptr; - - class XAttribute; - using XAttributePtr = std::shared_ptr; - - class XAttributeIterator; - using XAttributeIteratorPtr = std::shared_ptr; - - class XAttributeIterator; - using XAttributeIteratorPtr = std::shared_ptr; - - class XElement; - using XElementPtr = std::shared_ptr; - - class XAttribute - { - public: - virtual ~XAttribute() {} - - virtual bool getIsNull() const = 0; - virtual std::string getName() const = 0; - virtual std::string getValue() const = 0; - - virtual void setName( const std::string& name ) = 0; - virtual void setValue( const std::string& name ) = 0; - }; - - } -} diff --git a/Sourcecode/private/mx/xml/XAttributeIterImpl.h b/Sourcecode/private/mx/xml/XAttributeIterImpl.h deleted file mode 100755 index d47079d1e..000000000 --- a/Sourcecode/private/mx/xml/XAttributeIterImpl.h +++ /dev/null @@ -1,37 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once - -#include "mx/xml/XAttribute.h" - -#include - -namespace mx -{ - namespace xml - { - class XAttributeIterImpl; - using XAttributeIterImplUP = std::unique_ptr; - - class XAttributeIterImpl - { - public: - - virtual ~XAttributeIterImpl() {}; - - virtual bool getIsPayloadNull() const = 0; - virtual bool getIsEndIter() const = 0; - - virtual XAttributeIterImplUP clone() const = 0; - virtual bool equals( const XAttributeIterator& other ) const = 0; - - virtual XAttribute& getRef() const = 0; - virtual XAttribute* getPtr() const = 0; - - virtual const XAttributeIterImpl& increment() = 0; - virtual const XAttributeIterImpl& decrement() = 0; - }; - } -} diff --git a/Sourcecode/private/mx/xml/XAttributeIterator.cpp b/Sourcecode/private/mx/xml/XAttributeIterator.cpp deleted file mode 100755 index a2d52d337..000000000 --- a/Sourcecode/private/mx/xml/XAttributeIterator.cpp +++ /dev/null @@ -1,134 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#include "mx/xml/XAttributeIterator.h" - -namespace mx -{ - namespace xml - { - XAttributeIterator::XAttributeIterator() - : myImpl( nullptr ) - { - - } - - - XAttributeIterator::XAttributeIterator( const XAttributeIterImpl& impl ) - : myImpl( impl.clone() ) - { - - } - - - XAttributeIterator::XAttributeIterator( const XAttributeIterator& other ) - : myImpl( nullptr ) - { - if( other.myImpl ) - { - myImpl = other.myImpl->clone(); - } - } - - - XAttributeIterator& XAttributeIterator::operator=( const XAttributeIterator& other ) - { - if( other.myImpl ) - { - myImpl = other.myImpl->clone(); - } - return *this; - } - - - bool XAttributeIterator::operator==(const XAttributeIterator& rhs) const - { - if( !myImpl ) - { - return false; - } - return myImpl->equals( rhs ); - } - - - bool XAttributeIterator::operator!=(const XAttributeIterator& rhs) const - { - if( !myImpl ) - { - return false; - } - return !myImpl->equals( rhs ); - } - - - XAttribute& XAttributeIterator::operator*() const - { - if( !myImpl ) - { - throw std::runtime_error( "XAttributeIterator::operator*() - null dereference attempted" ); - } - return myImpl->getRef(); - } - - - XAttribute* XAttributeIterator::operator->() const - { - if( !myImpl ) - { - throw std::runtime_error( "XAttributeIterator::operator->() - null dereference attempted" ); - } - return myImpl->getPtr(); - } - - - const XAttributeIterator& XAttributeIterator::operator++() - { - if( myImpl ) - { - myImpl->increment(); - } - return *this; - } - - - XAttributeIterator XAttributeIterator::operator++(int) - { - if( !myImpl ) - { - return XAttributeIterator{}; - } - XAttributeIterImplUP temp = myImpl->clone(); - myImpl->increment(); - return XAttributeIterator{ *temp }; - } - - - const XAttributeIterator& XAttributeIterator::operator--() - { - if( myImpl ) - { - myImpl->decrement(); - } - return *this; - } - - - XAttributeIterator XAttributeIterator::operator--(int) - { - if( !myImpl ) - { - return XAttributeIterator{}; - } - XAttributeIterImplUP temp = myImpl->clone(); - myImpl->decrement(); - return XAttributeIterator{ *temp }; - } - - - const XAttributeIterImplUP& XAttributeIterator::reveal() const - { - return myImpl; - } - } -} diff --git a/Sourcecode/private/mx/xml/XAttributeIterator.h b/Sourcecode/private/mx/xml/XAttributeIterator.h deleted file mode 100755 index e270beb08..000000000 --- a/Sourcecode/private/mx/xml/XAttributeIterator.h +++ /dev/null @@ -1,58 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once - -#include "mx/xml/XAttribute.h" -#include "mx/xml/XAttributeIterImpl.h" - -#include -#include - -namespace mx -{ - namespace xml - { - class XAttributeIterator final - { - - public: - XAttributeIterator(); - XAttributeIterator( const XAttributeIterImpl& impl ); - XAttributeIterator( const XAttributeIterator& other ); - XAttributeIterator( XAttributeIterator&& other ) = default; - XAttributeIterator& operator=( const XAttributeIterator& other ); - XAttributeIterator& operator=( XAttributeIterator&& other ) = default; - ~XAttributeIterator() = default; - - // STL Iterator Compliance - typedef ptrdiff_t difference_type; // ??? - typedef XAttribute value_type; - typedef XAttribute* pointer; - typedef XAttribute& reference; - typedef std::bidirectional_iterator_tag iterator_category; - - - // Iterator operators - bool operator==(const XAttributeIterator& rhs) const; - bool operator!=(const XAttributeIterator& rhs) const; - - XAttribute& operator*() const; - XAttribute* operator->() const; - - const XAttributeIterator& operator++(); - XAttributeIterator operator++(int); - - const XAttributeIterator& operator--(); - XAttributeIterator operator--(int); - - // Reveal the private data member, violates - // encapsulation but could not find a better way - const XAttributeIterImplUP& reveal() const; - - private: - XAttributeIterImplUP myImpl; - }; - } -} diff --git a/Sourcecode/private/mx/xml/XDoc.h b/Sourcecode/private/mx/xml/XDoc.h deleted file mode 100755 index fea9feaff..000000000 --- a/Sourcecode/private/mx/xml/XDoc.h +++ /dev/null @@ -1,62 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once - - -#include "mx/xml/XDocSpec.h" -#include "mx/xml/XElement.h" - -#include -#include - -namespace mx -{ - namespace xml - { - - class XDoc; - using XDocPtr = std::shared_ptr; - using XDocCPtr = std::shared_ptr; - - class XDoc : public std::enable_shared_from_this - { - public: - virtual ~XDoc() {} - - // these can throw std::runtime_error - virtual void loadStream( std::istream& is ) = 0; - virtual void saveStream( std::ostream& os ) const = 0; - - // these can throw std::runtime_error - virtual void loadFile( const std::string& filename ) = 0; - virtual void saveFile( const std::string& filename ) const = 0; - - // Xml Declaration - virtual XmlVersion getXmlVersion() const = 0; - virtual void setXmlVersion( XmlVersion value ) = 0; - virtual Encoding getEncoding() const = 0; - virtual void setEncoding( Encoding value ) = 0; - virtual bool getHasStandaloneAttribute() const = 0; - virtual void setHasStandaloneAttribute( bool value ) = 0; - virtual bool getIsStandalone() const = 0; - virtual void setIsStandalone( bool value ) = 0; - - // Doctype Declaration - virtual bool getHasDoctypeDeclaration() const = 0; - virtual void setHasDoctypeDeclaration( bool value ) = 0; - virtual std::string getDoctypeValue() const = 0; - virtual void setDoctypeValue( const std::string& value ) = 0; - - // when calling the write function, this value will - // determine whether or not to include the BOM - virtual void setDoWriteByteOrderMark( bool value ) = 0; - - // Node Access - virtual XElementPtr getRoot() const = 0; - - }; - - } -} diff --git a/Sourcecode/private/mx/xml/XDocSpec.h b/Sourcecode/private/mx/xml/XDocSpec.h deleted file mode 100755 index 85bc4c789..000000000 --- a/Sourcecode/private/mx/xml/XDocSpec.h +++ /dev/null @@ -1,122 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once -#include "mx/utility/Parse.h" - -#include -#include -#include - -namespace mx -{ - namespace xml - { - - enum class XmlVersion - { - unknown, - onePointZero, - onePointOne - }; - - const XmlVersion DEFAULT_XML_VERSION = XmlVersion::onePointZero; - - inline std::ostream& toStream( std::ostream& os, const XmlVersion value ) - { - switch ( value ) - { - case XmlVersion::unknown: - os << "unknown"; - break; - case XmlVersion::onePointZero: - os << "1.0"; - break; - case XmlVersion::onePointOne: - os << "1.1"; - break; - default: - os << "error"; - break; - } - return os; - } - - - inline std::string toString( const XmlVersion value ) - { - std::stringstream ss; - toStream( ss, value ); - return ss.str(); - } - - - inline XmlVersion parseXmlVersion( const std::string& str ) - { - if( utility::compareCaseInsensitive( str, "1.0" ) ) - { - return XmlVersion::onePointZero; - } - - if( utility::compareCaseInsensitive( str, "1.1" ) ) - { - return XmlVersion::onePointOne; - } - - return DEFAULT_XML_VERSION; - } - - - enum class Encoding - { - unknown, - utfEight, - utfSixteen - }; - - const Encoding DEFAULT_ENCODING = Encoding::utfEight; - - inline std::ostream& toStream( std::ostream& os, const Encoding value ) - { - switch ( value ) - { - case Encoding::unknown: - os << "unknown"; - break; - case Encoding::utfEight: - os << "UTF-8"; - break; - case Encoding::utfSixteen: - os << "UTF-16"; - break; - default: - os << "error"; - break; - } - return os; - } - - - inline std::string toString( const Encoding value ) - { - std::stringstream ss; - toStream( ss, value ); - return ss.str(); - } - - - inline Encoding parseEncoding( const std::string& str ) - { - if( utility::compareCaseInsensitive( str, "UTF-8" ) ) - { - return Encoding::utfEight; - } - if( utility::compareCaseInsensitive( str, "UTF-16" ) ) - { - return Encoding::utfSixteen; - } - return DEFAULT_ENCODING; - } - } -} diff --git a/Sourcecode/private/mx/xml/XElement.h b/Sourcecode/private/mx/xml/XElement.h deleted file mode 100755 index df7b9bf0a..000000000 --- a/Sourcecode/private/mx/xml/XElement.h +++ /dev/null @@ -1,109 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - - -#pragma once - -#include -#include -#include -#include - -namespace mx -{ - namespace xml - { - enum class XElementType - { - null, // The element is in a bad, unusable state and getIsNull will return true - empty, // The element has no text and no child elements - element, // The element has child elements - text, // The element has text data - }; - - class XDoc; - using XDocCPtr = std::shared_ptr; - - class XElement; - using XElementPtr = std::shared_ptr; - - class XAttribute; - using XAttributePtr = std::shared_ptr; - - class XElementIterator; - using XElementIteratorPtr = std::shared_ptr; - - class XAttributeIterator; - using XAttributeIteratorPtr = std::shared_ptr; - - - class XElement - { - public: - virtual ~XElement() = default; - virtual XElementPtr clone() const = 0; - - virtual XElementType getType() const = 0; - virtual bool getIsNull() const = 0; - - virtual bool getIsProcessingInstruction() const = 0; - - virtual std::string getName() const = 0; - virtual std::string getValue() const = 0; - - virtual void setName( const std::string& name ) = 0; - virtual void setValue( const std::string& name ) = 0; - - // get the XDoc from which this - // entire XML tree descends - virtual XDocCPtr getDoc() const = 0; - - // get the element that contains this element - // returns an XElement with type == null if this - // element is the root of the entire XML tree - virtual XElementPtr getParent() const = 0; - - // return the next element after this one, can - // return nullptr if there are no more siblings - virtual XElementPtr getNextSibling() const = 0; - - // STL compliant iterators to the elements - // which are children of this element. If - // this element has text or has no children - // then begin() == end() - virtual XElementIterator begin() const = 0; - virtual XElementIterator end() const = 0; - - // if you want iterations to include processing - // instructions then use this function. - virtual XElementIterator beginWithProcessingInstructions() const = 0; - - // STL compliant iterators to the attributes - // of this element. If this element has no - // attributes then begin() == end() - virtual XAttributeIterator attributesBegin() const = 0; - virtual XAttributeIterator attributesEnd() const = 0; - - // add an element as the last child of this element. - // throws if this element's type == text - virtual XElementPtr appendChild( const std::string& name ) = 0; - - // add an element as the first child of this element. - // throws if this element's type == text - virtual XElementPtr prependChild( const std::string& name ) = 0; - - // removes the first occurence of a child element with the given name - virtual bool removeChild( const std::string& elementName ) = 0; - - // adds an element after this element, at this element's - // same level in the tree. throws if this element is the - // root of the entire XML tree - virtual XElementPtr insertSiblingAfter( const std::string& newElementName ) = 0; - - virtual XAttributePtr appendAttribute( const std::string& name ) = 0; - virtual XAttributePtr prependAttribute( const std::string& name ) = 0; - virtual void removeAttribute( const XAttributeIterator& iter ) = 0; - }; - } -} diff --git a/Sourcecode/private/mx/xml/XElementIterImpl.h b/Sourcecode/private/mx/xml/XElementIterImpl.h deleted file mode 100755 index 93b0b70e1..000000000 --- a/Sourcecode/private/mx/xml/XElementIterImpl.h +++ /dev/null @@ -1,41 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - - -#pragma once - -#include "mx/xml/XElementIterator.h" - -#include - -namespace mx -{ - namespace xml - { - class XElementIterImpl; - using XElementIterImplUP = std::unique_ptr; - - class XElementIterImpl - { - public: - - virtual ~XElementIterImpl() {}; - - virtual bool getIsPayloadNull() const = 0; - virtual bool getIsEndIter() const = 0; - virtual bool getIsProcessingInstruction() const = 0; - virtual bool getSkipProcessingInstructions() const = 0; - virtual void setSkipProcessingInstructions( bool inValue ) = 0; - - virtual XElementIterImplUP clone() const = 0; - virtual bool equals( const XElementIterator& other ) const = 0; - - virtual XElement& getRef() const = 0; - virtual XElement* getPtr() const = 0; - - virtual const XElementIterImpl& increment() = 0; - virtual const XElementIterImpl& decrement() = 0; - }; - } -} diff --git a/Sourcecode/private/mx/xml/XElementIterator.cpp b/Sourcecode/private/mx/xml/XElementIterator.cpp deleted file mode 100755 index 935790bd5..000000000 --- a/Sourcecode/private/mx/xml/XElementIterator.cpp +++ /dev/null @@ -1,162 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#include "mx/xml/XElementIterator.h" - -namespace mx -{ - namespace xml - { - XElementIterator::XElementIterator() - : myImpl( nullptr ) - { - - } - - - XElementIterator::XElementIterator( const XElementIterImpl& impl ) - : myImpl( impl.clone() ) - { - - } - - - XElementIterator::XElementIterator( const XElementIterator& other ) - : myImpl( nullptr ) - { - if( other.myImpl ) - { - myImpl = other.myImpl->clone(); - } - } - - - XElementIterator& XElementIterator::operator=( const XElementIterator& other ) - { - if( other.myImpl ) - { - myImpl = other.myImpl->clone(); - } - return *this; - } - - - bool XElementIterator::operator==(const XElementIterator& rhs) const - { - if( !myImpl ) - { - return false; - } - return myImpl->equals( rhs ); - } - - - bool XElementIterator::operator!=( const XElementIterator& rhs ) const - { - if( !myImpl ) - { - return false; - } - return !myImpl->equals( rhs ); - } - - - XElement& XElementIterator::operator*() const - { - if( !myImpl ) - { - throw std::runtime_error( "XElementIterator::operator*() - null dereference attempted" ); - } - return myImpl->getRef(); - } - - - XElement* XElementIterator::operator->() const - { - if( !myImpl ) - { - throw std::runtime_error( "XElementIterator::operator->() - null dereference attempted" ); - } - return myImpl->getPtr(); - } - - - const XElementIterator& XElementIterator::operator++() - { - if( myImpl ) - { - myImpl->increment(); - } - return *this; - } - - - XElementIterator XElementIterator::operator++(int) - { - if( !myImpl ) - { - return XElementIterator{}; - } - XElementIterImplUP temp = myImpl->clone(); - myImpl->increment(); - return XElementIterator{ *temp }; - } - - - const XElementIterator& XElementIterator::operator--() - { - if( myImpl ) - { - myImpl->decrement(); - } - return *this; - } - - - XElementIterator XElementIterator::operator--(int) - { - if( !myImpl ) - { - return XElementIterator{}; - } - XElementIterImplUP temp = myImpl->clone(); - myImpl->decrement(); - return XElementIterator{ *temp }; - } - - - bool XElementIterator::getIsPayloadNull() const - { - if( !myImpl ) - { - return true; - } - - if( myImpl->getIsPayloadNull() ) - { - return true; - } - - return false; - } - - - bool XElementIterator::getSkipProcessingInstructions() const - { - return myImpl->getSkipProcessingInstructions(); - } - - - void XElementIterator::setSkipProcessingInstructions( bool inValue ) - { - myImpl->setSkipProcessingInstructions( inValue ); - } - - - const XElementIterImplUP& XElementIterator::reveal() const - { - return myImpl; - } - } -} diff --git a/Sourcecode/private/mx/xml/XElementIterator.h b/Sourcecode/private/mx/xml/XElementIterator.h deleted file mode 100755 index 561826822..000000000 --- a/Sourcecode/private/mx/xml/XElementIterator.h +++ /dev/null @@ -1,64 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once - -#include "mx/xml/XElement.h" -#include "mx/xml/XElementIterImpl.h" - -#include -#include -#include -#include - -namespace mx -{ - namespace xml - { - class XElementIterator final - { - - public: - XElementIterator(); - XElementIterator( const XElementIterImpl& impl ); - XElementIterator( const XElementIterator& other ); - XElementIterator( XElementIterator&& other ) = default; - XElementIterator& operator=( const XElementIterator& other ); - XElementIterator& operator=( XElementIterator&& other ) = default; - ~XElementIterator() = default; - - // STL Iterator Compliance - typedef ptrdiff_t difference_type; // ??? - typedef XElement value_type; - typedef XElement* pointer; - typedef XElement& reference; - typedef std::bidirectional_iterator_tag iterator_category; - - - // Iterator operators - bool operator==(const XElementIterator& rhs) const; - bool operator!=(const XElementIterator& rhs) const; - - XElement& operator*() const; - XElement* operator->() const; - - const XElementIterator& operator++(); - XElementIterator operator++(int); - - const XElementIterator& operator--(); - XElementIterator operator--(int); - - bool getIsPayloadNull() const; - bool getSkipProcessingInstructions() const; - void setSkipProcessingInstructions( bool inValue ); - - // Reveal the private data member, violates - // encapsulation but could not find a better way - const XElementIterImplUP& reveal() const; - - private: - XElementIterImplUP myImpl; - }; - } -} diff --git a/Sourcecode/private/mx/xml/XFactory.cpp b/Sourcecode/private/mx/xml/XFactory.cpp deleted file mode 100755 index 3951d61dd..000000000 --- a/Sourcecode/private/mx/xml/XFactory.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#include "mx/xml/XFactory.h" -#include "mx/xml/PugiDoc.h" -#include "mx/xml/PugiElement.h" - -namespace mx -{ - namespace xml - { - XDocPtr XFactory::makeXDoc() - { - return XDocPtr{ new PugiDoc{} }; - } - - XElementPtr XFactory::makeXElement() - { - return XElementPtr{ new PugiElement{} }; - } - } -} diff --git a/Sourcecode/private/mx/xml/XFactory.h b/Sourcecode/private/mx/xml/XFactory.h deleted file mode 100755 index efdd9f92c..000000000 --- a/Sourcecode/private/mx/xml/XFactory.h +++ /dev/null @@ -1,23 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once - -#include "mx/xml/XDoc.h" -#include -#include -#include - -namespace mx -{ - namespace xml - { - class XFactory - { - public: - static XDocPtr makeXDoc(); - static XElementPtr makeXElement(); - }; - } -} diff --git a/Sourcecode/private/mx/xml/XForwardDeclare.h b/Sourcecode/private/mx/xml/XForwardDeclare.h deleted file mode 100755 index b1a37a2c3..000000000 --- a/Sourcecode/private/mx/xml/XForwardDeclare.h +++ /dev/null @@ -1,20 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once - -// TODO - delete this file if it is not used - -#ifndef MX_XML_FORWARD_DECLARE_ELEMENT -#define MX_XML_FORWARD_DECLARE_ELEMENT \ -namespace mx \ -{ \ - namespace xml \ - { \ - class XElement; \ - using XElementPtr ## Ptr = std::shared_ptr; \ - } \ -} \ - -#endif diff --git a/Sourcecode/private/mx/xml/XThrow.h b/Sourcecode/private/mx/xml/XThrow.h deleted file mode 100755 index ad5ec95fa..000000000 --- a/Sourcecode/private/mx/xml/XThrow.h +++ /dev/null @@ -1,8 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once -#include "mx/utility/Throw.h" - -#define MX_THROW_XNULL MX_THROW( "The internal object is null. This probably means that XDoc has gone out of scope causing all of its children to be destroyed." ); diff --git a/Sourcecode/private/mxtest/api/ApiTester.cpp b/Sourcecode/private/mxtest/api/ApiTester.cpp index d038dd544..881e3aa78 100644 --- a/Sourcecode/private/mxtest/api/ApiTester.cpp +++ b/Sourcecode/private/mxtest/api/ApiTester.cpp @@ -1,8 +1,8 @@ #include "mxtest/api/ApiTester.h" #include "mx/api/DocumentManager.h" -#include "mx/xml/XFactory.h" -#include "mx/xml/XDoc.h" +#include "ezxml/XFactory.h" +#include "ezxml/XDoc.h" #include "cpul/cpulFailure.h" #include "mxtest/file/StupidFileFunctions.h" @@ -78,7 +78,7 @@ namespace mxtest setFailureMessage( "after round-trips to disk the ScoreData objects were not equal" ); // save a "scrubbed" version of the input - auto xdoc = mx::xml::XFactory::makeXDoc(); + auto xdoc = ::ezxml::XFactory::makeXDoc(); xdoc->loadFile( testFilePath() ); xdoc->saveFile( myScrubbedFilePath ); diff --git a/Sourcecode/private/mxtest/file/PathRoot.h b/Sourcecode/private/mxtest/file/PathRoot.h index d078801ca..6248346a5 100644 --- a/Sourcecode/private/mxtest/file/PathRoot.h +++ b/Sourcecode/private/mxtest/file/PathRoot.h @@ -4,10 +4,10 @@ // The absolute path to the root of the repository. #ifndef MX_REPO_ROOT_PATH -#define MX_REPO_ROOT_PATH "/Users/mjb/repos/mx" +#define MX_REPO_ROOT_PATH "/Users/brigmatt/repos/mx" #endif // The absolute path to the binary output directory. #ifndef MX_BINARY_OUTPUT_PATH -#define MX_BINARY_OUTPUT_PATH "/Users/mjb/repos/mx/cmake-build-debug" +#define MX_BINARY_OUTPUT_PATH "/Users/brigmatt/repos/mx/cmake-build-debug" #endif \ No newline at end of file diff --git a/Sourcecode/private/mxtest/import/ChangeValues.cpp b/Sourcecode/private/mxtest/import/ChangeValues.cpp index 620477e70..b451b9295 100755 --- a/Sourcecode/private/mxtest/import/ChangeValues.cpp +++ b/Sourcecode/private/mxtest/import/ChangeValues.cpp @@ -7,22 +7,22 @@ namespace mxtest { - void convertValues( mx::xml::XDoc& xdoc, const std::string& elementName, const std::string& existingValue, const std::string desiredValue ) + void convertValues( ::ezxml::XDoc& xdoc, const std::string& elementName, const std::string& existingValue, const std::string desiredValue ) { convertValues( *xdoc.getRoot(), elementName, existingValue, desiredValue ); } - void convertValues( mx::xml::XElement& xelement, const std::string& elementName, const std::string& existingValue, const std::string desiredValue ) + void convertValues( ::ezxml::XElement& xelement, const std::string& elementName, const std::string& existingValue, const std::string desiredValue ) { - if( xelement.getType() == mx::xml::XElementType::element ) + if( xelement.getType() == ::ezxml::XElementType::element ) { for( auto it = xelement.begin(); it != xelement.end(); ++it ) { convertValues( *it, elementName, existingValue, desiredValue ); } } - else if ( xelement.getType() == mx::xml::XElementType::text || xelement.getType() == mx::xml::XElementType::empty ) + else if ( xelement.getType() == ::ezxml::XElementType::text || xelement.getType() == ::ezxml::XElementType::empty ) { if( xelement.getName() == elementName && xelement.getValue() == existingValue ) { @@ -32,15 +32,15 @@ namespace mxtest } - void addChildIfNone( mx::xml::XDoc& xdoc, const std::string& elementName, const std::string& childNameToAdd, const std::string childValueToAdd ) + void addChildIfNone( ::ezxml::XDoc& xdoc, const std::string& elementName, const std::string& childNameToAdd, const std::string childValueToAdd ) { addChildIfNone( *xdoc.getRoot(), elementName, childNameToAdd, childValueToAdd ); } - void addChildIfNone( mx::xml::XElement& xelement, const std::string& elementName, const std::string& childNameToAdd, const std::string childValueToAdd ) + void addChildIfNone( ::ezxml::XElement& xelement, const std::string& elementName, const std::string& childNameToAdd, const std::string childValueToAdd ) { - if( xelement.getType() != mx::xml::XElementType::text && xelement.getName() == elementName ) + if( xelement.getType() != ::ezxml::XElementType::text && xelement.getName() == elementName ) { if( xelement.begin() == xelement.end() ) { @@ -51,7 +51,7 @@ namespace mxtest } } } - else if ( xelement.getType() == mx::xml::XElementType::element || xelement.getType() == mx::xml::XElementType::empty ) + else if ( xelement.getType() == ::ezxml::XElementType::element || xelement.getType() == ::ezxml::XElementType::empty ) { for( auto it = xelement.begin(); it != xelement.end(); ++it ) { @@ -61,13 +61,13 @@ namespace mxtest } - void addAttributeIfNone( mx::xml::XDoc& xdoc, const std::string& elementName, const std::string& attributeNameToAdd, const std::string attributeValueToAdd ) + void addAttributeIfNone( ::ezxml::XDoc& xdoc, const std::string& elementName, const std::string& attributeNameToAdd, const std::string attributeValueToAdd ) { addAttributeIfNone( *xdoc.getRoot(), elementName, attributeNameToAdd, attributeValueToAdd ); } - void addAttributeIfNone( mx::xml::XElement& xelement, const std::string& elementName, const std::string& attributeNameToAdd, const std::string attributeValueToAdd ) + void addAttributeIfNone( ::ezxml::XElement& xelement, const std::string& elementName, const std::string& attributeNameToAdd, const std::string attributeValueToAdd ) { if( xelement.getName() == elementName ) @@ -89,7 +89,7 @@ namespace mxtest } } - if ( xelement.getType() == mx::xml::XElementType::element ) + if ( xelement.getType() == ::ezxml::XElementType::element ) { for( auto it = xelement.begin(); it != xelement.end(); ++it ) { @@ -99,13 +99,13 @@ namespace mxtest } - void removeAttribute( mx::xml::XDoc& xdoc, const std::string& elementName, const std::string& attributeNameToRemove ) + void removeAttribute( ::ezxml::XDoc& xdoc, const std::string& elementName, const std::string& attributeNameToRemove ) { removeAttribute( *xdoc.getRoot(), elementName, attributeNameToRemove ); } - void removeAttribute( mx::xml::XElement& xelement, const std::string& elementName, const std::string& attributeNameToRemove ) + void removeAttribute( ::ezxml::XElement& xelement, const std::string& elementName, const std::string& attributeNameToRemove ) { if( xelement.getName() == elementName ) { @@ -119,7 +119,7 @@ namespace mxtest } } - if ( xelement.getType() == mx::xml::XElementType::element ) + if ( xelement.getType() == ::ezxml::XElementType::element ) { for( auto it = xelement.begin(); it != xelement.end(); ++it ) { @@ -129,13 +129,13 @@ namespace mxtest } - void changeAttributeValue( mx::xml::XDoc& xdoc, const std::string& elementName, const std::string& attributeName, const std::string& undesiredValueToReplace, const std::string& replacementValue ) + void changeAttributeValue( ::ezxml::XDoc& xdoc, const std::string& elementName, const std::string& attributeName, const std::string& undesiredValueToReplace, const std::string& replacementValue ) { changeAttributeValue( *xdoc.getRoot(), elementName, attributeName, undesiredValueToReplace, replacementValue ); } - void changeAttributeValue( mx::xml::XElement& xelement, const std::string& elementName, const std::string& attributeName, const std::string& undesiredValueToReplace, const std::string& replacementValue) + void changeAttributeValue( ::ezxml::XElement& xelement, const std::string& elementName, const std::string& attributeName, const std::string& undesiredValueToReplace, const std::string& replacementValue) { if( xelement.getName() == elementName ) { @@ -152,7 +152,7 @@ namespace mxtest } } - if( xelement.getType() == mx::xml::XElementType::element ) + if( xelement.getType() == ::ezxml::XElementType::element ) { for( auto it = xelement.begin(); it != xelement.end(); ++it ) { @@ -162,21 +162,21 @@ namespace mxtest } - void stripZerosFromDecimalFields( mx::xml::XDoc& xdoc ) + void stripZerosFromDecimalFields( ::ezxml::XDoc& xdoc ) { stripZerosFromMatchingFields( xdoc, decimalFields ); } - void stripZerosFromMatchingFields( mx::xml::XDoc& xdoc, const std::set& fields ) + void stripZerosFromMatchingFields( ::ezxml::XDoc& xdoc, const std::set& fields ) { stripZerosFromMatchingFields( *xdoc.getRoot(), fields ); } - void stripZerosFromMatchingFields( mx::xml::XElement& xelement, const std::set& fields ) + void stripZerosFromMatchingFields( ::ezxml::XElement& xelement, const std::set& fields ) { - if ( xelement.getType() == mx::xml::XElementType::text ) + if ( xelement.getType() == ::ezxml::XElementType::text ) { auto foundIter = fields.find( xelement.getName() ); if ( foundIter != fields.end() ) @@ -194,7 +194,7 @@ namespace mxtest } } - if ( xelement.getType() == mx::xml::XElementType::element ) + if ( xelement.getType() == ::ezxml::XElementType::element ) { for ( auto e = xelement.begin(); e != xelement.end(); ++e ) { @@ -206,15 +206,15 @@ namespace mxtest } - void insertChildAfterIfMissing( const InsertChildAfterIfMissingParams& params, mx::xml::XElement& xelement ) + void insertChildAfterIfMissing( const InsertChildAfterIfMissingParams& params, ::ezxml::XElement& xelement ) { - if( xelement.getType() == mx::xml::XElementType::null ) + if( xelement.getType() == ::ezxml::XElementType::null ) { return; } - if( xelement.getType() != mx::xml::XElementType::text && xelement.getName() == params.parentElement ) + if( xelement.getType() != ::ezxml::XElementType::text && xelement.getName() == params.parentElement ) { bool isTriggerFound = false; @@ -243,7 +243,7 @@ namespace mxtest } } - else if ( xelement.getType() == mx::xml::XElementType::element || xelement.getType() == mx::xml::XElementType::empty ) + else if ( xelement.getType() == ::ezxml::XElementType::element || xelement.getType() == ::ezxml::XElementType::empty ) { for( auto it = xelement.begin(); it != xelement.end(); ++it ) { @@ -252,13 +252,13 @@ namespace mxtest } } - void removeElement( mx::xml::XElement& xelement, const std::string& elementName ) + void removeElement( ::ezxml::XElement& xelement, const std::string& elementName ) { while( xelement.removeChild( elementName ) ) {} for( auto it = xelement.begin(); it != xelement.end(); ++it ) { - if( it->getType() == mx::xml::XElementType::element ) + if( it->getType() == ::ezxml::XElementType::element ) { removeElement( *it, elementName ); } diff --git a/Sourcecode/private/mxtest/import/ChangeValues.h b/Sourcecode/private/mxtest/import/ChangeValues.h index 14057c7d2..b13f5a4fc 100755 --- a/Sourcecode/private/mxtest/import/ChangeValues.h +++ b/Sourcecode/private/mxtest/import/ChangeValues.h @@ -4,11 +4,11 @@ #pragma once -#include "mx/xml/XDoc.h" -#include "mx/xml/XElement.h" -#include "mx/xml/XAttribute.h" -#include "mx/xml/XElementIterator.h" -#include "mx/xml/XAttributeIterator.h" +#include "ezxml/XDoc.h" +#include "ezxml/XElement.h" +#include "ezxml/XAttribute.h" +#include "ezxml/XElementIterator.h" +#include "ezxml/XAttributeIterator.h" #include #include @@ -24,24 +24,24 @@ namespace mxtest // output that does not precisely match the input See ExpectedFiles.cpp // for the specific applications of these functions to the input test files. - void convertValues( mx::xml::XDoc& xdoc, const std::string& elementName, const std::string& existingValue, const std::string desiredValue ); - void convertValues( mx::xml::XElement& xelement, const std::string& elementName, const std::string& existingValue, const std::string desiredValue ); + void convertValues( ::ezxml::XDoc& xdoc, const std::string& elementName, const std::string& existingValue, const std::string desiredValue ); + void convertValues( ::ezxml::XElement& xelement, const std::string& elementName, const std::string& existingValue, const std::string desiredValue ); - void addChildIfNone( mx::xml::XDoc& xdoc, const std::string& elementName, const std::string& childNameToAdd, const std::string childValueToAdd ); - void addChildIfNone( mx::xml::XElement& xelement, const std::string& elementName, const std::string& childNameToAdd, const std::string childValueToAdd ); + void addChildIfNone( ::ezxml::XDoc& xdoc, const std::string& elementName, const std::string& childNameToAdd, const std::string childValueToAdd ); + void addChildIfNone( ::ezxml::XElement& xelement, const std::string& elementName, const std::string& childNameToAdd, const std::string childValueToAdd ); - void addAttributeIfNone( mx::xml::XDoc& xdoc, const std::string& elementName, const std::string& attributeNameToAdd, const std::string attributeValueToAdd ); - void addAttributeIfNone( mx::xml::XElement& xelement, const std::string& elementName, const std::string& attributeNameToAdd, const std::string attributeValueToAdd ); + void addAttributeIfNone( ::ezxml::XDoc& xdoc, const std::string& elementName, const std::string& attributeNameToAdd, const std::string attributeValueToAdd ); + void addAttributeIfNone( ::ezxml::XElement& xelement, const std::string& elementName, const std::string& attributeNameToAdd, const std::string attributeValueToAdd ); - void removeAttribute( mx::xml::XDoc& xdoc, const std::string& elementName, const std::string& attributeNameToRemove ); - void removeAttribute( mx::xml::XElement& xelement, const std::string& elementName, const std::string& attributeNameToRemove ); + void removeAttribute( ::ezxml::XDoc& xdoc, const std::string& elementName, const std::string& attributeNameToRemove ); + void removeAttribute( ::ezxml::XElement& xelement, const std::string& elementName, const std::string& attributeNameToRemove ); - void changeAttributeValue( mx::xml::XDoc& xdoc, const std::string& elementName, const std::string& attributeName, const std::string& undesiredValueToReplace, const std::string& replacementValue ); - void changeAttributeValue( mx::xml::XElement& xelement, const std::string& elementName, const std::string& attributeName, const std::string& undesiredValueToReplace, const std::string& replacementValue); + void changeAttributeValue( ::ezxml::XDoc& xdoc, const std::string& elementName, const std::string& attributeName, const std::string& undesiredValueToReplace, const std::string& replacementValue ); + void changeAttributeValue( ::ezxml::XElement& xelement, const std::string& elementName, const std::string& attributeName, const std::string& undesiredValueToReplace, const std::string& replacementValue); - void stripZerosFromDecimalFields( mx::xml::XDoc& xdoc ); - void stripZerosFromMatchingFields( mx::xml::XDoc& xdoc, const std::set& fields ); - void stripZerosFromMatchingFields( mx::xml::XElement& xelement, const std::set& fields ); + void stripZerosFromDecimalFields( ::ezxml::XDoc& xdoc ); + void stripZerosFromMatchingFields( ::ezxml::XDoc& xdoc, const std::set& fields ); + void stripZerosFromMatchingFields( ::ezxml::XElement& xelement, const std::set& fields ); struct InsertChildAfterIfMissingParams { @@ -51,8 +51,8 @@ namespace mxtest std::string value; }; - void insertChildAfterIfMissing( const InsertChildAfterIfMissingParams& params, mx::xml::XElement& xelement ); + void insertChildAfterIfMissing( const InsertChildAfterIfMissingParams& params, ::ezxml::XElement& xelement ); - void removeElement( mx::xml::XElement& xelement, const std::string& elementName ); + void removeElement( ::ezxml::XElement& xelement, const std::string& elementName ); } diff --git a/Sourcecode/private/mxtest/import/DecimalFields.h b/Sourcecode/private/mxtest/import/DecimalFields.h index 67f37317b..591185bef 100755 --- a/Sourcecode/private/mxtest/import/DecimalFields.h +++ b/Sourcecode/private/mxtest/import/DecimalFields.h @@ -4,11 +4,11 @@ #pragma once -#include "mx/xml/XDoc.h" -#include "mx/xml/XElement.h" -#include "mx/xml/XAttribute.h" -#include "mx/xml/XElementIterator.h" -#include "mx/xml/XAttributeIterator.h" +#include "ezxml/XDoc.h" +#include "ezxml/XElement.h" +#include "ezxml/XAttribute.h" +#include "ezxml/XElementIterator.h" +#include "ezxml/XAttributeIterator.h" #include #include @@ -74,7 +74,7 @@ namespace mxtest } - inline void stripZeros( mx::xml::XElement& xelement ) + inline void stripZeros( ::ezxml::XElement& xelement ) { const auto initialValue = xelement.getValue(); @@ -98,7 +98,7 @@ namespace mxtest } - inline void stripZeros( mx::xml::XAttribute& xattribute ) + inline void stripZeros( ::ezxml::XAttribute& xattribute ) { const auto initialValue = xattribute.getValue(); diff --git a/Sourcecode/private/mxtest/import/ExpectedFiles.cpp b/Sourcecode/private/mxtest/import/ExpectedFiles.cpp index f761fa9a5..d62a18f7a 100755 --- a/Sourcecode/private/mxtest/import/ExpectedFiles.cpp +++ b/Sourcecode/private/mxtest/import/ExpectedFiles.cpp @@ -20,7 +20,7 @@ #include #include -using namespace mx::xml; +using namespace ezxml; namespace mxtest @@ -136,12 +136,12 @@ namespace mxtest } - mx::xml::XDocPtr readInputFile( const std::string& subdir, const std::string& fileName ) + ::ezxml::XDocPtr readInputFile( const std::string& subdir, const std::string& fileName ) { std::ifstream inputFile; std::string fullPath = filePath( subdir, fileName ); openInputFile( inputFile, fullPath ); - auto xdoc = mx::xml::XFactory::makeXDoc(); + auto xdoc = ::ezxml::XFactory::makeXDoc(); xdoc->loadStream( inputFile ); // std::stringstream ss; // xdoc->saveStream( ss ); @@ -151,30 +151,30 @@ namespace mxtest } - void setXmlDeclaration( mx::xml::XDocPtr& xdoc ) + void setXmlDeclaration( ::ezxml::XDocPtr& xdoc ) { xdoc->setIsStandalone( false ); - xdoc->setXmlVersion( mx::xml::XmlVersion::onePointZero ); + xdoc->setXmlVersion( ::ezxml::XmlVersion::onePointZero ); auto encoding = xdoc->getEncoding(); switch( encoding ) { - case mx::xml::Encoding::utfEight: - xdoc->setEncoding( mx::xml::Encoding::utfEight ); + case ::ezxml::Encoding::utfEight: + xdoc->setEncoding( ::ezxml::Encoding::utfEight ); break; - case mx::xml::Encoding::utfSixteen: - xdoc->setEncoding( mx::xml::Encoding::utfSixteen ); + case ::ezxml::Encoding::utfSixteen: + xdoc->setEncoding( ::ezxml::Encoding::utfSixteen ); break; - case mx::xml::Encoding::unknown: - xdoc->setEncoding( mx::xml::DEFAULT_ENCODING ); + case ::ezxml::Encoding::unknown: + xdoc->setEncoding( ::ezxml::DEFAULT_ENCODING ); break; default: - xdoc->setEncoding( mx::xml::DEFAULT_ENCODING ); + xdoc->setEncoding( ::ezxml::DEFAULT_ENCODING ); break; } } - bool getIsScorePartwise( const mx::xml::XDocPtr& xdoc ) + bool getIsScorePartwise( const ::ezxml::XDocPtr& xdoc ) { std::string doctype = xdoc->getDoctypeValue(); bool isScorePartwise = true; @@ -196,7 +196,7 @@ namespace mxtest } - void setDoctype( mx::xml::XDocPtr& xdoc, bool isScorePartwise ) + void setDoctype( ::ezxml::XDocPtr& xdoc, bool isScorePartwise ) { if( isScorePartwise ) { @@ -209,7 +209,7 @@ namespace mxtest } - void setRootMusicXmlVersion( mx::xml::XDocPtr& xdoc, bool isScorePartwise ) + void setRootMusicXmlVersion( ::ezxml::XDocPtr& xdoc, bool isScorePartwise ) { auto root = xdoc->getRoot(); if ( root->getName() == "score-partwise" || root->getName() == "score-timewise" ) diff --git a/Sourcecode/private/mxtest/import/ExpectedFiles.h b/Sourcecode/private/mxtest/import/ExpectedFiles.h index 7079d00d5..a94df309f 100755 --- a/Sourcecode/private/mxtest/import/ExpectedFiles.h +++ b/Sourcecode/private/mxtest/import/ExpectedFiles.h @@ -11,9 +11,9 @@ #include "mxtest/file/StupidFileFunctions.h" #include "mxtest/file/MxFileRepository.h" #include "mx/utility/Parse.h" -#include "mx/xml/XFactory.h" -#include "mx/xml/XDoc.h" -#include "mx/xml/XAttributeIterator.h" +#include "ezxml/XFactory.h" +#include "ezxml/XDoc.h" +#include "ezxml/XAttributeIterator.h" #include #include @@ -23,15 +23,15 @@ namespace mxtest void generateExpectedFile( const std::string& subdir, const std::string& fileName ); - mx::xml::XDocPtr readInputFile( const std::string& subdir, const std::string& fileName ); + ::ezxml::XDocPtr readInputFile( const std::string& subdir, const std::string& fileName ); - void setXmlDeclaration( mx::xml::XDocPtr& xdoc ); + void setXmlDeclaration( ::ezxml::XDocPtr& xdoc ); - bool getIsScorePartwise( const mx::xml::XDocPtr& xdoc ); + bool getIsScorePartwise( const ::ezxml::XDocPtr& xdoc ); - void setDoctype( mx::xml::XDocPtr& xdoc, bool isScorePartwise ); + void setDoctype( ::ezxml::XDocPtr& xdoc, bool isScorePartwise ); - void setRootMusicXmlVersion( mx::xml::XDocPtr& xdoc, bool isScorePartwsise ); + void setRootMusicXmlVersion( ::ezxml::XDocPtr& xdoc, bool isScorePartwsise ); std::string getExpectedFileName( const std::string& subdir, const std::string& fileName ); diff --git a/Sourcecode/private/mxtest/import/ImportTest.cpp b/Sourcecode/private/mxtest/import/ImportTest.cpp index 618c7211f..94d4a5275 100755 --- a/Sourcecode/private/mxtest/import/ImportTest.cpp +++ b/Sourcecode/private/mxtest/import/ImportTest.cpp @@ -15,7 +15,7 @@ #include #include -using namespace mx::xml; +using namespace ezxml; using namespace mxtest; ////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/Sourcecode/private/mxtest/import/ImportTestImpl.cpp b/Sourcecode/private/mxtest/import/ImportTestImpl.cpp index 2bf0cdc27..ffb23bb7d 100755 --- a/Sourcecode/private/mxtest/import/ImportTestImpl.cpp +++ b/Sourcecode/private/mxtest/import/ImportTestImpl.cpp @@ -6,7 +6,7 @@ #ifdef MX_COMPILE_IMPORT_TESTS #include "ImportTestImpl.h" -#include "mx/xml/XFactory.h" +#include "ezxml/XFactory.h" #include "mxtest/file/StupidFileFunctions.h" #include "mxtest/file/Path.h" #include "mxtest/import/ExpectedFiles.h" @@ -14,7 +14,7 @@ #include -using namespace mx::xml; +using namespace ezxml; using namespace mx::core; namespace mxtest @@ -206,7 +206,7 @@ namespace mxtest } - bool ImportRoundTripTest::loadTestFile( std::ostream& msg, mx::xml::XDocPtr& outXDoc, const std::string& filepath ) + bool ImportRoundTripTest::loadTestFile( std::ostream& msg, ::ezxml::XDocPtr& outXDoc, const std::string& filepath ) { try { @@ -234,7 +234,7 @@ namespace mxtest } - bool ImportRoundTripTest::loadExpectedFile( std::ostream& msg, mx::xml::XDocPtr& outXDoc, const std::string& filepath ) + bool ImportRoundTripTest::loadExpectedFile( std::ostream& msg, ::ezxml::XDocPtr& outXDoc, const std::string& filepath ) { try { @@ -249,7 +249,7 @@ namespace mxtest } - bool ImportRoundTripTest::loadIntoMxClasses( std::ostream& msg, const mx::xml::XDocPtr& inXdoc, mx::core::DocumentPtr& outMx ) + bool ImportRoundTripTest::loadIntoMxClasses( std::ostream& msg, const ::ezxml::XDocPtr& inXdoc, mx::core::DocumentPtr& outMx ) { if( myIsMxBypassed ) { @@ -277,7 +277,7 @@ namespace mxtest } - bool ImportRoundTripTest::reserializeToXDoc( std::ostream& msg, const mx::core::DocumentPtr& inMx, mx::xml::XDocPtr& outXDoc ) + bool ImportRoundTripTest::reserializeToXDoc( std::ostream& msg, const mx::core::DocumentPtr& inMx, ::ezxml::XDocPtr& outXDoc ) { if( myIsMxBypassed ) { diff --git a/Sourcecode/private/mxtest/import/ImportTestImpl.h b/Sourcecode/private/mxtest/import/ImportTestImpl.h index 69e351491..8defd2826 100755 --- a/Sourcecode/private/mxtest/import/ImportTestImpl.h +++ b/Sourcecode/private/mxtest/import/ImportTestImpl.h @@ -10,8 +10,8 @@ #include "cpul/cpulTestHarness.h" #include "cpul/cpulTestTimer.h" #include "cpul/cpulTest.h" -#include "mx/xml/XFactory.h" -#include "mx/xml/XDoc.h" +#include "ezxml/XFactory.h" +#include "ezxml/XDoc.h" #include "mxtest/file/Path.h" #include "mxtest/file/MxFileRepository.h" #include "mx/core/Document.h" @@ -114,10 +114,10 @@ namespace mxtest cpul::TestTimer myXdocWriteTimer; bool myIsMxBypassed; - bool loadTestFile( std::ostream& msg, mx::xml::XDocPtr& outXDoc, const std::string& filepath ); - bool loadExpectedFile( std::ostream& msg, mx::xml::XDocPtr& outXDoc, const std::string& filepath ); - bool loadIntoMxClasses( std::ostream& msg, const mx::xml::XDocPtr& inXdoc, mx::core::DocumentPtr& outMx ); - bool reserializeToXDoc( std::ostream& msg, const mx::core::DocumentPtr& inMx, mx::xml::XDocPtr& outXDoc ); + bool loadTestFile( std::ostream& msg, ::ezxml::XDocPtr& outXDoc, const std::string& filepath ); + bool loadExpectedFile( std::ostream& msg, ::ezxml::XDocPtr& outXDoc, const std::string& filepath ); + bool loadIntoMxClasses( std::ostream& msg, const ::ezxml::XDocPtr& inXdoc, mx::core::DocumentPtr& outMx ); + bool reserializeToXDoc( std::ostream& msg, const mx::core::DocumentPtr& inMx, ::ezxml::XDocPtr& outXDoc ); bool checkEqual( std::ostream& msg, const std::string& inExpected, const std::string& inActual, double& outPercentMatch ); ImportRoundTripResult createInfo( const std::string& msg, bool success, const double percentMatch ); bool writeResultToOutputFile( const ImportRoundTripResult& info ); diff --git a/Sourcecode/private/mxtest/import/SortAttributes.cpp b/Sourcecode/private/mxtest/import/SortAttributes.cpp index dade095b5..615efba6d 100755 --- a/Sourcecode/private/mxtest/import/SortAttributes.cpp +++ b/Sourcecode/private/mxtest/import/SortAttributes.cpp @@ -6,13 +6,13 @@ namespace mxtest { - void sortAttributes( mx::xml::XDoc& xdoc ) + void sortAttributes( ::ezxml::XDoc& xdoc ) { sortAttributes( *xdoc.getRoot() ); } - void sortAttributes ( mx::xml::XElement& xelement ) + void sortAttributes ( ::ezxml::XElement& xelement ) { StringMap stringMap; @@ -31,7 +31,7 @@ namespace mxtest xelement.appendAttribute( mapIter->first )->setValue( mapIter->second ); } - if( xelement.getType() == mx::xml::XElementType::element ) + if( xelement.getType() == ::ezxml::XElementType::element ) { for( auto elementIter = xelement.begin(); elementIter != xelement.end(); ++elementIter ) { @@ -41,7 +41,7 @@ namespace mxtest } - void deleteFirstAttribute( mx::xml::XElement& xelement ) + void deleteFirstAttribute( ::ezxml::XElement& xelement ) { if( xelement.attributesBegin() != xelement.attributesEnd() ) { diff --git a/Sourcecode/private/mxtest/import/SortAttributes.h b/Sourcecode/private/mxtest/import/SortAttributes.h index 7c0b8cb19..76922e0f1 100755 --- a/Sourcecode/private/mxtest/import/SortAttributes.h +++ b/Sourcecode/private/mxtest/import/SortAttributes.h @@ -4,11 +4,11 @@ #pragma once -#include "mx/xml/XDoc.h" -#include "mx/xml/XElement.h" -#include "mx/xml/XAttribute.h" -#include "mx/xml/XElementIterator.h" -#include "mx/xml/XAttributeIterator.h" +#include "ezxml/XDoc.h" +#include "ezxml/XElement.h" +#include "ezxml/XAttribute.h" +#include "ezxml/XElementIterator.h" +#include "ezxml/XAttributeIterator.h" #include #include @@ -22,7 +22,7 @@ namespace mxtest // so both the expected and actual files will need to have their // attributes sorted into alphabetical order so that they match. - void sortAttributes( mx::xml::XDoc& xdoc ); - void sortAttributes ( mx::xml::XElement& xelement ); - void deleteFirstAttribute( mx::xml::XElement& xelement ); + void sortAttributes( ::ezxml::XDoc& xdoc ); + void sortAttributes ( ::ezxml::XElement& xelement ); + void deleteFirstAttribute( ::ezxml::XElement& xelement ); } diff --git a/Sourcecode/private/mxtest/xml/FakeXml.h b/Sourcecode/private/mxtest/xml/FakeXml.h deleted file mode 100755 index 3619eb83a..000000000 --- a/Sourcecode/private/mxtest/xml/FakeXml.h +++ /dev/null @@ -1,28 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#pragma once - -#include "mxtest/control/CompileControl.h" -#ifdef MX_COMPILE_XML_TESTS - - -namespace mxtest -{ - const char* const fakeXml = R"(((( - - - abcdefg - - - - Bones - Bishop - - -))))"; - -} - -#endif diff --git a/Sourcecode/private/mxtest/xml/XAttributeIteratorTest.cpp b/Sourcecode/private/mxtest/xml/XAttributeIteratorTest.cpp deleted file mode 100755 index 51198ebcb..000000000 --- a/Sourcecode/private/mxtest/xml/XAttributeIteratorTest.cpp +++ /dev/null @@ -1,301 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#include "mxtest/control/CompileControl.h" -#ifdef MX_COMPILE_XML_TESTS - -#include "cpul/cpulTestHarness.h" -#include "mxtest/xml/FakeXml.h" -#include "mx/xml/XFactory.h" -#include "mx/xml/XDoc.h" -#include "mx/xml/XAttribute.h" -#include "mx/xml/XAttributeIterator.h" -#include "mx/xml/XElementIterator.h" - -#include - -using namespace std; -using namespace mx::xml; - -namespace -{ - inline mx::xml::XDocCPtr doc() - { - auto xdoc = XFactory::makeXDoc(); - std::istringstream is( mxtest::fakeXml ); - xdoc->loadStream( is ); - return xdoc; - } - - inline XElementPtr somethingWithAttributes( const mx::xml::XDocCPtr& xdoc ) - { - auto root = xdoc->getRoot(); - auto firstIter = root->begin(); - ++firstIter; - ++firstIter; - auto nextIter = firstIter->begin(); - return nextIter->clone(); - } -} - - -TEST( basicIteration, XAttributeIterator ) -{ - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - auto iter = node->attributesBegin(); - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-a", iter->getName() ); - CHECK_EQUAL( "A", iter->getValue() ); - ++iter; - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-b", iter->getName() ); - CHECK_EQUAL( "B", iter->getValue() ); - ++iter; - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-c", iter->getName() ); - CHECK_EQUAL( "C", iter->getValue() ); - ++iter; - CHECK( iter == node->attributesEnd() ); - -} -T_END - - -TEST( suffixIncrement, XAttributeIterator ) -{ - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - auto iter = node->attributesBegin(); - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-a", ( iter++ )->getName() ); - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-b", ( iter++ )->getName() ); - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-c", ( iter++ )->getName() ); - CHECK( iter == node->attributesEnd() ); -} -T_END - - -TEST( suffixDecrement, XAttributeIterator ) -{ - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - XAttributeIterator iter = node->attributesEnd(); - CHECK( iter == node->attributesEnd() ); - iter--; - CHECK( iter != node->attributesEnd() ); - CHECK( iter != node->attributesBegin() ); - CHECK_EQUAL( "attr-c", ( iter-- )->getName() ); - CHECK( iter != node->attributesEnd() ); - CHECK( iter != node->attributesBegin() ); - CHECK_EQUAL( "attr-b", ( iter-- )->getName() ); - CHECK( iter != node->attributesEnd() ); - CHECK( iter == node->attributesBegin() ); - CHECK_EQUAL( "attr-a", ( iter-- )->getName() ); - - // iter is now "before" root->begin() - // which behaves like an "end" iter, should throw - CHECK_RAISES( iter->getName() ); -} -T_END - - -TEST( prefixIncrement, XAttributeIterator ) -{ - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - XAttributeIterator iter = node->attributesBegin(); - CHECK_EQUAL( "attr-a", iter->getName() ); - CHECK_EQUAL( "attr-b", ( ++iter )->getName() ); - CHECK_EQUAL( "attr-c", ( ++iter )->getName() ); - ++iter; - CHECK( iter == node->attributesEnd() ) -} -T_END - - -TEST( prefixDecrement, XAttributeIterator ) -{ - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - XAttributeIterator iter = node->attributesEnd(); - CHECK( iter == node->attributesEnd() ); - CHECK( iter != node->attributesBegin() ); - CHECK_EQUAL( "attr-c", ( --iter )->getName() ); - CHECK( iter != node->attributesEnd() ); - CHECK( iter != node->attributesBegin() ); - CHECK_EQUAL( "attr-b", ( --iter )->getName() ); - CHECK( iter != node->attributesEnd() ); - CHECK( iter != node->attributesBegin() ); - CHECK_EQUAL( "attr-a", ( --iter )->getName() ); - CHECK( iter != node->attributesEnd() ); - CHECK( iter == node->attributesBegin() ); - --iter; - - // iter is now "before" root->begin() - // which behaves like an "end" iter, should throw - CHECK_RAISES( iter->getName() ); -} -T_END - - -TEST( stlAlgorithm, XAttributeIterator ) -{ - // First demonstrate the impossible lambda syntax - std::vector ints{ 5, 7, 99, 1, -1, 36, 17, 9 }; - - auto it = std::find_if( - ints.begin(), - ints.end(), - [] ( const int& i ) { return i < 0; } ); - - CHECK_EQUAL( -1, *it ); - - // Now try it with the custom iterator - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - - auto iter = std::find_if( - node->attributesBegin(), - node->attributesEnd(), - [] ( const XAttribute& n ) { return n.getName() == "attr-b"; } ); - - CHECK_EQUAL( "attr-b", iter->getName() ) -} -T_END - - -TEST( operatorStar, XAttributeIterator ) -{ - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - XAttributeIterator iter = node->attributesBegin(); - auto& attribute = *iter; - CHECK_EQUAL( "attr-a", attribute.getName() ); - attribute.setName( "attr-XYZ" ); - CHECK_EQUAL( "attr-XYZ", attribute.getName() ); - - // obtain the node again to make sure it changed in the xdoc - auto reobtainednode = somethingWithAttributes( xdoc ); - auto reobtainedIter = reobtainednode->attributesBegin(); - CHECK_EQUAL( "attr-XYZ", reobtainedIter->getName() ); -} -T_END - - -TEST( copyConstructor, XAttributeIterator ) -{ - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - XAttributeIterator iter = node->attributesBegin(); - XAttributeIterator copy{ iter }; - - CHECK_EQUAL( "attr-a", iter->getName() ) - CHECK_EQUAL( "attr-a", copy->getName() ) - - copy->setName( "XYZ" ); - - CHECK_EQUAL( "XYZ", iter->getName() ) - CHECK_EQUAL( "XYZ", copy->getName() ) -} -T_END - - -TEST( moveConstructor, XAttributeIterator ) -{ - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - XAttributeIterator movedIter{ node->attributesBegin() }; // maybe it calls move ctor... - - CHECK_EQUAL( "attr-a", movedIter->getName() ) - movedIter->setName( "XYZ" ); - CHECK_EQUAL( "XYZ", movedIter->getName() ) - - // obtain the node again to make sure it changed in the xdoc - auto reobtainednode = somethingWithAttributes( xdoc ); - auto reobtainedIter = reobtainednode->attributesBegin(); - CHECK_EQUAL( "XYZ", reobtainedIter->getName() ); -} -T_END - - -TEST( assignmentOperator, XAttributeIterator ) -{ - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - XAttributeIterator iter = node->attributesBegin(); - XAttributeIterator assigned; - assigned = iter; - - CHECK_EQUAL( "attr-a", iter->getName() ) - CHECK_EQUAL( "attr-a", assigned->getName() ) - - assigned->setName( "XYZ" ); - - CHECK_EQUAL( "XYZ", iter->getName() ) - CHECK_EQUAL( "XYZ", assigned->getName() ) -} -T_END - - -TEST( moveAssignment, XAttributeIterator ) -{ - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - XAttributeIterator movedIter; - movedIter = node->attributesBegin(); // maybe it calls move assignment... - - CHECK_EQUAL( "attr-a", movedIter->getName() ) - movedIter->setName( "XYZ" ); - CHECK_EQUAL( "XYZ", movedIter->getName() ) - - // obtain the node again to make sure it changed in the xdoc - auto reobtainednode = somethingWithAttributes( xdoc ); - auto reobtainedIter = reobtainednode->attributesBegin(); - CHECK_EQUAL( "XYZ", reobtainedIter->getName() ); -} -T_END - - -TEST( nullThrows, XAttributeIterator ) -{ - XAttributeIterator nullIter; - CHECK_RAISES( nullIter->getName() ) - CHECK_RAISES( (*nullIter).getName() ) - -} -T_END - - -TEST( doesNotCrash, XAttributeIterator ) -{ - XAttributeIterator nullIter; - XAttributeIterator anotherIter; - CHECK_NOT_RAISES( anotherIter = nullIter ); - CHECK_NOT_RAISES( anotherIter = XAttributeIterator{} ); -} -T_END - - -namespace -{ - XElementPtr nodeWithDocOutOfScope() - { - auto xdoc = doc(); - auto node = xdoc->getRoot(); - return node; - } -} - - -TEST( avoidsUndefinedBehavior, XAttributeIterator ) -{ - auto root = nodeWithDocOutOfScope(); - CHECK_RAISES( auto iter = root->attributesBegin() ); -} -T_END - -#endif diff --git a/Sourcecode/private/mxtest/xml/XAttributeTest.cpp b/Sourcecode/private/mxtest/xml/XAttributeTest.cpp deleted file mode 100755 index 198c409fa..000000000 --- a/Sourcecode/private/mxtest/xml/XAttributeTest.cpp +++ /dev/null @@ -1,145 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#include "mxtest/control/CompileControl.h" -#ifdef MX_COMPILE_XML_TESTS - -#include "cpul/cpulTestHarness.h" -#include "mx/xml/XFactory.h" -#include "mx/xml/XDoc.h" -#include "mx/xml/XAttribute.h" -#include "mx/xml/XAttributeIterator.h" -#include "mx/xml/XElementIterator.h" -#include "mxtest/xml/FakeXml.h" - -using namespace std; -using namespace mx::xml; - -namespace -{ - inline mx::xml::XDocCPtr doc() - { - auto xdoc = XFactory::makeXDoc(); - std::istringstream is( mxtest::fakeXml ); - xdoc->loadStream( is ); - return xdoc; - } - - - inline XElementPtr somethingWithAttributes( const mx::xml::XDocCPtr& xdoc ) - { - auto root = xdoc->getRoot(); - auto firstIter = root->begin(); - ++firstIter; - ++firstIter; - auto nextIter = firstIter->begin(); - return nextIter->clone(); - } -} - - -TEST( getNameValue, XAttribute ) -{ - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - auto iter = node->attributesBegin(); - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-a", iter->getName() ); - CHECK_EQUAL( "A", iter->getValue() ); - ++iter; - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-b", iter->getName() ); - CHECK_EQUAL( "B", iter->getValue() ); - ++iter; - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-c", iter->getName() ); - CHECK_EQUAL( "C", iter->getValue() ); - ++iter; - CHECK( iter == node->attributesEnd() ); -} -T_END - - -TEST( setName, XAttribute ) -{ - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - auto iter = node->attributesBegin(); - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-a", iter->getName() ); - CHECK_EQUAL( "A", iter->getValue() ); - ++iter; - CHECK( iter != node->attributesEnd() ); - - iter->setName( "hello-attr" ); - - CHECK_EQUAL( "hello-attr", iter->getName() ); - CHECK_EQUAL( "B", iter->getValue() ); - ++iter; - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-c", iter->getName() ); - CHECK_EQUAL( "C", iter->getValue() ); - ++iter; - CHECK( iter == node->attributesEnd() ); - - node = somethingWithAttributes( xdoc ); - iter = node->attributesBegin(); - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-a", iter->getName() ); - CHECK_EQUAL( "A", iter->getValue() ); - ++iter; - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "hello-attr", iter->getName() ); - CHECK_EQUAL( "B", iter->getValue() ); - ++iter; - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-c", iter->getName() ); - CHECK_EQUAL( "C", iter->getValue() ); - ++iter; - CHECK( iter == node->attributesEnd() ); -} -T_END - - -TEST( setValue, XAttribute ) -{ - auto xdoc = doc(); - auto node = somethingWithAttributes( xdoc ); - auto iter = node->attributesBegin(); - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-a", iter->getName() ); - CHECK_EQUAL( "A", iter->getValue() ); - ++iter; - CHECK( iter != node->attributesEnd() ); - - iter->setValue( "hello-attr" ); - - CHECK_EQUAL( "attr-b", iter->getName() ); - CHECK_EQUAL( "hello-attr", iter->getValue() ); - ++iter; - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-c", iter->getName() ); - CHECK_EQUAL( "C", iter->getValue() ); - ++iter; - CHECK( iter == node->attributesEnd() ); - - node = somethingWithAttributes( xdoc ); - iter = node->attributesBegin(); - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-a", iter->getName() ); - CHECK_EQUAL( "A", iter->getValue() ); - ++iter; - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-b", iter->getName() ); - CHECK_EQUAL( "hello-attr", iter->getValue() ); - ++iter; - CHECK( iter != node->attributesEnd() ); - CHECK_EQUAL( "attr-c", iter->getName() ); - CHECK_EQUAL( "C", iter->getValue() ); - ++iter; - CHECK( iter == node->attributesEnd() ); -} -T_END - -#endif diff --git a/Sourcecode/private/mxtest/xml/XDocTest.cpp b/Sourcecode/private/mxtest/xml/XDocTest.cpp deleted file mode 100755 index 4d77375fb..000000000 --- a/Sourcecode/private/mxtest/xml/XDocTest.cpp +++ /dev/null @@ -1,995 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#include "mxtest/control/CompileControl.h" -#ifdef MX_COMPILE_XML_TESTS - -#include "cpul/cpulTestHarness.h" -#include "mx/xml/XFactory.h" -#include "mx/xml/XDoc.h" - -#include - -using namespace std; -using namespace mx::xml; - -void streamDoc( const XDocCPtr& xdoc ) -{ - xdoc->saveStream( std::cout ); - std::cout << std::endl; -} - - -TEST( defaultXmlVersion, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - auto xmlVersion = xdoc->getXmlVersion(); - CHECK( xmlVersion == XmlVersion::onePointZero ); -} -T_END - - -TEST( defaultEncoding, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - auto encoding = xdoc->getEncoding(); - CHECK( encoding == DEFAULT_ENCODING ); -} -T_END - - -TEST( defaultGetHasStandaloneAttribute, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - auto hasStandaloneAttribute = xdoc->getHasStandaloneAttribute(); - CHECK( !hasStandaloneAttribute ); -} -T_END - - -TEST( defaultgetIsStandalone, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - auto isStandalone = xdoc->getIsStandalone(); - CHECK( !isStandalone ); -} -T_END - - -TEST( defaultGetHasDoctypeDeclaration, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - auto hasDoctypeDeclaration = xdoc->getHasDoctypeDeclaration(); - CHECK( !hasDoctypeDeclaration ); -} -T_END - - -TEST( defaultgetDoctypeValue, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - std::string expected = ""; - std::string actual = xdoc->getDoctypeValue(); - CHECK_EQUAL( expected, actual ) -} -T_END - - -TEST( defaultContents, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - - std::stringstream expected; - expected << R"()" << std::endl; - expected << "" << std::endl; - std::stringstream actual; - xdoc->saveStream( actual ); - - CHECK_EQUAL( expected.str(), actual.str() ); - -} -T_END - - -TEST( xmlVersionOnePointOne, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - - std::stringstream documentContents; - documentContents << R"()" << std::endl; - documentContents << R"()" << std::endl; - xdoc->loadStream( documentContents ); - std::stringstream actual; - xdoc->saveStream( actual ); - - std::stringstream expectedContents; - expectedContents << R"()" << std::endl; - expectedContents << R"()" << std::endl; - - CHECK_EQUAL( expectedContents.str(), actual.str() ); - - auto actualXmlVersion = xdoc->getXmlVersion(); - auto expectedXmlVersion = XmlVersion::onePointOne; - CHECK( expectedXmlVersion == actualXmlVersion ); -} -T_END - - -TEST( simpleParse1, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - - std::stringstream input; - input << R"()" << std::endl; - input << R"()" << std::endl; - input << R"()" << std::endl; - - xdoc->loadStream( input ); - - auto expectedEncoding = Encoding::utfEight; - auto actualEncoding = xdoc->getEncoding(); - CHECK( expectedEncoding == actualEncoding ); - - auto expectedXmlVersion = XmlVersion::onePointZero; - auto actualXmlVersion = xdoc->getXmlVersion(); - CHECK( expectedXmlVersion == actualXmlVersion ); - - auto expectedHasStandalone = false; - auto actualHasStandalone = xdoc->getHasStandaloneAttribute(); - CHECK( expectedHasStandalone == actualHasStandalone ); - - auto expectedIsStandalone = false; - auto actualIsStandalone = xdoc->getIsStandalone(); - CHECK( expectedIsStandalone == actualIsStandalone ); - - auto expectedHasDoctype = true; - auto actualHasDoctype = xdoc->getHasDoctypeDeclaration(); - CHECK( expectedHasDoctype == actualHasDoctype ); - - auto expectedDoctype = std::string{ R"()" }; - - auto rootNode = xdoc->getRoot(); - CHECK( rootNode != nullptr ); - CHECK_EQUAL( "some-tag", rootNode->getName() ); -} -T_END - - -TEST( simpleParse_StandaloneNo, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - - std::stringstream input; - input << R"()" << std::endl; - input << R"()" << std::endl; - - xdoc->loadStream( input ); - - auto expectedEncoding = Encoding::utfEight; - auto actualEncoding = xdoc->getEncoding(); - CHECK( expectedEncoding == actualEncoding ); - - auto expectedXmlVersion = XmlVersion::onePointZero; - auto actualXmlVersion = xdoc->getXmlVersion(); - CHECK( expectedXmlVersion == actualXmlVersion ); - - auto expectedHasStandalone = true; - auto actualHasStandalone = xdoc->getHasStandaloneAttribute(); - CHECK( expectedHasStandalone == actualHasStandalone ); - - auto expectedIsStandalone = false; - auto actualIsStandalone = xdoc->getIsStandalone(); - CHECK( expectedIsStandalone == actualIsStandalone ); - - auto expectedHasDoctype = false; - auto actualHasDoctype = xdoc->getHasDoctypeDeclaration(); - CHECK( expectedHasDoctype == actualHasDoctype ); - - auto expectedDoctype = std::string{ R"()" }; - - auto rootNode = xdoc->getRoot(); - CHECK( rootNode != nullptr ) - CHECK_EQUAL( "some-tag", rootNode->getName() ); -} -T_END - - -TEST( simpleParse_StandaloneYes, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - - std::stringstream input; - input << R"()" << std::endl; - input << R"()" << std::endl; - input << R"()" << std::endl; - - xdoc->loadStream( input ); - - auto expectedEncoding = Encoding::utfEight; - auto actualEncoding = xdoc->getEncoding(); - CHECK( expectedEncoding == actualEncoding ); - - auto expectedXmlVersion = XmlVersion::onePointZero; - auto actualXmlVersion = xdoc->getXmlVersion(); - CHECK( expectedXmlVersion == actualXmlVersion ); - - auto expectedHasStandalone = true; - auto actualHasStandalone = xdoc->getHasStandaloneAttribute(); - CHECK( expectedHasStandalone == actualHasStandalone ); - - auto expectedIsStandalone = true; - auto actualIsStandalone = xdoc->getIsStandalone(); - CHECK( expectedIsStandalone == actualIsStandalone ); - - auto expectedHasDoctype = true; - auto actualHasDoctype = xdoc->getHasDoctypeDeclaration(); - CHECK( expectedHasDoctype == actualHasDoctype ); - - auto expectedDoctype = std::string{ R"()" }; - - auto rootNode = xdoc->getRoot(); - CHECK( rootNode != nullptr ); - CHECK_EQUAL( "some-tag", rootNode->getName() ); -} -T_END - - -TEST( simpleParse_EmptyDocParseException, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - - std::stringstream input; - CHECK_RAISES( xdoc->loadStream( input ) ) -} -T_END - - -TEST( simpleParse_RootOnly, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - - std::stringstream input; - input << ""; - - xdoc->loadStream( input ); - - auto expectedEncoding = DEFAULT_ENCODING; - auto actualEncoding = xdoc->getEncoding(); - CHECK( expectedEncoding == actualEncoding ); - - auto expectedXmlVersion = DEFAULT_XML_VERSION; - auto actualXmlVersion = xdoc->getXmlVersion(); - CHECK( expectedXmlVersion == actualXmlVersion ); - - auto expectedHasStandalone = false; - auto actualHasStandalone = xdoc->getHasStandaloneAttribute(); - CHECK( expectedHasStandalone == actualHasStandalone ); - - auto expectedIsStandalone = false; - auto actualIsStandalone = xdoc->getIsStandalone(); - CHECK( expectedIsStandalone == actualIsStandalone ); - - auto expectedHasDoctype = false; - auto actualHasDoctype = xdoc->getHasDoctypeDeclaration(); - CHECK( expectedHasDoctype == actualHasDoctype ); - - auto expectedDoctype = std::string{ R"()" }; - - auto rootNode = xdoc->getRoot(); - CHECK( rootNode != nullptr ); - CHECK_EQUAL( "score-partwise", rootNode->getName() ); - -} -T_END - - -TEST( simpleParse_RootAndDoctypeOnly, XDoc ) -{ - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - - std::stringstream input; - input << R"()" << std::endl; - input << ""; - - xdoc->loadStream( input ); - - auto expectedEncoding = DEFAULT_ENCODING; - auto actualEncoding = xdoc->getEncoding(); - CHECK( expectedEncoding == actualEncoding ); - - auto expectedXmlVersion = DEFAULT_XML_VERSION; - auto actualXmlVersion = xdoc->getXmlVersion(); - CHECK( expectedXmlVersion == actualXmlVersion ); - - auto expectedHasStandalone = false; - auto actualHasStandalone = xdoc->getHasStandaloneAttribute(); - CHECK( expectedHasStandalone == actualHasStandalone ); - - auto expectedIsStandalone = false; - auto actualIsStandalone = xdoc->getIsStandalone(); - CHECK( expectedIsStandalone == actualIsStandalone ); - - auto expectedHasDoctype = true; - auto actualHasDoctype = xdoc->getHasDoctypeDeclaration(); - CHECK( expectedHasDoctype == actualHasDoctype ); - - auto expectedDoctype = std::string{ R"()" }; - - auto rootNode = xdoc->getRoot(); - CHECK( rootNode != nullptr ); - CHECK_EQUAL( "score-partwise", rootNode->getName() ); -} - T_END; - - namespace - { - const char * const XML10_UTF8 = R"()"; -// const char * const XML10_UTF16 = R"()"; - const char * const XML11_UTF8 = R"()"; -// const char * const XML11_UTF16 = R"()"; - const char * const XML10_UTF8_STANDALONE_YES = R"()"; -// const char * const XML10_UTF16_STANDALONE_YES = R"()"; -// const char * const XML11_UTF8_STANDALONE_YES = R"()"; -// const char * const XML11_UTF16_STANDALONE_YES = R"()"; - const char * const XML10_UTF8_STANDALONE_NO = R"()"; -// const char * const XML10_UTF16_STANDALONE_NO = R"()"; -// const char * const XML11_UTF8_STANDALONE_NO = R"()"; -// const char * const XML11_UTF16_STANDALONE_NO = R"()"; - const char * const DOCTYPE_EMPTY_WSPACE = R"()"; - const char * const DOCTYPE_EMPTY_NSPACE = R"()"; - const char * const DOCTYPE_VALUE = R"()"; - const char * const ROOT = R"()"; - } - - - struct ThreeLineDocString - { - const char* const line1; - const char* const line2; - const char* const line3; - ThreeLineDocString( const char* const inLine1, const char* const inLine2, const char* const inLine3 ) : line1( inLine1 ), line2( inLine2 ), line3( inLine3 ) {} - std::string toString() const { std::stringstream ss; ss << line1 << std::endl << line2 << std::endl << line3 << std::endl; return ss.str(); } - }; - - - struct TwoLineDocString - { - const char* const line1; - const char* const line2; - TwoLineDocString( const char* const inLine1, const char* const inLine2 ) : line1( inLine1 ), line2( inLine2 ) {} - std::string toString() const { std::stringstream ss; ss << line1 << std::endl << line2 << std::endl; return ss.str(); } - }; - - inline std::string quickDoc( - const char* const line1, - const char* const line2, - const char* const line3 ) - { - std::stringstream ss; - ss << line1 << std::endl << line2 << std::endl << line3 << std::endl; - return ss.str(); - } - - TEST( Xml10_Xml11, XDoc ) - { - ThreeLineDocString xmlString{ XML10_UTF8, DOCTYPE_EMPTY_WSPACE, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setXmlVersion( XmlVersion::onePointOne ); - - CHECK( XmlVersion::onePointOne == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - ThreeLineDocString expected{ XML11_UTF8, DOCTYPE_EMPTY_WSPACE, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; - - - TEST( Xml11_Xml10, XDoc ) - { - ThreeLineDocString xmlString{ XML11_UTF8, DOCTYPE_EMPTY_WSPACE, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointOne == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setXmlVersion( XmlVersion::onePointZero ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - ThreeLineDocString expected{ XML10_UTF8, DOCTYPE_EMPTY_WSPACE, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; - - - TEST( NoDoctype_Doctype, XDoc ) - { - TwoLineDocString xmlString{ XML10_UTF8, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( ! xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setHasDoctypeDeclaration( true ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - ThreeLineDocString expected{ XML10_UTF8, DOCTYPE_EMPTY_NSPACE, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; - - - TEST( Doctype_NoDoctype, XDoc ) - { - ThreeLineDocString xmlString{ XML10_UTF8, DOCTYPE_EMPTY_WSPACE, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setHasDoctypeDeclaration( false ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( ! xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - TwoLineDocString expected{ XML10_UTF8, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; - - - TEST( NoDoctype_DoctypeWithValue, XDoc ) - { - TwoLineDocString xmlString{ XML10_UTF8, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( ! xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setHasDoctypeDeclaration( true ); - xdoc->setDoctypeValue( "SomeDoctypeValue" ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - ThreeLineDocString expected{ XML10_UTF8, DOCTYPE_VALUE, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; - - - TEST( DoctypeWithValue_NoDoctype, XDoc ) - { - ThreeLineDocString xmlString{ XML10_UTF8, DOCTYPE_VALUE, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setHasDoctypeDeclaration( false ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( ! xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - TwoLineDocString expected{ XML10_UTF8, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; - - - TEST( HasStandalone_NoStandalone, XDoc ) - { - ThreeLineDocString xmlString{ XML10_UTF8_STANDALONE_YES, DOCTYPE_VALUE, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( xdoc->getHasStandaloneAttribute() ); - CHECK( xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setHasStandaloneAttribute( false ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - ThreeLineDocString expected{ XML10_UTF8, DOCTYPE_VALUE, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; - - - TEST( NoStandalone_HasStandalone, XDoc ) - { - ThreeLineDocString xmlString{ XML10_UTF8, DOCTYPE_VALUE, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setHasStandaloneAttribute( true ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - ThreeLineDocString expected{ XML10_UTF8_STANDALONE_NO, DOCTYPE_VALUE, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; - - - TEST( NoStandalone_setIsStandaloneFalse, XDoc ) - { - ThreeLineDocString xmlString{ XML10_UTF8, DOCTYPE_VALUE, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setIsStandalone( false ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - ThreeLineDocString expected{ XML10_UTF8_STANDALONE_NO, DOCTYPE_VALUE, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; - - - TEST( NoStandalone_setIsStandaloneTrue, XDoc ) - { - ThreeLineDocString xmlString{ XML10_UTF8, DOCTYPE_VALUE, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setIsStandalone( true ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( xdoc->getHasStandaloneAttribute() ); - CHECK( xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - ThreeLineDocString expected{ XML10_UTF8_STANDALONE_YES, DOCTYPE_VALUE, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; - -// TODO - support UTF-16 properly -#if 1==0 - TEST( utf16_utf8, XDoc ) - { - ThreeLineDocString xmlString{ XML10_UTF16, DOCTYPE_VALUE, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfSixteen == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setEncoding( Encoding::utfEight ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - ThreeLineDocString expected{ XML10_UTF8, DOCTYPE_VALUE, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; -#endif - -// TODO - support UTF-16 properly -#if 1==0 - TEST( xml11_utf16, XDoc ) - { - ThreeLineDocString xmlString{ XML11_UTF16, DOCTYPE_VALUE, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointOne == xdoc->getXmlVersion() ); - CHECK( Encoding::utfSixteen == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setEncoding( Encoding::utfEight ); - xdoc->setIsStandalone( true ); - xdoc->setDoctypeValue( "" ); - - CHECK( XmlVersion::onePointOne == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( xdoc->getHasStandaloneAttribute() ); - CHECK( xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - ThreeLineDocString expected{ XML11_UTF8_STANDALONE_YES, DOCTYPE_EMPTY_NSPACE, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; -#endif - -// TODO - support UTF-16 properly -#if 1==0 - TEST( xml10_utf16_standalone_yes, XDoc ) - { - TwoLineDocString xmlString{ XML10_UTF16_STANDALONE_YES, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfSixteen == xdoc->getEncoding() ); - CHECK( xdoc->getHasStandaloneAttribute() ); - CHECK( xdoc->getIsStandalone() ); - CHECK( ! xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setXmlVersion( XmlVersion::onePointOne ); - xdoc->setIsStandalone( false ); - xdoc->setDoctypeValue( "" ); - - CHECK( XmlVersion::onePointOne == xdoc->getXmlVersion() ); - CHECK( Encoding::utfSixteen == xdoc->getEncoding() ); - CHECK( xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - ThreeLineDocString expected{ XML11_UTF16_STANDALONE_NO, DOCTYPE_EMPTY_NSPACE, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; -#endif - -// TODO - support UTF-16 properly -#if 1==0 - TEST( xml11_utf8_standalone_yes, XDoc ) - { - ThreeLineDocString xmlString{ XML11_UTF8_STANDALONE_YES, DOCTYPE_VALUE, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointOne == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( xdoc->getHasStandaloneAttribute() ); - CHECK( xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setXmlVersion( XmlVersion::onePointOne ); - xdoc->setEncoding( Encoding::utfSixteen ); - xdoc->setHasStandaloneAttribute( false ); - xdoc->setHasDoctypeDeclaration( false ); - - CHECK( XmlVersion::onePointOne == xdoc->getXmlVersion() ); - CHECK( Encoding::utfSixteen == xdoc->getEncoding() ); - CHECK( ! xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( ! xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - TwoLineDocString expected{ XML11_UTF16, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; -#endif - -// TODO - support UTF-16 properly -#if 1==0 - TEST( xml11_utf16_standalone_yes, XDoc ) - { - ThreeLineDocString xmlString{ XML11_UTF16_STANDALONE_YES, DOCTYPE_VALUE, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointOne == xdoc->getXmlVersion() ); - CHECK( Encoding::utfSixteen == xdoc->getEncoding() ); - CHECK( xdoc->getHasStandaloneAttribute() ); - CHECK( xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setXmlVersion( XmlVersion::onePointZero ); - xdoc->setEncoding( Encoding::utfSixteen ); - xdoc->setHasStandaloneAttribute( false ); - xdoc->setHasDoctypeDeclaration( false ); - xdoc->setHasStandaloneAttribute( false ); - xdoc->setIsStandalone( false ); - - CHECK( XmlVersion::onePointZero == xdoc->getXmlVersion() ); - CHECK( Encoding::utfSixteen == xdoc->getEncoding() ); - CHECK( xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( ! xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - TwoLineDocString expected{ XML10_UTF16_STANDALONE_NO, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; -#endif - -// TODO - support UTF-16 properly -#if 1==0 - TEST( xml11_utf16_standalone_no, XDoc ) - { - TwoLineDocString xmlString{ XML11_UTF16_STANDALONE_NO, ROOT }; - std::istringstream is( xmlString.toString() ); - auto xdoc = XFactory::makeXDoc(); - xdoc->setDoWriteByteOrderMark( false ); - xdoc->loadStream( is ); - - CHECK( XmlVersion::onePointOne == xdoc->getXmlVersion() ); - CHECK( Encoding::utfSixteen == xdoc->getEncoding() ); - CHECK( xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( ! xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "", xdoc->getDoctypeValue() ); - - std::stringstream reserialized; - xdoc->saveStream( reserialized ); - CHECK_EQUAL( xmlString.toString(), reserialized.str() ); - - xdoc->setXmlVersion( XmlVersion::onePointOne ); - xdoc->setEncoding( Encoding::utfEight ); - xdoc->setHasStandaloneAttribute( true ); - xdoc->setHasDoctypeDeclaration( true ); - xdoc->setDoctypeValue( "SomeDoctypeValue" ); - xdoc->setHasStandaloneAttribute( true ); - xdoc->setIsStandalone( false ); - - CHECK( XmlVersion::onePointOne == xdoc->getXmlVersion() ); - CHECK( Encoding::utfEight == xdoc->getEncoding() ); - CHECK( xdoc->getHasStandaloneAttribute() ); - CHECK( ! xdoc->getIsStandalone() ); - CHECK( xdoc->getHasDoctypeDeclaration() ); - CHECK_EQUAL( "SomeDoctypeValue", xdoc->getDoctypeValue() ); - ThreeLineDocString expected{ XML11_UTF8_STANDALONE_NO, DOCTYPE_VALUE, ROOT }; - std::stringstream actual; - xdoc->saveStream( actual ); - CHECK_EQUAL( expected.toString(), actual.str() ); - } - T_END; -#endif - -#endif diff --git a/Sourcecode/private/mxtest/xml/XElementIteratorTest.cpp b/Sourcecode/private/mxtest/xml/XElementIteratorTest.cpp deleted file mode 100755 index ddd2e48eb..000000000 --- a/Sourcecode/private/mxtest/xml/XElementIteratorTest.cpp +++ /dev/null @@ -1,279 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#include "mxtest/control/CompileControl.h" -#ifdef MX_COMPILE_XML_TESTS - -#include "cpul/cpulTestHarness.h" -#include "mx/xml/XFactory.h" -#include "mx/xml/XDoc.h" -#include "mx/xml/XElement.h" -#include "mx/xml/XElementIterator.h" -#include "mxtest/xml/FakeXml.h" - - - -#include - -using namespace std; -using namespace mx::xml; - -namespace -{ - inline mx::xml::XDocCPtr doc() - { - auto xdoc = XFactory::makeXDoc(); - std::istringstream is( mxtest::fakeXml ); - xdoc->loadStream( is ); - return xdoc; - } -} - - -TEST( beginEndForLoop, XElementIterator ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - int i = 0; - for( auto it = root->begin(); it != root->end(); ++it, ++i ) - { - switch( i ) - { - case 0: - CHECK_EQUAL( "abc", it->getName() ); - break; - case 1: - CHECK_EQUAL( "empty-element", it->getName() ); - break; - case 2: - CHECK_EQUAL( "nested-stuff", it->getName() ); - break; - default: - CHECK_FAIL( "should not reach here" ); - break; - } - } -} -T_END - - -TEST( suffixIncrement, XElementIterator ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - XElementIterator iter = root->begin(); - CHECK( iter != root->end() ); - CHECK_EQUAL( "abc", ( iter++ )->getName() ); - CHECK( iter != root->end() ); - CHECK_EQUAL( "empty-element", ( iter++ )->getName() ); - CHECK( iter != root->end() ); - CHECK_EQUAL( "nested-stuff", ( iter++ )->getName() ); - CHECK( iter == root->end() ); -} -T_END - - -TEST( suffixDecrement, XElementIterator ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - XElementIterator iter = root->end(); - CHECK( iter == root->end() ); - iter--; - CHECK( iter != root->end() ); - CHECK( iter != root->begin() ); - CHECK_EQUAL( "nested-stuff", ( iter-- )->getName() ); - CHECK( iter != root->end() ); - CHECK( iter != root->begin() ); - CHECK_EQUAL( "empty-element", ( iter-- )->getName() ); - CHECK( iter != root->end() ); - CHECK( iter == root->begin() ); - CHECK_EQUAL( "abc", ( iter-- )->getName() ); - - // iter is now "before" root->begin() - // which behaves like an "end" iter, should throw - CHECK_RAISES( iter->getName() ); -} -T_END - - -TEST( prefixIncrement, XElementIterator ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - XElementIterator iter = root->begin(); - CHECK_EQUAL( "abc", iter->getName() ); - CHECK_EQUAL( "empty-element", ( ++iter )->getName() ); - CHECK_EQUAL( "nested-stuff", ( ++iter )->getName() ); - ++iter; - CHECK( iter == root->end() ) -} -T_END - - -TEST( prefixDecrement, XElementIterator ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - XElementIterator iter = root->end(); - CHECK( iter == root->end() ); - CHECK( iter != root->begin() ); - CHECK_EQUAL( "nested-stuff", ( --iter )->getName() ); - CHECK( iter != root->end() ); - CHECK( iter != root->begin() ); - CHECK_EQUAL( "empty-element", ( --iter )->getName() ); - CHECK( iter != root->end() ); - CHECK( iter != root->begin() ); - CHECK_EQUAL( "abc", ( --iter )->getName() ); - CHECK( iter != root->end() ); - CHECK( iter == root->begin() ); - --iter; - - // iter is now "before" root->begin() - // which behaves like an "end" iter, should throw - CHECK_RAISES( iter->getName() ); -} -T_END - - -TEST( stlAlgorithm, XElementIterator ) -{ - // First demonstrate the impossible lambda syntax - std::vector ints{ 5, 7, 99, 1, -1, 36, 17, 9 }; - - auto it = std::find_if( - ints.begin(), - ints.end(), - [] ( const int& i ) { return i < 0; } ); - - CHECK_EQUAL( -1, (*it) ); - - // Now try it with the custom iterator - auto xdoc = doc(); - auto root = xdoc->getRoot(); - - auto iter = std::find_if( - root->begin(), - root->end(), - [] ( const XElement& n ) { return n.getName() == "nested-stuff"; } ); - - CHECK_EQUAL( "nested-stuff", iter->getName() ) -} -T_END - - -TEST( operatorStar, XElementIterator ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - XElementIterator iter = root->begin(); - auto& node = *iter; - CHECK_EQUAL( "abc", node.getName() ) - node.setName( "def" ); - CHECK_EQUAL( "def", node.getName() ) - - // obtain the node again to make sure it changed in the xdoc - auto reobtainedRoot = xdoc->getRoot(); - auto reobtainedIter = reobtainedRoot->begin(); - CHECK_EQUAL( "def", reobtainedIter->getName() ); -} -T_END - - -TEST( copyConstructor, XElementIterator ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - XElementIterator iter = root->begin(); - XElementIterator copy{ iter }; - - CHECK_EQUAL( "abc", iter->getName() ) - CHECK_EQUAL( "abc", copy->getName() ) - - copy->setName( "def" ); - - CHECK_EQUAL( "def", iter->getName() ) - CHECK_EQUAL( "def", copy->getName() ) -} -T_END - - -TEST( moveConstructor, XElementIterator ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - XElementIterator moved{ root->begin() }; // maybe it calls move ctor... - - auto& node = *moved; - CHECK_EQUAL( "abc", node.getName() ) - node.setName( "def" ); - CHECK_EQUAL( "def", node.getName() ) - - // obtain the node again to make sure it changed in the xdoc - auto reobtainedRoot = xdoc->getRoot(); - auto reobtainedIter = reobtainedRoot->begin(); - CHECK_EQUAL( "def", reobtainedIter->getName() ); -} -T_END - - -TEST( assignmentOperator, XElementIterator ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - XElementIterator iter = root->begin(); - XElementIterator assigned; - assigned = iter; - - CHECK_EQUAL( "abc", iter->getName() ) - CHECK_EQUAL( "abc", assigned->getName() ) - - assigned->setName( "def" ); - - CHECK_EQUAL( "def", iter->getName() ) - CHECK_EQUAL( "def", assigned->getName() ) -} -T_END - - -TEST( moveAssignment, XElementIterator ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - XElementIterator moved; - moved = root->begin(); // maybe it calls move assignment... - - auto& node = *moved; - CHECK_EQUAL( "abc", node.getName() ) - node.setName( "def" ); - CHECK_EQUAL( "def", node.getName() ) - - // obtain the node again to make sure it changed in the xdoc - auto reobtainedRoot = xdoc->getRoot(); - auto reobtainedIter = reobtainedRoot->begin(); - CHECK_EQUAL( "def", reobtainedIter->getName() ); -} -T_END - - -TEST( nullThrows, XElementIterator ) -{ - XElementIterator nullIter; - CHECK_RAISES( nullIter->getName() ) - CHECK_RAISES( (*nullIter).getName() ) - -} -T_END - - -TEST( doesNotCrash, XElementIterator ) -{ - XElementIterator nullIter; - XElementIterator anotherIter; - CHECK_NOT_RAISES( anotherIter = nullIter ); - CHECK_NOT_RAISES( anotherIter = XElementIterator{} ); -} -T_END - -#endif diff --git a/Sourcecode/private/mxtest/xml/XElementTest.cpp b/Sourcecode/private/mxtest/xml/XElementTest.cpp deleted file mode 100755 index 0b1a6fd5c..000000000 --- a/Sourcecode/private/mxtest/xml/XElementTest.cpp +++ /dev/null @@ -1,361 +0,0 @@ -// MusicXML Class Library -// Copyright (c) by Matthew James Briggs -// Distributed under the MIT License - -#include "mxtest/control/CompileControl.h" -#ifdef MX_COMPILE_XML_TESTS - -#include "cpul/cpulTestHarness.h" -#include "mx/xml/XFactory.h" -#include "mx/xml/XDoc.h" -#include "mx/xml/XElement.h" -#include "mx/xml/XElementIterator.h" -#include "mx/xml/XAttributeIterator.h" -#include "mxtest/xml/FakeXml.h" - -using namespace std; -using namespace mx::xml; - - - -namespace -{ - inline mx::xml::XDocCPtr doc() - { - auto xdoc = XFactory::makeXDoc(); - std::istringstream is( mxtest::fakeXml ); - xdoc->loadStream( is ); - return xdoc; - } -} - - -TEST( useIteratorBasic, XElement ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - int i = 0; - auto endIter = root->end(); - for( auto it = root->begin(); it != endIter; ++it, ++i ) - { - switch( i ) - { - case 0: - CHECK_EQUAL( "abc", it->getName() ); - break; - case 1: - CHECK_EQUAL( "empty-element", it->getName() ); - break; - case 2: - CHECK_EQUAL( "nested-stuff", it->getName() ); - break; - default: - CHECK_FAIL( "should not reach here" ); - break; - } - } -} -T_END - - -TEST( getTypeElement, XElement ) -{ - auto xdoc = doc(); - auto node = xdoc->getRoot(); - CHECK( !node->getIsNull() ); - CHECK_EQUAL( "root-node", node->getName() ); - CHECK_EQUAL( "", node->getValue() ); - CHECK( XElementType::element == node->getType() ); -} -T_END - - -TEST( getTypeText, XElement ) -{ - auto xdoc = doc(); - auto node = xdoc->getRoot(); - auto iter = node->begin(); - CHECK( !iter.getIsPayloadNull() ); - CHECK( !iter->getIsNull() ); - CHECK_EQUAL( "abc", iter->getName() ); - auto weird = iter->begin(); - CHECK( weird == iter->end() ); - CHECK_EQUAL( "abcdefg", iter->getValue() ); - CHECK( XElementType::text == iter->getType() ); -} -T_END - - -TEST( getTypeEmpty, XElement ) -{ - auto xdoc = doc(); - auto node = xdoc->getRoot(); - auto iter = node->begin(); - ++iter; - CHECK( !iter.getIsPayloadNull() ); - CHECK( !iter->getIsNull() ); - CHECK_EQUAL( "empty-element", iter->getName() ); - CHECK( XElementType::empty == iter->getType() ); -} -T_END - - -TEST( getValueEmptyElementEmptyString, XElement ) -{ - auto xdoc = doc(); - auto node = xdoc->getRoot(); - auto iter = node->begin(); - ++iter; - CHECK( !iter.getIsPayloadNull() ); - CHECK( !iter->getIsNull() ); - CHECK_EQUAL( "", iter->getValue() ); - CHECK( XElementType::empty == iter->getType() ); -} -T_END - - -TEST( getValueEmptyElementTypeEmptyString, XElement ) -{ - auto xdoc = doc(); - auto node = xdoc->getRoot(); - auto iter = node->begin(); - ++iter; - ++iter; - CHECK( !iter.getIsPayloadNull() ); - CHECK( !iter->getIsNull() ); - CHECK_EQUAL( "", iter->getValue() ); - CHECK( XElementType::element == iter->getType() ); -} -T_END - - -TEST( getValue, XElement ) -{ - auto xdoc = doc(); - auto node = xdoc->getRoot(); - auto iter = node->begin(); - CHECK( !iter.getIsPayloadNull() ); - CHECK( !iter->getIsNull() ); - CHECK_EQUAL( "abcdefg", iter->getValue() ); - CHECK( XElementType::text == iter->getType() ); -} -T_END - - -TEST( setName, XElement ) -{ - auto xdoc = doc(); - auto node1 = xdoc->getRoot(); - auto iter1 = node1->begin(); - CHECK_EQUAL( "abc", iter1->getName() ); - - // function under test - iter1->setName( "blah" ); - CHECK_EQUAL( "blah", iter1->getName() ); - - auto node2 = xdoc->getRoot(); - auto iter2 = node1->begin(); - CHECK_EQUAL( "blah", iter1->getName() ); -} -T_END - - -TEST( setValueChangeExisting, XElement ) -{ - auto xdoc = doc(); - auto node1 = xdoc->getRoot(); - auto iter1 = node1->begin(); - CHECK_EQUAL( "abcdefg", iter1->getValue() ); - - // function under test - iter1->setValue( "blah" ); - CHECK_EQUAL( "blah", iter1->getValue() ); - - auto node2 = xdoc->getRoot(); - auto iter2 = node1->begin(); - CHECK_EQUAL( "blah", iter1->getValue() ); -} -T_END - - -TEST( setValueAddToEmpty, XElement ) -{ - auto xdoc = doc(); - auto node1 = xdoc->getRoot(); - auto iter1 = node1->begin(); - ++iter1; - CHECK_EQUAL( "", iter1->getValue() ); - CHECK( XElementType::empty == iter1->getType() ); - - // function under test - iter1->setValue( "blah" ); - CHECK_EQUAL( "blah", iter1->getValue() ); - CHECK( XElementType::text == iter1->getType() ); - - auto node2 = xdoc->getRoot(); - auto iter2 = node1->begin(); - ++iter2; - CHECK_EQUAL( "blah", iter1->getValue() ); - CHECK( XElementType::text == iter1->getType() ); -} -T_END - - -TEST( getDoc, XElement ) -{ - auto xdoc = doc(); - auto node = xdoc->getRoot(); - auto gotdoc = node->getDoc(); - CHECK_EQUAL( reinterpret_cast( xdoc.get() ), reinterpret_cast( gotdoc.get() ) ) -} -T_END - - -TEST( getParent, XElement ) -{ - auto xdoc = doc(); - auto node = xdoc->getRoot(); - auto iter = node->begin(); - auto parent = iter->getParent(); - CHECK_EQUAL( "root-node", node->getName() ); - CHECK_EQUAL( "root-node", parent->getName() ) -} -T_END - - -TEST( attributesBeginEnd, XElement ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - CHECK( root->attributesBegin() == root->attributesEnd() ); - auto elIter = root->begin(); - ++elIter; - CHECK( elIter->attributesBegin() != elIter->attributesEnd() ); -} -T_END - - -TEST( prependAttributeFromEmpty, XElement ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - CHECK( root->attributesBegin() == root->attributesEnd() ); - root->prependAttribute( "prepended" )->setValue( "val-A" ); - CHECK( root->attributesBegin() != root->attributesEnd() ); - auto atIter = root->attributesBegin(); - CHECK_EQUAL( "prepended", atIter->getName() ); - CHECK_EQUAL( "val-A", atIter->getValue() ); - - // start over make sure its there - auto root2 = xdoc->getRoot(); - auto atIter2 = root2->attributesBegin(); - CHECK_EQUAL( "prepended", atIter2->getName() ); - CHECK_EQUAL( "val-A", atIter2->getValue() ); -} -T_END - - -TEST( appendAttributeFromEmpty, XElement ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - CHECK( root->attributesBegin() == root->attributesEnd() ); - root->appendAttribute( "appended" )->setValue( "val-B" ); - CHECK( root->attributesBegin() != root->attributesEnd() ); - auto atIter = root->attributesBegin(); - CHECK_EQUAL( "appended", atIter->getName() ); - CHECK_EQUAL( "val-B", atIter->getValue() ); - - // start over make sure its there - auto root2 = xdoc->getRoot(); - auto atIter2 = root2->attributesBegin(); - CHECK_EQUAL( "appended", atIter2->getName() ); - CHECK_EQUAL( "val-B", atIter2->getValue() ); -} -T_END - - -TEST( prependAttributeWithExisting, XElement ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - auto elIter = root->begin(); - ++elIter; - ++elIter; - auto& node = *elIter; - auto atIter = node.attributesBegin(); - CHECK_EQUAL( "color", atIter->getName() ); - CHECK_EQUAL( "blue", atIter->getValue() ); - node.prependAttribute( "pre" )->setValue( "pended" ); - atIter = node.attributesBegin(); - CHECK_EQUAL( "pre", atIter->getName() ); - CHECK_EQUAL( "pended", atIter->getValue() ); - ++atIter; - CHECK_EQUAL( "color", atIter->getName() ); - CHECK_EQUAL( "blue", atIter->getValue() ); -} -T_END - - -TEST( appendAttributeWithExisting, XElement ) -{ - auto xdoc = doc(); - auto root = xdoc->getRoot(); - auto elIter = root->begin(); - ++elIter; - ++elIter; - auto& node = *elIter; - auto atIter = node.attributesBegin(); - CHECK_EQUAL( "color", atIter->getName() ); - CHECK_EQUAL( "blue", atIter->getValue() ); - node.appendAttribute( "ap" )->setValue( "pended" ); - atIter = node.attributesBegin(); - CHECK_EQUAL( "color", atIter->getName() ); - CHECK_EQUAL( "blue", atIter->getValue() ); - ++atIter; - CHECK_EQUAL( "ap", atIter->getName() ); - CHECK_EQUAL( "pended", atIter->getValue() ); -} -T_END - - -TEST( insertSiblingAfter, XElement ) -{ - auto xdoc = XFactory::makeXDoc(); - auto root = xdoc->getRoot(); - root->appendChild( "one" ); - root->appendChild( "three" ); - root->appendChild( "four" ); - root->begin()->insertSiblingAfter( "two" ); - auto it = root->begin(); - CHECK_EQUAL( "one", it->getName() ); - ++it; - CHECK_EQUAL( "two", it->getName() ); - ++it; - CHECK_EQUAL( "three", it->getName() ); - ++it; - CHECK_EQUAL( "four", it->getName() ); -} -T_END - - -TEST( removeChild, XElement ) -{ - auto xdoc = XFactory::makeXDoc(); - auto root = xdoc->getRoot(); - root->appendChild( "one" ); - root->appendChild( "two" ); - root->appendChild( "three" ); - root->appendChild( "four" ); - root->removeChild( "two" ); - auto it = root->begin(); - CHECK_EQUAL( "one", it->getName() ); - ++it; - CHECK_EQUAL( "three", it->getName() ); - ++it; - CHECK_EQUAL( "four", it->getName() ); -} -T_END - - -#endif diff --git a/Xcode/Mx.xcodeproj/project.pbxproj b/Xcode/Mx.xcodeproj/project.pbxproj index 603af7d68..e157926b2 100755 --- a/Xcode/Mx.xcodeproj/project.pbxproj +++ b/Xcode/Mx.xcodeproj/project.pbxproj @@ -112,17 +112,8 @@ 29A800521EF0499300AD2478 /* TechnicalFunctions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2941EF0476300AD2478 /* TechnicalFunctions.cpp */; }; 29A800531EF0499300AD2478 /* TimeReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2961EF0476300AD2478 /* TimeReader.cpp */; }; 29A800541EF0499300AD2478 /* TupletReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2981EF0476300AD2478 /* TupletReader.cpp */; }; - 29A800551EF0499300AD2478 /* pugixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E29C1EF0476300AD2478 /* pugixml.cpp */; }; 29A800561EF0499300AD2478 /* Utility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2A71EF0476300AD2478 /* Utility.cpp */; }; 29A800571EF0499300AD2478 /* UtilityImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2A91EF0476300AD2478 /* UtilityImpl.cpp */; }; - 29A800581EF0499300AD2478 /* PugiAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2AC1EF0476300AD2478 /* PugiAttribute.cpp */; }; - 29A800591EF0499300AD2478 /* PugiAttributeIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2AE1EF0476300AD2478 /* PugiAttributeIterImpl.cpp */; }; - 29A8005A1EF0499300AD2478 /* PugiDoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B01EF0476300AD2478 /* PugiDoc.cpp */; }; - 29A8005B1EF0499300AD2478 /* PugiElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B21EF0476300AD2478 /* PugiElement.cpp */; }; - 29A8005C1EF0499300AD2478 /* PugiElementIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B41EF0476300AD2478 /* PugiElementIterImpl.cpp */; }; - 29A8005D1EF0499300AD2478 /* XAttributeIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B71EF0476300AD2478 /* XAttributeIterator.cpp */; }; - 29A8005E1EF0499300AD2478 /* XElementIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2BD1EF0476300AD2478 /* XElementIterator.cpp */; }; - 29A8005F1EF0499300AD2478 /* XFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2C01EF0476300AD2478 /* XFactory.cpp */; }; 29A800641EF0876500AD2478 /* SoundID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A800621EF0876500AD2478 /* SoundID.cpp */; }; 29A800651EF0876500AD2478 /* SoundID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A800621EF0876500AD2478 /* SoundID.cpp */; }; 29A800661EF0876500AD2478 /* SoundID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A800621EF0876500AD2478 /* SoundID.cpp */; }; @@ -2724,10 +2715,6 @@ 29A8FCF11EF0476E00AD2478 /* TupletReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2981EF0476300AD2478 /* TupletReader.cpp */; }; 29A8FCF21EF0476E00AD2478 /* TupletReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2981EF0476300AD2478 /* TupletReader.cpp */; }; 29A8FCF31EF0476E00AD2478 /* TupletReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2981EF0476300AD2478 /* TupletReader.cpp */; }; - 29A8FCFF1EF0476E00AD2478 /* pugixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E29C1EF0476300AD2478 /* pugixml.cpp */; }; - 29A8FD001EF0476E00AD2478 /* pugixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E29C1EF0476300AD2478 /* pugixml.cpp */; }; - 29A8FD011EF0476E00AD2478 /* pugixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E29C1EF0476300AD2478 /* pugixml.cpp */; }; - 29A8FD021EF0476E00AD2478 /* pugixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E29C1EF0476300AD2478 /* pugixml.cpp */; }; 29A8FD311EF0476E00AD2478 /* Utility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2A71EF0476300AD2478 /* Utility.cpp */; }; 29A8FD321EF0476E00AD2478 /* Utility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2A71EF0476300AD2478 /* Utility.cpp */; }; 29A8FD331EF0476E00AD2478 /* Utility.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2A71EF0476300AD2478 /* Utility.cpp */; }; @@ -2736,38 +2723,6 @@ 29A8FD3C1EF0476E00AD2478 /* UtilityImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2A91EF0476300AD2478 /* UtilityImpl.cpp */; }; 29A8FD3D1EF0476E00AD2478 /* UtilityImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2A91EF0476300AD2478 /* UtilityImpl.cpp */; }; 29A8FD3E1EF0476E00AD2478 /* UtilityImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2A91EF0476300AD2478 /* UtilityImpl.cpp */; }; - 29A8FD451EF0476E00AD2478 /* PugiAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2AC1EF0476300AD2478 /* PugiAttribute.cpp */; }; - 29A8FD461EF0476E00AD2478 /* PugiAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2AC1EF0476300AD2478 /* PugiAttribute.cpp */; }; - 29A8FD471EF0476E00AD2478 /* PugiAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2AC1EF0476300AD2478 /* PugiAttribute.cpp */; }; - 29A8FD481EF0476E00AD2478 /* PugiAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2AC1EF0476300AD2478 /* PugiAttribute.cpp */; }; - 29A8FD4F1EF0476E00AD2478 /* PugiAttributeIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2AE1EF0476300AD2478 /* PugiAttributeIterImpl.cpp */; }; - 29A8FD501EF0476E00AD2478 /* PugiAttributeIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2AE1EF0476300AD2478 /* PugiAttributeIterImpl.cpp */; }; - 29A8FD511EF0476E00AD2478 /* PugiAttributeIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2AE1EF0476300AD2478 /* PugiAttributeIterImpl.cpp */; }; - 29A8FD521EF0476E00AD2478 /* PugiAttributeIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2AE1EF0476300AD2478 /* PugiAttributeIterImpl.cpp */; }; - 29A8FD591EF0476F00AD2478 /* PugiDoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B01EF0476300AD2478 /* PugiDoc.cpp */; }; - 29A8FD5A1EF0476F00AD2478 /* PugiDoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B01EF0476300AD2478 /* PugiDoc.cpp */; }; - 29A8FD5B1EF0476F00AD2478 /* PugiDoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B01EF0476300AD2478 /* PugiDoc.cpp */; }; - 29A8FD5C1EF0476F00AD2478 /* PugiDoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B01EF0476300AD2478 /* PugiDoc.cpp */; }; - 29A8FD631EF0476F00AD2478 /* PugiElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B21EF0476300AD2478 /* PugiElement.cpp */; }; - 29A8FD641EF0476F00AD2478 /* PugiElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B21EF0476300AD2478 /* PugiElement.cpp */; }; - 29A8FD651EF0476F00AD2478 /* PugiElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B21EF0476300AD2478 /* PugiElement.cpp */; }; - 29A8FD661EF0476F00AD2478 /* PugiElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B21EF0476300AD2478 /* PugiElement.cpp */; }; - 29A8FD6D1EF0476F00AD2478 /* PugiElementIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B41EF0476300AD2478 /* PugiElementIterImpl.cpp */; }; - 29A8FD6E1EF0476F00AD2478 /* PugiElementIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B41EF0476300AD2478 /* PugiElementIterImpl.cpp */; }; - 29A8FD6F1EF0476F00AD2478 /* PugiElementIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B41EF0476300AD2478 /* PugiElementIterImpl.cpp */; }; - 29A8FD701EF0476F00AD2478 /* PugiElementIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B41EF0476300AD2478 /* PugiElementIterImpl.cpp */; }; - 29A8FD7C1EF0476F00AD2478 /* XAttributeIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B71EF0476300AD2478 /* XAttributeIterator.cpp */; }; - 29A8FD7D1EF0476F00AD2478 /* XAttributeIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B71EF0476300AD2478 /* XAttributeIterator.cpp */; }; - 29A8FD7E1EF0476F00AD2478 /* XAttributeIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B71EF0476300AD2478 /* XAttributeIterator.cpp */; }; - 29A8FD7F1EF0476F00AD2478 /* XAttributeIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2B71EF0476300AD2478 /* XAttributeIterator.cpp */; }; - 29A8FD9A1EF0476F00AD2478 /* XElementIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2BD1EF0476300AD2478 /* XElementIterator.cpp */; }; - 29A8FD9B1EF0476F00AD2478 /* XElementIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2BD1EF0476300AD2478 /* XElementIterator.cpp */; }; - 29A8FD9C1EF0476F00AD2478 /* XElementIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2BD1EF0476300AD2478 /* XElementIterator.cpp */; }; - 29A8FD9D1EF0476F00AD2478 /* XElementIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2BD1EF0476300AD2478 /* XElementIterator.cpp */; }; - 29A8FDA91EF0476F00AD2478 /* XFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2C01EF0476300AD2478 /* XFactory.cpp */; }; - 29A8FDAA1EF0476F00AD2478 /* XFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2C01EF0476300AD2478 /* XFactory.cpp */; }; - 29A8FDAB1EF0476F00AD2478 /* XFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2C01EF0476300AD2478 /* XFactory.cpp */; }; - 29A8FDAC1EF0476F00AD2478 /* XFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E2C01EF0476300AD2478 /* XFactory.cpp */; }; 29A8FDCA1EF0499200AD2478 /* ClefData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8DD5C1EF0475D00AD2478 /* ClefData.cpp */; }; 29A8FDCB1EF0499200AD2478 /* DocumentManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8DD611EF0475D00AD2478 /* DocumentManager.cpp */; }; 29A8FDCC1EF0499200AD2478 /* DurationData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8DD631EF0475D00AD2478 /* DurationData.cpp */; }; @@ -3332,7 +3287,6 @@ 29A8FFFD1EF0499300AD2478 /* TouchingPitch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E1DB1EF0476100AD2478 /* TouchingPitch.cpp */; }; 29A8FFFE1EF0499300AD2478 /* TraditionalKey.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E1DD1EF0476200AD2478 /* TraditionalKey.cpp */; }; 29A8FFFF1EF0499300AD2478 /* Transpose.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29A8E1DF1EF0476200AD2478 /* Transpose.cpp */; }; - 29B962851E79FF410072071D /* MxiOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 29B962831E79FF410072071D /* MxiOS.h */; }; 29E7633B205E2DEE00B754D5 /* LyricType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29E76339205E2DEE00B754D5 /* LyricType.cpp */; }; 29E7633C205E2DEE00B754D5 /* LyricType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29E76339205E2DEE00B754D5 /* LyricType.cpp */; }; 29E7633D205E2DEE00B754D5 /* LyricType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29E76339205E2DEE00B754D5 /* LyricType.cpp */; }; @@ -3351,6 +3305,135 @@ 29EAD74A1F0EF8CE00BDE782 /* MiscData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29EAD7461F0EF8CE00BDE782 /* MiscData.cpp */; }; 29EAD74B1F0EF8CE00BDE782 /* MiscData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29EAD7461F0EF8CE00BDE782 /* MiscData.cpp */; }; 29EAD74C1F0EF8CE00BDE782 /* MiscData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29EAD7461F0EF8CE00BDE782 /* MiscData.cpp */; }; + 9CD50C25238A323100ED7DD8 /* ApiCommon.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3863225C0DB800814240 /* ApiCommon.h */; }; + 9CD50C26238A323100ED7DD8 /* ApiEquality.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3856225C0DB600814240 /* ApiEquality.h */; }; + 9CD50C27238A323100ED7DD8 /* AppearanceData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3841225C0DB400814240 /* AppearanceData.h */; }; + 9CD50C28238A323100ED7DD8 /* BarlineData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3852225C0DB600814240 /* BarlineData.h */; }; + 9CD50C29238A323100ED7DD8 /* ChordData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC384A225C0DB500814240 /* ChordData.h */; }; + 9CD50C2A238A323100ED7DD8 /* ClefData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC383D225C0DB300814240 /* ClefData.h */; }; + 9CD50C2B238A323100ED7DD8 /* ColorData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3861225C0DB700814240 /* ColorData.h */; }; + 9CD50C2C238A323100ED7DD8 /* CurveData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3859225C0DB600814240 /* CurveData.h */; }; + 9CD50C2D238A323100ED7DD8 /* DirectionData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC384B225C0DB500814240 /* DirectionData.h */; }; + 9CD50C2E238A323100ED7DD8 /* DocumentManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3840225C0DB400814240 /* DocumentManager.h */; }; + 9CD50C2F238A323100ED7DD8 /* DurationData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC385B225C0DB700814240 /* DurationData.h */; }; + 9CD50C30238A323100ED7DD8 /* EncodingData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3862225C0DB700814240 /* EncodingData.h */; }; + 9CD50C31238A323100ED7DD8 /* FontData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC384D225C0DB500814240 /* FontData.h */; }; + 9CD50C32238A323100ED7DD8 /* KeyData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3843225C0DB400814240 /* KeyData.h */; }; + 9CD50C33238A323100ED7DD8 /* LayoutData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC385C225C0DB700814240 /* LayoutData.h */; }; + 9CD50C34238A323100ED7DD8 /* LineData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3854225C0DB600814240 /* LineData.h */; }; + 9CD50C35238A323100ED7DD8 /* LyricData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3860225C0DB700814240 /* LyricData.h */; }; + 9CD50C36238A323100ED7DD8 /* MarkData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC385D225C0DB700814240 /* MarkData.h */; }; + 9CD50C37238A323100ED7DD8 /* MeasureData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC385F225C0DB700814240 /* MeasureData.h */; }; + 9CD50C38238A323100ED7DD8 /* MeasureLocation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC385E225C0DB700814240 /* MeasureLocation.h */; }; + 9CD50C39238A323100ED7DD8 /* MiscData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3857225C0DB600814240 /* MiscData.h */; }; + 9CD50C3A238A323100ED7DD8 /* NoteAttachmentData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3866225C0DB800814240 /* NoteAttachmentData.h */; }; + 9CD50C3B238A323100ED7DD8 /* NoteData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC385A225C0DB600814240 /* NoteData.h */; }; + 9CD50C3C238A323100ED7DD8 /* OttavaData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3851225C0DB500814240 /* OttavaData.h */; }; + 9CD50C3D238A323100ED7DD8 /* PageTextData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3844225C0DB400814240 /* PageTextData.h */; }; + 9CD50C3E238A323100ED7DD8 /* PartData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3858225C0DB600814240 /* PartData.h */; }; + 9CD50C3F238A323100ED7DD8 /* PartGroupData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3845225C0DB400814240 /* PartGroupData.h */; }; + 9CD50C40238A323100ED7DD8 /* PitchData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC383F225C0DB400814240 /* PitchData.h */; }; + 9CD50C41238A323100ED7DD8 /* PositionData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3850225C0DB500814240 /* PositionData.h */; }; + 9CD50C42238A323100ED7DD8 /* PrintData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3846225C0DB400814240 /* PrintData.h */; }; + 9CD50C43238A323100ED7DD8 /* ScoreData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3847225C0DB400814240 /* ScoreData.h */; }; + 9CD50C44238A323100ED7DD8 /* SoundID.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3849225C0DB500814240 /* SoundID.h */; }; + 9CD50C45238A323100ED7DD8 /* SpannerData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3848225C0DB400814240 /* SpannerData.h */; }; + 9CD50C46238A323100ED7DD8 /* StaffData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3864225C0DB800814240 /* StaffData.h */; }; + 9CD50C47238A323100ED7DD8 /* SystemData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC384C225C0DB500814240 /* SystemData.h */; }; + 9CD50C48238A323100ED7DD8 /* TempoData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC384E225C0DB500814240 /* TempoData.h */; }; + 9CD50C49238A323100ED7DD8 /* TimeSignatureData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3842225C0DB400814240 /* TimeSignatureData.h */; }; + 9CD50C4A238A323100ED7DD8 /* TupletData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3853225C0DB600814240 /* TupletData.h */; }; + 9CD50C4B238A323100ED7DD8 /* Version.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC384F225C0DB500814240 /* Version.h */; }; + 9CD50C4C238A323100ED7DD8 /* VoiceData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3865225C0DB800814240 /* VoiceData.h */; }; + 9CD50C4D238A323100ED7DD8 /* WedgeData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC383E225C0DB300814240 /* WedgeData.h */; }; + 9CD50C4E238A323100ED7DD8 /* WordsData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3855225C0DB600814240 /* WordsData.h */; }; + 9CD50C4F238A329F00ED7DD8 /* ApiCommon.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3863225C0DB800814240 /* ApiCommon.h */; }; + 9CD50C50238A329F00ED7DD8 /* ApiEquality.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3856225C0DB600814240 /* ApiEquality.h */; }; + 9CD50C51238A329F00ED7DD8 /* AppearanceData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3841225C0DB400814240 /* AppearanceData.h */; }; + 9CD50C52238A32A000ED7DD8 /* BarlineData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3852225C0DB600814240 /* BarlineData.h */; }; + 9CD50C53238A32A000ED7DD8 /* ChordData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC384A225C0DB500814240 /* ChordData.h */; }; + 9CD50C54238A32A000ED7DD8 /* ClefData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC383D225C0DB300814240 /* ClefData.h */; }; + 9CD50C55238A32A000ED7DD8 /* ColorData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3861225C0DB700814240 /* ColorData.h */; }; + 9CD50C56238A32A000ED7DD8 /* CurveData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3859225C0DB600814240 /* CurveData.h */; }; + 9CD50C57238A32A000ED7DD8 /* DirectionData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC384B225C0DB500814240 /* DirectionData.h */; }; + 9CD50C58238A32A000ED7DD8 /* DocumentManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3840225C0DB400814240 /* DocumentManager.h */; }; + 9CD50C59238A32A000ED7DD8 /* DurationData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC385B225C0DB700814240 /* DurationData.h */; }; + 9CD50C5A238A32A000ED7DD8 /* EncodingData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3862225C0DB700814240 /* EncodingData.h */; }; + 9CD50C5B238A32A000ED7DD8 /* FontData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC384D225C0DB500814240 /* FontData.h */; }; + 9CD50C5C238A32A000ED7DD8 /* KeyData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3843225C0DB400814240 /* KeyData.h */; }; + 9CD50C5D238A32A000ED7DD8 /* LayoutData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC385C225C0DB700814240 /* LayoutData.h */; }; + 9CD50C5E238A32A000ED7DD8 /* LineData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3854225C0DB600814240 /* LineData.h */; }; + 9CD50C5F238A32A000ED7DD8 /* LyricData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3860225C0DB700814240 /* LyricData.h */; }; + 9CD50C60238A32A000ED7DD8 /* MarkData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC385D225C0DB700814240 /* MarkData.h */; }; + 9CD50C61238A32A000ED7DD8 /* MeasureData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC385F225C0DB700814240 /* MeasureData.h */; }; + 9CD50C62238A32A000ED7DD8 /* MeasureLocation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC385E225C0DB700814240 /* MeasureLocation.h */; }; + 9CD50C63238A32A000ED7DD8 /* MiscData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3857225C0DB600814240 /* MiscData.h */; }; + 9CD50C64238A32A000ED7DD8 /* NoteAttachmentData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3866225C0DB800814240 /* NoteAttachmentData.h */; }; + 9CD50C65238A32A000ED7DD8 /* NoteData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC385A225C0DB600814240 /* NoteData.h */; }; + 9CD50C66238A32A100ED7DD8 /* OttavaData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3851225C0DB500814240 /* OttavaData.h */; }; + 9CD50C67238A32A100ED7DD8 /* PageTextData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3844225C0DB400814240 /* PageTextData.h */; }; + 9CD50C68238A32A100ED7DD8 /* PartData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3858225C0DB600814240 /* PartData.h */; }; + 9CD50C69238A32A100ED7DD8 /* PartGroupData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3845225C0DB400814240 /* PartGroupData.h */; }; + 9CD50C6A238A32A100ED7DD8 /* PitchData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC383F225C0DB400814240 /* PitchData.h */; }; + 9CD50C6B238A32A100ED7DD8 /* PositionData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3850225C0DB500814240 /* PositionData.h */; }; + 9CD50C6C238A32A100ED7DD8 /* PrintData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3846225C0DB400814240 /* PrintData.h */; }; + 9CD50C6D238A32A100ED7DD8 /* ScoreData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3847225C0DB400814240 /* ScoreData.h */; }; + 9CD50C6E238A32A100ED7DD8 /* SoundID.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3849225C0DB500814240 /* SoundID.h */; }; + 9CD50C6F238A32A100ED7DD8 /* SpannerData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3848225C0DB400814240 /* SpannerData.h */; }; + 9CD50C70238A32A100ED7DD8 /* StaffData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3864225C0DB800814240 /* StaffData.h */; }; + 9CD50C71238A32A100ED7DD8 /* SystemData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC384C225C0DB500814240 /* SystemData.h */; }; + 9CD50C72238A32A100ED7DD8 /* TempoData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC384E225C0DB500814240 /* TempoData.h */; }; + 9CD50C73238A32A100ED7DD8 /* TimeSignatureData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3842225C0DB400814240 /* TimeSignatureData.h */; }; + 9CD50C74238A32A100ED7DD8 /* TupletData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3853225C0DB600814240 /* TupletData.h */; }; + 9CD50C75238A32A100ED7DD8 /* Version.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC384F225C0DB500814240 /* Version.h */; }; + 9CD50C76238A32A100ED7DD8 /* VoiceData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3865225C0DB800814240 /* VoiceData.h */; }; + 9CD50C77238A32A100ED7DD8 /* WedgeData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC383E225C0DB300814240 /* WedgeData.h */; }; + 9CD50C78238A32A100ED7DD8 /* WordsData.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 29DC3855225C0DB600814240 /* WordsData.h */; }; + 9CD50CA0238A3D2700ED7DD8 /* XAttributeIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C7F238A3CFA00ED7DD8 /* XAttributeIterator.cpp */; }; + 9CD50CA1238A3D2700ED7DD8 /* XElementIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C81238A3CFA00ED7DD8 /* XElementIterator.cpp */; }; + 9CD50CA2238A3D2700ED7DD8 /* PugiElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C82238A3CFA00ED7DD8 /* PugiElement.cpp */; }; + 9CD50CA3238A3D2700ED7DD8 /* PugiAttributeIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C86238A3CFA00ED7DD8 /* PugiAttributeIterImpl.cpp */; }; + 9CD50CA4238A3D2700ED7DD8 /* PugiAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C89238A3CFA00ED7DD8 /* PugiAttribute.cpp */; }; + 9CD50CA5238A3D2700ED7DD8 /* PugiElementIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8A238A3CFA00ED7DD8 /* PugiElementIterImpl.cpp */; }; + 9CD50CA6238A3D2700ED7DD8 /* pugixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8B238A3CFA00ED7DD8 /* pugixml.cpp */; }; + 9CD50CA7238A3D2700ED7DD8 /* XFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8F238A3CFA00ED7DD8 /* XFactory.cpp */; }; + 9CD50CA8238A3D2700ED7DD8 /* PugiDoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C92238A3CFA00ED7DD8 /* PugiDoc.cpp */; }; + 9CD50CA9238A3D2800ED7DD8 /* XAttributeIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C7F238A3CFA00ED7DD8 /* XAttributeIterator.cpp */; }; + 9CD50CAA238A3D2800ED7DD8 /* XElementIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C81238A3CFA00ED7DD8 /* XElementIterator.cpp */; }; + 9CD50CAB238A3D2800ED7DD8 /* PugiElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C82238A3CFA00ED7DD8 /* PugiElement.cpp */; }; + 9CD50CAC238A3D2800ED7DD8 /* PugiAttributeIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C86238A3CFA00ED7DD8 /* PugiAttributeIterImpl.cpp */; }; + 9CD50CAD238A3D2800ED7DD8 /* PugiAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C89238A3CFA00ED7DD8 /* PugiAttribute.cpp */; }; + 9CD50CAE238A3D2800ED7DD8 /* PugiElementIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8A238A3CFA00ED7DD8 /* PugiElementIterImpl.cpp */; }; + 9CD50CAF238A3D2800ED7DD8 /* pugixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8B238A3CFA00ED7DD8 /* pugixml.cpp */; }; + 9CD50CB0238A3D2800ED7DD8 /* XFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8F238A3CFA00ED7DD8 /* XFactory.cpp */; }; + 9CD50CB1238A3D2800ED7DD8 /* PugiDoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C92238A3CFA00ED7DD8 /* PugiDoc.cpp */; }; + 9CD50CB2238A3D2800ED7DD8 /* XAttributeIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C7F238A3CFA00ED7DD8 /* XAttributeIterator.cpp */; }; + 9CD50CB3238A3D2800ED7DD8 /* XElementIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C81238A3CFA00ED7DD8 /* XElementIterator.cpp */; }; + 9CD50CB4238A3D2800ED7DD8 /* PugiElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C82238A3CFA00ED7DD8 /* PugiElement.cpp */; }; + 9CD50CB5238A3D2800ED7DD8 /* PugiAttributeIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C86238A3CFA00ED7DD8 /* PugiAttributeIterImpl.cpp */; }; + 9CD50CB6238A3D2800ED7DD8 /* PugiAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C89238A3CFA00ED7DD8 /* PugiAttribute.cpp */; }; + 9CD50CB7238A3D2800ED7DD8 /* PugiElementIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8A238A3CFA00ED7DD8 /* PugiElementIterImpl.cpp */; }; + 9CD50CB8238A3D2800ED7DD8 /* pugixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8B238A3CFA00ED7DD8 /* pugixml.cpp */; }; + 9CD50CB9238A3D2800ED7DD8 /* XFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8F238A3CFA00ED7DD8 /* XFactory.cpp */; }; + 9CD50CBA238A3D2800ED7DD8 /* PugiDoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C92238A3CFA00ED7DD8 /* PugiDoc.cpp */; }; + 9CD50CBB238A3D2800ED7DD8 /* XAttributeIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C7F238A3CFA00ED7DD8 /* XAttributeIterator.cpp */; }; + 9CD50CBC238A3D2800ED7DD8 /* XElementIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C81238A3CFA00ED7DD8 /* XElementIterator.cpp */; }; + 9CD50CBD238A3D2800ED7DD8 /* PugiElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C82238A3CFA00ED7DD8 /* PugiElement.cpp */; }; + 9CD50CBE238A3D2800ED7DD8 /* PugiAttributeIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C86238A3CFA00ED7DD8 /* PugiAttributeIterImpl.cpp */; }; + 9CD50CBF238A3D2800ED7DD8 /* PugiAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C89238A3CFA00ED7DD8 /* PugiAttribute.cpp */; }; + 9CD50CC0238A3D2800ED7DD8 /* PugiElementIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8A238A3CFA00ED7DD8 /* PugiElementIterImpl.cpp */; }; + 9CD50CC1238A3D2800ED7DD8 /* pugixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8B238A3CFA00ED7DD8 /* pugixml.cpp */; }; + 9CD50CC2238A3D2800ED7DD8 /* XFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8F238A3CFA00ED7DD8 /* XFactory.cpp */; }; + 9CD50CC3238A3D2800ED7DD8 /* PugiDoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C92238A3CFA00ED7DD8 /* PugiDoc.cpp */; }; + 9CD50CC4238A3D2900ED7DD8 /* XAttributeIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C7F238A3CFA00ED7DD8 /* XAttributeIterator.cpp */; }; + 9CD50CC5238A3D2900ED7DD8 /* XElementIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C81238A3CFA00ED7DD8 /* XElementIterator.cpp */; }; + 9CD50CC6238A3D2900ED7DD8 /* PugiElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C82238A3CFA00ED7DD8 /* PugiElement.cpp */; }; + 9CD50CC7238A3D2900ED7DD8 /* PugiAttributeIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C86238A3CFA00ED7DD8 /* PugiAttributeIterImpl.cpp */; }; + 9CD50CC8238A3D2900ED7DD8 /* PugiAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C89238A3CFA00ED7DD8 /* PugiAttribute.cpp */; }; + 9CD50CC9238A3D2900ED7DD8 /* PugiElementIterImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8A238A3CFA00ED7DD8 /* PugiElementIterImpl.cpp */; }; + 9CD50CCA238A3D2900ED7DD8 /* pugixml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8B238A3CFA00ED7DD8 /* pugixml.cpp */; }; + 9CD50CCB238A3D2900ED7DD8 /* XFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C8F238A3CFA00ED7DD8 /* XFactory.cpp */; }; + 9CD50CCC238A3D2900ED7DD8 /* PugiDoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9CD50C92238A3CFA00ED7DD8 /* PugiDoc.cpp */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -3358,8 +3441,50 @@ isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = mx/api; - dstSubfolderSpec = 7; + dstSubfolderSpec = 6; files = ( + 9CD50C25238A323100ED7DD8 /* ApiCommon.h in CopyFiles */, + 9CD50C26238A323100ED7DD8 /* ApiEquality.h in CopyFiles */, + 9CD50C27238A323100ED7DD8 /* AppearanceData.h in CopyFiles */, + 9CD50C28238A323100ED7DD8 /* BarlineData.h in CopyFiles */, + 9CD50C29238A323100ED7DD8 /* ChordData.h in CopyFiles */, + 9CD50C2A238A323100ED7DD8 /* ClefData.h in CopyFiles */, + 9CD50C2B238A323100ED7DD8 /* ColorData.h in CopyFiles */, + 9CD50C2C238A323100ED7DD8 /* CurveData.h in CopyFiles */, + 9CD50C2D238A323100ED7DD8 /* DirectionData.h in CopyFiles */, + 9CD50C2E238A323100ED7DD8 /* DocumentManager.h in CopyFiles */, + 9CD50C2F238A323100ED7DD8 /* DurationData.h in CopyFiles */, + 9CD50C30238A323100ED7DD8 /* EncodingData.h in CopyFiles */, + 9CD50C31238A323100ED7DD8 /* FontData.h in CopyFiles */, + 9CD50C32238A323100ED7DD8 /* KeyData.h in CopyFiles */, + 9CD50C33238A323100ED7DD8 /* LayoutData.h in CopyFiles */, + 9CD50C34238A323100ED7DD8 /* LineData.h in CopyFiles */, + 9CD50C35238A323100ED7DD8 /* LyricData.h in CopyFiles */, + 9CD50C36238A323100ED7DD8 /* MarkData.h in CopyFiles */, + 9CD50C37238A323100ED7DD8 /* MeasureData.h in CopyFiles */, + 9CD50C38238A323100ED7DD8 /* MeasureLocation.h in CopyFiles */, + 9CD50C39238A323100ED7DD8 /* MiscData.h in CopyFiles */, + 9CD50C3A238A323100ED7DD8 /* NoteAttachmentData.h in CopyFiles */, + 9CD50C3B238A323100ED7DD8 /* NoteData.h in CopyFiles */, + 9CD50C3C238A323100ED7DD8 /* OttavaData.h in CopyFiles */, + 9CD50C3D238A323100ED7DD8 /* PageTextData.h in CopyFiles */, + 9CD50C3E238A323100ED7DD8 /* PartData.h in CopyFiles */, + 9CD50C3F238A323100ED7DD8 /* PartGroupData.h in CopyFiles */, + 9CD50C40238A323100ED7DD8 /* PitchData.h in CopyFiles */, + 9CD50C41238A323100ED7DD8 /* PositionData.h in CopyFiles */, + 9CD50C42238A323100ED7DD8 /* PrintData.h in CopyFiles */, + 9CD50C43238A323100ED7DD8 /* ScoreData.h in CopyFiles */, + 9CD50C44238A323100ED7DD8 /* SoundID.h in CopyFiles */, + 9CD50C45238A323100ED7DD8 /* SpannerData.h in CopyFiles */, + 9CD50C46238A323100ED7DD8 /* StaffData.h in CopyFiles */, + 9CD50C47238A323100ED7DD8 /* SystemData.h in CopyFiles */, + 9CD50C48238A323100ED7DD8 /* TempoData.h in CopyFiles */, + 9CD50C49238A323100ED7DD8 /* TimeSignatureData.h in CopyFiles */, + 9CD50C4A238A323100ED7DD8 /* TupletData.h in CopyFiles */, + 9CD50C4B238A323100ED7DD8 /* Version.h in CopyFiles */, + 9CD50C4C238A323100ED7DD8 /* VoiceData.h in CopyFiles */, + 9CD50C4D238A323100ED7DD8 /* WedgeData.h in CopyFiles */, + 9CD50C4E238A323100ED7DD8 /* WordsData.h in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3369,6 +3494,48 @@ dstPath = mx/api; dstSubfolderSpec = 7; files = ( + 9CD50C4F238A329F00ED7DD8 /* ApiCommon.h in CopyFiles */, + 9CD50C50238A329F00ED7DD8 /* ApiEquality.h in CopyFiles */, + 9CD50C51238A329F00ED7DD8 /* AppearanceData.h in CopyFiles */, + 9CD50C52238A32A000ED7DD8 /* BarlineData.h in CopyFiles */, + 9CD50C53238A32A000ED7DD8 /* ChordData.h in CopyFiles */, + 9CD50C54238A32A000ED7DD8 /* ClefData.h in CopyFiles */, + 9CD50C55238A32A000ED7DD8 /* ColorData.h in CopyFiles */, + 9CD50C56238A32A000ED7DD8 /* CurveData.h in CopyFiles */, + 9CD50C57238A32A000ED7DD8 /* DirectionData.h in CopyFiles */, + 9CD50C58238A32A000ED7DD8 /* DocumentManager.h in CopyFiles */, + 9CD50C59238A32A000ED7DD8 /* DurationData.h in CopyFiles */, + 9CD50C5A238A32A000ED7DD8 /* EncodingData.h in CopyFiles */, + 9CD50C5B238A32A000ED7DD8 /* FontData.h in CopyFiles */, + 9CD50C5C238A32A000ED7DD8 /* KeyData.h in CopyFiles */, + 9CD50C5D238A32A000ED7DD8 /* LayoutData.h in CopyFiles */, + 9CD50C5E238A32A000ED7DD8 /* LineData.h in CopyFiles */, + 9CD50C5F238A32A000ED7DD8 /* LyricData.h in CopyFiles */, + 9CD50C60238A32A000ED7DD8 /* MarkData.h in CopyFiles */, + 9CD50C61238A32A000ED7DD8 /* MeasureData.h in CopyFiles */, + 9CD50C62238A32A000ED7DD8 /* MeasureLocation.h in CopyFiles */, + 9CD50C63238A32A000ED7DD8 /* MiscData.h in CopyFiles */, + 9CD50C64238A32A000ED7DD8 /* NoteAttachmentData.h in CopyFiles */, + 9CD50C65238A32A000ED7DD8 /* NoteData.h in CopyFiles */, + 9CD50C66238A32A100ED7DD8 /* OttavaData.h in CopyFiles */, + 9CD50C67238A32A100ED7DD8 /* PageTextData.h in CopyFiles */, + 9CD50C68238A32A100ED7DD8 /* PartData.h in CopyFiles */, + 9CD50C69238A32A100ED7DD8 /* PartGroupData.h in CopyFiles */, + 9CD50C6A238A32A100ED7DD8 /* PitchData.h in CopyFiles */, + 9CD50C6B238A32A100ED7DD8 /* PositionData.h in CopyFiles */, + 9CD50C6C238A32A100ED7DD8 /* PrintData.h in CopyFiles */, + 9CD50C6D238A32A100ED7DD8 /* ScoreData.h in CopyFiles */, + 9CD50C6E238A32A100ED7DD8 /* SoundID.h in CopyFiles */, + 9CD50C6F238A32A100ED7DD8 /* SpannerData.h in CopyFiles */, + 9CD50C70238A32A100ED7DD8 /* StaffData.h in CopyFiles */, + 9CD50C71238A32A100ED7DD8 /* SystemData.h in CopyFiles */, + 9CD50C72238A32A100ED7DD8 /* TempoData.h in CopyFiles */, + 9CD50C73238A32A100ED7DD8 /* TimeSignatureData.h in CopyFiles */, + 9CD50C74238A32A100ED7DD8 /* TupletData.h in CopyFiles */, + 9CD50C75238A32A100ED7DD8 /* Version.h in CopyFiles */, + 9CD50C76238A32A100ED7DD8 /* VoiceData.h in CopyFiles */, + 9CD50C77238A32A100ED7DD8 /* WedgeData.h in CopyFiles */, + 9CD50C78238A32A100ED7DD8 /* WordsData.h in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4685,9 +4852,6 @@ 29A8E2971EF0476300AD2478 /* TimeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TimeReader.h; sourceTree = ""; }; 29A8E2981EF0476300AD2478 /* TupletReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TupletReader.cpp; sourceTree = ""; }; 29A8E2991EF0476300AD2478 /* TupletReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TupletReader.h; sourceTree = ""; }; - 29A8E29B1EF0476300AD2478 /* pugiconfig.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = pugiconfig.hpp; sourceTree = ""; }; - 29A8E29C1EF0476300AD2478 /* pugixml.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pugixml.cpp; sourceTree = ""; }; - 29A8E29D1EF0476300AD2478 /* pugixml.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = pugixml.hpp; sourceTree = ""; }; 29A8E29F1EF0476300AD2478 /* Enum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Enum.h; sourceTree = ""; }; 29A8E2A01EF0476300AD2478 /* EnumWithString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EnumWithString.h; sourceTree = ""; }; 29A8E2A11EF0476300AD2478 /* JitAllocate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JitAllocate.h; sourceTree = ""; }; @@ -4700,30 +4864,6 @@ 29A8E2A81EF0476300AD2478 /* Utility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Utility.h; sourceTree = ""; }; 29A8E2A91EF0476300AD2478 /* UtilityImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UtilityImpl.cpp; sourceTree = ""; }; 29A8E2AA1EF0476300AD2478 /* UtilityImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UtilityImpl.h; sourceTree = ""; }; - 29A8E2AC1EF0476300AD2478 /* PugiAttribute.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PugiAttribute.cpp; sourceTree = ""; }; - 29A8E2AD1EF0476300AD2478 /* PugiAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PugiAttribute.h; sourceTree = ""; }; - 29A8E2AE1EF0476300AD2478 /* PugiAttributeIterImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PugiAttributeIterImpl.cpp; sourceTree = ""; }; - 29A8E2AF1EF0476300AD2478 /* PugiAttributeIterImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PugiAttributeIterImpl.h; sourceTree = ""; }; - 29A8E2B01EF0476300AD2478 /* PugiDoc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PugiDoc.cpp; sourceTree = ""; }; - 29A8E2B11EF0476300AD2478 /* PugiDoc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PugiDoc.h; sourceTree = ""; }; - 29A8E2B21EF0476300AD2478 /* PugiElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PugiElement.cpp; sourceTree = ""; }; - 29A8E2B31EF0476300AD2478 /* PugiElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PugiElement.h; sourceTree = ""; }; - 29A8E2B41EF0476300AD2478 /* PugiElementIterImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PugiElementIterImpl.cpp; sourceTree = ""; }; - 29A8E2B51EF0476300AD2478 /* PugiElementIterImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PugiElementIterImpl.h; sourceTree = ""; }; - 29A8E2B61EF0476300AD2478 /* XAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XAttribute.h; sourceTree = ""; }; - 29A8E2B71EF0476300AD2478 /* XAttributeIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XAttributeIterator.cpp; sourceTree = ""; }; - 29A8E2B81EF0476300AD2478 /* XAttributeIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XAttributeIterator.h; sourceTree = ""; }; - 29A8E2B91EF0476300AD2478 /* XAttributeIterImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XAttributeIterImpl.h; sourceTree = ""; }; - 29A8E2BA1EF0476300AD2478 /* XDoc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XDoc.h; sourceTree = ""; }; - 29A8E2BB1EF0476300AD2478 /* XDocSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XDocSpec.h; sourceTree = ""; }; - 29A8E2BC1EF0476300AD2478 /* XElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XElement.h; sourceTree = ""; }; - 29A8E2BD1EF0476300AD2478 /* XElementIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XElementIterator.cpp; sourceTree = ""; }; - 29A8E2BE1EF0476300AD2478 /* XElementIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XElementIterator.h; sourceTree = ""; }; - 29A8E2BF1EF0476300AD2478 /* XElementIterImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XElementIterImpl.h; sourceTree = ""; }; - 29A8E2C01EF0476300AD2478 /* XFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XFactory.cpp; sourceTree = ""; }; - 29A8E2C11EF0476300AD2478 /* XFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XFactory.h; sourceTree = ""; }; - 29A8E2C21EF0476300AD2478 /* XForwardDeclare.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XForwardDeclare.h; sourceTree = ""; }; - 29A8E2C31EF0476300AD2478 /* XThrow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XThrow.h; sourceTree = ""; }; 29A8FDC21EF0497400AD2478 /* MxmacOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MxmacOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 29A8FDC41EF0497500AD2478 /* MxmacOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MxmacOS.h; sourceTree = ""; }; 29A8FDC51EF0497500AD2478 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -4778,6 +4918,37 @@ 29EAD7391F0EA96B00BDE782 /* ProcessingInstruction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessingInstruction.cpp; sourceTree = ""; }; 29EAD73A1F0EA96B00BDE782 /* ProcessingInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessingInstruction.h; sourceTree = ""; }; 29EAD7461F0EF8CE00BDE782 /* MiscData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MiscData.cpp; sourceTree = ""; }; + 9CD50C7F238A3CFA00ED7DD8 /* XAttributeIterator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = XAttributeIterator.cpp; sourceTree = ""; }; + 9CD50C80238A3CFA00ED7DD8 /* pugiconfig.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = pugiconfig.hpp; sourceTree = ""; }; + 9CD50C81238A3CFA00ED7DD8 /* XElementIterator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = XElementIterator.cpp; sourceTree = ""; }; + 9CD50C82238A3CFA00ED7DD8 /* PugiElement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PugiElement.cpp; sourceTree = ""; }; + 9CD50C83238A3CFA00ED7DD8 /* PugiDoc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PugiDoc.h; sourceTree = ""; }; + 9CD50C84238A3CFA00ED7DD8 /* Parse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Parse.h; sourceTree = ""; }; + 9CD50C85238A3CFA00ED7DD8 /* PugiAttribute.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PugiAttribute.h; sourceTree = ""; }; + 9CD50C86238A3CFA00ED7DD8 /* PugiAttributeIterImpl.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PugiAttributeIterImpl.cpp; sourceTree = ""; }; + 9CD50C87238A3CFA00ED7DD8 /* pugilicense.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = pugilicense.txt; sourceTree = ""; }; + 9CD50C88238A3CFA00ED7DD8 /* pugixml.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = pugixml.hpp; sourceTree = ""; }; + 9CD50C89238A3CFA00ED7DD8 /* PugiAttribute.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PugiAttribute.cpp; sourceTree = ""; }; + 9CD50C8A238A3CFA00ED7DD8 /* PugiElementIterImpl.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PugiElementIterImpl.cpp; sourceTree = ""; }; + 9CD50C8B238A3CFA00ED7DD8 /* pugixml.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = pugixml.cpp; sourceTree = ""; }; + 9CD50C8C238A3CFA00ED7DD8 /* XThrow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XThrow.h; sourceTree = ""; }; + 9CD50C8D238A3CFA00ED7DD8 /* PugiElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PugiElement.h; sourceTree = ""; }; + 9CD50C8E238A3CFA00ED7DD8 /* PugiElementIterImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PugiElementIterImpl.h; sourceTree = ""; }; + 9CD50C8F238A3CFA00ED7DD8 /* XFactory.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = XFactory.cpp; sourceTree = ""; }; + 9CD50C90238A3CFA00ED7DD8 /* Throw.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Throw.h; sourceTree = ""; }; + 9CD50C91238A3CFA00ED7DD8 /* PugiAttributeIterImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PugiAttributeIterImpl.h; sourceTree = ""; }; + 9CD50C92238A3CFA00ED7DD8 /* PugiDoc.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PugiDoc.cpp; sourceTree = ""; }; + 9CD50C95238A3D0A00ED7DD8 /* XDocSpec.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XDocSpec.h; sourceTree = ""; }; + 9CD50C96238A3D0A00ED7DD8 /* XFactory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XFactory.h; sourceTree = ""; }; + 9CD50C97238A3D0A00ED7DD8 /* ezxml.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ezxml.h; sourceTree = ""; }; + 9CD50C98238A3D0A00ED7DD8 /* XElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XElement.h; sourceTree = ""; }; + 9CD50C99238A3D0A00ED7DD8 /* XAttributeIterImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XAttributeIterImpl.h; sourceTree = ""; }; + 9CD50C9A238A3D0A00ED7DD8 /* XElementIterImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XElementIterImpl.h; sourceTree = ""; }; + 9CD50C9B238A3D0A00ED7DD8 /* XAttributeIterator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XAttributeIterator.h; sourceTree = ""; }; + 9CD50C9C238A3D0A00ED7DD8 /* XElementIterator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XElementIterator.h; sourceTree = ""; }; + 9CD50C9D238A3D0A00ED7DD8 /* XDoc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XDoc.h; sourceTree = ""; }; + 9CD50C9E238A3D0A00ED7DD8 /* XAttribute.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XAttribute.h; sourceTree = ""; }; + 9CD50C9F238A3D0A00ED7DD8 /* XForwardDeclare.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XForwardDeclare.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -4852,13 +5023,12 @@ 29A8DD571EF0475D00AD2478 /* mx */ = { isa = PBXGroup; children = ( + 9CD50C7D238A3CB700ED7DD8 /* ezxml */, 29DC383C225C0D4000814240 /* api-include */, 29A8DD581EF0475D00AD2478 /* api */, 29A8DD881EF0475D00AD2478 /* core */, 29A8E2551EF0476200AD2478 /* impl */, - 29A8E29A1EF0476300AD2478 /* pugixml */, 29A8E29E1EF0476300AD2478 /* utility */, - 29A8E2AB1EF0476300AD2478 /* xml */, ); name = mx; path = ../Sourcecode/private/mx; @@ -6205,16 +6375,6 @@ path = impl; sourceTree = ""; }; - 29A8E29A1EF0476300AD2478 /* pugixml */ = { - isa = PBXGroup; - children = ( - 29A8E29B1EF0476300AD2478 /* pugiconfig.hpp */, - 29A8E29C1EF0476300AD2478 /* pugixml.cpp */, - 29A8E29D1EF0476300AD2478 /* pugixml.hpp */, - ); - path = pugixml; - sourceTree = ""; - }; 29A8E29E1EF0476300AD2478 /* utility */ = { isa = PBXGroup; children = ( @@ -6235,37 +6395,6 @@ path = utility; sourceTree = ""; }; - 29A8E2AB1EF0476300AD2478 /* xml */ = { - isa = PBXGroup; - children = ( - 29A8E2AC1EF0476300AD2478 /* PugiAttribute.cpp */, - 29A8E2AD1EF0476300AD2478 /* PugiAttribute.h */, - 29A8E2AE1EF0476300AD2478 /* PugiAttributeIterImpl.cpp */, - 29A8E2AF1EF0476300AD2478 /* PugiAttributeIterImpl.h */, - 29A8E2B01EF0476300AD2478 /* PugiDoc.cpp */, - 29A8E2B11EF0476300AD2478 /* PugiDoc.h */, - 29A8E2B21EF0476300AD2478 /* PugiElement.cpp */, - 29A8E2B31EF0476300AD2478 /* PugiElement.h */, - 29A8E2B41EF0476300AD2478 /* PugiElementIterImpl.cpp */, - 29A8E2B51EF0476300AD2478 /* PugiElementIterImpl.h */, - 29A8E2B61EF0476300AD2478 /* XAttribute.h */, - 29A8E2B71EF0476300AD2478 /* XAttributeIterator.cpp */, - 29A8E2B81EF0476300AD2478 /* XAttributeIterator.h */, - 29A8E2B91EF0476300AD2478 /* XAttributeIterImpl.h */, - 29A8E2BA1EF0476300AD2478 /* XDoc.h */, - 29A8E2BB1EF0476300AD2478 /* XDocSpec.h */, - 29A8E2BC1EF0476300AD2478 /* XElement.h */, - 29A8E2BD1EF0476300AD2478 /* XElementIterator.cpp */, - 29A8E2BE1EF0476300AD2478 /* XElementIterator.h */, - 29A8E2BF1EF0476300AD2478 /* XElementIterImpl.h */, - 29A8E2C01EF0476300AD2478 /* XFactory.cpp */, - 29A8E2C11EF0476300AD2478 /* XFactory.h */, - 29A8E2C21EF0476300AD2478 /* XForwardDeclare.h */, - 29A8E2C31EF0476300AD2478 /* XThrow.h */, - ); - path = xml; - sourceTree = ""; - }; 29A8FDC31EF0497500AD2478 /* MxmacOS */ = { isa = PBXGroup; children = ( @@ -6334,6 +6463,70 @@ path = ../../include/mx/api; sourceTree = ""; }; + 9CD50C7D238A3CB700ED7DD8 /* ezxml */ = { + isa = PBXGroup; + children = ( + 9CD50C93238A3D0A00ED7DD8 /* include */, + 9CD50C7E238A3CFA00ED7DD8 /* private */, + ); + name = ezxml; + sourceTree = ""; + }; + 9CD50C7E238A3CFA00ED7DD8 /* private */ = { + isa = PBXGroup; + children = ( + 9CD50C7F238A3CFA00ED7DD8 /* XAttributeIterator.cpp */, + 9CD50C80238A3CFA00ED7DD8 /* pugiconfig.hpp */, + 9CD50C81238A3CFA00ED7DD8 /* XElementIterator.cpp */, + 9CD50C82238A3CFA00ED7DD8 /* PugiElement.cpp */, + 9CD50C83238A3CFA00ED7DD8 /* PugiDoc.h */, + 9CD50C84238A3CFA00ED7DD8 /* Parse.h */, + 9CD50C85238A3CFA00ED7DD8 /* PugiAttribute.h */, + 9CD50C86238A3CFA00ED7DD8 /* PugiAttributeIterImpl.cpp */, + 9CD50C87238A3CFA00ED7DD8 /* pugilicense.txt */, + 9CD50C88238A3CFA00ED7DD8 /* pugixml.hpp */, + 9CD50C89238A3CFA00ED7DD8 /* PugiAttribute.cpp */, + 9CD50C8A238A3CFA00ED7DD8 /* PugiElementIterImpl.cpp */, + 9CD50C8B238A3CFA00ED7DD8 /* pugixml.cpp */, + 9CD50C8C238A3CFA00ED7DD8 /* XThrow.h */, + 9CD50C8D238A3CFA00ED7DD8 /* PugiElement.h */, + 9CD50C8E238A3CFA00ED7DD8 /* PugiElementIterImpl.h */, + 9CD50C8F238A3CFA00ED7DD8 /* XFactory.cpp */, + 9CD50C90238A3CFA00ED7DD8 /* Throw.h */, + 9CD50C91238A3CFA00ED7DD8 /* PugiAttributeIterImpl.h */, + 9CD50C92238A3CFA00ED7DD8 /* PugiDoc.cpp */, + ); + name = private; + path = ../extern/ezxml/src/private/private; + sourceTree = ""; + }; + 9CD50C93238A3D0A00ED7DD8 /* include */ = { + isa = PBXGroup; + children = ( + 9CD50C94238A3D0A00ED7DD8 /* ezxml */, + ); + name = include; + path = ../extern/ezxml/src/include; + sourceTree = ""; + }; + 9CD50C94238A3D0A00ED7DD8 /* ezxml */ = { + isa = PBXGroup; + children = ( + 9CD50C95238A3D0A00ED7DD8 /* XDocSpec.h */, + 9CD50C96238A3D0A00ED7DD8 /* XFactory.h */, + 9CD50C97238A3D0A00ED7DD8 /* ezxml.h */, + 9CD50C98238A3D0A00ED7DD8 /* XElement.h */, + 9CD50C99238A3D0A00ED7DD8 /* XAttributeIterImpl.h */, + 9CD50C9A238A3D0A00ED7DD8 /* XElementIterImpl.h */, + 9CD50C9B238A3D0A00ED7DD8 /* XAttributeIterator.h */, + 9CD50C9C238A3D0A00ED7DD8 /* XElementIterator.h */, + 9CD50C9D238A3D0A00ED7DD8 /* XDoc.h */, + 9CD50C9E238A3D0A00ED7DD8 /* XAttribute.h */, + 9CD50C9F238A3D0A00ED7DD8 /* XForwardDeclare.h */, + ); + path = ezxml; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -6364,7 +6557,6 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 29B962851E79FF410072071D /* MxiOS.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -6501,6 +6693,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 299F7FDD1CA8D2200084CAE5; @@ -6551,6 +6744,7 @@ 29A8FB0C1EF0476D00AD2478 /* WorkNumber.cpp in Sources */, 29A8EFD61EF0476700AD2478 /* MidiDeviceAttributes.cpp in Sources */, 29A8EAA41EF0476500AD2478 /* Fingernails.cpp in Sources */, + 9CD50CAF238A3D2800ED7DD8 /* pugixml.cpp in Sources */, 29A8ED6A1EF0476600AD2478 /* InterchangeableAttributes.cpp in Sources */, 29A8E9001EF0476400AD2478 /* Dynamics.cpp in Sources */, 29A8EC201EF0476500AD2478 /* GroupTime.cpp in Sources */, @@ -6604,7 +6798,6 @@ 29A8FC151EF0476E00AD2478 /* LcmGcd.cpp in Sources */, 29A8F3821EF0476900AD2478 /* PedalAlter.cpp in Sources */, 29A8F8191EF0476B00AD2478 /* SystemDividers.cpp in Sources */, - 29A8FD9B1EF0476F00AD2478 /* XElementIterator.cpp in Sources */, 29A8E8EC1EF0476400AD2478 /* DownBow.cpp in Sources */, 29A8F7E71EF0476B00AD2478 /* Supports.cpp in Sources */, 29A8F4D11EF0476900AD2478 /* RepeatAttributes.cpp in Sources */, @@ -6630,6 +6823,7 @@ 29A8F08A1EF0476700AD2478 /* MusicDataChoice.cpp in Sources */, 29A8F7FB1EF0476B00AD2478 /* Syllabic.cpp in Sources */, 29A8F8B91EF0476C00AD2478 /* Time.cpp in Sources */, + 9CD50CAA238A3D2800ED7DD8 /* XElementIterator.cpp in Sources */, 29A8E3A61EF0476300AD2478 /* WordsData.cpp in Sources */, 29A8ED741EF0476600AD2478 /* Inversion.cpp in Sources */, 29A8EAB81EF0476500AD2478 /* FirstFretAttributes.cpp in Sources */, @@ -6638,14 +6832,15 @@ 29A8E84C1EF0476400AD2478 /* DirectionType.cpp in Sources */, 29A8FCD31EF0476E00AD2478 /* StaffFunctions.cpp in Sources */, 29A8FBDE1EF0476E00AD2478 /* DirectionWriter.cpp in Sources */, + 9CD50CAB238A3D2800ED7DD8 /* PugiElement.cpp in Sources */, 29A8F18E1EF0476800AD2478 /* Octave.cpp in Sources */, 29A8EFC21EF0476700AD2478 /* MidiChannel.cpp in Sources */, - 29A8FD461EF0476E00AD2478 /* PugiAttribute.cpp in Sources */, 29A800651EF0876500AD2478 /* SoundID.cpp in Sources */, 29A8F6251EF0476A00AD2478 /* Slide.cpp in Sources */, 29A8E8741EF0476400AD2478 /* DisplayStep.cpp in Sources */, 29A8F67F1EF0476A00AD2478 /* SoundAttributes.cpp in Sources */, 29A8E7701EF0476400AD2478 /* CueNoteGroup.cpp in Sources */, + 9CD50CB0238A3D2800ED7DD8 /* XFactory.cpp in Sources */, 29A8F2741EF0476800AD2478 /* OtherPlayAttributes.cpp in Sources */, 29A8EE821EF0476600AD2478 /* LinkAttributes.cpp in Sources */, 29A8EDBA1EF0476600AD2478 /* Key.cpp in Sources */, @@ -6679,7 +6874,6 @@ 29A8F17A1EF0476800AD2478 /* NoteSize.cpp in Sources */, 29A8F2C41EF0476800AD2478 /* Pan.cpp in Sources */, 29A8EA861EF0476500AD2478 /* FigureNumberAttributes.cpp in Sources */, - 29A8FD641EF0476F00AD2478 /* PugiElement.cpp in Sources */, 29A8FBFC1EF0476E00AD2478 /* EncodingFunctions.cpp in Sources */, 29A8EC661EF0476500AD2478 /* HarmonicInfoChoice.cpp in Sources */, 29A8E3381EF0476300AD2478 /* NoteData.cpp in Sources */, @@ -6700,6 +6894,7 @@ 29A8E9AA1EF0476400AD2478 /* Encoding.cpp in Sources */, 29A8E6081EF0476300AD2478 /* BeatUnitPer.cpp in Sources */, 29A8E77A1EF0476400AD2478 /* Damp.cpp in Sources */, + 9CD50CAC238A3D2800ED7DD8 /* PugiAttributeIterImpl.cpp in Sources */, 29A8F4BD1EF0476900AD2478 /* Release.cpp in Sources */, 29A8F7291EF0476B00AD2478 /* Staves.cpp in Sources */, 29A8F3281EF0476800AD2478 /* PartName.cpp in Sources */, @@ -6763,6 +6958,7 @@ 29A8EC701EF0476500AD2478 /* HarmonicTypeChoice.cpp in Sources */, 29A8F8871EF0476B00AD2478 /* ThumbPosition.cpp in Sources */, 29A8FB021EF0476D00AD2478 /* Work.cpp in Sources */, + 9CD50CA9238A3D2800ED7DD8 /* XAttributeIterator.cpp in Sources */, 29A8EDD81EF0476600AD2478 /* KeyAttributes.cpp in Sources */, 29A8F6C51EF0476A00AD2478 /* StaffDetails.cpp in Sources */, 29A8E50E1EF0476300AD2478 /* AttributesIterface.cpp in Sources */, @@ -6787,6 +6983,7 @@ 29A8E9821EF0476400AD2478 /* EmptyPlacementAttributes.cpp in Sources */, 29A8ECD41EF0476600AD2478 /* HoleClosed.cpp in Sources */, 29A8E4141EF0476300AD2478 /* AccidentalAttributes.cpp in Sources */, + 9CD50CB1238A3D2800ED7DD8 /* PugiDoc.cpp in Sources */, 29A8E7E81EF0476400AD2478 /* DegreeValue.cpp in Sources */, 29A8E5EA1EF0476300AD2478 /* BeatUnit.cpp in Sources */, 29A8FC381EF0476E00AD2478 /* MeasureWriter.cpp in Sources */, @@ -6799,11 +6996,9 @@ 29A8E8D81EF0476400AD2478 /* Double.cpp in Sources */, 29A8E8061EF0476400AD2478 /* DelayedInvertedTurnAttributes.cpp in Sources */, 29A8F2921EF0476800AD2478 /* PageHeight.cpp in Sources */, - 29A8FDAA1EF0476F00AD2478 /* XFactory.cpp in Sources */, 29A8EF5E1EF0476700AD2478 /* MetronomeBeam.cpp in Sources */, 29A8F57B1EF0476A00AD2478 /* ScoreInstrument.cpp in Sources */, 29A8EDCE1EF0476600AD2478 /* KeyAlter.cpp in Sources */, - 29A8FD5A1EF0476F00AD2478 /* PugiDoc.cpp in Sources */, 29A8F3001EF0476800AD2478 /* PartGroup.cpp in Sources */, 29A8F1C01EF0476800AD2478 /* OffsetAttributes.cpp in Sources */, 29A8E5C21EF0476300AD2478 /* BeatRepeat.cpp in Sources */, @@ -6833,7 +7028,6 @@ 29A8E5901EF0476300AD2478 /* BassStepAttributes.cpp in Sources */, 29A8ED241EF0476600AD2478 /* Instrument.cpp in Sources */, 29A8EB761EF0476500AD2478 /* GraceAttributes.cpp in Sources */, - 29A8FD7D1EF0476F00AD2478 /* XAttributeIterator.cpp in Sources */, 29A8EE141EF0476600AD2478 /* KindAttributes.cpp in Sources */, 29A8F8AF1EF0476C00AD2478 /* TiedAttributes.cpp in Sources */, 29A8E7981EF0476400AD2478 /* DashesAttributes.cpp in Sources */, @@ -6860,6 +7054,7 @@ 29EAD7491F0EF8CE00BDE782 /* MiscData.cpp in Sources */, 29A8ED881EF0476600AD2478 /* InvertedMordent.cpp in Sources */, 29A8E86A1EF0476400AD2478 /* DisplayOctave.cpp in Sources */, + 9CD50CAD238A3D2800ED7DD8 /* PugiAttribute.cpp in Sources */, 29A8E91E1EF0476400AD2478 /* EditorialVoiceDirectionGroup.cpp in Sources */, 29A8F3AA1EF0476900AD2478 /* Percussion.cpp in Sources */, 29A8EED21EF0476600AD2478 /* MeasureAttributes.cpp in Sources */, @@ -6917,7 +7112,6 @@ 29A8E4001EF0476300AD2478 /* Accent.cpp in Sources */, 29A8F27E1EF0476800AD2478 /* OtherTechnical.cpp in Sources */, 29A8F8411EF0476B00AD2478 /* TapAttributes.cpp in Sources */, - 29A8FD001EF0476E00AD2478 /* pugixml.cpp in Sources */, 29A8F89B1EF0476C00AD2478 /* TieAttributes.cpp in Sources */, 29A8EAFE1EF0476500AD2478 /* FrameNote.cpp in Sources */, 29A8F1521EF0476800AD2478 /* NoteheadAttributes.cpp in Sources */, @@ -6942,7 +7136,6 @@ 29A8EA0E1EF0476500AD2478 /* ExtendAttributes.cpp in Sources */, 29A8EC8E1EF0476600AD2478 /* HarmonyChordGroup.cpp in Sources */, 29A8FA4E1EF0476D00AD2478 /* Unstress.cpp in Sources */, - 29A8FD501EF0476E00AD2478 /* PugiAttributeIterImpl.cpp in Sources */, 29A8E7341EF0476400AD2478 /* CreditImageAttributes.cpp in Sources */, 29A8E9E61EF0476500AD2478 /* EndLine.cpp in Sources */, 29A8FBA71EF0476D00AD2478 /* AccidentalMarkFunctions.cpp in Sources */, @@ -7029,6 +7222,7 @@ 29A8EF721EF0476700AD2478 /* MetronomeDot.cpp in Sources */, 29A8F3B41EF0476900AD2478 /* PercussionAttributes.cpp in Sources */, 29A8E7661EF0476400AD2478 /* Cue.cpp in Sources */, + 9CD50CAE238A3D2800ED7DD8 /* PugiElementIterImpl.cpp in Sources */, 29A8E4E61EF0476300AD2478 /* ArrowStyle.cpp in Sources */, 29A8F8231EF0476B00AD2478 /* SystemLayout.cpp in Sources */, 29A8F31E1EF0476800AD2478 /* PartList.cpp in Sources */, @@ -7054,7 +7248,6 @@ 29A8E66C1EF0476300AD2478 /* BracketAttributes.cpp in Sources */, 29A8F5351EF0476900AD2478 /* RootStep.cpp in Sources */, 29A8F7971EF0476B00AD2478 /* String.cpp in Sources */, - 29A8FD6E1EF0476F00AD2478 /* PugiElementIterImpl.cpp in Sources */, 29A8E4B41EF0476300AD2478 /* ArpeggiateAttributes.cpp in Sources */, 29A8EF4A1EF0476700AD2478 /* Metronome.cpp in Sources */, 29A8F5F31EF0476A00AD2478 /* Sign.cpp in Sources */, @@ -7226,6 +7419,7 @@ 29A8FB0B1EF0476D00AD2478 /* WorkNumber.cpp in Sources */, 29A8EFD51EF0476700AD2478 /* MidiDeviceAttributes.cpp in Sources */, 29A8EAA31EF0476500AD2478 /* Fingernails.cpp in Sources */, + 9CD50CA6238A3D2700ED7DD8 /* pugixml.cpp in Sources */, 29A8ED691EF0476600AD2478 /* InterchangeableAttributes.cpp in Sources */, 29A8E8FF1EF0476400AD2478 /* Dynamics.cpp in Sources */, 29A8EC1F1EF0476500AD2478 /* GroupTime.cpp in Sources */, @@ -7279,7 +7473,6 @@ 29A8FC141EF0476E00AD2478 /* LcmGcd.cpp in Sources */, 29A8F3811EF0476900AD2478 /* PedalAlter.cpp in Sources */, 29A8F8181EF0476B00AD2478 /* SystemDividers.cpp in Sources */, - 29A8FD9A1EF0476F00AD2478 /* XElementIterator.cpp in Sources */, 29A8E8EB1EF0476400AD2478 /* DownBow.cpp in Sources */, 29A8F7E61EF0476B00AD2478 /* Supports.cpp in Sources */, 29A8F4D01EF0476900AD2478 /* RepeatAttributes.cpp in Sources */, @@ -7305,6 +7498,7 @@ 29A8F0891EF0476700AD2478 /* MusicDataChoice.cpp in Sources */, 29A8F7FA1EF0476B00AD2478 /* Syllabic.cpp in Sources */, 29A8F8B81EF0476C00AD2478 /* Time.cpp in Sources */, + 9CD50CA1238A3D2700ED7DD8 /* XElementIterator.cpp in Sources */, 29A8E3A51EF0476300AD2478 /* WordsData.cpp in Sources */, 29A8ED731EF0476600AD2478 /* Inversion.cpp in Sources */, 29A8EAB71EF0476500AD2478 /* FirstFretAttributes.cpp in Sources */, @@ -7313,14 +7507,15 @@ 29A8E84B1EF0476400AD2478 /* DirectionType.cpp in Sources */, 29A8FCD21EF0476E00AD2478 /* StaffFunctions.cpp in Sources */, 29A8FBDD1EF0476E00AD2478 /* DirectionWriter.cpp in Sources */, + 9CD50CA2238A3D2700ED7DD8 /* PugiElement.cpp in Sources */, 29A8F18D1EF0476800AD2478 /* Octave.cpp in Sources */, 29A8EFC11EF0476700AD2478 /* MidiChannel.cpp in Sources */, - 29A8FD451EF0476E00AD2478 /* PugiAttribute.cpp in Sources */, 29A800641EF0876500AD2478 /* SoundID.cpp in Sources */, 29A8F6241EF0476A00AD2478 /* Slide.cpp in Sources */, 29A8E8731EF0476400AD2478 /* DisplayStep.cpp in Sources */, 29A8F67E1EF0476A00AD2478 /* SoundAttributes.cpp in Sources */, 29A8E76F1EF0476400AD2478 /* CueNoteGroup.cpp in Sources */, + 9CD50CA7238A3D2700ED7DD8 /* XFactory.cpp in Sources */, 29A8F2731EF0476800AD2478 /* OtherPlayAttributes.cpp in Sources */, 29A8EE811EF0476600AD2478 /* LinkAttributes.cpp in Sources */, 29A8EDB91EF0476600AD2478 /* Key.cpp in Sources */, @@ -7354,7 +7549,6 @@ 29A8F1791EF0476800AD2478 /* NoteSize.cpp in Sources */, 29A8F2C31EF0476800AD2478 /* Pan.cpp in Sources */, 29A8EA851EF0476500AD2478 /* FigureNumberAttributes.cpp in Sources */, - 29A8FD631EF0476F00AD2478 /* PugiElement.cpp in Sources */, 29A8FBFB1EF0476E00AD2478 /* EncodingFunctions.cpp in Sources */, 29A8EC651EF0476500AD2478 /* HarmonicInfoChoice.cpp in Sources */, 29A8E3371EF0476300AD2478 /* NoteData.cpp in Sources */, @@ -7375,6 +7569,7 @@ 29A8E9A91EF0476400AD2478 /* Encoding.cpp in Sources */, 29A8E6071EF0476300AD2478 /* BeatUnitPer.cpp in Sources */, 29A8E7791EF0476400AD2478 /* Damp.cpp in Sources */, + 9CD50CA3238A3D2700ED7DD8 /* PugiAttributeIterImpl.cpp in Sources */, 29A8F4BC1EF0476900AD2478 /* Release.cpp in Sources */, 29A8F7281EF0476B00AD2478 /* Staves.cpp in Sources */, 29A8F3271EF0476800AD2478 /* PartName.cpp in Sources */, @@ -7438,6 +7633,7 @@ 29A8EC6F1EF0476500AD2478 /* HarmonicTypeChoice.cpp in Sources */, 29A8F8861EF0476B00AD2478 /* ThumbPosition.cpp in Sources */, 29A8FB011EF0476D00AD2478 /* Work.cpp in Sources */, + 9CD50CA0238A3D2700ED7DD8 /* XAttributeIterator.cpp in Sources */, 29A8EDD71EF0476600AD2478 /* KeyAttributes.cpp in Sources */, 29A8F6C41EF0476A00AD2478 /* StaffDetails.cpp in Sources */, 29A8E50D1EF0476300AD2478 /* AttributesIterface.cpp in Sources */, @@ -7462,6 +7658,7 @@ 29A8E9811EF0476400AD2478 /* EmptyPlacementAttributes.cpp in Sources */, 29A8ECD31EF0476600AD2478 /* HoleClosed.cpp in Sources */, 29A8E4131EF0476300AD2478 /* AccidentalAttributes.cpp in Sources */, + 9CD50CA8238A3D2700ED7DD8 /* PugiDoc.cpp in Sources */, 29A8E7E71EF0476400AD2478 /* DegreeValue.cpp in Sources */, 29A8E5E91EF0476300AD2478 /* BeatUnit.cpp in Sources */, 29A8FC371EF0476E00AD2478 /* MeasureWriter.cpp in Sources */, @@ -7474,11 +7671,9 @@ 29A8E8D71EF0476400AD2478 /* Double.cpp in Sources */, 29A8E8051EF0476400AD2478 /* DelayedInvertedTurnAttributes.cpp in Sources */, 29A8F2911EF0476800AD2478 /* PageHeight.cpp in Sources */, - 29A8FDA91EF0476F00AD2478 /* XFactory.cpp in Sources */, 29A8EF5D1EF0476700AD2478 /* MetronomeBeam.cpp in Sources */, 29A8F57A1EF0476A00AD2478 /* ScoreInstrument.cpp in Sources */, 29A8EDCD1EF0476600AD2478 /* KeyAlter.cpp in Sources */, - 29A8FD591EF0476F00AD2478 /* PugiDoc.cpp in Sources */, 29A8F2FF1EF0476800AD2478 /* PartGroup.cpp in Sources */, 29A8F1BF1EF0476800AD2478 /* OffsetAttributes.cpp in Sources */, 29A8E5C11EF0476300AD2478 /* BeatRepeat.cpp in Sources */, @@ -7508,7 +7703,6 @@ 29A8E58F1EF0476300AD2478 /* BassStepAttributes.cpp in Sources */, 29A8ED231EF0476600AD2478 /* Instrument.cpp in Sources */, 29A8EB751EF0476500AD2478 /* GraceAttributes.cpp in Sources */, - 29A8FD7C1EF0476F00AD2478 /* XAttributeIterator.cpp in Sources */, 29A8EE131EF0476600AD2478 /* KindAttributes.cpp in Sources */, 29A8F8AE1EF0476C00AD2478 /* TiedAttributes.cpp in Sources */, 29A8E7971EF0476400AD2478 /* DashesAttributes.cpp in Sources */, @@ -7535,6 +7729,7 @@ 29EAD7481F0EF8CE00BDE782 /* MiscData.cpp in Sources */, 29A8ED871EF0476600AD2478 /* InvertedMordent.cpp in Sources */, 29A8E8691EF0476400AD2478 /* DisplayOctave.cpp in Sources */, + 9CD50CA4238A3D2700ED7DD8 /* PugiAttribute.cpp in Sources */, 29A8E91D1EF0476400AD2478 /* EditorialVoiceDirectionGroup.cpp in Sources */, 29A8F3A91EF0476900AD2478 /* Percussion.cpp in Sources */, 29A8EED11EF0476600AD2478 /* MeasureAttributes.cpp in Sources */, @@ -7592,7 +7787,6 @@ 29A8E3FF1EF0476300AD2478 /* Accent.cpp in Sources */, 29A8F27D1EF0476800AD2478 /* OtherTechnical.cpp in Sources */, 29A8F8401EF0476B00AD2478 /* TapAttributes.cpp in Sources */, - 29A8FCFF1EF0476E00AD2478 /* pugixml.cpp in Sources */, 29A8F89A1EF0476C00AD2478 /* TieAttributes.cpp in Sources */, 29A8EAFD1EF0476500AD2478 /* FrameNote.cpp in Sources */, 29A8F1511EF0476800AD2478 /* NoteheadAttributes.cpp in Sources */, @@ -7617,7 +7811,6 @@ 29A8EA0D1EF0476500AD2478 /* ExtendAttributes.cpp in Sources */, 29A8EC8D1EF0476500AD2478 /* HarmonyChordGroup.cpp in Sources */, 29A8FA4D1EF0476D00AD2478 /* Unstress.cpp in Sources */, - 29A8FD4F1EF0476E00AD2478 /* PugiAttributeIterImpl.cpp in Sources */, 29A8E7331EF0476400AD2478 /* CreditImageAttributes.cpp in Sources */, 29A8E9E51EF0476500AD2478 /* EndLine.cpp in Sources */, 29A8FBA61EF0476D00AD2478 /* AccidentalMarkFunctions.cpp in Sources */, @@ -7704,6 +7897,7 @@ 29A8EF711EF0476700AD2478 /* MetronomeDot.cpp in Sources */, 29A8F3B31EF0476900AD2478 /* PercussionAttributes.cpp in Sources */, 29A8E7651EF0476400AD2478 /* Cue.cpp in Sources */, + 9CD50CA5238A3D2700ED7DD8 /* PugiElementIterImpl.cpp in Sources */, 29A8E4E51EF0476300AD2478 /* ArrowStyle.cpp in Sources */, 29A8F8221EF0476B00AD2478 /* SystemLayout.cpp in Sources */, 29A8F31D1EF0476800AD2478 /* PartList.cpp in Sources */, @@ -7729,7 +7923,6 @@ 29A8E66B1EF0476300AD2478 /* BracketAttributes.cpp in Sources */, 29A8F5341EF0476900AD2478 /* RootStep.cpp in Sources */, 29A8F7961EF0476B00AD2478 /* String.cpp in Sources */, - 29A8FD6D1EF0476F00AD2478 /* PugiElementIterImpl.cpp in Sources */, 29A8E4B31EF0476300AD2478 /* ArpeggiateAttributes.cpp in Sources */, 29A8EF491EF0476700AD2478 /* Metronome.cpp in Sources */, 29A8F5F21EF0476A00AD2478 /* Sign.cpp in Sources */, @@ -7901,6 +8094,7 @@ 29A8FDE51EF0499200AD2478 /* AccordionHigh.cpp in Sources */, 29A8FDE61EF0499200AD2478 /* AccordionLow.cpp in Sources */, 29A8FDE71EF0499200AD2478 /* AccordionMiddle.cpp in Sources */, + 9CD50CCA238A3D2900ED7DD8 /* pugixml.cpp in Sources */, 29A8FDE81EF0499200AD2478 /* AccordionRegistration.cpp in Sources */, 29A8FDE91EF0499200AD2478 /* AccordionRegistrationAttributes.cpp in Sources */, 29A8FDEA1EF0499200AD2478 /* ActualNotes.cpp in Sources */, @@ -7979,6 +8173,7 @@ 29A8FE321EF0499200AD2478 /* CreditWordsGroup.cpp in Sources */, 29A8FE331EF0499200AD2478 /* Cue.cpp in Sources */, 29A8FE341EF0499200AD2478 /* CueNoteGroup.cpp in Sources */, + 9CD50CC5238A3D2900ED7DD8 /* XElementIterator.cpp in Sources */, 29A8FE351EF0499200AD2478 /* Damp.cpp in Sources */, 29A8FE361EF0499200AD2478 /* DampAll.cpp in Sources */, 29A8FE371EF0499200AD2478 /* Dashes.cpp in Sources */, @@ -7987,6 +8182,7 @@ 29A8FE3A1EF0499200AD2478 /* Degree.cpp in Sources */, 29A8FE3B1EF0499200AD2478 /* DegreeAlter.cpp in Sources */, 29A8FE3C1EF0499200AD2478 /* DegreeAlterAttributes.cpp in Sources */, + 9CD50CC6238A3D2900ED7DD8 /* PugiElement.cpp in Sources */, 29A8FE3D1EF0499200AD2478 /* DegreeAttributes.cpp in Sources */, 29A8FE3E1EF0499200AD2478 /* DegreeType.cpp in Sources */, 29A8FE3F1EF0499200AD2478 /* DegreeTypeAttributes.cpp in Sources */, @@ -7994,6 +8190,7 @@ 29A8FE401EF0499200AD2478 /* DegreeValue.cpp in Sources */, 29A8FE411EF0499200AD2478 /* DegreeValueAttributes.cpp in Sources */, 29A8FE421EF0499200AD2478 /* DelayedInvertedTurn.cpp in Sources */, + 9CD50CCB238A3D2900ED7DD8 /* XFactory.cpp in Sources */, 29A8FE431EF0499200AD2478 /* DelayedInvertedTurnAttributes.cpp in Sources */, 29A8FE441EF0499200AD2478 /* DelayedTurn.cpp in Sources */, 29A8FE451EF0499200AD2478 /* DelayedTurnAttributes.cpp in Sources */, @@ -8047,6 +8244,7 @@ 29A8FE741EF0499200AD2478 /* EndParagraph.cpp in Sources */, 29A02E8E1FE0FA5000B74FDE /* EncodingData.cpp in Sources */, 29A8FE751EF0499200AD2478 /* Ensemble.cpp in Sources */, + 9CD50CC7238A3D2900ED7DD8 /* PugiAttributeIterImpl.cpp in Sources */, 29A8FE761EF0499200AD2478 /* Extend.cpp in Sources */, 29A8FE771EF0499200AD2478 /* ExtendAttributes.cpp in Sources */, 29A8FE781EF0499200AD2478 /* Eyeglasses.cpp in Sources */, @@ -8110,6 +8308,7 @@ 29A8FEB21EF0499200AD2478 /* HarmonicAttributes.cpp in Sources */, 29A8FEB31EF0499200AD2478 /* HarmonicInfoChoice.cpp in Sources */, 29A8FEB41EF0499200AD2478 /* HarmonicTypeChoice.cpp in Sources */, + 9CD50CC4238A3D2900ED7DD8 /* XAttributeIterator.cpp in Sources */, 29A8FEB51EF0499200AD2478 /* Harmony.cpp in Sources */, 29A8FEB61EF0499200AD2478 /* HarmonyAttributes.cpp in Sources */, 29A8FEB71EF0499200AD2478 /* HarmonyChordGroup.cpp in Sources */, @@ -8134,6 +8333,7 @@ 29A8FECA1EF0499200AD2478 /* Instruments.cpp in Sources */, 29A8FECB1EF0499200AD2478 /* InstrumentSound.cpp in Sources */, 29A8FECC1EF0499200AD2478 /* Interchangeable.cpp in Sources */, + 9CD50CCC238A3D2900ED7DD8 /* PugiDoc.cpp in Sources */, 29A8FECD1EF0499200AD2478 /* InterchangeableAttributes.cpp in Sources */, 29A8FECE1EF0499200AD2478 /* Inversion.cpp in Sources */, 29A8FECF1EF0499200AD2478 /* InversionAttributes.cpp in Sources */, @@ -8204,6 +8404,7 @@ 29A8FF101EF0499200AD2478 /* MidiProgram.cpp in Sources */, 29A8FF111EF0499200AD2478 /* MidiUnpitched.cpp in Sources */, 29A8FF121EF0499200AD2478 /* Millimeters.cpp in Sources */, + 9CD50CC8238A3D2900ED7DD8 /* PugiAttribute.cpp in Sources */, 29A8FF131EF0499200AD2478 /* Miscellaneous.cpp in Sources */, 29A8FF141EF0499200AD2478 /* MiscellaneousField.cpp in Sources */, 29EAD74C1F0EF8CE00BDE782 /* MiscData.cpp in Sources */, @@ -8372,6 +8573,7 @@ 29A8FFB61EF0499300AD2478 /* SoundAttributes.cpp in Sources */, 29A8FFB71EF0499300AD2478 /* SoundingPitch.cpp in Sources */, 29A8FFB81EF0499300AD2478 /* Source.cpp in Sources */, + 9CD50CC9238A3D2900ED7DD8 /* PugiElementIterImpl.cpp in Sources */, 29A8FFB91EF0499300AD2478 /* Spiccato.cpp in Sources */, 29A8FFBA1EF0499300AD2478 /* Staccatissimo.cpp in Sources */, 29A8FFBB1EF0499300AD2478 /* Staccato.cpp in Sources */, @@ -8529,17 +8731,8 @@ 29A800521EF0499300AD2478 /* TechnicalFunctions.cpp in Sources */, 29A800531EF0499300AD2478 /* TimeReader.cpp in Sources */, 29A800541EF0499300AD2478 /* TupletReader.cpp in Sources */, - 29A800551EF0499300AD2478 /* pugixml.cpp in Sources */, 29A800561EF0499300AD2478 /* Utility.cpp in Sources */, 29A800571EF0499300AD2478 /* UtilityImpl.cpp in Sources */, - 29A800581EF0499300AD2478 /* PugiAttribute.cpp in Sources */, - 29A800591EF0499300AD2478 /* PugiAttributeIterImpl.cpp in Sources */, - 29A8005A1EF0499300AD2478 /* PugiDoc.cpp in Sources */, - 29A8005B1EF0499300AD2478 /* PugiElement.cpp in Sources */, - 29A8005C1EF0499300AD2478 /* PugiElementIterImpl.cpp in Sources */, - 29A8005D1EF0499300AD2478 /* XAttributeIterator.cpp in Sources */, - 29A8005E1EF0499300AD2478 /* XElementIterator.cpp in Sources */, - 29A8005F1EF0499300AD2478 /* XFactory.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -8576,6 +8769,7 @@ 29A8FB0E1EF0476D00AD2478 /* WorkNumber.cpp in Sources */, 29A8EFD81EF0476700AD2478 /* MidiDeviceAttributes.cpp in Sources */, 29A8EAA61EF0476500AD2478 /* Fingernails.cpp in Sources */, + 9CD50CC1238A3D2800ED7DD8 /* pugixml.cpp in Sources */, 29A8ED6C1EF0476600AD2478 /* InterchangeableAttributes.cpp in Sources */, 29A8E9021EF0476400AD2478 /* Dynamics.cpp in Sources */, 29A8EC221EF0476500AD2478 /* GroupTime.cpp in Sources */, @@ -8629,7 +8823,6 @@ 29A8FC171EF0476E00AD2478 /* LcmGcd.cpp in Sources */, 29A8F3841EF0476900AD2478 /* PedalAlter.cpp in Sources */, 29A8F81B1EF0476B00AD2478 /* SystemDividers.cpp in Sources */, - 29A8FD9D1EF0476F00AD2478 /* XElementIterator.cpp in Sources */, 29A8E8EE1EF0476400AD2478 /* DownBow.cpp in Sources */, 29A8F7E91EF0476B00AD2478 /* Supports.cpp in Sources */, 29A8F4D31EF0476900AD2478 /* RepeatAttributes.cpp in Sources */, @@ -8655,6 +8848,7 @@ 29A8F08C1EF0476700AD2478 /* MusicDataChoice.cpp in Sources */, 29A8F7FD1EF0476B00AD2478 /* Syllabic.cpp in Sources */, 29A8F8BB1EF0476C00AD2478 /* Time.cpp in Sources */, + 9CD50CBC238A3D2800ED7DD8 /* XElementIterator.cpp in Sources */, 29A8E3A81EF0476300AD2478 /* WordsData.cpp in Sources */, 29A8ED761EF0476600AD2478 /* Inversion.cpp in Sources */, 29A8EABA1EF0476500AD2478 /* FirstFretAttributes.cpp in Sources */, @@ -8663,14 +8857,15 @@ 29A8E84E1EF0476400AD2478 /* DirectionType.cpp in Sources */, 29A8FCD51EF0476E00AD2478 /* StaffFunctions.cpp in Sources */, 29A8FBE01EF0476E00AD2478 /* DirectionWriter.cpp in Sources */, + 9CD50CBD238A3D2800ED7DD8 /* PugiElement.cpp in Sources */, 29A8F1901EF0476800AD2478 /* Octave.cpp in Sources */, 29A8EFC41EF0476700AD2478 /* MidiChannel.cpp in Sources */, - 29A8FD481EF0476E00AD2478 /* PugiAttribute.cpp in Sources */, 29A800671EF0876500AD2478 /* SoundID.cpp in Sources */, 29A8F6271EF0476A00AD2478 /* Slide.cpp in Sources */, 29A8E8761EF0476400AD2478 /* DisplayStep.cpp in Sources */, 29A8F6811EF0476A00AD2478 /* SoundAttributes.cpp in Sources */, 29A8E7721EF0476400AD2478 /* CueNoteGroup.cpp in Sources */, + 9CD50CC2238A3D2800ED7DD8 /* XFactory.cpp in Sources */, 29A8F2761EF0476800AD2478 /* OtherPlayAttributes.cpp in Sources */, 29A8EE841EF0476600AD2478 /* LinkAttributes.cpp in Sources */, 29A8EDBC1EF0476600AD2478 /* Key.cpp in Sources */, @@ -8704,7 +8899,6 @@ 29A8F17C1EF0476800AD2478 /* NoteSize.cpp in Sources */, 29A8F2C61EF0476800AD2478 /* Pan.cpp in Sources */, 29A8EA881EF0476500AD2478 /* FigureNumberAttributes.cpp in Sources */, - 29A8FD661EF0476F00AD2478 /* PugiElement.cpp in Sources */, 29A8FBFE1EF0476E00AD2478 /* EncodingFunctions.cpp in Sources */, 29A8EC681EF0476500AD2478 /* HarmonicInfoChoice.cpp in Sources */, 29A8E33A1EF0476300AD2478 /* NoteData.cpp in Sources */, @@ -8725,6 +8919,7 @@ 29A8E9AC1EF0476400AD2478 /* Encoding.cpp in Sources */, 29A8E60A1EF0476300AD2478 /* BeatUnitPer.cpp in Sources */, 29A8E77C1EF0476400AD2478 /* Damp.cpp in Sources */, + 9CD50CBE238A3D2800ED7DD8 /* PugiAttributeIterImpl.cpp in Sources */, 29A8F4BF1EF0476900AD2478 /* Release.cpp in Sources */, 29A8F72B1EF0476B00AD2478 /* Staves.cpp in Sources */, 29A8F32A1EF0476800AD2478 /* PartName.cpp in Sources */, @@ -8788,6 +8983,7 @@ 29A8EC721EF0476500AD2478 /* HarmonicTypeChoice.cpp in Sources */, 29A8F8891EF0476B00AD2478 /* ThumbPosition.cpp in Sources */, 29A8FB041EF0476D00AD2478 /* Work.cpp in Sources */, + 9CD50CBB238A3D2800ED7DD8 /* XAttributeIterator.cpp in Sources */, 29A8EDDA1EF0476600AD2478 /* KeyAttributes.cpp in Sources */, 29A8F6C71EF0476A00AD2478 /* StaffDetails.cpp in Sources */, 29A8E5101EF0476300AD2478 /* AttributesIterface.cpp in Sources */, @@ -8812,6 +9008,7 @@ 29A8E9841EF0476400AD2478 /* EmptyPlacementAttributes.cpp in Sources */, 29A8ECD61EF0476600AD2478 /* HoleClosed.cpp in Sources */, 29A8E4161EF0476300AD2478 /* AccidentalAttributes.cpp in Sources */, + 9CD50CC3238A3D2800ED7DD8 /* PugiDoc.cpp in Sources */, 29A8E7EA1EF0476400AD2478 /* DegreeValue.cpp in Sources */, 29A8E5EC1EF0476300AD2478 /* BeatUnit.cpp in Sources */, 29A8FC3A1EF0476E00AD2478 /* MeasureWriter.cpp in Sources */, @@ -8824,11 +9021,9 @@ 29A8E8DA1EF0476400AD2478 /* Double.cpp in Sources */, 29A8E8081EF0476400AD2478 /* DelayedInvertedTurnAttributes.cpp in Sources */, 29A8F2941EF0476800AD2478 /* PageHeight.cpp in Sources */, - 29A8FDAC1EF0476F00AD2478 /* XFactory.cpp in Sources */, 29A8EF601EF0476700AD2478 /* MetronomeBeam.cpp in Sources */, 29A8F57D1EF0476A00AD2478 /* ScoreInstrument.cpp in Sources */, 29A8EDD01EF0476600AD2478 /* KeyAlter.cpp in Sources */, - 29A8FD5C1EF0476F00AD2478 /* PugiDoc.cpp in Sources */, 29A8F3021EF0476800AD2478 /* PartGroup.cpp in Sources */, 29A8F1C21EF0476800AD2478 /* OffsetAttributes.cpp in Sources */, 29A8E5C41EF0476300AD2478 /* BeatRepeat.cpp in Sources */, @@ -8858,7 +9053,6 @@ 29A8E5921EF0476300AD2478 /* BassStepAttributes.cpp in Sources */, 29A8ED261EF0476600AD2478 /* Instrument.cpp in Sources */, 29A8EB781EF0476500AD2478 /* GraceAttributes.cpp in Sources */, - 29A8FD7F1EF0476F00AD2478 /* XAttributeIterator.cpp in Sources */, 29A8EE161EF0476600AD2478 /* KindAttributes.cpp in Sources */, 29A8F8B11EF0476C00AD2478 /* TiedAttributes.cpp in Sources */, 29A8E79A1EF0476400AD2478 /* DashesAttributes.cpp in Sources */, @@ -8885,6 +9079,7 @@ 29EAD74B1F0EF8CE00BDE782 /* MiscData.cpp in Sources */, 29A8ED8A1EF0476600AD2478 /* InvertedMordent.cpp in Sources */, 29A8E86C1EF0476400AD2478 /* DisplayOctave.cpp in Sources */, + 9CD50CBF238A3D2800ED7DD8 /* PugiAttribute.cpp in Sources */, 29A8E9201EF0476400AD2478 /* EditorialVoiceDirectionGroup.cpp in Sources */, 29A8F3AC1EF0476900AD2478 /* Percussion.cpp in Sources */, 29A8EED41EF0476600AD2478 /* MeasureAttributes.cpp in Sources */, @@ -8942,7 +9137,6 @@ 29A8E4021EF0476300AD2478 /* Accent.cpp in Sources */, 29A8F2801EF0476800AD2478 /* OtherTechnical.cpp in Sources */, 29A8F8431EF0476B00AD2478 /* TapAttributes.cpp in Sources */, - 29A8FD021EF0476E00AD2478 /* pugixml.cpp in Sources */, 29A8F89D1EF0476C00AD2478 /* TieAttributes.cpp in Sources */, 29A8EB001EF0476500AD2478 /* FrameNote.cpp in Sources */, 29A8F1541EF0476800AD2478 /* NoteheadAttributes.cpp in Sources */, @@ -8967,7 +9161,6 @@ 29A8EA101EF0476500AD2478 /* ExtendAttributes.cpp in Sources */, 29A8EC901EF0476600AD2478 /* HarmonyChordGroup.cpp in Sources */, 29A8FA501EF0476D00AD2478 /* Unstress.cpp in Sources */, - 29A8FD521EF0476E00AD2478 /* PugiAttributeIterImpl.cpp in Sources */, 29A8E7361EF0476400AD2478 /* CreditImageAttributes.cpp in Sources */, 29A8E9E81EF0476500AD2478 /* EndLine.cpp in Sources */, 29A8FBA91EF0476D00AD2478 /* AccidentalMarkFunctions.cpp in Sources */, @@ -9054,6 +9247,7 @@ 29A8EF741EF0476700AD2478 /* MetronomeDot.cpp in Sources */, 29A8F3B61EF0476900AD2478 /* PercussionAttributes.cpp in Sources */, 29A8E7681EF0476400AD2478 /* Cue.cpp in Sources */, + 9CD50CC0238A3D2800ED7DD8 /* PugiElementIterImpl.cpp in Sources */, 29A8E4E81EF0476300AD2478 /* ArrowStyle.cpp in Sources */, 29A8F8251EF0476B00AD2478 /* SystemLayout.cpp in Sources */, 29A8F3201EF0476800AD2478 /* PartList.cpp in Sources */, @@ -9079,7 +9273,6 @@ 29A8E66E1EF0476300AD2478 /* BracketAttributes.cpp in Sources */, 29A8F5371EF0476900AD2478 /* RootStep.cpp in Sources */, 29A8F7991EF0476B00AD2478 /* String.cpp in Sources */, - 29A8FD701EF0476F00AD2478 /* PugiElementIterImpl.cpp in Sources */, 29A8E4B61EF0476300AD2478 /* ArpeggiateAttributes.cpp in Sources */, 29A8EF4C1EF0476700AD2478 /* Metronome.cpp in Sources */, 29A8F5F51EF0476A00AD2478 /* Sign.cpp in Sources */, @@ -9251,6 +9444,7 @@ 29A8FB0D1EF0476D00AD2478 /* WorkNumber.cpp in Sources */, 29A8EFD71EF0476700AD2478 /* MidiDeviceAttributes.cpp in Sources */, 29A8EAA51EF0476500AD2478 /* Fingernails.cpp in Sources */, + 9CD50CB8238A3D2800ED7DD8 /* pugixml.cpp in Sources */, 29A8ED6B1EF0476600AD2478 /* InterchangeableAttributes.cpp in Sources */, 29A8E9011EF0476400AD2478 /* Dynamics.cpp in Sources */, 29A8EC211EF0476500AD2478 /* GroupTime.cpp in Sources */, @@ -9304,7 +9498,6 @@ 29A8FC161EF0476E00AD2478 /* LcmGcd.cpp in Sources */, 29A8F3831EF0476900AD2478 /* PedalAlter.cpp in Sources */, 29A8F81A1EF0476B00AD2478 /* SystemDividers.cpp in Sources */, - 29A8FD9C1EF0476F00AD2478 /* XElementIterator.cpp in Sources */, 29A8E8ED1EF0476400AD2478 /* DownBow.cpp in Sources */, 29A8F7E81EF0476B00AD2478 /* Supports.cpp in Sources */, 29A8F4D21EF0476900AD2478 /* RepeatAttributes.cpp in Sources */, @@ -9330,6 +9523,7 @@ 29A8F08B1EF0476700AD2478 /* MusicDataChoice.cpp in Sources */, 29A8F7FC1EF0476B00AD2478 /* Syllabic.cpp in Sources */, 29A8F8BA1EF0476C00AD2478 /* Time.cpp in Sources */, + 9CD50CB3238A3D2800ED7DD8 /* XElementIterator.cpp in Sources */, 29A8E3A71EF0476300AD2478 /* WordsData.cpp in Sources */, 29A8ED751EF0476600AD2478 /* Inversion.cpp in Sources */, 29A8EAB91EF0476500AD2478 /* FirstFretAttributes.cpp in Sources */, @@ -9338,14 +9532,15 @@ 29A8E84D1EF0476400AD2478 /* DirectionType.cpp in Sources */, 29A8FCD41EF0476E00AD2478 /* StaffFunctions.cpp in Sources */, 29A8FBDF1EF0476E00AD2478 /* DirectionWriter.cpp in Sources */, + 9CD50CB4238A3D2800ED7DD8 /* PugiElement.cpp in Sources */, 29A8F18F1EF0476800AD2478 /* Octave.cpp in Sources */, 29A8EFC31EF0476700AD2478 /* MidiChannel.cpp in Sources */, - 29A8FD471EF0476E00AD2478 /* PugiAttribute.cpp in Sources */, 29A800661EF0876500AD2478 /* SoundID.cpp in Sources */, 29A8F6261EF0476A00AD2478 /* Slide.cpp in Sources */, 29A8E8751EF0476400AD2478 /* DisplayStep.cpp in Sources */, 29A8F6801EF0476A00AD2478 /* SoundAttributes.cpp in Sources */, 29A8E7711EF0476400AD2478 /* CueNoteGroup.cpp in Sources */, + 9CD50CB9238A3D2800ED7DD8 /* XFactory.cpp in Sources */, 29A8F2751EF0476800AD2478 /* OtherPlayAttributes.cpp in Sources */, 29A8EE831EF0476600AD2478 /* LinkAttributes.cpp in Sources */, 29A8EDBB1EF0476600AD2478 /* Key.cpp in Sources */, @@ -9379,7 +9574,6 @@ 29A8F17B1EF0476800AD2478 /* NoteSize.cpp in Sources */, 29A8F2C51EF0476800AD2478 /* Pan.cpp in Sources */, 29A8EA871EF0476500AD2478 /* FigureNumberAttributes.cpp in Sources */, - 29A8FD651EF0476F00AD2478 /* PugiElement.cpp in Sources */, 29A8FBFD1EF0476E00AD2478 /* EncodingFunctions.cpp in Sources */, 29A8EC671EF0476500AD2478 /* HarmonicInfoChoice.cpp in Sources */, 29A8E3391EF0476300AD2478 /* NoteData.cpp in Sources */, @@ -9400,6 +9594,7 @@ 29A8E9AB1EF0476400AD2478 /* Encoding.cpp in Sources */, 29A8E6091EF0476300AD2478 /* BeatUnitPer.cpp in Sources */, 29A8E77B1EF0476400AD2478 /* Damp.cpp in Sources */, + 9CD50CB5238A3D2800ED7DD8 /* PugiAttributeIterImpl.cpp in Sources */, 29A8F4BE1EF0476900AD2478 /* Release.cpp in Sources */, 29A8F72A1EF0476B00AD2478 /* Staves.cpp in Sources */, 29A8F3291EF0476800AD2478 /* PartName.cpp in Sources */, @@ -9463,6 +9658,7 @@ 29A8EC711EF0476500AD2478 /* HarmonicTypeChoice.cpp in Sources */, 29A8F8881EF0476B00AD2478 /* ThumbPosition.cpp in Sources */, 29A8FB031EF0476D00AD2478 /* Work.cpp in Sources */, + 9CD50CB2238A3D2800ED7DD8 /* XAttributeIterator.cpp in Sources */, 29A8EDD91EF0476600AD2478 /* KeyAttributes.cpp in Sources */, 29A8F6C61EF0476A00AD2478 /* StaffDetails.cpp in Sources */, 29A8E50F1EF0476300AD2478 /* AttributesIterface.cpp in Sources */, @@ -9487,6 +9683,7 @@ 29A8E9831EF0476400AD2478 /* EmptyPlacementAttributes.cpp in Sources */, 29A8ECD51EF0476600AD2478 /* HoleClosed.cpp in Sources */, 29A8E4151EF0476300AD2478 /* AccidentalAttributes.cpp in Sources */, + 9CD50CBA238A3D2800ED7DD8 /* PugiDoc.cpp in Sources */, 29A8E7E91EF0476400AD2478 /* DegreeValue.cpp in Sources */, 29A8E5EB1EF0476300AD2478 /* BeatUnit.cpp in Sources */, 29A8FC391EF0476E00AD2478 /* MeasureWriter.cpp in Sources */, @@ -9499,11 +9696,9 @@ 29A8E8D91EF0476400AD2478 /* Double.cpp in Sources */, 29A8E8071EF0476400AD2478 /* DelayedInvertedTurnAttributes.cpp in Sources */, 29A8F2931EF0476800AD2478 /* PageHeight.cpp in Sources */, - 29A8FDAB1EF0476F00AD2478 /* XFactory.cpp in Sources */, 29A8EF5F1EF0476700AD2478 /* MetronomeBeam.cpp in Sources */, 29A8F57C1EF0476A00AD2478 /* ScoreInstrument.cpp in Sources */, 29A8EDCF1EF0476600AD2478 /* KeyAlter.cpp in Sources */, - 29A8FD5B1EF0476F00AD2478 /* PugiDoc.cpp in Sources */, 29A8F3011EF0476800AD2478 /* PartGroup.cpp in Sources */, 29A8F1C11EF0476800AD2478 /* OffsetAttributes.cpp in Sources */, 29A8E5C31EF0476300AD2478 /* BeatRepeat.cpp in Sources */, @@ -9533,7 +9728,6 @@ 29A8E5911EF0476300AD2478 /* BassStepAttributes.cpp in Sources */, 29A8ED251EF0476600AD2478 /* Instrument.cpp in Sources */, 29A8EB771EF0476500AD2478 /* GraceAttributes.cpp in Sources */, - 29A8FD7E1EF0476F00AD2478 /* XAttributeIterator.cpp in Sources */, 29A8EE151EF0476600AD2478 /* KindAttributes.cpp in Sources */, 29A8F8B01EF0476C00AD2478 /* TiedAttributes.cpp in Sources */, 29A8E7991EF0476400AD2478 /* DashesAttributes.cpp in Sources */, @@ -9560,6 +9754,7 @@ 29EAD74A1F0EF8CE00BDE782 /* MiscData.cpp in Sources */, 29A8ED891EF0476600AD2478 /* InvertedMordent.cpp in Sources */, 29A8E86B1EF0476400AD2478 /* DisplayOctave.cpp in Sources */, + 9CD50CB6238A3D2800ED7DD8 /* PugiAttribute.cpp in Sources */, 29A8E91F1EF0476400AD2478 /* EditorialVoiceDirectionGroup.cpp in Sources */, 29A8F3AB1EF0476900AD2478 /* Percussion.cpp in Sources */, 29A8EED31EF0476600AD2478 /* MeasureAttributes.cpp in Sources */, @@ -9617,7 +9812,6 @@ 29A8E4011EF0476300AD2478 /* Accent.cpp in Sources */, 29A8F27F1EF0476800AD2478 /* OtherTechnical.cpp in Sources */, 29A8F8421EF0476B00AD2478 /* TapAttributes.cpp in Sources */, - 29A8FD011EF0476E00AD2478 /* pugixml.cpp in Sources */, 29A8F89C1EF0476C00AD2478 /* TieAttributes.cpp in Sources */, 29A8EAFF1EF0476500AD2478 /* FrameNote.cpp in Sources */, 29A8F1531EF0476800AD2478 /* NoteheadAttributes.cpp in Sources */, @@ -9642,7 +9836,6 @@ 29A8EA0F1EF0476500AD2478 /* ExtendAttributes.cpp in Sources */, 29A8EC8F1EF0476600AD2478 /* HarmonyChordGroup.cpp in Sources */, 29A8FA4F1EF0476D00AD2478 /* Unstress.cpp in Sources */, - 29A8FD511EF0476E00AD2478 /* PugiAttributeIterImpl.cpp in Sources */, 29A8E7351EF0476400AD2478 /* CreditImageAttributes.cpp in Sources */, 29A8E9E71EF0476500AD2478 /* EndLine.cpp in Sources */, 29A8FBA81EF0476D00AD2478 /* AccidentalMarkFunctions.cpp in Sources */, @@ -9729,6 +9922,7 @@ 29A8EF731EF0476700AD2478 /* MetronomeDot.cpp in Sources */, 29A8F3B51EF0476900AD2478 /* PercussionAttributes.cpp in Sources */, 29A8E7671EF0476400AD2478 /* Cue.cpp in Sources */, + 9CD50CB7238A3D2800ED7DD8 /* PugiElementIterImpl.cpp in Sources */, 29A8E4E71EF0476300AD2478 /* ArrowStyle.cpp in Sources */, 29A8F8241EF0476B00AD2478 /* SystemLayout.cpp in Sources */, 29A8F31F1EF0476800AD2478 /* PartList.cpp in Sources */, @@ -9754,7 +9948,6 @@ 29A8E66D1EF0476300AD2478 /* BracketAttributes.cpp in Sources */, 29A8F5361EF0476900AD2478 /* RootStep.cpp in Sources */, 29A8F7981EF0476B00AD2478 /* String.cpp in Sources */, - 29A8FD6F1EF0476F00AD2478 /* PugiElementIterImpl.cpp in Sources */, 29A8E4B51EF0476300AD2478 /* ArpeggiateAttributes.cpp in Sources */, 29A8EF4B1EF0476700AD2478 /* Metronome.cpp in Sources */, 29A8F5F41EF0476A00AD2478 /* Sign.cpp in Sources */, @@ -10023,7 +10216,7 @@ ); OTHER_LDFLAGS = ""; SDKROOT = ""; - USER_HEADER_SEARCH_PATHS = "$PROJECT_DIR/../Sourcecode/private $PROJECT_DIR/../Sourcecode/include"; + USER_HEADER_SEARCH_PATHS = "$PROJECT_DIR/../Sourcecode/private $PROJECT_DIR/../Sourcecode/include $PROJECT_DIR/../Sourcecode/private/extern/ezxml/src/include $PROJECT_DIR/../Sourcecode/private/extern/ezxml/src/private"; }; name = Debug; }; @@ -10097,13 +10290,15 @@ ); OTHER_LDFLAGS = ""; SDKROOT = ""; - USER_HEADER_SEARCH_PATHS = "$PROJECT_DIR/../Sourcecode/private $PROJECT_DIR/../Sourcecode/include"; + USER_HEADER_SEARCH_PATHS = "$PROJECT_DIR/../Sourcecode/private $PROJECT_DIR/../Sourcecode/include $PROJECT_DIR/../Sourcecode/private/extern/ezxml/src/include $PROJECT_DIR/../Sourcecode/private/extern/ezxml/src/private"; }; name = Release; }; 299F7FEB1CA8D2200084CAE5 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO; + CLANG_WARN_INT_CONVERSION = YES; COMBINE_HIDPI_IMAGES = YES; EXECUTABLE_PREFIX = lib; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; @@ -10122,6 +10317,8 @@ 299F7FEC1CA8D2200084CAE5 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO; + CLANG_WARN_INT_CONVERSION = YES; COMBINE_HIDPI_IMAGES = YES; EXECUTABLE_PREFIX = lib; GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; @@ -10144,6 +10341,7 @@ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "c++14"; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO; CLANG_WARN_UNREACHABLE_CODE = YES; CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; @@ -10176,6 +10374,7 @@ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "c++14"; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO; CLANG_WARN_UNREACHABLE_CODE = YES; CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; @@ -10207,6 +10406,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "c++14"; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO; CLANG_WARN_UNREACHABLE_CODE = YES; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -10220,7 +10420,7 @@ HEADER_SEARCH_PATHS = /usr/local/include; INFOPLIST_FILE = MxiOS/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ""; MTL_ENABLE_DEBUG_INFO = YES; @@ -10231,6 +10431,7 @@ "SDKROOT[arch=i386]" = "$(CORRESPONDING_SIMULATOR_SDK_NAME)"; "SDKROOT[arch=x86_64]" = "$(CORRESPONDING_SIMULATOR_SDK_NAME)"; SKIP_INSTALL = NO; + SUPPORTS_MACCATALYST = NO; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = "arm64 armv7 armv7s i386 x86_64"; VERSIONING_SYSTEM = "apple-generic"; @@ -10244,6 +10445,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "c++14"; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO; CLANG_WARN_UNREACHABLE_CODE = YES; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -10258,7 +10460,7 @@ HEADER_SEARCH_PATHS = /usr/local/include; INFOPLIST_FILE = MxiOS/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.2; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LIBRARY_SEARCH_PATHS = ""; MTL_ENABLE_DEBUG_INFO = NO; @@ -10269,6 +10471,7 @@ "SDKROOT[arch=i386]" = "$(CORRESPONDING_SIMULATOR_SDK_NAME)"; "SDKROOT[arch=x86_64]" = "$(CORRESPONDING_SIMULATOR_SDK_NAME)"; SKIP_INSTALL = NO; + SUPPORTS_MACCATALYST = NO; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VALID_ARCHS = "arm64 armv7 armv7s i386 x86_64"; diff --git a/Xcode/Mx.xcodeproj/xcshareddata/xcschemes/Mx.xcscheme b/Xcode/Mx.xcodeproj/xcshareddata/xcschemes/Mx.xcscheme index 48162ed1e..7cb07d861 100644 --- a/Xcode/Mx.xcodeproj/xcshareddata/xcschemes/Mx.xcscheme +++ b/Xcode/Mx.xcodeproj/xcshareddata/xcschemes/Mx.xcscheme @@ -1,6 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + - -