Teuchos - Trilinos Tools Package
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
comm
src
Teuchos_Serializer.hpp
1
// @HEADER
2
// *****************************************************************************
3
// Teuchos: Common Tools Package
4
//
5
// Copyright 2004 NTESS and the Teuchos contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef TEUCHOS_SERIALIZER_HPP
11
#define TEUCHOS_SERIALIZER_HPP
12
13
#include "
Teuchos_RCP.hpp
"
14
15
namespace
Teuchos
{
16
24
template
<
typename
Ordinal,
typename
T>
25
class
Serializer
{
26
public
:
27
29
virtual
~Serializer
() {}
30
34
virtual
Ordinal
getBufferSize
(
const
Ordinal count)
const
= 0;
35
54
virtual
void
serialize
(
55
const
Ordinal count
56
,
const
T *
const
objs[]
57
,
const
Ordinal bytes
58
,
char
charBuffer[]
59
)
const
= 0;
60
61
// const ArrayView<const Ptr<const T> >& objs
62
// std::ostream& oStream
63
66
virtual
RCP<T>
createObj
()
const
= 0;
67
86
virtual
void
deserialize
(
87
const
Ordinal bytes
88
,
const
char
charBuffer[]
89
,
const
Ordinal count
90
,T *
const
objs[]
91
)
const
= 0;
92
93
// const ArrayView<const Ptr<T> >& objs
94
// std::istream& iStream
95
96
};
97
98
}
// namespace Teuchos
99
100
#endif
// TEUCHOS_SERIALIZER_HPP
Teuchos_RCP.hpp
Reference-counted pointer class and non-member templated function implementations.
Teuchos::RCP
Smart reference counting pointer class for automatic garbage collection.
Definition
Teuchos_RCPDecl.hpp:397
Teuchos::Serializer
Strategy interface for the indirect serializing and deserializing objects of a given type handled usi...
Definition
Teuchos_Serializer.hpp:25
Teuchos::Serializer::serialize
virtual void serialize(const Ordinal count, const T *const objs[], const Ordinal bytes, char charBuffer[]) const =0
Serialize an object to a char[] buffer.
Teuchos::Serializer::getBufferSize
virtual Ordinal getBufferSize(const Ordinal count) const =0
Return an estimate for the maximum storage for count objects to be serialized.
Teuchos::Serializer::~Serializer
virtual ~Serializer()
Definition
Teuchos_Serializer.hpp:29
Teuchos::Serializer::deserialize
virtual void deserialize(const Ordinal bytes, const char charBuffer[], const Ordinal count, T *const objs[]) const =0
Deserialize an object from a char[] buffer.
Teuchos::Serializer::createObj
virtual RCP< T > createObj() const =0
Create an object of type T to be serialized into.
Teuchos
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
Generated by
1.17.0