PVData C++
8.0.9
Toggle main menu visibility
Loading...
Searching...
No Matches
misc
pv
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
22
namespace
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
97
static
std::string
deserializeString
(
ByteBuffer
* buffer,
98
DeserializableControl
* control, std::size_t
max
= 0x7fffffff);
99
100
private
:
101
SerializeHelper() {};
102
~SerializeHelper
() {};
103
110
static
void
writeSize(std::size_t s, ByteBuffer* buffer);
111
112
};
113
114
}
115
}
116
123
#define DESERIALIZE_STRING_HAS_LIMIT
124
125
#endif
/* SERIALIZEHELPER_H_ */
count
constexpr iterator_traits< _InputIterator >::difference_type count(_InputIterator __first, _InputIterator __last, const _Tp &__value)
max
constexpr const _Tp & max(const _Tp &__a, const _Tp &__b)
std::string
basic_string< char > string
epics::pvData::ByteBuffer
This class implements a Bytebuffer that is like the java.nio.ByteBuffer.
Definition
byteBuffer.h:237
epics::pvData::DeserializableControl
Callback class for deserialization.
Definition
serialize.h:93
epics::pvData::SerializableControl
Callback class for serialization.
Definition
serialize.h:42
epics::pvData::SerializeHelper
Serialization helper.
Definition
serializeHelper.h:29
epics::pvData::SerializeHelper::readSize
static std::size_t readSize(ByteBuffer *buffer, DeserializableControl *control)
epics::pvData::SerializeHelper::serializeString
static void serializeString(const std::string &value, ByteBuffer *buffer, SerializableControl *flusher)
epics::pvData::SerializeHelper::serializeSubstring
static void serializeSubstring(const std::string &value, std::size_t offset, std::size_t count, ByteBuffer *buffer, SerializableControl *flusher)
epics::pvData::SerializeHelper::deserializeString
static std::string deserializeString(ByteBuffer *buffer, DeserializableControl *control, std::size_t max=0x7fffffff)
epics::pvData::SerializeHelper::writeSize
static void writeSize(std::size_t s, ByteBuffer *buffer, SerializableControl *flusher)
epics::pvData
pvData
Definition
convert.h:21
epics
epics
Definition
convert.h:21
Generated on
for PVData C++ by
1.17.0