VISH  0.2
Classes | Functions
VISH Input Object Management

Classes

Functions


Detailed Description

Note:
Only weak pointers are stored in the input creator data base. All objects must be strongly referenced by external means (e.g. like a VManagedDomainObject). The internal registry for input creator objects is of type
typemap<list<WeakPtr<VInputCreatorBase> > > InputCreatorRegistry;
As creators are derived from class VInputCreatorBase, they are automatically referenced through the VManagedDomainObject<VInputCreatorBase> database.

Function Documentation

VBASE_API RefPtr< VInputCreatorBase > Wizt::findBestVInputCreator ( const type_info &  what,
const RefPtr< VCreationPreferences > &  prop 
)

Search through the database of creator objects for input objects such that the specified properties are matched best.

Of course, the specified type must match exactly.

Note:
It returns a strong reference although only weak pointers are stored in the input data base. This is to avoid deletion of an input creator just when finding it. It is assumed that the input creator already is strongly referenced through an external instance. If note, there will be problems and not referenced creators might be destroyed during iteration, even when it is not returned here.
See also:
VInputRegistry
VBASE_API bool Wizt::iterateVInputCreators ( const type_info &  what,
VInputCreatorIterator &  VICI 
)

Given a certain type, iterate through all registered VCreator objects that may create objects providing this type.

See also:
registerVInput, unregisterVInput,
VBASE_API bool Wizt::registerVInput ( const type_info &  what,
const WeakPtr< VInputCreatorBase > &  impl 
)

Register a certain VInputCreatorBase object as having the capability to create an object that may provide a certain type.

Parameters:
whatThe type that may be provided by the newly created object.
implA VCreator object that may create new objects.
See also:
VInputRegistry
VBASE_API bool Wizt::unregisterVInput ( const type_info &  what,
const WeakPtr< VInputCreatorBase > &  impl 
)

Remove a creator's property to provide a certain type from the registry.

Returns:
true if the creator was found and unregistered, false if the pointer was invalid or it was not found in the database.
See also:
VInputRegistry