company logo

TypeContext :: canCreate - Check whether new instance can be created

The function is called from the system or when calling Property::canCreate() in order to check whether instance creation is possible or not. By default, the function returns true. In order to perform application specific checks, the function has to be overloaded in a corresponding type context class.

The function is not an event, i.e. it is not called before creating an instance. In order to be consistent, it is suggested to call the function also in the doBeforeCreate() event handler.

Notes:

The function must not be called for checking the action but performs the check. For checking the action one may call Property::canCreate().

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation details

bool TypeContext  :: canCreate (  )