Elementa v8.0.0
Minimalistic library for any C++ application (C++11 and up)
Loading...
Searching...
No Matches
Serial channels

Description

Interface for sequenced binary input and output through diverse media, 
plus implementations of some particular, basic serial channels. 

The goals of this module are:

- Reusing STL streams without changes or extensions, in both directions,
from STL to Elementa (using STL channels in Elementa) and from Elementa
to STL (using Elementa serial channels in STL). In particular, these 
ones must be available as Elementa serial channels:
    - cin, cout, cerr, clog [singletons]
    - istringstream, ostringstream, 
        stringstream [strings; buffering provided through stringbuf]
    - ifstream, ofstream, fstream [files; buffering through filebuf]
    - socketstreams in C++20 [to appear, as for the date I write this]

- Add new channels not existing in STL that can be used like STL
ones in the Elementa context through polymorphism.

- Minimalizing the serial channel interface w.r.t. the one of STL.
For instance, "formatted output/input" should be provided by 
serializers, not by the very channel (STL formatted methods and 
operators (<<, >>) have also some drawbacks as serializers, such as 
the impossibility of defining several serializers for the same 
type of object). Locales have no sense either in Elementa channels, 
that are always considered "binary", nor STL channels defined with
"w"ide chars.
Collaboration diagram for Serial channels:

Modules

 Basics of serial channels
 
 Common serial channels
 
 Filters for serial channels
 
 Serializers