42 #ifndef TEUCHOS_SERIALIZER_HELPERS_HPP 43 #define TEUCHOS_SERIALIZER_HELPERS_HPP 53 template <
typename Ordinal,
typename T>
59 ,
const Ordinal count, T*
const buffer[]
83 template <
typename Ordinal,
typename T>
89 ,
const Ordinal count,
const T*
const buffer[]
115 template <
typename Ordinal,
typename T>
121 ,
const Ordinal bytes,
char charBuffer[]
128 T*
const* getBuffer()
const;
130 Ordinal getCount()
const;
149 template <
typename Ordinal,
typename T>
155 ,
const Ordinal bytes,
const char charBuffer[]
162 const T*
const* getBuffer()
const;
164 Ordinal getCount()
const;
186 template <
typename Ordinal,
typename T>
189 ,
const Ordinal count, T*
const buffer[]
198 template <
typename Ordinal,
typename T>
204 template <
typename Ordinal,
typename T>
208 return &(
const_cast<this_ptr_t
>(
this)->
charBuffer_)[0];
213 template <
typename Ordinal,
typename T>
223 template <
typename Ordinal,
typename T>
226 ,
const Ordinal count,
const T*
const buffer[]
235 template <
typename Ordinal,
typename T>
241 template <
typename Ordinal,
typename T>
247 template <
typename Ordinal,
typename T>
257 template <
typename Ordinal,
typename T>
260 ,
const Ordinal bytes,
char charBuffer[]
264 const Ordinal extent =
serializer_.getBufferSize(1);
265 const Ordinal count =
bytes_ / extent;
271 for(
int i = 0; i < count; ++i ) {
280 template <
typename Ordinal,
typename T>
288 template <
typename Ordinal,
typename T>
292 return &(
const_cast<this_ptr_t
>(
this)->
buffer_)[0];
297 template <
typename Ordinal,
typename T>
307 template <
typename Ordinal,
typename T>
310 ,
const Ordinal bytes,
const char charBuffer[]
314 const Ordinal extent =
serializer_.getBufferSize(1);
315 const Ordinal count =
bytes_ / extent;
321 for(
int i = 0; i < count; ++i ) {
330 template <
typename Ordinal,
typename T>
336 template <
typename Ordinal,
typename T>
342 template <
typename Ordinal,
typename T>
350 #endif // TEUCHOS_SERIALIZER_HELPERS_HPP Strategy interface for the indirect serializing and deserializing objects of a given type handled usi...
const Serializer< Ordinal, T > & serializer_
Array< RCP< T > > buffer_ptr_t
Encapsulate how an array of non-const objects with reference sematics is deserialized from a char[] a...
ConstReferenceTypeSerializationBuffer()
Encapsulate how an array of non-const objects with reference sematics is serialized into a char[] arr...
Array< char > charBuffer_
Encapsulate how an array of onst objects with reference sematics is deserialized from a char[] array ...
const char * getCharBuffer() const
const T *const * getBuffer() const
ReferenceTypeSerializationBuffer & operator=(const ReferenceTypeSerializationBuffer &)
ReferenceTypeSerializationBuffer()
~ReferenceTypeDeserializationBuffer()
Reserialize back to the char[] buffer from the internal T*[] buffer.
Encapsulate how an array of const objects with reference sematics is serialized into a char[] array...
ReferenceTypeDeserializationBuffer()
~ConstReferenceTypeDeserializationBuffer()
Reserialize back to the char[] buffer from the internal T*[] buffer.
~ConstReferenceTypeSerializationBuffer()
Free the internal char[] buffer (no data to be written back).
void resize(size_type new_size, const value_type &x=value_type())
char * getCharBuffer() const
Array< RCP< T > > buffer_ptr_t
Templated array class derived from the STL std::vector.
Array< char > charBuffer_
T *const * getBuffer() const
const Serializer< Ordinal, T > & serializer_
const Serializer< Ordinal, T > & serializer_
const Serializer< Ordinal, T > & serializer_
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
This macro is designed to be a short version of TEUCHOS_TEST_FOR_EXCEPTION() that is easier to call...
~ReferenceTypeSerializationBuffer()
Deserialize from the interal char[] buffer back to the original T*[] buffer.
ConstReferenceTypeDeserializationBuffer()