C++ Portable Types Library (PTypes)
PTypes (C++ Portable Types Library) is a simple alternative to the STL that includes multithreading and networking. It defines dynamic strings, variants, character sets, lists and other basic data types along with portable thread and synchronization objects, IP sockets and named pipes. Its main `target audience' is developers of complex network daemons, robots or non-visual client/server applications of any kind.
PTypes defines simple and intuitive interfaces. It differs from the STL in very moderate use of templates. The library is portable across many modern operating systems (currently FreeBSD, Linux, SunOS, MacOS X and Windows). All platform-dependent issues are hidden inside. A simple web server called wshare is included in the package to demonstrate the full power of the library.
PTypes is a free library and is covered by a simple license known as "zlib/libpng License". It grants full freedom to use the library for commercial, educational or any other purpose except that you can not change its name and/or the copyright notice and redistribute it as your own work.
The latest source code and both on-line and out-of-line documentation can be found at:
PTypes is constantly developing. You can receive announcements about new releases through Freshmeat.Net:
WHY USE PTYPES?
PTypes is yet another generic class library among tens and hundreds of others. To find its own niche in this variety of generic programming tools we decided to emphasis on simplicity of the interfaces and readability of the resulting code (i.e. the code that uses the library). The library focuses only on most widely used data types and functional interfaces. We think that like programming languages themselves, low-level libraries, too, should use the minimal set of notions for covering most programming patterns.
Some data types in the library (strings, character sets and variants) use algebraic notation rather than object-oriented, i.e. you write length(s) for a string object instead of s.length(). We believe that traditional notation better fits to a class that represents some fundamental notion and is not supposed to produce subclasses with overridden methods. In other words, if there is no inheritance and polymorphism, there is no need for method calls as well.
PTypes uses old-fashioned all-lowercase naming style, since it can peacefully co-exist with other styles in one program. Whether you are a `unixoid' or you are using modern writing styles (Hungarian, Borland, etc.) you can combine your favorite style with PTypes with no or very little harm to your source code.
And finally, in order to achieve better readability of the resulting code we use clean class naming, i.e. the string type is called string, thread is thread, etc.
We designed this library in the hope that PTypes with its conciseness and intuitiveness could find its own 'target audience'.
Release 2.0
In this release container classes/templates have been completely redesigned. (See Introduction to lists) As an alternative to std::vector PTypes now offers 2 separate templates, tpodlist and tobjlist, which were specifically designed to eliminate the template 'code bloat' problem and to perform dynamic array reallocations in the most efficient way. A limitation for element types that existed in the previous versions (must be derived from 'unknown') is no longer in effect. The old interfaces for lists are preserved for backward compatibility.
This release also features Cygwin port, a standard installation procedure for UNIX ('make install'), improvements in the jobqueue and msgqueue classes, several other minor improvements and bug fixes. Please, see the change log for details:
http://www.melikyan.com/ptypes/doc/changes.html
Re: How to contribute
Hovik, We will send an invitation to join to the OSA community (over 200 members). Do you think NOW is a good time to do it, or it would be better to announce after the holydays? Alternatively, we can organize a group, which will work on the PTypes project under your supervision as it's done in some of other OSA projects.
Since 2001 the library has received substantial contributions from many of its users, including open-source enthusiasts and proprietary software developers. While the main developers control the overall architecture, enerally any user of ANY open-source library has the right to shape it.
So.. would any Armenian join us finally? ;)
An immediate to-do plan is available in the CVS repository (not included in the distribution). A general list of feature requests received from users is available here:
http://sourceforge.net/tracker/?atid=479027&group_id=56008&func=browse