diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-23 18:48:24 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-23 18:48:24 +0100 |
commit | d8b25fe2e585634567483124a33c3b779d2516f5 (patch) | |
tree | 3b46d9fd93b443d4c27f24ba01f9f46858a60f29 /src/streams.cpp | |
parent | 5852a65e876421b118de9e76a9f83388be590690 (diff) |
implemented php output streams as was asked for in issue #51
Diffstat (limited to 'src/streams.cpp')
-rw-r--r-- | src/streams.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/streams.cpp b/src/streams.cpp new file mode 100644 index 0000000..ba6d916 --- /dev/null +++ b/src/streams.cpp @@ -0,0 +1,40 @@ +/** + * Streams.cpp + * + * Implementation of the streams + * + * @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com> + * @copyright 2014 Copernica BV + */ +#include "includes.h" + +/** + * Set up namespace + */ +namespace Php { + +/** + * Some static buffers for writing data + * @var StreamBuf + */ +static StreamBuf bufOut (0); +static StreamBuf bufError (E_ERROR); +static StreamBuf bufWarning (E_WARNING); +static StreamBuf bufNotice (E_NOTICE); +static StreamBuf bufDeprecated (E_DEPRECATED); + +/** + * Create the actual steams + * @var std::ostream + */ +std::ostream out (&bufOut); +std::ostream error (&bufError); +std::ostream warning (&bufWarning); +std::ostream notice (&bufNotice); +std::ostream deprecated (&bufDeprecated); + +/** + * End namespace + */ +} + |