Skip to content

Commit

Permalink
use ezxml as extern library (#40)
Browse files Browse the repository at this point in the history
* release v0.3.0

* frz fix placement of directions in chords

* frz round trip musicxml version

* frz fix tuplet issues

* frz branch progress

* gene noteheads and lyrics

* fix errant comments in cmake build

* better error message and project update

* gitignore

* merge mxapi into develop

* probably ok

* sublime

* merge mxapi branch (#20)

* mxapi komp-build stuff

* mxapi bombe test

* the latest crap

* mxapi handle divisions changes

* mxapi use voice 1 in bombe

* mx-version-0.2.0.2

* mx-version-0.2.0.3

* mx-version-0.2.0.4

* mxapi adjust -0 to say 0 instead when stringing decimals

* mx-version-0.2.0.5

* mx-version-0.2.0.6

* mxapi save ornaments

* mx-version-0.2.0.7

* mxapi working on direction offset problems

* mxapi direction mark time bug fixed

* mxapi reenable some tests

* mxapi pedal start stop working

* mxapi disable the core tests

* mx-version-0.2.0.8

* mxapi working on order of directions and notes

* mxapi directions are now written in a relatively sane order with respect to notes

* mxapi tests passing

* mx-version-0.2.0.9

* mxapi fix direction position data import and export

* mx-version-0.2.0.10

* mxapi compile visual studio

* mx-version-0.2.0.11

* mxapi doesnt compile add tremolos

* better support for tremolo glyphs

* mxapi words are exporting

* mxapi finish with words for now

* mx-version-0.2.0.12

* mxapi save and load technical marks

* mx-version-0.2.0.13

* mxapi turn off cout

* mxapi fix bug with other articulation

* mx-version-0.2.0.14

* mxapi merge decimal

* mxapi score data and tests

* mxapi tests

* mxapi sort score data before writing

* mx-version-0.2.0.17

* mxapi progress on directions robustness

* more work on cursor and direction

* mxapi directions seem more bulletproof now

* mx-version-0.2.0.18

* mxapi fix chord bug

* mxapi fix xcode project groups - add enum macros

* mxapi add musicxml instrument sound strings

* mxapi sound id

* mxapi restore compile control

* mx-version-0.2.0.20

* sound and general midi work

* mxapi begin adding chord support

* mxapi chord test simple

* mxapi middle of something does not compile

* mxapi chord progress

* mxapi chord saving works but round trip does not work

* mxapi still cannot fix the round trip test

* mxapi basic chord support complete

* mx-version-0.2.0.21

* mxapi add chord symbol features

* mx-version-0.2.0.22

* mxapi add processing instructions

* mx-version-0.2.0.23

* more chord symbol work

* mx-version-0.2.0.24

* mxapi not much

* mxapi Barlines (#12)

* mxapi fix broken test

* mx-version-0.2.0.25

* Feature/mxapi (#14)

mxapi barlines and endings

* Feature/repeats (#15)

mxapi repeats

* mx-version-0.2.0.26

* mxapi add chord positioning

* mx-version-0.2.0.27

* mxapi read and write note position data

* mx-version-0.2.0.28

* mxapi barline work

* mx-version-0.2.0.29

* mxapi fix measure rest writing

* mx-version-0.2.0.30

* mxapi fix another measure rest issue

* mx-version-0.2.0.31

* mx-version-0.2.0.32

* mxapi add failing freezing pieces test viola measure 7

* mxapi freezing tests

* mxapi more freezing tests

* mxapi freezing tests

* Feature/mxapi (#17)

* Smufl flailing

* Fat framework

* Add missing architectures

* Clean up projects

* Remove scheme and add stub post-archive script

* Track down a memory smasher

* Add an additional check

* use sparsepp to avoid smufl crash (#18)

* Use frozen map

* User sparse map for unordered list

* Return ref not copy of string

* smufl map carnage

* version

* mx-version-0.3.1.37

* nothing

* gitignore

* remove sublime workspace

* ignore sublime workspace

* ci and gcc work

* pesky sublime workspace

* sublime workspace ignore

* ci

* ci work

* ci work and gcc

* circleci

* circleci

* circleci

* test stuff

* work on test options (#27)

work on test options #24 #23

* readme and examples #22 #26 (#28)

* work on test options

* work on examples

* work on examples

* build examples on circleci

* run examples on circleci

* use include directory as public api #21 (#29)

* work on test options

* work on examples

* work on examples

* build examples on circleci

* run examples on circleci

* readme

* readme

* readme

* big shuffle

* hide stuff

* readme work for 1.0 #25 #26 #30 (#31)

* work on test options

* work on examples

* work on examples

* build examples on circleci

* run examples on circleci

* readme

* readme

* readme

* big shuffle

* hide stuff

* readme work

* done enough

* xcode

* merge with ezxml library (#38)

* bring in latest ezxml

* use ezxml library cmake works xcode does not

* incorporate ezxml into xcode project - does not build

* xcode mx library compiles

* xcode project stuff

* xcode tests run

* fix circleci warning

* delete circleci comments

* fix xcode project for komp (#39)

* fix-build

* xcode
  • Loading branch information
webern authored Nov 24, 2019
1 parent 37fa4f1 commit 38f38fc
Show file tree
Hide file tree
Showing 1,269 changed files with 29,781 additions and 7,745 deletions.
32 changes: 0 additions & 32 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -528,20 +528,20 @@ private:

When `getChoice() == BendChoice::Choice::preBend` then we will see `<pre-bend/>` in the XML, but when `getChoice() == BendChoice::Choice::postBend` then we will see `<post-bend/>` 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 <iostream>
#include <string>
Expand All @@ -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" );
Expand Down Expand Up @@ -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.

Expand Down
12 changes: 12 additions & 0 deletions Sourcecode/private/extern/ezxml/.gitattributes
Original file line number Diff line number Diff line change
@@ -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
236 changes: 236 additions & 0 deletions Sourcecode/private/extern/ezxml/.gitignore
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 38f38fc

Please sign in to comment.