simgear/simgear
Florent Rougon b01bd93a20 Add CharArrayStreambuf and related IOStreams classes for working with char arrays
Add the following classes in the 'simgear' namespace:
  - CharArrayStreambuf    subclass of std::streambuf      stream buffer
  - ROCharArrayStreambuf  subclass of CharArrayStreambuf  stream buffer
  - CharArrayIStream      subclass of std::istream        input stream
  - CharArrayOStream      subclass of std::ostream        output stream
  - CharArrayIOStream     subclass of std::iostream       input/output stream

CharArrayStreambuf is a stream buffer class allowing to read from, and
write to char arrays (std::strstream has been deprecated since C++98).
Contrary to std::strstream, this class does no dynamic allocation: it is
very simple, strictly staying for both reads and writes within the
limits of the buffer specified in the constructor. Contrary to
std::stringstream, CharArrayStreambuf allows one to work on an array of
char (that could be static data or on the stack) without having to make
a whole copy of it.

CharArrayStreambuf supports reading and writing (including efficient
implementations of xsgetn() and xsputn()), seeking (with independent
read and write stream pointers, as for std::stringstream) and putting
back chars up to the beginning of the char array. The internal buffer
for both reads and writes is defined to be the whole buffer specified in
the constructor call. As a consequence, flushing the stream buffer with
pubsync() is useless: data is always written directly to the buffer
passed to the constructor, never to an intermediate buffer.

Of course, this buffer must remain available as long as the stream
buffer object is used.

ROCharArrayStreambuf is a read-only subclass of CharArrayStreambuf.
CharArrayIStream, CharArrayOStream and CharArrayIOStream are very simple
convenience stream classes using either CharArrayStreambuf or
ROCharArrayStreambuf as their stream buffer class.
2017-06-10 09:45:15 +02:00
..
bucket Rename the COMPARE, COMPARE_EP, COMPARE_EP2 and VERIFY test macros 2016-12-04 21:04:40 +01:00
bvh Ensure <simgear_config.h> is always included. 2017-03-28 09:36:53 +01:00
canvas OSG 3.5.x support 2017-03-30 03:58:27 +02:00
debug Add logging support for hexdumps 2017-04-02 17:56:31 +02:00
environment alternative terrain engine - SGMesh utilizing pagedLOD 2017-02-25 19:17:55 -05:00
ephemeris Ensure <simgear_config.h> is always included. 2017-03-28 09:36:53 +01:00
hla Replace auto_ptr with unique_ptr 2016-12-07 11:03:49 +01:00
io Add CharArrayStreambuf and related IOStreams classes for working with char arrays 2017-06-10 09:45:15 +02:00
magvar chance the WMM epic form 1 jan 2005 to 1 jan 2015 2015-09-02 10:37:01 +02:00
math Fix (hopefully) sim4_t class initialization problems 2017-04-27 14:54:21 +02:00
misc Change license from GPL2+ to LGPL2.0+ for the SimGear files I wrote 2017-05-10 17:03:50 +02:00
nasal Replace auto_ptr with unique_ptr 2016-12-07 11:03:49 +01:00
package Define SG_DEPRECATED, remove unused DEPRECATED. 2017-04-05 22:09:52 +09:00
props Ensure <simgear_config.h> is always included. 2017-03-28 09:36:53 +01:00
scene Remove the last traces of enhanced lighting support 2017-06-04 16:51:27 +02:00
screen Remove jpeg-factory. 2014-01-27 09:19:11 +00:00
serial Ensure <simgear_config.h> is always included. 2017-03-28 09:36:53 +01:00
sound Fix a bug when using properties instead of a fixed position 2017-05-17 08:28:01 +02:00
structure Ensure <simgear_config.h> is always included. 2017-03-28 09:36:53 +01:00
threads Lots of (mostly) doxygen fixes/cleanup. 2014-08-01 00:13:25 +02:00
timing Remove sgGMTime, no longer used. 2017-03-17 23:25:25 +00:00
xml Move IOStreams-related files to simgear/io/iostreams; rename zfstream.[ch]xx to gzfstream.[ch]xx 2017-02-12 21:18:52 +01:00
.gitignore Remove obsolete ignore pattern for automake generated headers. 2012-02-17 23:46:06 +01:00
CMakeLists.txt Zlib is a public, not private include in Simgear. 2016-11-14 07:31:54 +01:00
compiler.h Define SG_DEPRECATED, remove unused DEPRECATED. 2017-04-05 22:09:52 +09:00
constants.h Add STG verbs for building mesh integration. 2016-09-22 20:38:58 +01:00
sg_inlines.h Macro to disable the copy-constructor. 2012-09-24 23:18:57 +01:00
simgear_config_cmake.h.in alternative terrain engine - SGMesh utilizing pagedLOD 2017-02-25 19:17:55 -05:00
version.h.in Fix rpmlint/Linux packager complaints 2012-05-05 00:30:16 +02:00