The Vish Visualization Shell 0.3
Vish
Classes | Functions
VISH Input Object Management

Classes

class  Wizt::VInputCreator< InputType, VInputCreatorClass >
 Template class for convenient definition of creators of objects providing a multiple input types. More...
 
class  Wizt::VInputCreatorBase
 Base class for objects that may create objects that serve as input facilities. More...
 
class  Wizt::VInputRegistry< InputType >
 Templated convenience class that encompassess all VInput registry functions that are associated with a certain type. More...
 

Functions

RefPtr< VInputCreatorBaseWizt::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.
 
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.
 
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.
 
bool Wizt::unregisterVInput (const type_info &what, const WeakPtr< VInputCreatorBase > &impl)
 Remove a creator's property to provide a certain type from the registry.
 

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

◆ findBestVInputCreator()

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

References Wizt::VManagedObject::find().

Referenced by Wizt::VObject::attachNewObject(), Wizt::VInputRegistry< InputType >::find(), and Wizt::VThreadCreator::getThreadManager().

◆ iterateVInputCreators()

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, @VInputRegistry

References Wizt::VInputCreatorIterator::apply(), and Wizt::VManagedObject::find().

Referenced by Wizt::VInputRegistry< InputType >::iterate().

◆ registerVInput()

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

References Wizt::VActionNotifier::Warning().

Referenced by Wizt::VInputRegistry< InputType >::registerCreator(), and Wizt::VInputCreator< InputType, VInputCreatorClass >::VInputCreator().

◆ unregisterVInput()

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

Referenced by Wizt::VInputRegistry< InputType >::unregister(), and Wizt::VInputCreator< InputType, VInputCreatorClass >::~VInputCreator().