PVData C++ 8.0.7
Loading...
Searching...
No Matches
serializeHelper.h
1/*
2 * Copyright information and license terms for this software can be
3 * found in the file LICENSE that is included with the distribution
4 */
5/*
6 * serializeHelper.h
7 *
8 * Created on: Oct 21, 2010
9 * Author: Miha Vitorovic
10 */
11
12#ifndef SERIALIZEHELPER_H_
13#define SERIALIZEHELPER_H_
14
15#include <pv/serialize.h>
16#include <pv/byteBuffer.h>
17#include <pv/noDefaultMethods.h>
18#include <pv/pvIntrospect.h>
19
20#include <shareLib.h>
21
22namespace epics {
23 namespace pvData {
24
29 class epicsShareClass SerializeHelper {
30 EPICS_NOT_COPYABLE(SerializeHelper)
31 public:
32
43 static void writeSize(std::size_t s, ByteBuffer* buffer,
44 SerializableControl* flusher);
45
55 static std::size_t readSize(ByteBuffer* buffer,
56 DeserializableControl* control);
57
65 static void serializeString(const std::string& value, ByteBuffer* buffer,
66 SerializableControl* flusher);
67
77 static void serializeSubstring(const std::string& value, std::size_t offset,
78 std::size_t count, ByteBuffer* buffer,
79 SerializableControl* flusher);
80
95 static std::string deserializeString(ByteBuffer* buffer,
96 DeserializableControl* control);
97
98 private:
99 SerializeHelper() {};
100 ~SerializeHelper() {};
101
108 static void writeSize(std::size_t s, ByteBuffer* buffer);
109
110 };
111
112 }
113}
114
115#endif /* SERIALIZEHELPER_H_ */
This class implements a Bytebuffer that is like the java.nio.ByteBuffer.
Definition byteBuffer.h:237
Callback class for deserialization.
Definition serialize.h:93
Callback class for serialization.
Definition serialize.h:42
static std::size_t readSize(ByteBuffer *buffer, DeserializableControl *control)
static void serializeString(const std::string &value, ByteBuffer *buffer, SerializableControl *flusher)
static void serializeSubstring(const std::string &value, std::size_t offset, std::size_t count, ByteBuffer *buffer, SerializableControl *flusher)
static void writeSize(std::size_t s, ByteBuffer *buffer, SerializableControl *flusher)
static std::string deserializeString(ByteBuffer *buffer, DeserializableControl *control)
epics
Definition convert.h:21