AGX Dynamics 2.40.0.0
Loading...
Searching...
No Matches
WireWinchSerialization.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17
18#ifndef AGXPOWERLINE_DETAIL_WIRE_WINCH_SERIALIZATION_H
19#define AGXPOWERLINE_DETAIL_WIRE_WINCH_SERIALIZATION_H
20
22#include <agx/version.h>
23
24
25namespace agxPowerLine
26{
27 namespace detail
28 {
29 inline bool shouldReadWireWinchConnectorData(size_t archiveAgxVersion, agx::UInt16 archiveSerializationVersion)
30 {
31 /*
32 Using AGX version instead of serialization version because of serialization
33 breaking change in a release candidate (RC).
34
35 A bug fix was required in 2.13.2 and the fix required changes to the
36 serialization format. The fix was implemented in trunk and the serialization
37 version increased to 61. However, we cannot bump the serialization format in
38 the RC because there are intermediate changes to the serialization in trunk
39 that we don't want in the RC. We therefore need another way to determine if
40 the archive being read contains the new data or not.
41
42 By looking at the AGX version instead fo the serialization version we can
43 determine if the archive was written with the extra data or not regardless of
44 whether it was written from trunk or the RC
45 */
46 agx::UInt16 const serializationVersionInRc = 58;
47 agx::UInt16 const serializationVersionAtChange = 61;
48 size_t const agxVersionInRc = AGX_CALC_VERSION(2, 13, 2, 5);
49 size_t const agxVersionInTrunkAfterRc = AGX_CALC_VERSION(2, 14, 0, 0);
50
51 return agxStream::detail::shouldReadDataFromArchive(
52 archiveAgxVersion,
53 archiveSerializationVersion,
54 serializationVersionInRc,
55 serializationVersionAtChange,
56 agxVersionInRc,
57 agxVersionInTrunkAfterRc);
58 }
59 }
60}
61
62#endif
bool shouldReadWireWinchConnectorData(size_t archiveAgxVersion, agx::UInt16 archiveSerializationVersion)
agxPowerLine contains a collection of connected components that transport power across a system.
Definition: MotorUnit.h:24
uint16_t UInt16
Definition: Integer.h:31
AGXCORE_EXPORT agx::UInt32 AGX_CALC_VERSION(agx::UInt8 generation, agx::UInt8 major, agx::UInt8 minor, agx::UInt8 patch)