Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Branch] - CMarkup --> Tinyxml2 : SetSkeletonSettings() #70

Conversation

OliverGlandberger
Copy link
Contributor

@OliverGlandberger OliverGlandberger commented Jan 29, 2025

This PR replaces CMarkup with Tinyxml2 in the SetSkeletonSettings() function, as well as the following required functions:

  • AddXMLElementTransform()
  • AddXMLElementDOF()

image

@OliverGlandberger OliverGlandberger changed the title Replace CMarkup with Tinyxml2: SetSkeletonSettings() CMarkup --> Tinyxml2 : SetSkeletonSettings() Jan 29, 2025
@OliverGlandberger OliverGlandberger changed the title CMarkup --> Tinyxml2 : SetSkeletonSettings() [Feature Branch] - CMarkup --> Tinyxml2 : SetSkeletonSettings() Jan 30, 2025
@OliverGlandberger OliverGlandberger marked this pull request as ready for review January 30, 2025 09:53
Copy link
Contributor

@qjgn qjgn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requested minor adjustment to avoid breaking version handling

@OliverGlandberger OliverGlandberger merged commit 7669272 into create_tinyxml2_serializer_deserializer Jan 30, 2025
OliverGlandberger added a commit that referenced this pull request Feb 17, 2025
* tests passing

* Extracted serialization from rtprotocol

* Use a separate serializer for each function to enable gradual replacement

* Extended ISettingsSerializer interface, restored Deserialize6DOFSettings

* Removed todo

* Build examples

* Renamed parameters

* Renamed parameters

* renamed parameters

* mini reformat for readability

* Fixed minor/major mixup

* Adding 'Tinyxml2Serializer' shell, commented out CMarkup code within each function.

* Properly include tinyxml2

* [Feature Branch] - CMarkup --> Tinyxml2 : SetSkeletonSettings() (#70)

* Changed to tinyxml2 in 'SetSkeletonSettings', as well as dependant function.

* Add else-statement to include 'LowerBound' and 'UpperBound' when 'Constraint' is missing.

* Remove unnecessary explicit string-construction.

* Removed pointers from functions, replaced with references.

* [Feature Branch] - CMarkup --> Tinyxml2 : Set6DOFBodySettings() (#71)

* Changed 'Set6DOFBodySettings' to use tinyxml2.

* Output is slightly different still. Saving progress.

* Test now passes. Removed a newline at the start of the test data set for 6DOF. Not sure if it needs to be there or not.

* Revert the data since the newline doesn't seem to matter.

* Removed unnecessary explicit string-construction, renamed from 'doc' to 'oXML'.

* [Feature Branch] - CMarkup --> Tinyxml2 : SetForceSettings() (#72)

* Updated 'SetForceSettings' function for Tinyxml2 serializer.

* Change pointers to references where applicable in new code.

* Change pointers to references where applicable in new code.

* Fix merge issues.

* Changed namespace to qualisys_cpp_sdk

* [Feature Branch] - CMarkup --> Tinyxml2 : SetImageSettings() (#73)

* Saving progress.

* Added 'SetForceSettings' function.

* Remove unnecessary explicit string-construction.

---------

Co-authored-by: johannes.gotlen <johannes.gotlen@qualisys.se>

* [Feature Branch] - CMarkup --> Tinyxml2 : SetGeneralSettings() (#75)

* Added 'SetGeneralSettings' function.

* Reverted 'AddXMLElementBool' functions to contain default-specified texts for 'True' and 'False' alternatives, since there are commented out functions that need to specify these texts.

---------

Co-authored-by: johannes.gotlen <johannes.gotlen@qualisys.se>

* [Feature Branch] - CMarkup --> Tinyxml2 : DeserializeEyeTrackerSettings() (#74)

* Implemented CTinyxml2Deserializer::DeserializeEyeTrackerSettings, CTinyxml2Deserializer::ReadXmlBool

* formatted else

* removed extra include

* use static_cast

---------

Co-authored-by: Oliver Glandberger <oliver.glandberger@qualisys.se>

* [Feature Branch] - CMarkup --> Tinyxml2 : DeserializeGazeVectorSettings() (#76)

* Implemented CTinyxml2Deserializer::DeserializeEyeTrackerSettings, CTinyxml2Deserializer::ReadXmlBool

* formatted else

* removed extra include

* use static_cast

* Tests passing

* [Feature Branch] - CMarkup --> Tinyxml2 : Deserialize6DOFSettings() (#77)

* Implemented CTinyxml2Deserializer::DeserializeEyeTrackerSettings, CTinyxml2Deserializer::ReadXmlBool

* formatted else

* removed extra include

* use static_cast

* Tests passing

* Tests passing

* [Feature Branch] - CMarkup --> Tinyxml2 : Deserialize3DSettings() (#78)

* Implemented CTinyxml2Deserializer::DeserializeEyeTrackerSettings, CTinyxml2Deserializer::ReadXmlBool

* formatted else

* removed extra include

* use static_cast

* Tests passing

* Tests passing

* Test passes

* Deserialize general settings. Tests passing (#80)

* DeserializeAnalogSettings, Tests Passing (#81)

* Added initial refactor of 'SetExtTimestampSettings' function for tinyxml2. (#79)

* Added initial refactor of 'SetExtTimeBaseSettings' function for tinyxml2. (#82)

* Added initial refactor of 'SetCameraVideoSettings' function for tinyxml2. (#83)

* Added initial refactor of 'SetCameraSyncOutSettings' function for tinyxml2. (#84)

* [Feature Branch] - CMarkup --> Tinyxml2 : SetCameraSettings() (#85)

* Initial push to change 'SetCameraSettngs' to use tinyxml2.

* Remove unnecessary comment.

* [Feature Branch] - CMarkup --> Tinyxml2 : SetCameraLensControlSettings() (#86)

* Initial push to change 'SetCameraLensSettings' to use tinyxml2.

* Remove unnecessary string.

* Updated new 'AddXMLElementFloatWithTextAttribute', removed prefix letters, updated order of parameters, udpated pointers.

* Initial push to change 'SetCameraAutoWhiteBalanceSettings' to use tinyxml2. (#87)

* Initial push to change 'SetCameraAutoExposureSettings' to use tinyxml2. (#88)

* [Feature Branch] - CMarkup --> Tinyxml2 : DeserializeForceSettings() (#89)

* DeserializeForceSettings Incomplete testing

* DeserializeForceSettings. New test data. Tests passing

* Formatting change

* Changed to range based for loops

* Removed initialization loop

* Added newline

* Whitepsace

* Formatting update

* Deserialize image settings, tests passing (#90)

* [Feature Branch] - Tinyxml2 : Integrate tinyxml2 Using Git Submodule (#91)

* Removed './cmake/tinyxml2.cmake', added tinyxml2 as a submodule, updated relevant 'CMakeLists.txt' files accordingly.

* Added 'branch = v10.0.0' to '.gitmodules'.

* Updated 'README.md' to reflect now adding tinyxml2 via submodule.

* Saving branch.

* Initial fix that makes this project consumable by QTM.

* Updating CMakeLists.txt.

* Removed unnecessary spaces.

* DeserializeSkeletonSettings, Tests passing (#92)

* Tinyxml2 : DeserializeCalibrationSettings()

* Split up Tinyxml2Serializer/Tinyxml2Deserializer

* Fixed `sprintf` notices by changing to `sprintf_s`

* Tinyxml2Deserializer: Removed private functions

* Tinyxml2Deserializer: Renamed private variables

* Tinyxml2Deserializer: Renamed private variables

* Tinyxml2Deserializer: Removed some of the over-specialized helper functions (#95)

* [Feature Branch] - Tinyxml2Deserializer: Extracted deserialization interface (#96)

* extracted seralization interface

* Fixup cmak file

* Fixup. Removed extra endlines

* [Feature Branch] - Refactor Naming Serializer (#97)

* Started renaming variables in Tinyxml2Serializer.

* Finished renaming.

* Minor updates.

* Remove the unnecessary comments, some minor changes.

* In the middle of renaming many parameter and variable names. Code builds and tests pass. Saving progress.

* Finished renaming in 'RTProtocol.h'.

* Finished renaming parameters and variables in 'RTProtocol.cpp'.

* Finished with 'Settings.h'.

* Merged feature branch, fixed conflicts.

* Additional minor changes.

* Reverting Deserializer files.

* Revert accidental change from x,y,z to x,x,x.

* Removing 'e' from two local variables in 'SetCameraVideoSettingsTest'.

* Reverted changes to 'Settings.h', 'RTProtocol.h', and test files. Also reverted changes that are not required right now in MarkupSerializer.cpp.

* [Feature Branch] - Refactor Naming Deserializer (#98)

* Started renaming variables in Tinyxml2Serializer.

* Finished renaming.

* Minor updates.

* Remove the unnecessary comments, some minor changes.

* In the middle of renaming many parameter and variable names. Code builds and tests pass. Saving progress.

* Finished renaming in 'RTProtocol.h'.

* Finished renaming parameters and variables in 'RTProtocol.cpp'.

* Finished with 'Settings.h'.

* Merged feature branch, fixed conflicts.

* Additional minor changes.

* Reverting Deserializer files.

* Revert accidental change from x,y,z to x,x,x.

* Removing 'e' from two local variables in 'SetCameraVideoSettingsTest'.

* Reverted changes to 'Settings.h', 'RTProtocol.h', and test files. Also reverted changes that are not required right now in MarkupSerializer.cpp.

* Refactoring Deserializer names, some small changes in RTProtocol.cpp and MarkupSerializer .h and .cpp.

* Update some additional names.

* Revert "[Feature Branch] - Refactor Naming Deserializer (#98)" (#99)

This reverts commit dda77f1.

* [Feature Branch] - Refactor Naming Deserializer (#100)

* Started renaming variables in Tinyxml2Serializer.

* Finished renaming.

* Minor updates.

* Remove the unnecessary comments, some minor changes.

* In the middle of renaming many parameter and variable names. Code builds and tests pass. Saving progress.

* Finished renaming in 'RTProtocol.h'.

* Finished renaming parameters and variables in 'RTProtocol.cpp'.

* Finished with 'Settings.h'.

* Merged feature branch, fixed conflicts.

* Additional minor changes.

* Reverting Deserializer files.

* Revert accidental change from x,y,z to x,x,x.

* Removing 'e' from two local variables in 'SetCameraVideoSettingsTest'.

* Reverted changes to 'Settings.h', 'RTProtocol.h', and test files. Also reverted changes that are not required right now in MarkupSerializer.cpp.

* Refactoring Deserializer names, some small changes in RTProtocol.cpp and MarkupSerializer .h and .cpp.

* Update some additional names.

* Removing mingw_build folder.

* [FeatureBranch] Tinyxml2 deserializer cleanup (#103)

* ranged based for, narrowed scope of some variables

* removed root element variables

* Formatted document

* Adjusted closing parenthesis

* Hiked up parenthesis

* Renamed formal parameters

* Sorted includes

* Line break after if block

* [Feature Branch] - Refactor Into 'Serializer' Class (#102)

* Checked out to previous commit.

* Initial commit that extracts tinyxml2 dependency to 'Serializer.h' and 'Serializer.cpp'.

* Fixed issues causing the projects to not build when opening the solution in Visual Studio.

* Remove 'tinyxml2.h' from 'Serializer.h' and move it to 'Serializer.cpp'.

* Revert to change that auto-reverted by Visual Studio.

* Rename serialization files (#104)

* Renamed files

* Renamed files and removed leaking headers

* Fixed dll export issue

* Fixed vcxproj build errors

* Renamed parameters

* Renamed files

* [FeatureBranch] Tinyxml2 cleanup (#105)

* Removed settings structs from DeserializerAPI

* Serializer wip

* restored support for optional force plate corners

* SetSettings6Dof

* Fixed incorrect element creation of '2D' and '3D', removed commented out code.

* Removing unused 'GeneralSettings' function from SerializerApi.h.

* Removed 'SetExtTimeBaseSettings' from 'SerializerApi.h' and moved to 'SettingsSerializer.cpp'.

* Removed 'SetExtTimestampSettings' from 'SerializerApi.h', moved to 'SettingsSerializer.cpp'.

* Removed 'SetCameraVideoSettings' from 'SerializerApi', moved to 'SettingsSerializer'.

* Removed 'SetCameraSyncOutSettings' from 'SerializerApi.h', moved to 'SettingsSerializer.cpp'.

* Removed 'SetCameraLensControlSettings' from 'SerializerApi', moved to 'SettingsSerializer'.

* Removed 'SetCameraAutoExposureSettings' from 'SerializerApi', moved to 'SettingsSerializer'.

* Reformated creation of root elements.

* Renamed deserializer function

* Removed 'SetCameraAutoWhiteBalance' from 'SerializeApi', moved to 'SettingsSerializer'.

* Removed 'SetImageSettings' from 'SerializerApi', moved to 'SettingsSerializer',

* Removed 'SetForceSettings' from 'SerializerApi', moved to 'SettingsSerializer'.

* Moved deserializer api TryRead.. functions into class scope

* Renamed deserializer methods

* Renamed deserializer api find element methods

* Saving progress.

* Simplified ChildElementRange

* Share buffer

* Fixup deserializer row/col itertor

* Fixup Deserialize Calibration_Matrix

* Started moving out 'SetSkeletonSettings' from 'SerializerApi' to 'SettingsSerializer'. It compiles but there are some diffs.

* Fixed Marker/Weight skeleton serialization issue

* Removed 'SetSkeletonSettings' from 'SerializerApi', moved to 'SettingsSerializer'.

* Remove unused helper functions.

* Removing unnecessary newlines.

* Cleaned up SerializerApi.h

* Cleaned up SerializerApi.h

* Removed variable decimal count

* Removed calls to std::to_string

* Adding 'cstring' include to 'RTProtocol.cpp'.

* Change to 'sprintf_s' variant.

* Added 'algorithm' include to 'Settings.cpp'.

* Updating to 'snprintf'.

* Fixed use of overlapping buffer with snprintf

---------

Co-authored-by: Oliver Glandberger <oliver.glandberger@qualisys.se>

* [Feature Branch] - Removes (old) serialization library CMarkup (#107)

* Removed alternate serialization library

* Filter fixes

* Removed "Serialize/Deserializer" from project filter

* [Feature Branch] - Fix Compiler Issues (mingw, GNU, Linux, Windows, etc.) (#108)

* Removed settings structs from DeserializerAPI

* Serializer wip

* restored support for optional force plate corners

* SetSettings6Dof

* Fixed incorrect element creation of '2D' and '3D', removed commented out code.

* Removing unused 'GeneralSettings' function from SerializerApi.h.

* Removed 'SetExtTimeBaseSettings' from 'SerializerApi.h' and moved to 'SettingsSerializer.cpp'.

* Removed 'SetExtTimestampSettings' from 'SerializerApi.h', moved to 'SettingsSerializer.cpp'.

* Removed 'SetCameraVideoSettings' from 'SerializerApi', moved to 'SettingsSerializer'.

* Removed 'SetCameraSyncOutSettings' from 'SerializerApi.h', moved to 'SettingsSerializer.cpp'.

* Removed 'SetCameraLensControlSettings' from 'SerializerApi', moved to 'SettingsSerializer'.

* Removed 'SetCameraAutoExposureSettings' from 'SerializerApi', moved to 'SettingsSerializer'.

* Reformated creation of root elements.

* Renamed deserializer function

* Removed 'SetCameraAutoWhiteBalance' from 'SerializeApi', moved to 'SettingsSerializer'.

* Removed 'SetImageSettings' from 'SerializerApi', moved to 'SettingsSerializer',

* Removed 'SetForceSettings' from 'SerializerApi', moved to 'SettingsSerializer'.

* Moved deserializer api TryRead.. functions into class scope

* Renamed deserializer methods

* Renamed deserializer api find element methods

* Saving progress.

* Simplified ChildElementRange

* Share buffer

* Fixup deserializer row/col itertor

* Fixup Deserialize Calibration_Matrix

* Started moving out 'SetSkeletonSettings' from 'SerializerApi' to 'SettingsSerializer'. It compiles but there are some diffs.

* Fixed Marker/Weight skeleton serialization issue

* Removed 'SetSkeletonSettings' from 'SerializerApi', moved to 'SettingsSerializer'.

* Remove unused helper functions.

* Removing unnecessary newlines.

* Cleaned up SerializerApi.h

* Cleaned up SerializerApi.h

* Removed variable decimal count

* Removed calls to std::to_string

* Adding 'cstring' include to 'RTProtocol.cpp'.

* Change to 'sprintf_s' variant.

* Added 'algorithm' include to 'Settings.cpp'.

* Updating to 'snprintf'.

* Fixed use of overlapping buffer with snprintf

* Compiler warnings are gone when building using mingw in Windows.

* Updating code for creating 'mErrorStr' to remove compiler warning.

* Updating code for creating 'mErrorStr' to remove compiler warning.

* Remove whitespace.

* Changing to 'snprintf'.

* Updating print calls to remove compiler issues.

* Changing from 'int' to 'size_t' type in for-loops.

* Update so that it works to build using Visual Studio and 'GNU'.

* Add 'if(WIN32)' to CMakeLists.txt target_link_libraries code to fix broken building when using Ubuntu terminal.

* Remove 'build_test' folder.

* Remove includes, start adding 'std::' instead.

* Add 'include <stdint.h>' to 'Settings.h'.

* Revert back to previous include 'cstdint'.

* Revert 'cstring' include in 'MarkupSerializer.cpp'.

* Reverting another include.

* Re-introduce include to 'DesierializerApi.h' but instead include 'cstdint'.

* Reintroduce '#include <algorithm>' to 'SettingsDeserializer.cpp'.

* Adding 'std::' in front of 'size_t' instances that were missing it.

---------

Co-authored-by: johannes.gotlen <johannes.gotlen@qualisys.se>

* Added accidentally deleted spaces.

* Added accidentally deleted spaces.

* Removed serializer interfaces

* Fixed SerializerApi memory leak

* Various minor changes.

* Minor changes.

* Fixed errors while handling input parameters in SettingsSerializer

* use sizeof instead of repeating size literal

* Added extra line breaks

* Reintroduced settings of 'tinyxml2_BUILD_TESTING' to OFF.

* Changed tests cmake version requirement to match the parent project

* Updated README.md

* Removing unnecessary newline.

* Remove two unnecessary comments.

* Remove unnecessary double newlines from top of RTPRotocol.cpp.

* Replace c-style cast with static_cast.

* Remove unnecessary spaces.

* Remove one newline from two locations with double newlines.

* DeserializerApi: Made mPtr private

* Formatting change

* Change from '.0f' to '0.0f'.

* Remove commented-out line of code.

* fixed bug detecting invalid chars

* Auto formatted new files

* Removed unused includes

* Renamed SerializerApi -> Serializer, DeserializerApi -> Deserializer

* Removed raw pointers, removed retained state in SettingsDeserializer

* Fixed inconsistent line breaks

* Deserializer, updated private member order

* Added missing formal parameter name in  Deserialize6DOFSettings

* Removed comments from SettingsDeserializer

---------

Co-authored-by: Oliver Glandberger <oliver.glandberger@qualisys.se>
Co-authored-by: Oliver Glandberger <32294492+OliverGlandberger@users.noreply.github.com>
@qjgn qjgn deleted the tinyxml2_set_skeleton_settings branch February 20, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants