The C++ Portable Types Library (PTypes) is a simple alternative to the STL that includes multithreading and networking. It defines dynamic strings, character sets, variants, lists and other basic data types along with threads, synchronization primitives and IP sockets. It is portable across modern Unix and Windows systems and includes a sample HTTP daemon showing the full power of the library.
| Tags | Internet Web HTTP Servers Software Development Libraries Application Frameworks |
|---|---|
| Licenses | zlib/libpng |
| Operating Systems | Mac OS X POSIX HP-UX Solaris Linux BSD FreeBSD OS Independent Windows Windows Unix |
| Implementation | C++ |
Recent releases


Changes: Support for HP-UX/aCC was added. Several compilation problems were solved on *BSD systems and Mac OS X.


Changes: In addition to Intel and PowerPC, atomic functions (inc/dec/swap) are now implemented in the assembly language for SPARC platforms as well. More exotic platforms still use a mutex hash table in these functions. Another important improvement in this release is introduction of portable 64-bit file/stream positioning.


Changes: Several bugs have been fixed that accumulated during the past few years.


Changes: The memory corruption problem in multi-threaded applications compiled with the LinuxThreads library has been fixed. Several minor improvements and bugfixes have been made for streams and for the dynamic string class.


No changes have been submitted for this release.
- All comments
Recent commentsVery Nice Library!
In the time it took me to get Boost and ACE* compiled and usable as plugin libraries I was able to make a controlled document webserver application complete with view/update/tracking/collaboration capabilities using PTypes library that works in a diverse network environment for proof of concept.
This is definitely a library that will be a main stay in my own personal toolbox!
Chris
*I am not being critical of Boost, ACE, or STL as I have used them extensively and they are great libraries. My point is PTypes is one of the first truly plug it and go with code bases I have come across in a long time with such a gentle learning curve/functionality ratio. Awesome library.
Re: PTypes / STL comparative
>
> Has somebody done a comparative between
> PTypes and STL? It should be nice to
> see a comparative about performance and
> memory ocupation for several
> hungry-resource problems.
>
I did some tests on my FreeBSD and also on a Windows 2003 machine with MSVC. In summary, the basic operations on dynamic arrays (std::vector and pt::tpodlist) are nearly equal, but PTypes produces less binary code.
The picture with dynamic strings is different. PTypes performs better than Microsoft's string class, but it is worse than GNU.
As for memory usage, PTypes uses less memory space for strings compared to GNU, by exactly one 'int' per string (the capacity is not stored, a quantization algorithm is used instead in PTypes).
(BTW, a better place to discuss this is the project management page at SourceForge.net:
http://sourceforge.net/projects/ptypes/)
PTypes / STL comparative
Has somebody done a comparative between PTypes and STL? It should be nice to see a comparative about performance and memory ocupation for several hungry-resource problems.
Jose (http://dac.escet.urjc.es/personal/jespa) Miguel (http://dac.escet.urjc.es/personal/jespa) Espadero (http://dac.escet.urjc.es/personal/jespa)