stemkit-cpp - All you need to start off a C++ project.
Current version: 0.10
by Gennady Bystritsky (firstname.lastname@example.org)
This package provides various facilities helping to build C++ applications from scratch. Its API design was greatly inspired by standard Java class library, especialy collection framework (java.util
) and streams (java.io
). Its implementation, on the other hand, uses available C++ facilities like STL and standard IO libraries, often complicated, verbose or contrived to be used in their pure forms. See Direct STL use issues
for further details.
The API and implementation of stemkit-cpp is based upon a set of principles, following which has been proven to produce high quality, easy to debug code. They also help in greatly reducing possibilities of memory leaks. Those principles are:
- Using pure virtual C++ protocol classes as interfaces, implemented by public virtual inheritance. See Denoting interfaces in C++ for further details.
- Avoiding multiple inheritance by all means other than interface implementation (no more than one non-virtual inheritance). See Multiple inheritance woes for further details.
- All classes inherit (public virtual) from sk::util::Object, thus having a set of guaranteed properties and capabilities (object id, clone, inspect, etc.) See sk::util::Object as the root of a class hierarchy for further details.
- Copy constructors and
operator=() private by default, otherwise only when proven necessary.
- Methods and method parameters (references) must be declared const by default, non-const only if really necessary.
- Passing pointers means passing objects' ownership. Otherwise, object copies or references must be passed. See References vs. pointers for further details.
- Getting a pointer is immediatelly followed by placing it in a managing container (like sk::util::Holder, sk::util::ArrayList,
- The functionality is split into the following main namespaces:
- Provides collection framework. Plus utility classes for basic types.
- Provides stream classes.
- Provides network communication classes.
- Introduce classes Socket, ServerSocket, etc. (as defined in java.net).
- Provides runtime support. This includes:
- Scope centered logging and configuration
- Configuration files lookup and XML parsing
- Thread management and synchronization
- Synchronized wrappers for sk::util containers
- Object disposal with notification
- Provides OS integration support.
- Provides useful extensions for CppUnit unit testing framework. Like assertions of strings specified in any manner, with persentation of "inspected" content in diagnostics.