|
NuiLib-Full
Utility Library for working with NUI devices.
|
The interface for factory classes which instantiate NuiLib objects. More...
#include <NuiLib-API.h>
Public Member Functions | |
| virtual | ~INuiFactory () |
| Delete all components this factory created. | |
| virtual bool | Init ()=0 |
| Initialise the factory. | |
| virtual void | SetAutoPoll (bool)=0 |
| Set whether the factory auto polls. | |
| virtual bool | GetAutoPoll ()=0 |
| Get whether the factory auto polls. | |
| virtual void | Poll ()=0 |
| Force the factory to poll the Nui device for new data. | |
| virtual Scalar | GetScalar (string name)=0 |
| Look up a Scalar from its name. | |
| virtual Condition | GetCondition (string name)=0 |
| Look up a Condition from its name. | |
| virtual Vector | GetVector (string name)=0 |
| Look up a Vector from its name. | |
| virtual string | ToXML ()=0 |
| Write all components created by this factory, and their relationships, to XML. | |
| virtual void | LoadXML (string xml)=0 |
| Initialise the factory based on an XML string. | |
| virtual void ** | GetNuiDevices ()=0 |
| Get an array of pointers to the actual NUI devices that are powering the system. | |
Public Member Functions inherited from NuiLib::IObservable | |
| void | AddListener (function< void(IObservable *)> listener) |
| Add a listener that will called whenever the observabled changes. | |
Protected Member Functions | |
| INuiFactory (string type, string name) | |
| Initialise the factory. | |
Protected Member Functions inherited from NuiLib::IObservable | |
| virtual | ~IObservable () |
| void | Trigger () |
| Trigger this observable. | |
The interface for factory classes which instantiate NuiLib objects.
Contains generic template code which can instantiate any classes with the correct format. Deals with Vectors, Scalars and Conditions. Also provides some extra control over how polling is done.
|
inlineprotected |
Initialise the factory.
Specifies the type of the factory and its name.
| type | The type of factory this is. |
| name | The name of this factory. |
|
virtual |
Delete all components this factory created.
|
pure virtual |
Get whether the factory auto polls.
If true the factory will automatically update all entities it has regstered whenever the Nui device sends and update or only update them when the Poll method is called.
| value | True to auto poll. False to only poll when the method is called. |
Implemented in NuiLib::KinectFactory, and TestFactory.
|
pure virtual |
Look up a Condition from its name.
Designed to be used after a call to LoadFromXML. LoadFromXML imports a series of components. GetCondition then gets a given condition. If no scalar is found with the given name a zero Condition is returned.
Implemented in NuiLib::INuiFactoryExtension.
|
pure virtual |
Get an array of pointers to the actual NUI devices that are powering the system.
Depending on which factory implementation is linked the actual devices returned will be different.
Implemented in NuiLib::KinectFactory.
|
pure virtual |
Look up a Scalar from its name.
Designed to be used after a call to LoadFromXML. LoadFromXML imports a series of components. GetScalar then gets a given scalar. If no scalar is found with the given name a zero Scalar is returned.
Implemented in NuiLib::INuiFactoryExtension.
|
pure virtual |
Look up a Vector from its name.
Designed to be used after a call to LoadFromXML. LoadFromXML imports a series of components. GetVector then gets a given vector. If no vector is found with the given name a zero Vector is returned.
Implemented in NuiLib::INuiFactoryExtension.
|
pure virtual |
Initialise the factory.
Any logic to do with starting up the factory should go here.
Implemented in NuiLib::KinectFactory, and TestFactory.
|
pure virtual |
Initialise the factory based on an XML string.
Not currently implemented.
| xml | The XML string to load. |
Implemented in NuiLib::INuiFactoryExtension, and NuiLib::KinectFactory.
|
pure virtual |
Force the factory to poll the Nui device for new data.
When the device has been polled all entities which take data from the device will be updated. If AutoPoll is false calling this method is the only time the device will be polled.
Implemented in NuiLib::KinectFactory, and TestFactory.
|
pure virtual |
Set whether the factory auto polls.
If true the factory will automatically update all entities it has created whenever the Nui device sends and update or only update them when the Poll method is called.
| value | True to auto poll. False to only poll when the method is called. |
Implemented in NuiLib::KinectFactory, and TestFactory.
|
pure virtual |
Write all components created by this factory, and their relationships, to XML.
Not currently implemented.
Implemented in NuiLib::INuiFactoryExtension, and NuiLib::KinectFactory.