#include <it_bus_pdk/context.h>
Definition at line 211 of file context.h.
Public Member Functions | |
virtual AnyType * | get_context (const QName &context_name, bool create_if_not_found=false)=0 |
Return a pointer to a specific context. | |
virtual const AnyType * | get_context (const QName &context_name) const =0 |
Return a pointer to a specific context. | |
virtual Boolean | add_context (const QName &context_name, AnyType &context)=0 |
Add specific context to the container for context that is generated from a schema description. | |
virtual Context * | get_context_data (const QName &context_name)=0 |
Return a pointer to a specific context. | |
virtual const Context * | get_context_data (const QName &context_name) const =0 |
Return a pointer to a specific context. | |
virtual BindingContext * | get_binding_context (const QName &context_name, const QName &binding_context, bool create_if_not_found=false)=0 |
Return a binding specific context. | |
virtual const BindingContext * | get_binding_context (const QName &context_name, const QName &binding_context) const =0 |
Return a binding specific context. | |
virtual Boolean | add_context (const QName &context_name, Context &context)=0 |
Add specific context to the container for context that is not generated from a schema description. | |
virtual Boolean | remove_context (const QName &context_name)=0 |
Remove Context from container if present. | |
virtual bool | contains (const QName &context_name)=0 |
Returns a indicator as to whether this container contains a specific context. |
virtual AnyType* IT_Bus::ContextContainer::get_context | ( | const QName & | context_name, | |
bool | create_if_not_found = false | |||
) | [pure virtual] |
Return a pointer to a specific context.
QName | of the desired context. | |
bool | indicating whether an instance of the context should be created if one does not already exist; default is false. |
For example, for the built-in context representing the HTTP client outgoing context, the following code retrieves the context from the request container and casts to the appropriate type (clientType).
IT_Bus::Bus_var bus = IT_Bus::init(argc, argv); ContextRegistry* registry = bus -> get_context_registry(); ContextCurrent& current = registry -> get_current(); ContextContainer* request_container = current.request_contexts(); AnyType& info = request_container -> get_context ( IT_ContextAttributes::HTTP_CLIENT_OUTGOING_CONTEXTS, true ); clientType& config = dynamic_cast<clientType&> (info);
virtual Boolean IT_Bus::ContextContainer::add_context | ( | const QName & | context_name, | |
AnyType & | context | |||
) | [pure virtual] |
Add specific context to the container for context that is generated from a schema description.
Referenced by IT_ContextAttributes::ContextHandler< T >::ContextHandler().
virtual Context* IT_Bus::ContextContainer::get_context_data | ( | const QName & | context_name | ) | [pure virtual] |
Return a pointer to a specific context.
QName | of the desired context. |
virtual const Context* IT_Bus::ContextContainer::get_context_data | ( | const QName & | context_name | ) | const [pure virtual] |
Return a pointer to a specific context.
QName | of the desired context. |
virtual BindingContext* IT_Bus::ContextContainer::get_binding_context | ( | const QName & | context_name, | |
const QName & | binding_context, | |||
bool | create_if_not_found = false | |||
) | [pure virtual] |
Return a binding specific context.
QName | of the desired context. | |
String | containing the URI of the desired binding. | |
bool | indicating whether an instance of the context should be created if one does not already exist; default is false. |
virtual const BindingContext* IT_Bus::ContextContainer::get_binding_context | ( | const QName & | context_name, | |
const QName & | binding_context | |||
) | const [pure virtual] |
virtual Boolean IT_Bus::ContextContainer::remove_context | ( | const QName & | context_name | ) | [pure virtual] |
Remove Context from container if present.
QName | of the desired context to remove |
Referenced by IT_ContextAttributes::ContextHandler< T >::~ContextHandler().
virtual bool IT_Bus::ContextContainer::contains | ( | const QName & | context_name | ) | [pure virtual] |
Returns a indicator as to whether this container contains a specific context.
QName | of the desired context. |