New C++ library project

I’ve decided that I’m starting a new c++ library project instead of a 2nd version of AXCEL. It’s called CodeTherapy and is hosted at github:

It’s currently undergoing development. But you can watch my progress as I upload and modify source files to the repo.

The stream classes will be redesigned. Instead of having pure virtual functions in the stream classes, they will be virtual functions with a default behavior of failing and setting the last error associated with the object to ENOTSUP (Not supported). Derived classes of stream will have to at least implement getc or putc member functions while functions like seek, tell, flush, peek, and sync will be optional to implement. The programmer then can override readable, writable, seekable, buffered, and peekable boolean functions which specify which set of optional functions are supported.

The string and bytes classes will be integrated with the STL.

My goal is to have the library handle code like this:

stream s = fopen("foo.txt", "w");
s.puts("hello world!");
lnstream s = tcp::connect("", "80");
s << "GET " << resource << " HTTP/1.1\r\nHost:\r\n\r\n";
string header = s.drink("\r\n\r\n");

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: