Graphite  Version 3
An experimental 3D geometry processing program
OGF::GenericSerializer< T > Class Template Reference

Generic implementation of Serializer. More...

#include <OGF/gom/services/serializer.h>

Inheritance diagram for OGF::GenericSerializer< T >:
OGF::Serializer GEO::Counted

Public Member Functions

bool serialize_read (std::istream &stream, void *addr) override
 Reads a value from a stream. More...
 
bool serialize_write (std::ostream &stream, void *addr) override
 Writes a value to a stream. More...
 
- Public Member Functions inherited from OGF::Serializer
 ~Serializer () override
 Serializer destructor.
 
- Public Member Functions inherited from GEO::Counted
void ref () const
 Increments the reference count. More...
 
void unref () const
 Decrements the reference count. More...
 
bool is_shared () const
 Check if the object is shared. More...
 
int nb_refs () const
 Gets the number of references that point to this object. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from GEO::Counted
static void ref (const Counted *counted)
 Increments the reference count. More...
 
static void unref (const Counted *counted)
 Decrements the reference count. More...
 
- Protected Member Functions inherited from GEO::Counted
 Counted ()
 Creates a reference counted object. More...
 
virtual ~Counted ()
 Destroys a reference counted object. More...
 

Detailed Description

template<class T>
class OGF::GenericSerializer< T >

Generic implementation of Serializer.

Template Parameters
Ta type that has operator<< and operator>>

Definition at line 206 of file serializer.h.

Member Function Documentation

◆ serialize_read()

template<class T >
bool OGF::GenericSerializer< T >::serialize_read ( std::istream &  stream,
void *  addr 
)
inlineoverridevirtual

Reads a value from a stream.

Parameters
[in]streamthe input stream
[out]addran untyped pointer where to store the result
Return values
trueif the value could be successfully read
falseotherwise

Implements OGF::Serializer.

Definition at line 211 of file serializer.h.

◆ serialize_write()

template<class T >
bool OGF::GenericSerializer< T >::serialize_write ( std::ostream &  stream,
void *  addr 
)
inlineoverridevirtual

Writes a value to a stream.

Parameters
[out]streamthe output stream
[in]addran untyped pointer where to read the value from
Return values
trueif the value could be successfully written
falseotherwise

Implements OGF::Serializer.

Definition at line 222 of file serializer.h.


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