BaseContext :: parent - Get parent context
The function returns the next higher context in accordance with passed parameters. A context is parent context of another one, when it is the next higher context or any other context in the parent hierarchy (parent's parent etc.).
Parent context may be requested by resource name and/or context type. Since resource names are not necessarily unique, the context type might be passed in addition.
The parent context is returned as BaseContext and has to be casted to the type expected. Run-time type information is available, i.e. dynamic cast can be used in C++.
When no context instance could be provided, the function throws an exception.
The function replaces the function highContext, which will be removed in version 14.
Implementation overview
- Get nearest parent context
BaseContext :: parent (  ) - Get parent context by resource name
BaseContext :: parent ( sResourceName ) - Get parent context by context type and resource name
BaseContext :: parent ( sResourceName, eContextType ) - Get parent context by type
BaseContext :: parent ( eContextType )
Implementation details
-
Get nearest parent context
odaba::BaseContext & BaseContext  :: parent (  )
The function returns the next higher context. For a property context, the parent context is a type or object space context. For a type context, it is always a property context. The high context for a control context (GUI) is, usually, a control context.
to list
-
Get parent context by resource name
odaba::BaseContext & BaseContext  :: parent ( odaba::String &sResourceName )
The function looks for the next higher context for the resource name passed in sResourceName . The resource name is the property name (property context), the type name (type context) or the control name (control context in GUi applications).
The function should not be called in order to obtain the database or project context, which might be provided by specialized functions in DBBaseContext or GUIBaseContext .
- sResourceName
- Resource name
The resource name is the name of a GUI or database definition resource associated with a context class instance.
to list
- sResourceName
- Resource name
-
Get parent context by context type and resource name
odaba::BaseContext & BaseContext  :: parent ( odaba::String &sResourceName, odaba::ContextTypes eContextType )
The function looks for the next higher context for the resource name passed in sResourceName and the context type passed in eContextTypes . The resource name is the property name (property context), the type name (type context) or the control name (control context in GUI applications).
The function should not be called in order to obtain the database or project context, which might be provided by specialized functions in DBBaseContext or GUIBaseContext .
- sResourceName
- Resource name
The resource name is the name of a GUI or database definition resource associated with a context class instance.
- eContextType - - internal feature (not documented)
to list
- sResourceName
- Resource name
-
Get parent context by type
odaba::BaseContext & BaseContext  :: parent ( odaba::ContextTypes eContextType )
The function returns the next higher context with the context type passed in eContextType .
- eContextType - - internal feature (not documented)
to list