csp::ChannelFactory< DATA_TYPE > Class Template Reference

Inheritance diagram for csp::ChannelFactory< DATA_TYPE >:

boost::noncopyable csp::BufferedChannelFactory< DATA_TYPE > csp::StandardChannelFactory< DATA_TYPE > List of all members.

Detailed Description

template<typename DATA_TYPE>
class csp::ChannelFactory< DATA_TYPE >

A channel "factory" class.

This is the templated base class for channel factories. It contains methods to get one-to-one, one-to-any, any-to-one and any-to-any channel ends from the factory. The channel is guaranteed to last until the factory is destroyed.

This guarantee means that a ChannelFactory can end up using up a lot of memory if channels are continually re-allocated, because none of these channels will be destroyed until the factory is destroyed. Be mindful of this if you allocate channels inside a loop, or otherwise repeatedly reallocate them.

See also:
StandardChannelFactory

BufferedChannelFactory


Public Member Functions

virtual void any2Any (Chanin< DATA_TYPE > *in, Chanout< DATA_TYPE > *out, bool canPoisonIn=true, bool canPoisonOut=true)=0
 Gets an any-to-any channel from the factory.
virtual std::pair< Chanin<
DATA_TYPE >, Chanout< DATA_TYPE > > 
any2AnyPair (bool canPoisonIn=true, bool canPoisonOut=true)
 Gets an any-to-any channel from the factory.
virtual void any2One (AltChanin< DATA_TYPE > *in, Chanout< DATA_TYPE > *out, bool canPoisonIn=true, bool canPoisonOut=true)=0
 Gets an any-to-one channel from the factory.
virtual std::pair< AltChanin<
DATA_TYPE >, Chanout< DATA_TYPE > > 
any2OnePair (bool canPoisonIn=true, bool canPoisonOut=true)
 Gets an any-to-one channel from the factory.
virtual void one2Any (Chanin< DATA_TYPE > *in, Chanout< DATA_TYPE > *out, bool canPoisonIn=true, bool canPoisonOut=true)=0
 Gets a one-to-any channel from the factory.
virtual std::pair< Chanin<
DATA_TYPE >, Chanout< DATA_TYPE > > 
one2AnyPair (bool canPoisonIn=true, bool canPoisonOut=true)
 Gets a one-to-any channel from the factory.
virtual void one2One (AltChanin< DATA_TYPE > *in, Chanout< DATA_TYPE > *out, bool canPoisonIn=true, bool canPoisonOut=true)=0
 Gets a one-to-one channel from the factory.
virtual std::pair< AltChanin<
DATA_TYPE >, Chanout< DATA_TYPE > > 
one2OnePair (bool canPoisonIn=true, bool canPoisonOut=true)
 Gets a one-to-one channel from the factory.


Member Function Documentation

template<typename DATA_TYPE>
virtual void csp::ChannelFactory< DATA_TYPE >::one2One ( AltChanin< DATA_TYPE > *  in,
Chanout< DATA_TYPE > *  out,
bool  canPoisonIn = true,
bool  canPoisonOut = true 
) [pure virtual]

Gets a one-to-one channel from the factory.

Parameters:
in A pointer to an AltChanin object that will become the input end of the requested channel.
out A pointer to a Chanout object that will become the output end of the requested channel.
canPoisonIn Flag to designate whether the input end should be poisonable
canPoisonOut Flag to designate whether the output end should be poisonable

Implemented in csp::StandardChannelFactory< DATA_TYPE >, and csp::BufferedChannelFactory< DATA_TYPE >.

template<typename DATA_TYPE>
virtual void csp::ChannelFactory< DATA_TYPE >::one2Any ( Chanin< DATA_TYPE > *  in,
Chanout< DATA_TYPE > *  out,
bool  canPoisonIn = true,
bool  canPoisonOut = true 
) [pure virtual]

Gets a one-to-any channel from the factory.

Parameters:
in A pointer to a Chanin object that will become the input end of the requested channel.
out A pointer to a Chanout object that will become the output end of the requested channel.
canPoisonIn Flag to designate whether the input end should be poisonable
canPoisonOut Flag to designate whether the output end should be poisonable

Implemented in csp::StandardChannelFactory< DATA_TYPE >, and csp::BufferedChannelFactory< DATA_TYPE >.

template<typename DATA_TYPE>
virtual void csp::ChannelFactory< DATA_TYPE >::any2One ( AltChanin< DATA_TYPE > *  in,
Chanout< DATA_TYPE > *  out,
bool  canPoisonIn = true,
bool  canPoisonOut = true 
) [pure virtual]

Gets an any-to-one channel from the factory.

Parameters:
in A pointer to an AltChanin object that will become the input end of the requested channel.
out A pointer to a Chanout object that will become the output end of the requested channel.
canPoisonIn Flag to designate whether the input end should be poisonable
canPoisonOut Flag to designate whether the output end should be poisonable

Implemented in csp::StandardChannelFactory< DATA_TYPE >, and csp::BufferedChannelFactory< DATA_TYPE >.

template<typename DATA_TYPE>
virtual void csp::ChannelFactory< DATA_TYPE >::any2Any ( Chanin< DATA_TYPE > *  in,
Chanout< DATA_TYPE > *  out,
bool  canPoisonIn = true,
bool  canPoisonOut = true 
) [pure virtual]

Gets an any-to-any channel from the factory.

Parameters:
in A pointer to a Chanin object that will become the input end of the requested channel.
out A pointer to a Chanout object that will become the output end of the requested channel.
canPoisonIn Flag to designate whether the input end should be poisonable
canPoisonOut Flag to designate whether the output end should be poisonable

Implemented in csp::StandardChannelFactory< DATA_TYPE >, and csp::BufferedChannelFactory< DATA_TYPE >.

template<typename DATA_TYPE>
virtual std::pair< AltChanin<DATA_TYPE> , Chanout<DATA_TYPE> > csp::ChannelFactory< DATA_TYPE >::one2OnePair ( bool  canPoisonIn = true,
bool  canPoisonOut = true 
) [inline, virtual]

Gets a one-to-one channel from the factory.

Parameters:
canPoisonIn Flag to designate whether the input end should be poisonable
canPoisonOut Flag to designate whether the output end should be poisonable
Returns:
A pair comprising the input and output ends (respectively) of the channel

template<typename DATA_TYPE>
virtual std::pair< Chanin<DATA_TYPE> , Chanout<DATA_TYPE> > csp::ChannelFactory< DATA_TYPE >::one2AnyPair ( bool  canPoisonIn = true,
bool  canPoisonOut = true 
) [inline, virtual]

Gets a one-to-any channel from the factory.

Parameters:
canPoisonIn Flag to designate whether the input end should be poisonable
canPoisonOut Flag to designate whether the output end should be poisonable
Returns:
A pair comprising the input and output ends (respectively) of the channel

template<typename DATA_TYPE>
virtual std::pair< AltChanin<DATA_TYPE> , Chanout<DATA_TYPE> > csp::ChannelFactory< DATA_TYPE >::any2OnePair ( bool  canPoisonIn = true,
bool  canPoisonOut = true 
) [inline, virtual]

Gets an any-to-one channel from the factory.

Parameters:
canPoisonIn Flag to designate whether the input end should be poisonable
canPoisonOut Flag to designate whether the output end should be poisonable
Returns:
A pair comprising the input and output ends (respectively) of the channel

template<typename DATA_TYPE>
virtual std::pair< Chanin<DATA_TYPE> , Chanout<DATA_TYPE> > csp::ChannelFactory< DATA_TYPE >::any2AnyPair ( bool  canPoisonIn = true,
bool  canPoisonOut = true 
) [inline, virtual]

Gets an any-to-any channel from the factory.

Parameters:
canPoisonIn Flag to designate whether the input end should be poisonable
canPoisonOut Flag to designate whether the output end should be poisonable
Returns:
A pair comprising the input and output ends (respectively) of the channel


Generated on Mon Aug 20 12:24:28 2007 for C++CSP2 by  doxygen 1.4.7