Version 0.54 of Rudiments, the C++ class library for developing systems and applications, is now available.
There are a few bug fixes in this release, and one or two new features.
The most significant feature in this release is the addition of a url class, and incorporation of it into the XML classes.
The url class inherits from file and implements read-only access to arbitrary URL's. HTTP URL's, with basic-authentication are supported on all platforms. On Linux/Unix, if you have a modern enough version of libcurl, then Rudiments will use it and some URL's supported by libcurl will also be supported.
See the url class documentation for more info.
The url class has been integrated into the xmlsax class. So, xmlsax::parseFile() can now be passed a url, rather than just a local file. Since the xmldom class uses xmlsax, then xmldom::parseFile() can also take a url.
Other New Features
The leftTrim(), rightTrim() and bothTrim() methods of the charstring class trim all whitespace now, not just spaces.
There's a charstring::isNullOrEmpty() method now which returns true if the string is either NULL or "" and false otherwise.
The filedescriptor::read() methods which read until a specified terminator is found now have variants with a maxbytes option, which sets the maximum number of bytes that can be read before giving up if no terminator is found.
Full ChangeLog follows:
- tweaked code in configure script to remove -Werror* to be non-greedy
- updated semaphoreset/sharedmemory destructors to remove the semaphoreset/sharedmemory segment last
- added url class that uses libcurl (read-only for now)
- added support for urls to xmlsax (and thus xmldom and codetree)
- added http support to the url class for platforms that lack an appropriate libcurl
- charstring 1-argument trim methods trim all whitespace now, not just spaces
- added charstring::isNullOrEmpty()
- added read-until-terminator methods with maxbytes option
- applied George Carrette's listener class patch to not close invalid-epoll filedescriptors