The VCF is organized into a series of subdirectories all under the main VCF root directory. All the source code is contained under the src directory. This includes third party libraries like AGG, FreeImage, and other code. Third party libraries are stored in the src/thirdparty directory. Documentation is contained in the docs directory and consists of all the HTML and images necessary for creating the HTML Help files (on Win32 systems). Executable binaries are kept in the bin directory, while the link libraries are kept in the lib directory.
The source code for the VCF framework itself is stored in the src/vcf directory. Under this directory, each library, or "kit" as we refer to them, has it's own subdirectory, one for each kit. So under the src/vcf directory there's a directory named "FoundationKit", one named "GraphicsKit" and so on. The source code to each kit, including .cpp and .h files are all stored in the kits directory. So if your looking where the source code to the FoundationKit is stored, you'd just have to look in the src/vcf/FoundationKit directory.
The main header files used by each of the framework "kits" (FoundationKit, GraphicsKit, ApplicationKit, etc) to pull in whatever common files are needed by a developer using the particular kit are named with the form "vcf/<kit name>/<kit name>.h". For example, the FoundationKit.h header includes all the common headers required for developing with the VCF when using the FoundationKit. So a developer writing a console application that links to the FoundationKit simply needs to #include "vcf/FoundationKit/FoundationKit.h" and everything else will be taken care of. If you are using pre compiled headers then you would want to include this file (FoundationKit.h) in your master pre compiled header file (i.e. if you are used to using VC++ you would put this include in your stdafx.h file). Kits that use the FoundationKit will also include the FoundationKit.h in their header as well. For example, the ApplicationKit.h includes the GraphicsKit.h header, which in turn includes the FoundationKit.h. Thus including the ApplicationKit.h pulls in the other two major kit headers.
When writing code for the VCF itself (as opposed to simply using it in your application) you must use include guards both for the outer level of your header files, and for any cases that require you to include a header inside of another header. For example, the following code demonstrates writing a header with correct top level include guards :
//MyHeader.h #ifndef _MYHEADER_H__ #define _MYHEADER_H__ //rest of code goes here #endif //_MYHEADER_H__
The symbol for the #define has the following form which MUST be followed for VCF headers. Headers for your own use outside of the framework proper can take any form you want. That form is:
_VCF_<name of the header in upper case - no breaks, underbars, etc>_H__
You have added a new control control class to the VCF called LEDLabel. It's header is called LEDLabel.h, so it's include guard is _LEDLABEL_H__
If your code for the VCF needs to include other headers, then you must wrap the #include in an include guard as well. Once again if this is code for your application, then this does not apply, you can use it if you want to, but you are not obligated to. If you contribute code to the framework itself then you must do this. The following example demonstrates this:
//MyHeader.h #ifndef _MYHEADER_H__ #define _MYHEADER_H__ //this will include the ListModel header #ifndef _LISTMODEL_H__ #include "vcf/ApplicationKit/ListModel.h" #endif//_LISTMODEL_H__ //rest of code goes here #endif //_MYHEADER_H__
This may seem like an extra hassle (and it is) but for a framework this size this helps reduce compile time and makes it more efficient to use.