As you may or may not have noticed, this release marks a change in name of the Capsule library to GlobalSentry. I made this change to help differentiate the project from the vast selection of other libraries it might seem a duplication of. This library is headed in the direction of specialization for multi-threaded data access control on a wide range of systems, although it serves (and will continue to serve) useful purposes far beyond that.... read more
The Capsule library is a C++ template library used to protect centralized program data from abuse by various program units which use it. It provides the storage and access controls necessary for the using program to enforce modular use of that data by preventing normal functions from accessing it.
This release contains a complete superficial revision of code to standardize class and function names. Incidentally, I've also rearranged the header structure, added several safety fixes, and restructured a few classes.... read more
The Capsule Library is a portable C++ template library used to encapsulate C++ objects. This allows objects to be passed as pointers or copied without allowing access along the way. Access to the encapsulated objects is restricted to objects derived for that specific purpose, forcing modular (instead of procedural) use of those objects.
The major addition to the Capsule Library for 1.1 is the addition of a new capsule class. This class allows the using program to derive a new class from a capsule itself so that the object can be fully accessed at the point of creation, but can still be passed to another process as encapsulated data. The programmer's class is derived from this capsule class at the point they implement an abstract interface, making the overall interface type of the capsule the abstract class. This allows the programmer to create various self-containing classes using the same interface, which will all be accessible at the point of creation and can be passed as encapsulated objects to other processes.... read more
I just released the second update to the Capsule lib. This update contains one very small (yet significant) change; I've added an include for the 'memory' header. I overlooked this earlier since I've been testing with the STL and haven't run into a situation where I used the lib without it until now (most STL headers include this header). Thanks for your support.
I've just posted an updated version of the Capsule library. This release contains only code improvements. Thanks for your interest.
I've posted the initial release of the Capsule library. This is a series of basic classes that enclose objects and data in "capsules" to protect them from modification. The capsules can be copied with the objects contained in them, but the objects cannot be accessed except by accessors which are designed for that purpose. This allows you to essentially "privatize" a normal object without having to redesign its class to have a private interface, and without having to wrap it as a private data member of another class. The library has a "dynamic" capsule which allows enclosing polymorphic types of objects. All of the capsules can be copied dynamically (i.e. new) or to a location (i.e. in-place new). When copied, the capsule and the enclosed object are both duplicated, regardless of if the enclosed object is a polymorphic type. Because these are fairly simple concepts, I don't plan to make significant changes to this lib in the future. Thanks for checking it out!