AGX Dynamics
2.38.0.2
Loading...
Searching...
No Matches
WireWinchSerialization.h
Go to the documentation of this file.
1
/*
2
Copyright 2007-2024. Algoryx Simulation AB.
3
4
All AGX source code, intellectual property, documentation, sample code,
5
tutorials, scene files and technical white papers, are copyrighted, proprietary
6
and confidential material of Algoryx Simulation AB. You may not download, read,
7
store, distribute, publish, copy or otherwise disseminate, use or expose this
8
material unless having a written signed agreement with Algoryx Simulation AB, or having been
9
advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10
valid commercial license from Algoryx Simulation AB.
11
12
Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13
from using this software, unless otherwise stated in written agreements with
14
Algoryx Simulation AB.
15
*/
16
17
18
#ifndef AGXPOWERLINE_DETAIL_WIRE_WINCH_SERIALIZATION_H
19
#define AGXPOWERLINE_DETAIL_WIRE_WINCH_SERIALIZATION_H
20
21
#include <
agxStream/shouldReadDataFromArchive.h
>
22
#include <
agx/version.h
>
23
24
25
namespace
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
agxPowerLine::detail::shouldReadWireWinchConnectorData
bool shouldReadWireWinchConnectorData(size_t archiveAgxVersion, agx::UInt16 archiveSerializationVersion)
Definition
WireWinchSerialization.h:29
agxPowerLine
agxPowerLine contains a collection of connected components that transport power across a system.
Definition
MotorUnit.h:24
agx::UInt16
uint16_t UInt16
Definition
Integer.h:31
shouldReadDataFromArchive.h
version.h
AGX_CALC_VERSION
AGXCORE_EXPORT agx::UInt32 AGX_CALC_VERSION(agx::UInt8 generation, agx::UInt8 major, agx::UInt8 minor, agx::UInt8 patch)
include
agxPowerLine
detail
WireWinchSerialization.h
Generated on Sun Sep 1 2024 11:24:47 for AGX Dynamics by
1.9.8