incu or ++Unix
Posted 2000-12-19 12:00. Tagged project, c++.
Unix facilities for C++ programmers
The aim of ++Unix is to allow C++ programs to use Unix facilities, such as sockets, whose interface includes a lot of pointers and other low-level stuff, and might vary on different kinds of Unix, in a nice, simple and consistent way.
One of the goals:
There should be no need for preprocessor conditionals (
than as include guards in a C++ programs that uses ++Unix.
Stream out to syslog as simply as to any ostream. Almost.
A pipe created in an object. Really just a constructor / destructor pair for convenience.
Some classes to help out in using sockets. A client looks basically like this:
incu::SockaddrIn addr; addr..; incu::Socket ; socket.; ifstream ; ofstream ;
Contains the classes
TimeVal, which is just a constructor for
struct timeval, and
Time which works like a time_t, but more
The following will print the current time in a user-friendly format:
cout << "Time is " << << endl;
Mainly used by the other parts of incu, a
c_error is thrown when
something goes wrong the