Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
StructuredOutput Class Referenceabstract

#include <elm/io/StructuredOutput.h>

+ Inheritance diagram for StructuredOutput:

Public Member Functions

virtual ~StructuredOutput ()
 
virtual void write (bool x)=0
 
virtual void write (char c)=0
 
virtual void write (signed char)=0
 
virtual void write (unsigned char)=0
 
virtual void write (short x)=0
 
virtual void write (unsigned short x)=0
 
virtual void write (int x)=0
 
virtual void write (unsigned int x)=0
 
virtual void write (long x)=0
 
virtual void write (unsigned long x)=0
 
virtual void write (long long int x)=0
 
virtual void write (long long unsigned int x)=0
 
virtual void write (float x)=0
 
virtual void write (double x)=0
 
virtual void write (long double x)=0
 
virtual void write (const char *s)=0
 
virtual void write (cstring x)=0
 
virtual void write (const string &x)=0
 
void key (const char *x)
 
virtual void key (cstring x)=0
 
virtual void key (const string &x)=0
 
virtual void beginMap ()=0
 
virtual void endMap ()=0
 
virtual void beginList ()=0
 
virtual void endList ()=0
 

Detailed Description

This interface is implemented to be performed structure output, that is the output of values orgznized as:

  • base types (integer, float, boolean, string)
  • list of values
  • map of values with string keys.

Classical structured outputs encompasses JSON, XML or (INI)[https://en.wikipedia.org/wiki/INI_file].

Base types are simply written by a call to a write() function.

To write an list, perform a call to beginList(), as many call to write the items composing the list and closing is performed by calling endList().

To write a map, perform a call to beginMap() and the, for each map value,

  • perform a call to key() with key name
  • and a call to a write function with the value. The map is completed by a call to endMap().

This interface is currently implemented by:

Constructor & Destructor Documentation

◆ ~StructuredOutput()

~StructuredOutput ( )
virtual

Member Function Documentation

◆ beginList()

virtual void beginList ( )
pure virtual

Implemented in Saver.

◆ beginMap()

virtual void beginMap ( )
pure virtual

Implemented in Saver.

◆ endList()

virtual void endList ( )
pure virtual

Implemented in Saver.

◆ endMap()

virtual void endMap ( )
pure virtual

Implemented in Saver.

◆ key() [1/3]

void key ( const char *  x)
inline

◆ key() [2/3]

virtual void key ( const string x)
pure virtual

Implemented in Saver.

◆ key() [3/3]

virtual void key ( cstring  x)
pure virtual

Implemented in Saver.

◆ write() [1/18]

virtual void write ( bool  x)
pure virtual

Implemented in Saver.

◆ write() [2/18]

virtual void write ( char  c)
pure virtual

Implemented in Saver.

◆ write() [3/18]

virtual void write ( const char *  s)
pure virtual

Implemented in Saver.

◆ write() [4/18]

virtual void write ( const string x)
pure virtual

Implemented in Saver.

◆ write() [5/18]

virtual void write ( cstring  x)
pure virtual

Implemented in Saver.

◆ write() [6/18]

virtual void write ( double  x)
pure virtual

Implemented in Saver.

◆ write() [7/18]

virtual void write ( float  x)
pure virtual

Implemented in Saver.

◆ write() [8/18]

virtual void write ( int  x)
pure virtual

Implemented in Saver.

◆ write() [9/18]

virtual void write ( long double  x)
pure virtual

Implemented in Saver.

◆ write() [10/18]

virtual void write ( long long int  x)
pure virtual

Implemented in Saver.

◆ write() [11/18]

virtual void write ( long long unsigned int  x)
pure virtual

Implemented in Saver.

◆ write() [12/18]

virtual void write ( long  x)
pure virtual

Implemented in Saver.

◆ write() [13/18]

virtual void write ( short  x)
pure virtual

Implemented in Saver.

◆ write() [14/18]

virtual void write ( signed char  )
pure virtual

Implemented in Saver.

◆ write() [15/18]

virtual void write ( unsigned char  )
pure virtual

Implemented in Saver.

◆ write() [16/18]

virtual void write ( unsigned int  x)
pure virtual

Implemented in Saver.

◆ write() [17/18]

virtual void write ( unsigned long  x)
pure virtual

Implemented in Saver.

◆ write() [18/18]

virtual void write ( unsigned short  x)
pure virtual

Implemented in Saver.


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