object base class and convenience static class for TinyXML-2
Copyright (c) Dan Wilcox 2009, 2015, 2020
This is a wrapper around the TinyXML-2 library to add chainable object loading in classes and automatic loading/saving of primitive types via reference (XMLObject). Also includes a static class (XML) for common data get/set convenience functions. Both classes utilize the "tinyxml" namespace.
See the headers in src/tinyobject and the example in src/totest for more info.
Download a release tarball from http://docs.danomatika.com/releases/tinyobject/.
Otherwise, if cloning this repo, you will also need to run autogen.sh to create the configure script:
git clone https://github.com/danomatika/tinyobject.git
cd tinyobject
./autogen.sh
You will need tinyxml2 installed before building. On macOS, you can use Homebrew with:
brew install tinyxml2
On Ubuntu/Debian, you would do the following:
sudo apt-get install libtinyxml2-dev
On Windows, it is recommended to use Msys2. Install the build tool chain (make, gcc or clang, pkgconfig, autconf, automake, libtool) and the tinyxml2 package:
# 32 bit
pacman -S mingw-w64-i686-tinyxml2
# 64 bit
pacman -S mingw-w64-x86_64-tinyxml2
This is an automake project, so build the lib & test with:
./configure
make
Run the test program with:
cd src/totest
./totest
Install via:
sudo make install
A Premake4 script and IDE files can be found in the prj folder. Premake4 can generate IDE files from a given lua script. Download Premake4 from http://industriousone.com/premake.
You can enable a debug build using:
./configure --enable-debug
I develop using an IDE, then update the autotools files when the sources are finished. I run make distcheck to make sure the distributable package can be built successfully.
Note: tinyobject was originally named "xmlframework" in versions prior to 0.3.0