CopperSpice Defined

CopperSpice is a set of cross platform libraries for C++. The following sections describe some of the philosophy behind the development of CopperSpice and its long term goals.

Library versus Framework

The basic definition of a library is essentially a set of classes or functions you call from your application. The reason developers find libraries so valuable is they add features which are not in the base language. Library functionality is normally maintained by someone other than the application developer.

In C++ the STL is a library which is maintained by the C++ standards committee and is not updated very often. Boost is a set of libraries which are contributed by a large number of people. The committee for Boost tries to set guidelines but each library is independently managed. Updates are at the discretion of the library developer.

All the functionality in a library is at the same level of abstraction. A class in CopperSpice like QString (similar to std::string) operates at a low level and the methods are written to modify or query the given data. The entire QString class operates at the same level of abstraction, namely a sequence of characters.

A framework is a set of interrelated libraries which is intended to confine your design choices. Whatever restrictions exist in the framework may constrain how you write your application. The intention of a framework is that a developer does not need to make many of the fundamental design decisions. Some believe this makes a framework easier to use, can increase productivity, and programmers are not required to learn as much about the low level operations.

The downside of a framework is that applications do not always fit into the given framework model. Frameworks can make applications difficult to scale, they are often restrictive, and very expensive to port away from.

The functionality provided in a framework is at several different layers of abstraction for any given class.

As a developer you may not need to use every library in the framework however you may end up needing to include libraries because of their dependencies.

CopperSpice is a set of libraries however some of the libraries really fall under the definition of a framework. The direction of CopperSpice is to move more of the framework functionality into smaller libraries

Removing MOC

In order to build the main Core library in Qt, moc has to be built first. In order to build moc you need QMake and a special version of the Core library which is called the bootstrap library. The way this is done is by building QtCore in a special "bootstrap" configuration by disabling a large portion of the library with a massive number of #ifdefs. The bootstrap library is then used to build QMake, followed by the moc being built. After this process has been completed the real version of the QtCore library is compiled.

This legacy bootstrap dance is not required in CopperSpice where CsCore is just a normal C++ library.

Removing moc resulted in several benefits for CopperSpice. QMake is no longer required and developers can build CopperSpice with GCC or clang using either the AutoTools or CMake build systems.

The fully functionality moc provided has been retained in CopperSpice. The implementation of reflection which was supplied by this code generator, is now based entirely on modern C++. A string based code generator is not used in CopperSpice.

CopperSpice Reflection

Listed below are some of the advantage of the improved reflection system.

  • The bootstrap library is not required and all code related to it was removed
  • CsCore is simpler to build and maintain with the enormous reduction in #ifdefs
  • A templated class can inherit from QObject
  • Improved static type checking in Signals and Slots
  • Typedefs in Signal/Slot parameters are recognized as the defined type, not the alias name

  • Data types which contain a comma can be used without restrictions
    • For example: QMap<QString, bool>
    • This affects Signal/Slots, Properties, and QMetaMethod
    • QMap can be used as a data type for a Signal or a Slot parameter

Moving to CopperSpice

CopperSpice requires C++14 and takes advantage of templates, variadic templates, SFINAE, constexpr, tuples, type traits, decltype, and the power of modern C++. It is our aim to encourage other developers working on CopperSpice to leverage C++14 features to improve functionality.

Our PepperMill utility will convert your application header files to standard C++ header files. This will allow your existing Qt code to run with no other code modifications. The step is done only one time.

DoxyPress Defined

DoxyPress is derived from Doxygen.

The internals to DoxyPress are changing as more C++14 functionality is added and CopperSpice is improved. The focus has been on efficiency, improved readability, and type safety. Both DoxyPress and DoxyPressApp have been updated to leverage the improved CopperSpice container classes. When appropriate and to improve efficiency, functionality from the standard library is used. The prolific use of raw pointers has been migrated to shared pointers to reduce memory leaks. The pointer based containers were migrated to value based containers.

We have improved the output formats and we will continue to do so to conform to the current industry standards. The html output format has so far received the most attention.

DoxyPress is moving away from the lex only parsing for C++, C, and Objective-C. Both libClang and clang libTooling are used for parsing. This gives DoxyPress the advantage that as C++ changes we will be able to easily handle the new constructs with ease and conformity to the C++ standard.

Mission Statement

Our goal is to develop and support open source libraries for application developers. It is our aim to inspire C++ developers to write GUI applications using a modern framework and current technology.

CopperSpice is a set of libraries which provide a graphical interface for cross platform deployment. The CopperSpice libraries can be used in any application which links with C++14 libraries.

DoxyPress was developed as a need existed to effectively document CopperSpice and the complex internal C++ source code. It is our desire to enhance DoxyPress for documenting other complex projects, and libraries such as those associated with boost.

Philosophy

The most significant difference between a successful software project and one which rarely gets a second glance, is when the project can be successfully installed and built from the supplied source and project files.