1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- // This file is part of libigl, a simple c++ geometry processing library.
- //
- // Copyright (C) 2013 Alec Jacobson <alecjacobson@gmail.com>
- //
- // This Source Code Form is subject to the terms of the Mozilla Public License
- // v. 2.0. If a copy of the MPL was not distributed with this file, You can
- // obtain one at http://mozilla.org/MPL/2.0/.
- /* ---------------------------------------------------------------------------
- // XMLSerializationTest.h
- // Author: Christian Schüller <schuellchr@gmail.com>
- ------------------------------------------------------------------------------
- Used to demonstrates howto use the XMLSerialization class.
- ----------------------------------------------------------------------------*/
- #ifndef XML_SERIALIZABLE_H
- #define XML_SERIALIZABLE_H
- #include <igl/xml/XMLSerialization.h>
- namespace igl
- {
- class XMLSerializationTest : public ::igl::XMLSerialization
- {
- public:
-
- int testInt;
- std::vector<float> testVector;
-
- XMLSerializationTest();
- void InitSerialization();
-
- bool Test();
- };
- XMLSerializerTest::XMLSerializerTest()
- : XMLSerialization("testObject")
- {
- }
- void XMLSerializerTest::InitSerialization()
- {
- xmlSerializer->Add(testInt,"testInt");
- xmlSerializer->Add(testVector,"testVector");
-
- testInt = 10;
-
- testVector.push_back(1.0001f);
- testVector.push_back(2.0001f);
- testVector.push_back(3.0001f);
- }
- }
- #endif
|