BaseContext :: highContext - High context by resource name
The function returns the high context with the resource name passed to the function. A context is high context of another one, when it is the parent context or any other context in the parent hierarchy (parent's parent etc.).
Since resource names are not unique, the context type might be passed in addition. Passing CtxUndefined, any context with the resource name passed will be returned.
The high 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 has been replaced by parent() and will be removed in version 14.
Implementation overview
- Get nearest parent context
BaseContext :: highContext (  ) - Get parent context by type
BaseContext :: highContext ( eContextType ) - Get parent context by resource name
BaseContext :: highContext ( sResourceName ) - Get parent context by context type and resource name
BaseContext :: highContext ( sResourceName, eContextType )
Implementation details
-
Get nearest parent context
odaba::BaseContext & BaseContext  :: highContext (  )
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 type
odaba::BaseContext & BaseContext  :: highContext ( odaba::ContextTypes eContextType )
The function returns the next higher context with the context type passed in eContextType.
- eContextType - Type of specialized context
to list
-
Get parent context by resource name
odaba::BaseContext & BaseContext  :: highContext ( 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  :: highContext ( 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 - Type of specialized context
to list
- sResourceName
- Resource name