Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++ wrapper for posix and linux specific functions [closed]

Do you know about any good library wrapping posix and linux functions and structures ( eg. sockets or file descriptors ) into C++ classes? For example I'm thinking about a base FileDescriptor class and some inheriting classes ( unix sockets etc ) with methods like write, read or even some syscalls ( sendfile, splice ) - all throwing exceptions instead of setting errno. Or some shared memory class etc.

I can't seem to find anything like that and by now I consider writing it myself, as I often have to write a C++ app for linux and either use C functions ( painful error checking ), or wrap them myself every time.

---EDIT---

Well neither QT nor Boost will compile on the system, we're using - it's a small linux kernel based on 2.4.29 installed on embedded computers.

like image 724
zbigh Avatar asked Mar 30 '10 09:03

zbigh


2 Answers

Well, not exactly a wrapper, but Boost has a library for everything, and supports all major platforms.

like image 187
Björn Pollex Avatar answered Nov 04 '22 15:11

Björn Pollex


Boost has a number of portable interfaces for some of the things you need e.g. Boost.Interprocess or Boost.Asio.

like image 22
TheJuice Avatar answered Nov 04 '22 15:11

TheJuice