vOS Library |
|||
|
vOS is a C++ library for providing common and simple functionality, and is released under the LGPL. RationaleWhile writing the vGUI library, I found myself adding some modules that were necessary for supporting multiple platforms, but which were not really related to writing GUI-based applications. I wanted to keep the library as clean as possible, so I separated these lower-level functions out into another library, which I called vOS, which is short for 'Virtual Operating System'. vOS can be used on its own to write portable command-line programs, or used with another library such as vGUI to write GUI-based programs. vOS essentially serves to standardise on certain common low-level constructs which are either handled differently on different platforms, or which are handled in the same way, but where I found the standard API for doing so annoying. For example, it always annoys me that the standard C function call fopen() opens files in 'text mode' by default, and does CR/LF translation. I have so far been caught out 3 times by this idiosyncrasy while dealing with binary data files in my programming career - therefore my File class always opens files in binary mode by default - you have to ask for special text processing features when you open the file. Library OverviewAs a quick overview, here are the facilities that vOS provides:
Obviously some of this functionality is not strictly necessary in a portability layer, but is just in there as I didn't have anywhere else to put it at the time, so I just put it in vOS. An example of this is the ZIP file support, which is actually almost 100% portable, as it just uses the vOS File handling classes and Endian macros to do all the work. Yes, vOS has its own String class. I really wanted to just use the standard
C++ string class, but it has an API from hell, and is cumbersome to use - or at
least it was when I tried to use it. It's a bit too STL'd up for my liking, with
its reliance on iterator semantics, which makes a string processing code hard
to read (in my opinion). Also, the standard string class is quite minimal, and
I think that a string class is one of the few classes that should really have a
'kitchen-sink' interface, so you don't have to keep writing your own little
extra string functions.
Platforms: Windows License: LGPL Copyright: Tim Browse, 2002 Status: Completeness: 8/10, Reliability: 9/10 Installation: See the Library page.
Version HistoryVersion 1.02 - 03/08/2002
Version 1.01 - 03/08/2002
Version 1.00 - 14/07/2002
|