You are here: cpcc - Cross Platform C++ classes
cpcc - Cross Platform C++ classes
cpcc library - cross platform C++ classes
[Download] the cpcc library source code from the repository
Price: $0.00
cpcc is a minimal library of C++ classes.
Amongst others, it contains:
- a portable file system class a path helper class - allows manipulation of file paths
- a screensaver interface class
- a persistent settings class (similar to INI files)
- a portable color class
- a window class with simple drawing functions
- a time counter class a
- self-test class (allows you to run tests against your code, with minimal programming overhead). Every class can contain its self-test code, which is executed without extra tools of unit-testing libraries.
Operating systems:
- Windows,
- OSX
- (more to come)
Features:
- Small enough; can be easily included in your projects
- No need to precompile it. Compile it with your code while building your program
Indicative classes:
Class | Depends on | Description |
cpcc_SelfTest | A MACRO that allows you to call selfTest() functions of your C++ classes. Most C++ classes in the cpcc library contain a static selfTest() function, inside which self-test code is written that runs specific test scenarios and uses the ASSERT() function to flag errors. There is a global switch to turn OFF all selftests. Otherwise, your code is always tests and changes that result to bugs are immediately spotted. |
|
cpccColorT<T> cpccColor |
cpccTypes | A C++ color class, containing also conversion from/to routines for other color types: COLORREF, NSColor, CGColor |
cpccScreenSaverInterface cpccScreenSaverAbstract cpccScreenSaveLibWin_OsInterface app.cpccScreenSaveLibMac_OsInterface |
cpccWindowBase cpccTimeCounter cpccLog cpccApp |
Classes to create a cross platform screensaver for Windows and OSX. You will only need to subclass the cpccScreenSaverAbstract. |
cpccInstanceCounterPattern | Abstract base class to perform instance counting. Counts how many objects of a specific class were created. Special functions onFirstCreate(), onLastDestroy can be overwritten to allow children classes perform initialization/finalisation. |
|
cpccListenerPattern | cpccUnicodeSupport | |
cpccNumberWithBounds<T> cpccFloat0_1 |
A class to store and manipulate number that have a range, like the float color components that have a range of 0.0 to 1.0. The class guaranties that you will never get a number that is out of its limits. | |
cpccSettings | cpccUnicodeSupport cpcc_SelfTest |
A small and portable (cross platform) C++ class to save/load application settings from an INI-like file. |
cpccStackWithDefault<T> | The usual stack but with a default value. You get the default value if you have not pushed other values in. In cpcc this is used in the drawing tool styles, where there is a default color, fontname, fontsize, etc, but you can also push/pop your specific styles when drawing specific areas. |
|
cpccTimeCounter | Cross platform C++ time interval counter | |
cpccCss cpccProperty<T> |
cpccColor cpccUnicodeSupport |
A CSS like class to hold some drawing styles and parameters. |
cpccDrawingToolsAbstract<TdrawContext, TRect> | Abstract C++ class for gathering the various native drawing functions under one roof. | |
cpccDrawingToolsCGContext cpccDrawingToolsNSBitmapImageRep cpccDrawingToolsWinDC |
Drawing tools for CGContext, NSBitmapImageRep |
|
cpccImageBase cpccImageWin cpccImageMac cpccImage |
Image loading and drawing classes for windows and MAC | |
cpccWindowBase cpccWindowMac cpccWindowWin cpccWindow |
Window drawing classes for windows and MAC | |
cpccFileSystemMini cpccPathHelper |
cpccUnicodeSupport cpcc_SelfTest |
A small and portable (cross platform) C++ class with basic file system functions. Simply add the .h and the .cpp files in your application. |
cpccLog | cpccUnicodeSupport cpccFileSystemMini cpccPathHelper |
A file logging class for log events of Info, Warning, Error. Automatically finds the proper filename and folder to store the log file. |
cpccRandom | Class to generate random numbers. Automatically initializes itself. |
|
cpccVector<T, DIM> | cpccRandom cpcc_SelfTest |
A vector class with all the convenience functions (add, multiply, randomise, length, etc) |
cpccRect<T> | cpccVectorTypes | Rectangle class with conversions to native gui rectangles like RECT and NSRect |
Diagrams:
Class diagram of the cross platform screensaver classes. They take the window handler supplied by the operating system and pass it to an abstract screensaver class from which your own screensaver class must derive.
Class diagram of the cross platform "window" classes
(click on image to enlarge)
Class diagram of the cross platform image classes
(click on image to enlarge)
Class diagram of the cross platform "mini file system" classes
(click on image to enlarge)
Comments
web admin
Sat, 05/27/2017 - 11:46
Permalink
This library can be used in
This library can be used in cross platform screen savers. Our StarMessage cross platform screensaver (for Mac and Windows) is one example.
Add new comment