VISH  0.2
Public Member Functions | Static Public Member Functions | Static Public Attributes
Wizt::TypedSlotCreator Class Reference

A registry for the runtime-creation of typed slots, allowing creation of type-specific VObject input parameters without knowing their types explicitly. More...

#include </home/werner/origo/vish/ocean/plankton/VSlot.hpp>

List of all members.

Public Member Functions

Static Public Member Functions

Static Public Attributes


Detailed Description

A registry for the runtime-creation of typed slots, allowing creation of type-specific VObject input parameters without knowing their types explicitly.

Usage:

   if (RefPtr<TypedSlotCreatorBase> TC = TypedSlotCreatorBase::getTypedSlotCreator("int") )
   {
   RefPtr<VSlot> mylot = TC->newSlot( ... );
   }

Constructor & Destructor Documentation

Wizt::TypedSlotCreator::~TypedSlotCreator ( )

Destructor, cleans up registry.

It will be called when a type is defined in a plugin and the plugin is unloaded.


Member Function Documentation

virtual RefPtr<VSlot> Wizt::TypedSlotCreator::newSlot ( VObject that,
const string name,
const string InitialValue,
bool &  Initialized,
const RefPtr< VCreationPreferences > &  VP,
int  ExpertLevel 
) const [pure virtual]

The virtual slot creation function.

Parameters:
InitialValueAn initial value encoded as string, utilizing the VValueTrait<> template to convert into the actual type.
InitializedFlag telling wether the slot could be initialized successfully from the given initial value. If that one is invalid, for instance it could not be parsed correctly for the final type, then the Slot will be initialized with the default constructor of the given type.

Implemented in Wizt::TypedSlot::SlotCreator.

void Wizt::TypedSlotCreator::registerTypedSlotCreator ( const type_info &  theType,
const WeakPtr< TypedSlotCreator, TypedSlotCreator > &  who 
) [static]

Add an instance of a type-specific SlotCreator to the registry.

Parameters:
theTypeThe typeid of the value that are operated on
whoA static SlotCreator as provided by TypedSlotCreator<>::getCreator();

The documentation for this class was generated from the following files: