reverted to hand-edited single lib header

This commit is contained in:
Bob Polis 2020-02-17 21:10:11 +01:00
parent 4db3e6995c
commit 99159a9764

51
libscio.hpp Normal file
View File

@ -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 <iostream>
#include <streambuf>
#include <cstdio>
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_