NGL  6.5
The NCCA Graphics Library
ngl::AbstractSerializer Class Referenceabstract

an abstract base clase for all serialization in NGL More...

#include <AbstractSerializer.h>

+ Collaboration diagram for ngl::AbstractSerializer:

Public Types

enum  ACCESSMODE { READ, WRITE }
 

Public Member Functions

 AbstractSerializer (const std::string &_fname, ACCESSMODE _mode) noexcept
 ctor, uses RAII to open the file, flag indicates if we have read or write mode More...
 
virtual ~AbstractSerializer () noexcept
 dtor will close the file More...
 
virtual void read (AABB &_s) noexcept=0
 read from an AABB must be overriden in child More...
 
virtual void write (const AABB &_s) noexcept=0
 write from an AABB must be overriden in child More...
 
virtual void read (BBox &_s) noexcept=0
 read from an BBox must be overriden in child More...
 
virtual void write (const BBox &_s) noexcept=0
 write from an BBox must be overriden in child More...
 
virtual void read (BezierCurve &_s) noexcept=0
 read from an BezierCurve must be overriden in child More...
 
virtual void write (const BezierCurve &_s) noexcept=0
 write from an BezierCurve must be overriden in child More...
 
virtual void read (Camera &_s) noexcept=0
 read from an Camera must be overriden in child More...
 
virtual void write (const Camera &_s) noexcept=0
 write from an Camera must be overriden in child More...
 
virtual void read (Colour &_s) noexcept=0
 read from an Colour must be overriden in child More...
 
virtual void write (const Colour &_s) noexcept=0
 write from an Colour must be overriden in child More...
 
virtual void read (Light &_s) noexcept=0
 read from an Light must be overriden in child More...
 
virtual void write (const Light &_s) noexcept=0
 write from an Light must be overriden in child More...
 
virtual void read (Mat3 &_s) noexcept=0
 read from an Mat3 must be overriden in child More...
 
virtual void write (const Mat3 &_s) noexcept=0
 write from an Mat3 must be overriden in child More...
 
virtual void read (Mat4 &_s) noexcept=0
 read from an Mat4 must be overriden in child More...
 
virtual void write (const Mat4 &_s) noexcept=0
 write from an Mat4 must be overriden in child More...
 
virtual void read (Material &_s) noexcept=0
 read from an Material must be overriden in child More...
 
virtual void write (const Material &_s) noexcept=0
 write from an Material must be overriden in child More...
 
virtual void read (PathCamera &_s) noexcept=0
 read from an PathCamera must be overriden in child More...
 
virtual void write (const PathCamera &_s) noexcept=0
 write from an PathCamera must be overriden in child More...
 
virtual void read (Plane &_s) noexcept=0
 read from an Plane must be overriden in child More...
 
virtual void write (const Plane &_s) noexcept=0
 write from an Plane must be overriden in child More...
 
virtual void read (Quaternion &_s) noexcept=0
 read from an Quaternion must be overriden in child More...
 
virtual void write (const Quaternion &_s) noexcept=0
 write from an Quaternion must be overriden in child More...
 
virtual void read (SpotLight &_s) noexcept=0
 read from an SpotLight must be overriden in child More...
 
virtual void write (const SpotLight &_s) noexcept=0
 write from an SpotLight must be overriden in child More...
 
virtual void read (Transformation &_s) noexcept=0
 read from an Transformation must be overriden in child More...
 
virtual void write (const Transformation &_s) noexcept=0
 write from an Transformation must be overriden in child More...
 
virtual void read (Vec2 &_s) noexcept=0
 read from an Vec2 must be overriden in child More...
 
virtual void write (const Vec2 &_s) noexcept=0
 write from an Vec2 must be overriden in child More...
 
virtual void read (Vec3 &_s) noexcept=0
 read from an Vec3 must be overriden in child More...
 
virtual void write (const Vec3 &_s) noexcept=0
 write from an Vec3 must be overriden in child More...
 
virtual void read (Vec4 &_s) noexcept=0
 read from an Vec4 must be overriden in child More...
 
virtual void write (const Vec4 &_s) noexcept=0
 write from an Vec4 must be overriden in child More...
 

Private Member Functions

 AbstractSerializer (const AbstractSerializer &)=delete
 make sure we can't copy this class; More...
 
AbstractSerializeroperator= (const AbstractSerializer &)=delete
 make sure we can't copy this class; More...
 

Detailed Description

an abstract base clase for all serialization in NGL

XML serialization in NGL.

Author
Jonathan Macey
Version
1.0
Date
11/11/13

Definition at line 57 of file AbstractSerializer.h.

Member Enumeration Documentation

Enumerator
READ 
WRITE 

Definition at line 61 of file AbstractSerializer.h.

Constructor & Destructor Documentation

ngl::AbstractSerializer::AbstractSerializer ( const std::string _fname,
ACCESSMODE  _mode 
)
noexcept

ctor, uses RAII to open the file, flag indicates if we have read or write mode

Parameters
[in]&_fnamethe name of file to serialize

Definition at line 7 of file AbstractSerializer.cpp.

References NGL_UNUSED.

ngl::AbstractSerializer::~AbstractSerializer ( )
virtualnoexcept

dtor will close the file

Definition at line 13 of file AbstractSerializer.cpp.

ngl::AbstractSerializer::AbstractSerializer ( const AbstractSerializer )
privatedelete

make sure we can't copy this class;

Member Function Documentation

AbstractSerializer& ngl::AbstractSerializer::operator= ( const AbstractSerializer )
privatedelete

make sure we can't copy this class;

virtual void ngl::AbstractSerializer::read ( AABB _s)
pure virtualnoexcept

read from an AABB must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( BBox _s)
pure virtualnoexcept

read from an BBox must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( BezierCurve _s)
pure virtualnoexcept

read from an BezierCurve must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( Camera _s)
pure virtualnoexcept

read from an Camera must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( Colour _s)
pure virtualnoexcept

read from an Colour must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( Light _s)
pure virtualnoexcept

read from an Light must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( Mat3 _s)
pure virtualnoexcept

read from an Mat3 must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( Mat4 _s)
pure virtualnoexcept

read from an Mat4 must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( Material &  _s)
pure virtualnoexcept

read from an Material must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( PathCamera _s)
pure virtualnoexcept

read from an PathCamera must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( Plane _s)
pure virtualnoexcept

read from an Plane must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( Quaternion _s)
pure virtualnoexcept

read from an Quaternion must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( SpotLight _s)
pure virtualnoexcept

read from an SpotLight must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( Transformation _s)
pure virtualnoexcept

read from an Transformation must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( Vec2 _s)
pure virtualnoexcept

read from an Vec2 must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( Vec3 _s)
pure virtualnoexcept

read from an Vec3 must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::read ( Vec4 _s)
pure virtualnoexcept

read from an Vec4 must be overriden in child

Parameters
[in,out]_sthe element to read
virtual void ngl::AbstractSerializer::write ( const AABB _s)
pure virtualnoexcept

write from an AABB must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const BBox _s)
pure virtualnoexcept

write from an BBox must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const BezierCurve _s)
pure virtualnoexcept

write from an BezierCurve must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const Camera _s)
pure virtualnoexcept

write from an Camera must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const Colour _s)
pure virtualnoexcept

write from an Colour must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const Light _s)
pure virtualnoexcept

write from an Light must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const Mat3 _s)
pure virtualnoexcept

write from an Mat3 must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const Mat4 _s)
pure virtualnoexcept

write from an Mat4 must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const Material &  _s)
pure virtualnoexcept

write from an Material must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const PathCamera _s)
pure virtualnoexcept

write from an PathCamera must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const Plane _s)
pure virtualnoexcept

write from an Plane must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const Quaternion _s)
pure virtualnoexcept

write from an Quaternion must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const SpotLight _s)
pure virtualnoexcept

write from an SpotLight must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const Transformation _s)
pure virtualnoexcept

write from an Transformation must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const Vec2 _s)
pure virtualnoexcept

write from an Vec2 must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const Vec3 _s)
pure virtualnoexcept

write from an Vec3 must be overriden in child

Parameters
[in]_sthe element to write
virtual void ngl::AbstractSerializer::write ( const Vec4 _s)
pure virtualnoexcept

write from an Vec4 must be overriden in child

Parameters
[in]_sthe element to write

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