rc_driver_object_b< IF, false > Class Template Reference

#include <rc_driver_object.h>

Inheritance diagram for rc_driver_object_b< IF, false >:

rc_driver_object_base rc_nb_driver_object

List of all members.


Detailed Description

template<class IF>
class ReChannel::rc_driver_object_b< IF, false >

Templated base class of a non-blocking driver.

This is the base class of a non-blocking driver object for the use with interface IF. At construction a channel is set as the target for this driver object.

Member rc_driver_object_b<IF,false>::access provides access to the driver forwarding methods that will redirect the call to the channel being executed by the associated driver process. The first parameter is a pointer the interface method and the subsequent up up to ten optional arguments of the call. The use is as follows:

 drvobj.access.call(&if_type::write, rc_cref(value));
By default parameters are passed by value. If a parameter is to be passed by reference rc_ref() and rc_cref() have to be used. (or alternatively: boost:ref() and boost::cref())

The targeted channel may be exchanged by another channel at any time.

See also:
rc_driver_object.h, rc_driver_object_base
Remarks:
Non-blocking drivers cannot be used for calls that have a return value due to technical reasons.

Definition at line 326 of file rc_driver_object.h.


Public Member Functions

 rc_driver_object_b (IF &channel)
 Constructor.
IF & get_channel ()
 Returns the target channel.
void set_channel (IF &channel)
 Sets the target channel.
bool has_written () const
 Have all calls been forwarded?
void cancel ()
 Cancels all pending write calls.

Public Attributes

driver_access access
 Driver forwarder methods are accessed through this member.

Protected Types

typedef
rc_driver_object_b
< IF, false > 
this_type
typedef
rc_driver_object_base 
base_type
typedef
base_type::write_call 
write_call
typedef
base_type::call_type 
call_type
 The type of the forwarded function object.
typedef
base_type::write_call_vector 
write_call_vector
 The type of the write call vector.
typedef
base_type::write_call_iterator 
write_call_iterator
 The type of the write call vector iterator.

Private Member Functions

 rc_driver_object_b (const this_type &dobj)
 (disabled)
this_typeoperator= (const this_type &dobj)
 (disabled)

Private Attributes

IF * p_channel
 The target channel.

Classes

class  driver_access

Member Typedef Documentation

typedef rc_driver_object_b<IF, false> this_type [protected]

Reimplemented in rc_nb_driver_object.

Definition at line 331 of file rc_driver_object.h.

typedef rc_driver_object_base base_type [protected]

Reimplemented in rc_nb_driver_object.

Definition at line 333 of file rc_driver_object.h.

typedef base_type::write_call write_call [protected]

Definition at line 335 of file rc_driver_object.h.

typedef base_type::call_type call_type [protected]

The type of the forwarded function object.

A forwarded function object is always of the form: void f(void).

Reimplemented from rc_driver_object_base.

Definition at line 336 of file rc_driver_object.h.

typedef base_type::write_call_vector write_call_vector [protected]

The type of the write call vector.

Reimplemented from rc_driver_object_base.

Definition at line 337 of file rc_driver_object.h.

typedef base_type::write_call_iterator write_call_iterator [protected]

The type of the write call vector iterator.

Reimplemented from rc_driver_object_base.

Definition at line 338 of file rc_driver_object.h.


Constructor & Destructor Documentation

rc_driver_object_b ( IF &  channel  )  [inline]

Constructor.

Parameters:
channel The target channel.
Initialises the driver object to target to the given channel.

Definition at line 571 of file rc_driver_object.h.

rc_driver_object_b ( const this_type dobj  )  [private]

(disabled)


Member Function Documentation

IF& get_channel (  )  [inline]

Returns the target channel.

Definition at line 352 of file rc_driver_object.h.

void set_channel ( IF &  channel  )  [inline]

Sets the target channel.

Parameters:
channel The target channel to which the calls are forwarded to.

Definition at line 358 of file rc_driver_object.h.

Referenced by rc_abstract_interface_wrapper::_rc_set_nb_driver_channel().

bool has_written (  )  const [inline]

Have all calls been forwarded?

Returns:
true if the write call cache is empty, false otherwise

Definition at line 365 of file rc_driver_object.h.

void cancel (  )  [inline]

Cancels all pending write calls.

Attention:
This method is technically not applicable when RC_USE_SHARED_METHOD_DRIVER is defined and will therefore be ignored in this case.

Definition at line 375 of file rc_driver_object.h.

this_type& operator= ( const this_type dobj  )  [private]

(disabled)


Member Data Documentation

IF* p_channel [private]

The target channel.

Definition at line 386 of file rc_driver_object.h.

driver_access access

Driver forwarder methods are accessed through this member.

Definition at line 392 of file rc_driver_object.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 1 23:14:15 2008 for ReChannel by  doxygen 1.5.3