Infinity API




The Infinity API is licenced to you, the end user under the terms and conditions defined in the licence document found in the 'Documentation' folder.
If you did not recieve a copy of the licence with this source code, please refer to

Dedications / Thanks

The Infinity API would not exist without the help and support of several people:
First there are our long suffering other halves - Cathy and Jo. You are both absolute stars! Thanks for putting up with all the late nights, missed dinners and for reminding us to eat and sleep!
Secondly a big thank you has to go out to all the staff at FXpansion, and a specific mention for SKot McDonald, who has helped in so many ways that its impossible to list them all. He is a king amongst men.
Thanks also go to all the guys and gals who have supported us and given us kind words of encouragment. There are too many to list all of them but a couple deserve specific mention:
Quinn Capen (API beta tester extrordinaire!)
Mully and The Betabugs crew
The KVR Developers forum

And finally a big thanks to everyone who downloads and uses Infinity!


The Infinity API is a cross platform (OSX, Win32) toolkit

It is divided in to a series of libraries to enable easy maintainence and to ensure that projects can be built with the minimum amount of extra source code.
The foundation library, upon which all other libraries depend is ECore. The is the primary library and as such it provides those generic classes that are most required when developing applications.
Note that this does not include any Graphical-Interface classes. These are handled by a seperate library (EGUI).

Project structure
Each library is subdivided in to a set of namespaces. Each namespace is also contained within a corresponding folder. So, for example, if a class is contained inside the 'Host' namespace it will be found in a folder named 'Host' as-well.
For example, ECore contains the following namespace / folders:

The Infinity API is based around a class management system. This is one of the most important features of the API's. A good place to start when first learning the use of the API is to take a look at the Basics namespace
This namespace features several objects that should be fully understood before any other objects are looked at. They are:

See also:


Other Libraries in the Infinity API

There are several other parts to the Infinity API, that is:

Pointers and management in the Infinity API

It is worth pointing out that in the Infinity API all pointers to ICountedObjecteds are reference counted. You shouldnt ever directly delete a reference counted object
instead, use the macro FORGET_COUNTED_OBJECT. This has an important implication for the function headers:
If a function takes a pointer to a counted object you can assume that this object is being reference counted. In this case *never* pass is an address of a local variable
 // Say we have a function like this that takes a pointer to a counted object
 void foo(CCountedObject *object)

 // If you call it with the address of a local variable then potentially a non dynamic variable will be deleted
 CCountedObject myObject;
 foo(&myObject);                    // << NEVER, EVER, EVER do this!

 // The correct way to handle it is like this
 CCountedObject *myObject = new CCountedObject;
 myObject->referenced();            // << We want to remember this object for the time being
 foo(myObject);                 // << DO do this!
 // Do something else with myObject
 // ...
 // ...

However, if a function takes the address of a variable, then you are safe to pass in a local variable:
 // Takes an address
 void foo(const CCountedObject &object);

 // Then you are safe to do both
 CCountedObject myObject;

 // And
 CCountedObject *myObject = new CCountedObject;
 // Do something else with myObject
 // ...
 // ...

When storing a counted object, always make sure that you reference the new copy and dereference the old pointer. We have a handy macro for this: EXCHANGE_COUNTED_OBJECTS
 void foo(CCountedObject *object)
     EXCHANGE_COUNTED_OBJECTS(myObject, object);        // << Dereferences myObject, stores object in myObject pointer and references object
See also:


Support and Help

Please direct all comments about the code to our developers support forum on our website:

We hope that you enjoy using the Infinity API
Team Exponent

Version History

Version 1.0.1 - Maintenance release, adding several new features and fixing a couple of small bugs
Version 1.0.0 - Initial release
Infinity API - Infinity API generated on 7 Mar 2007