Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::FoundationKit Class Reference

The FoundationKit class is used to initialize the Foundation Kit runtime. More...

#include <vcf/FoundationKit/FoundationKit.h>

List of all members.

Static Public Member Functions

static void init (int argc, char **argv)
 Initialization takes place here, plus creating the various system resources and peer instances.
static void terminate ()
 Frees up any resources allocated in the FoundationKit::init() function.
static const CommandLinegetCommandLine ()
 returns the CommandLine contents as passed into the FoundationKit::init() function.
static void assertCondition (bool condition, const String &failureMessage)
 Use this to cause an assert to be fired.
static void internal_addInitializer (InitializationFunc funcPtr)
static void internal_addFinalizer (FinalizationFunc funcPtr)

Classes

class  Assertion
 This is a special case exception used only for the triggering of an asertion, through the call to FoundationKit::assertCondition(). More...


Detailed Description

The FoundationKit class is used to initialize the Foundation Kit runtime.

This includes registering the basic classes in the runtime system, such as the correct SystemToolkit implementation, and the ClassRegistry.

FoundationKit::init() MUST be called at start up before anything else in the VCF is used. FoundationKit::terminate() MUST be called to free up any resources used by the FoundationKit.

An example of proper usage looks like this:

    int main( int argc, char** argv ) 
    {
        VCF::FoundationKit::init(argc, argv);

        //your code here

        VCF::FoundationKit::terminate();

        return 0;
    }

The FoundationKit is cannot be instantiated nor can it be derived from.

See also:
SystemToolkit

ClassRegistry


Member Function Documentation

static void VCF::FoundationKit::assertCondition bool  condition,
const String failureMessage
[static]
 

Use this to cause an assert to be fired.

Currently an assert is implemented by throwing an exception. An assert is triggered if the condition is false.

As a general rule you don't need to call this directly, instead use the VCF_ASSERT macro's because in addition to a message the macro will be able to also include the file and line number where the assertion was triggered, which is more useful.

Parameters:
bool the condition - if this value is false, then an assert is triggered and an excpetion is thrown.
failureMessage a string message indicating what failed.
See also:
VCF_ASSERT

static const CommandLine& VCF::FoundationKit::getCommandLine  )  [static]
 

returns the CommandLine contents as passed into the FoundationKit::init() function.

The CommandLine allows you easy access to any command like arguments passed into your application. See the CommandLine class for examples of how to use this class.

See also:
CommandLine

static void VCF::FoundationKit::init int  argc,
char **  argv
[static]
 

Initialization takes place here, plus creating the various system resources and peer instances.

static void VCF::FoundationKit::internal_addFinalizer FinalizationFunc  funcPtr  )  [static]
 

static void VCF::FoundationKit::internal_addInitializer InitializationFunc  funcPtr  )  [static]
 

static void VCF::FoundationKit::terminate  )  [static]
 

Frees up any resources allocated in the FoundationKit::init() function.


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information