StormByte C++ Library 0.0.9999
StormByte is a comprehensive, cross-platform C++ library aimed at easing system programming, configuration management, logging, and database handling tasks. This library provides a unified API that abstracts away the complexities and inconsistencies of different platforms (Windows, Linux).
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
StormByte::Serializable< T > Class Template Reference

The class to serialize and deserialize data. More...

#include <serializable.hxx>

Public Member Functions

 Serializable (const DecayedT &data) noexcept
 The constructor of the Serializable class.
 
 Serializable (const Serializable &other) noexcept=delete
 The copy constructor of the Serializable class.
 
 Serializable (Serializable &&other) noexcept=delete
 The move constructor of the Serializable class.
 
 ~Serializable () noexcept=default
 The destructor of the Serializable class.
 
Serializableoperator= (const Serializable &other) noexcept=delete
 The assignment operator of the Serializable class.
 
Serializableoperator= (Serializable &&other) noexcept=delete
 The move assignment operator of the Serializable class.
 
Buffer::Simple Serialize () const noexcept
 The function to serialize the data.
 

Static Public Member Functions

static StormByte::Expected< T, Buffer::BufferOverflowDeserialize (const Buffer::Simple &data) noexcept
 The function to deserialize the data.
 
static std::size_t Size (const DecayedT &data) noexcept
 

Detailed Description

template<typename T>
class StormByte::Serializable< T >

The class to serialize and deserialize data.

Template Parameters
TThe type of the data to serialize and deserialize.

Constructor & Destructor Documentation

◆ Serializable() [1/3]

template<typename T >
StormByte::Serializable< T >::Serializable ( const DecayedT &  data)
inlinenoexcept

The constructor of the Serializable class.

Parameters
dataThe data to serialize.

◆ Serializable() [2/3]

template<typename T >
StormByte::Serializable< T >::Serializable ( const Serializable< T > &  other)
deletenoexcept

The copy constructor of the Serializable class.

Parameters
otherThe other Serializable to copy.

◆ Serializable() [3/3]

template<typename T >
StormByte::Serializable< T >::Serializable ( Serializable< T > &&  other)
deletenoexcept

The move constructor of the Serializable class.

Parameters
otherThe other Serializable to move.

Member Function Documentation

◆ Deserialize()

template<typename T >
static StormByte::Expected< T, Buffer::BufferOverflow > StormByte::Serializable< T >::Deserialize ( const Buffer::Simple data)
inlinestaticnoexcept

The function to deserialize the data.

Parameters
dataThe data to deserialize.
Returns
The deserialized data.

◆ operator=() [1/2]

template<typename T >
Serializable & StormByte::Serializable< T >::operator= ( const Serializable< T > &  other)
deletenoexcept

The assignment operator of the Serializable class.

Parameters
otherThe other Serializable to assign.
Returns
The reference to the assigned Serializable.

◆ operator=() [2/2]

template<typename T >
Serializable & StormByte::Serializable< T >::operator= ( Serializable< T > &&  other)
deletenoexcept

The move assignment operator of the Serializable class.

Parameters
otherThe other Serializable to assign.
Returns
The reference to the assigned Serializable.

◆ Serialize()

template<typename T >
Buffer::Simple StormByte::Serializable< T >::Serialize ( ) const
inlinenoexcept

The function to serialize the data.

Parameters
dataThe data to serialize.
Returns
The serialized data.

The documentation for this class was generated from the following file: