Anklang 0.3.0-460-gc4ef46ba
ASE — Anklang Sound Engine (C++)

« « « Anklang Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
Ase::Writ Class Reference

Document containing all information needed to serialize and deserialize a Value. More...

#include "serialize.hh"

Public Types

enum  Flags {
  NONE , RELAXED , SKIP_ZERO , SKIP_EMPTYSTRING ,
  SKIP_DEFAULTS
}
 

Public Member Functions

 Writ (Flags flags=Flags(0))
 
template<class T >
void save (T &source)
 
template<class T >
bool load (T &target)
 
String to_json ()
 
bool from_json (const String &jsonstring)
 
bool in_load () const
 Return true during deserialization.
 
bool in_save () const
 Return true during serialization.
 

Static Public Member Functions

static void blank_enum (const String &enumname)
 
static void not_serializable (const String &classname)
 
static bool typedata_is_loadable (const StringS &typedata, const String &fieldname)
 Check for the writable and storage flags in the hints field of typedata.
 
static bool typedata_is_storable (const StringS &typedata, const String &fieldname)
 Check for the readable and storage flags in the hints field of typedata.
 
static bool typedata_find_minimum (const StringS &typedata, const std::string &fieldname, long double *limit)
 Find the minimum value for field of typedata.
 
static bool typedata_find_maximum (const StringS &typedata, const std::string &fieldname, long double *limit)
 Find the maximum value for field of typedata.
 

Friends

class WritNode
 
Flags operator| (Flags a, Flags b)
 

Detailed Description

Document containing all information needed to serialize and deserialize a Value.

Definition at line 71 of file serialize.hh.

Member Enumeration Documentation

◆ Flags

enum Ase::Writ::Flags

Definition at line 94 of file serialize.hh.

Constructor & Destructor Documentation

◆ Writ()

Ase::Writ::Writ ( Flags  flags = Flags (0))
explicit

Definition at line 29 of file serialize.cc.

Member Function Documentation

◆ blank_enum()

void Ase::Writ::blank_enum ( const String enumname)
static

Definition at line 110 of file serialize.cc.

◆ from_json()

bool Ase::Writ::from_json ( const String jsonstring)

Definition at line 87 of file serialize.cc.

◆ in_load()

bool Ase::Writ::in_load ( ) const

Return true during deserialization.

Definition at line 101 of file serialize.hh.

Referenced by Ase::WritNode::in_load().

◆ in_save()

bool Ase::Writ::in_save ( ) const

Return true during serialization.

Definition at line 102 of file serialize.hh.

Referenced by Ase::WritNode::in_save().

◆ load()

template<class T >
bool Ase::Writ::load ( T &  target)

Definition at line 153 of file serialize.hh.

◆ not_serializable()

void Ase::Writ::not_serializable ( const String classname)
static

Definition at line 116 of file serialize.cc.

◆ save()

template<class T >
void Ase::Writ::save ( T &  source)

Definition at line 138 of file serialize.hh.

◆ to_json()

String Ase::Writ::to_json ( )

Definition at line 61 of file serialize.cc.

◆ typedata_find_maximum()

bool Ase::Writ::typedata_find_maximum ( const StringS typedata,
const std::string fieldname,
long double limit 
)
static

Find the maximum value for field of typedata.

Definition at line 147 of file serialize.cc.

References std::string::empty(), std::vector::empty(), and return_unless.

◆ typedata_find_minimum()

bool Ase::Writ::typedata_find_minimum ( const StringS typedata,
const std::string fieldname,
long double limit 
)
static

Find the minimum value for field of typedata.

Definition at line 139 of file serialize.cc.

References std::string::empty(), std::vector::empty(), and return_unless.

◆ typedata_is_loadable()

bool Ase::Writ::typedata_is_loadable ( const StringS typedata,
const String fieldname 
)
static

Check for the writable and storage flags in the hints field of typedata.

Definition at line 123 of file serialize.cc.

References std::string::empty(), std::vector::empty(), and return_unless.

◆ typedata_is_storable()

bool Ase::Writ::typedata_is_storable ( const StringS typedata,
const String fieldname 
)
static

Check for the readable and storage flags in the hints field of typedata.

Definition at line 131 of file serialize.cc.

References std::string::empty(), std::vector::empty(), and return_unless.

Friends And Related Symbol Documentation

◆ operator|

Flags operator| ( Flags  a,
Flags  b 
)
friend

Definition at line 95 of file serialize.hh.

◆ WritNode

friend class WritNode
friend

Definition at line 92 of file serialize.hh.


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