company logo

TypeContext :: canInsert - Check whether an instance can be inserted

The function is called from the system or when calling Property::canInsert() in order to check whether instance insertion 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 inserting an instance. In order to be consistent, it is suggested to call the function also in the doBeforeInsert() event handler (property context).

Notes:

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

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  :: canInsert (  )