[PPL-devel] [GIT] ppl/ppl(master): Added write functions for native types.
Abramo Bagnara
abramo.bagnara at gmail.com
Mon Mar 23 15:30:17 CET 2009
Module: ppl/ppl
Branch: master
Commit: dfdb1368ab60442e050667a72cfb1a21e6565a0c
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=dfdb1368ab60442e050667a72cfb1a21e6565a0c
Author: Abramo Bagnara <abramo.bagnara at gmail.com>
Date: Mon Mar 23 15:30:14 2009 +0100
Added write functions for native types.
---
src/c_stream.cc | 19 +++++++++++++++----
src/c_stream.h | 11 +++++++++++
2 files changed, 26 insertions(+), 4 deletions(-)
diff --git a/src/c_stream.cc b/src/c_stream.cc
index 6d8ae2b..57bd13a 100644
--- a/src/c_stream.cc
+++ b/src/c_stream.cc
@@ -92,10 +92,21 @@ int ppl_io_write_endl(struct ppl_io_ostream* s) {
return *s->stream ? 0 : -1; \
}
-DEFINE_WRITE_VAL(char, char)
-DEFINE_WRITE_VAL(int, int)
-DEFINE_WRITE_VAL(double, double)
-DEFINE_WRITE_VAL(string, char*)
+DEFINE_WRITE_VAL(char, char);
+DEFINE_WRITE_VAL(signed_char, signed char);
+DEFINE_WRITE_VAL(unsigned_char, unsigned char);
+DEFINE_WRITE_VAL(short, short);
+DEFINE_WRITE_VAL(unsigned_short, unsigned short);
+DEFINE_WRITE_VAL(int, int);
+DEFINE_WRITE_VAL(unsigned_int, unsigned int);
+DEFINE_WRITE_VAL(long, long);
+DEFINE_WRITE_VAL(unsigned_long, unsigned long);
+DEFINE_WRITE_VAL(long_long, long long);
+DEFINE_WRITE_VAL(unsigned_long_long, unsigned long long);
+DEFINE_WRITE_VAL(float, float);
+DEFINE_WRITE_VAL(double, double);
+DEFINE_WRITE_VAL(long_double, long double);
+DEFINE_WRITE_VAL(string, char*);
}
diff --git a/src/c_stream.h b/src/c_stream.h
index af6ef5a..fd33d83 100644
--- a/src/c_stream.h
+++ b/src/c_stream.h
@@ -66,6 +66,17 @@ int ppl_io_write_endl(struct ppl_io_ostream* s);
#define DECLARE_WRITE_REF(name, type) int ppl_io_write_##name(struct ppl_io_ostream* s, const type* o)
DECLARE_WRITE_VAL(char, char);
+DECLARE_WRITE_VAL(signed_char, signed char);
+DECLARE_WRITE_VAL(unsigned_char, unsigned char);
+DECLARE_WRITE_VAL(short, short);
+DECLARE_WRITE_VAL(unsigned_short, unsigned short);
DECLARE_WRITE_VAL(int, int);
+DECLARE_WRITE_VAL(unsigned_int, unsigned int);
+DECLARE_WRITE_VAL(long, long);
+DECLARE_WRITE_VAL(unsigned_long, unsigned long);
+DECLARE_WRITE_VAL(long_long, long long);
+DECLARE_WRITE_VAL(unsigned_long_long, unsigned long long);
+DECLARE_WRITE_VAL(float, float);
DECLARE_WRITE_VAL(double, double);
+DECLARE_WRITE_VAL(long_double, long double);
DECLARE_WRITE_VAL(string, char*);
More information about the PPL-devel
mailing list