IT_Bus::ContextContainer Class Reference

#include <it_bus_pdk/context.h>

List of all members.


Detailed Description

Class that manages collections of contexts.

Definition at line 211 of file context.h.

Public Member Functions

virtual AnyTypeget_context (const QName &context_name, bool create_if_not_found=false)=0
 Return a pointer to a specific context.
virtual const AnyTypeget_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 Contextget_context_data (const QName &context_name)=0
 Return a pointer to a specific context.
virtual const Contextget_context_data (const QName &context_name) const =0
 Return a pointer to a specific context.
virtual BindingContextget_binding_context (const QName &context_name, const QName &binding_context, bool create_if_not_found=false)=0
 Return a binding specific context.
virtual const BindingContextget_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.


Member Function Documentation

virtual Boolean IT_Bus::ContextContainer::add_context ( const QName context_name,
Context context 
) [pure virtual]

Add specific context to the container for context that is not generated from a schema description.

The context is a just C++ object that derives from Context.

Parameters:
QName of the desired context.
context data
Returns:
Boolean indicating if context was added

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.

Parameters:
QName of the desired context.
context data that derives from AnyType
Returns:
Boolean indicating if context was added

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.

Parameters:
QName of the desired context.
Returns:
bool indicating whether the context exists in this container.

virtual const BindingContext* IT_Bus::ContextContainer::get_binding_context ( const QName context_name,
const QName binding_context 
) const [pure virtual]

Return a binding specific context.

Parameters:
QName of the desired context.
String containing the URI of the desired binding.
Returns:
A pointer to the desired BindingContext.

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.

Parameters:
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.
Returns:
A pointer to the desired BindingContext.

virtual const AnyType* IT_Bus::ContextContainer::get_context ( const QName context_name  )  const [pure virtual]

Return a pointer to a specific context.

Parameters:
QName of the desired context.
Returns:
A pointer to an AnyType; the instance must be cast to the appropriate context type.

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.

Parameters:
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.
Returns:
A pointer to an AnyType; the instance must be cast to the appropriate context type.

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 const Context* IT_Bus::ContextContainer::get_context_data ( const QName context_name  )  const [pure virtual]

Return a pointer to a specific context.

Parameters:
QName of the desired context.
Returns:
A pointer to the desired context.

virtual Context* IT_Bus::ContextContainer::get_context_data ( const QName context_name  )  [pure virtual]

Return a pointer to a specific context.

Parameters:
QName of the desired context.
Returns:
A pointer to the desired context.

virtual Boolean IT_Bus::ContextContainer::remove_context ( const QName context_name  )  [pure virtual]

Remove Context from container if present.

Parameters:
QName of the desired context to remove
Returns:
Boolean indicating if context was removed

Referenced by IT_ContextAttributes::ContextHandler< T >::~ContextHandler().


Generated on Thu Sep 7 11:40:17 2006 for Artix by  doxygen 1.4.7