From 99159a976421397fb12273b75523247e0cfe7bd3 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Mon, 17 Feb 2020 21:10:11 +0100 Subject: [PATCH] reverted to hand-edited single lib header --- libscio.hpp | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 libscio.hpp diff --git a/libscio.hpp b/libscio.hpp new file mode 100644 index 0000000..fd0b597 --- /dev/null +++ b/libscio.hpp @@ -0,0 +1,51 @@ +// +// libscio.hpp +// libscio +// +// Created by Bob Polis at 2020-02-14 +// Copyright (c) 2020 SwiftCoder. All rights reserved. +// + +#ifndef _libscio_H_ +#define _libscio_H_ + +#include +#include +#include + +namespace sc { + + namespace io { + + class fdoutbuf: public std::streambuf { + public: + fdoutbuf(int fd): _fd(fd) {} + + private: + int _fd; + + int_type overflow(int_type c) override; + std::streamsize xsputn(const char* s, std::streamsize num) override; + }; + + class fdostream : public std::ostream { + public: + fdostream(int fd) : std::ostream(&_buf), _buf(fd) {} + + private: + fdoutbuf _buf; + }; + + class fdinbuf : public std::streambuf { + + }; + + class fdistream : public std::istream { + + }; + + } + +} + +#endif // _libscio_H_