TrigSteeringEvent::StringSerializer Class Reference

Utility class (not a tool or so) to serialize strings into stream of 32bit integers. More...

#include <StringSerializer.h>

List of all members.

Public Member Functions

void serialize (const std::vector< std::string > &strings, std::vector< uint32_t > &storage)
void serialize (const std::string &str, std::vector< uint32_t > &storage)
std::size_t deserialize (std::vector< uint32_t >::const_iterator first, std::vector< uint32_t >::const_iterator last, std::vector< std::string > &strings)
std::size_t deserialize (const std::vector< uint32_t > &storage, std::vector< std::string > &strings)
 Same as above but with vector instead of iterators.
std::size_t deserialize (std::vector< uint32_t >::const_iterator first, std::vector< uint32_t >::const_iterator last, std::string &str)
 Deserialize one single string.
std::size_t deserialize (const std::vector< uint32_t > &storage, std::string &str)
 Deserialize one single string.
unsigned int inquireSize (const std::vector< uint32_t > &storage)

Detailed Description

Utility class (not a tool or so) to serialize strings into stream of 32bit integers.


Member Function Documentation

std::size_t TrigSteeringEvent::StringSerializer::deserialize ( std::vector< uint32_t >::const_iterator  first,
std::vector< uint32_t >::const_iterator  last,
std::vector< std::string > &  strings 
)

Deserialize vector into strings

Parameters:
first Beginning of 'byte-stream'
last End of 'byte-stream', i.e. vector::end()
strings Vector of strings to hold result
Returns:
Number of words consumed during deserialization
unsigned int TrigSteeringEvent::StringSerializer::inquireSize ( const std::vector< uint32_t > &  storage  ) 

Return number of strings serialized into 'storage'

void TrigSteeringEvent::StringSerializer::serialize ( const std::vector< std::string > &  strings,
std::vector< uint32_t > &  storage 
)

Serializes vector of strings into vector of integers

The number of strings (size of input vector) is put first into the stream. In case the strings is an empty vector the 0 is put into the storage.

Parameters:
strings 
storage is place where serizlized from of stings is appended to

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1