Gocator API

GoSerializer.h
Go to the documentation of this file.
1 /**
2 * @file GoSerializer.h
3 * @brief Declares the GoSerializer class.
4 *
5 * @internal
6 * Copyright (C) 2016-2020 by LMI Technologies Inc.
7 * Licensed under the MIT License.
8 * Redistributed files must retain the above copyright notice.
9 */
10 #ifndef GO_SDK_SERIALIZER_H
11 #define GO_SDK_SERIALIZER_H
12
13 #include <GoSdk/GoSdkDef.h>
14 #include <kApi/Io/kSerializer.h>
15 kBeginHeader()
16
17 #define GO_SERIALIZATION_FORMAT_NAME "godat" //format name, used for version info lookup
18 #define GO_SERIALIZATION_FORMAT_VERSION "6.0.0.0" //format version, used for version info lookup
19
20 // Need a level of indirection to stringify a number.
21 // Must only call GoSerializerTypeIdStr() and DO NOT call GoSerializerTypeIdStr_().
22 #define GoSerializerTypeIdStr_(TYPE_ID) #TYPE_ID
23 #define GoSerializerTypeIdStr(TYPE_ID) GoSerializerTypeIdStr_(TYPE_ID)
24
25 /**
26 * @class GoSerializer
27 * @extends kSerializer
28 * @ingroup GoSdk-Internal
29 * @brief Serializes/deserializes objects to/from Gocator Data Protocol.
30 */
31 typedef kSerializer GoSerializer;
32
33 /**
34 * Constructs a GoSerializer object.
35 *
36 * @public @memberof GoSerializer
37 * @version Introduced in firmware 4.0.10.27
38 * @param serializer Receives the constructed object.
39 * @param stream Stream for reading or writing.
40 * @param allocator Memory allocator (or kNULL for default).
41 * @return Operation status.
42 */
43 GoFx(kStatus) GoSerializer_Construct(GoSerializer* serializer, kStream stream, kAlloc allocator);
44
45 kEndHeader()
46 #include <GoSdk/Internal/GoSerializer.x.h>
47
48 #endif
GoSerializer::GoSerializer_Construct
kStatus GoSerializer_Construct(GoSerializer *serializer, kStream stream, kAlloc allocator)
Constructs a GoSerializer object.
GoSerializer
Serializes/deserializes objects to/from Gocator Data Protocol.
kAlloc
kSerializer
GoSdkDef.h
Essential SDK declarations.
kStream
kSerializer.h
kStatus