Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Data Processing - Multiplexer - DPMultiplexBodyC<class InT,class OutT>
 

  PUBLIC
DPMultiplexBodyC::DPMultiplexBodyC(IntT,const DPIOPortC &)
DPMultiplexBodyC::DPMultiplexBodyC(const SArray1dC> &)
DPMultiplexBodyC::DPMultiplexBodyC(istream &)
DPMultiplexBodyC::DPMultiplexBodyC(const DPMultiplexBodyC &)
DPMultiplexBodyC::IsPutReady(void) const
DPMultiplexBodyC::IsGetReady(void) const
DPMultiplexBodyC::PutEOS(void)
DPMultiplexBodyC::Put(const OutT &)
DPMultiplexBodyC::PutArray(const SArray1dC &)
DPMultiplexBodyC::Get(void)
DPMultiplexBodyC::GetArray(SArray1dC &)
DPMultiplexBodyC::Get(InT &)
DPMultiplexBodyC::IsGetEOS(void) const
DPMultiplexBodyC::Copy(void) const
DPMultiplexBodyC::Save(ostream &) const
DPIOPortBodyC::Save(ostream &) const
DPIOPortBodyC::IPorts(void) const
DPIOPortBodyC::OPorts(void) const
DPIPortBodyC::Get(void)
DPIPortBodyC::Get(DataT &)
DPIPortBodyC::GetArray(SArray1dC &)
DPIPortBodyC::InputType(void) const
DPIPortBodyC::Save(ostream &) const
DPIPortBodyC::Discard(void)
DPOPortBodyC::Put(const DataT &)
DPOPortBodyC::PutArray(const SArray1dC &)
DPOPortBodyC::OutputType(void) const
DPOPortBodyC::Save(ostream &) const
DPStreamOpBodyC::OpName(void) const
DPStreamOpBodyC::IPlugs(void) const
DPStreamOpBodyC::OPlugs(void) const
DPStreamOpBodyC::IPorts(void) const
DPStreamOpBodyC::OPorts(void) const
DPIPortBaseBodyC::IsGetReady(void) const
DPIPortBaseBodyC::IsGetEOS(void) const
DPIPortBaseBodyC::InputType(void) const
DPIPortBaseBodyC::Save(ostream &) const
DPIPortBaseBodyC::Discard(void)
DPOPortBaseBodyC::PutEOS(void)
DPOPortBaseBodyC::IsPutReady(void) const
DPOPortBaseBodyC::OutputType(void) const
DPOPortBaseBodyC::Save(ostream &) const
DPEntityBodyC::Save(ostream &) const
DPEntityBodyC::Save(BinOStreamC &) const
DPEntityBodyC::Copy(void) const
DPPortBodyC::IsAsync(void) const
DPPortBodyC::Save(ostream &) const
DPPortBodyC::ConnectedTo(void) const
DPPortBodyC::GetAttr(const StringC &,StringC &)
DPPortBodyC::SetAttr(const StringC &,const StringC &)
DPPortBodyC::IsAsync(void) const
DPPortBodyC::Save(ostream &) const
DPPortBodyC::ConnectedTo(void) const
DPPortBodyC::GetAttr(const StringC &,StringC &)
DPPortBodyC::SetAttr(const StringC &,const StringC &)
RCBodyVC::Save(ostream &) const
RCBodyVC::Save(BinOStreamC &) const
RCBodyVC::Copy(void) const
RCBodyVC::DeepCopy(UIntT) const
DPEntityBodyC::Save(ostream &) const
DPEntityBodyC::Save(BinOStreamC &) const
DPEntityBodyC::Copy(void) const
RCBodyC::References(void) const
RCBodyC::Copy(void) const
RCBodyC::DeepCopy(UIntT) const
RCBodyC::IncRefCounter(void)
RCBodyC::DecRefCounter(void)

   DPMultiplexBodyC<class InT,class OutT>   
 
Multiplex an operation body.
 
include "Ravl/DP/Multiplex.hh"
Created:04/07/1998 
Source file:Ravl/Core/IO/Multiplex.hh
User Level:Develop
Library:RavlIO
Example:exDPMultiplex.cc
In Scope:RavlN

Comments:
This is indended to be used with DPThreadC to do multiprocessing.

This will preserve the order of the data in the stream.

Parent Classes: Variables:
IntT in;

IntT out;

SArray1dC> procs;

Methods:
DPMultiplexBodyC(IntT num,const DPIOPortC<InT,OutT> & nproc)
Constructor.
NB. This only uses nproc as a template, it is not actually used for processing. This avoids possible problems of copying data out of a running thread.

** nproc MUST not have a running thread **.


DPMultiplexBodyC(const SArray1dC<DPIOPortC<InT,OutT>> & nprocs)
Constructor.

DPMultiplexBodyC(istream & in)
Stream constructor.

DPMultiplexBodyC(const DPMultiplexBodyC & oth)
Copy constructor.
Makes a deep copy of procs array.

bool IsPutReady() const
Is some data ready ?
true = yes.

bool IsGetReady() const
Is some data ready ?
true = yes.

void PutEOS()
Put End Of Stream marker.

bool Put(const OutT & dat)
Put data.

IntT PutArray(const SArray1dC<OutT> & data)
Put an array of data to stream.
returns the number of elements processed.

InT Get()
Get next piece of data.
May block if not ready, or it will return a constructed with the default constructor.

IntT GetArray(SArray1dC<InT> & data)
Get an array of data from stream.
returns the number of elements processed.

bool Get(InT & buff)
Get next piece of data.
May block if not ready, or it will return a constructed with the default constructor.

bool IsGetEOS() const
Is get EOS ?

RCBodyVC & Copy() const
Make a deep copy of object.

bool Save(ostream & out) const
Save to ostream.

#include "Ravl/DP/IOPort.hh"
bool Save(ostream & out) const
Save to ostream.

DListC<DPIPortBaseC> IPorts() const
Input ports.

DListC<DPOPortBaseC> OPorts() const
Output ports

#include "Ravl/DP/Port.hh"
InT Get()
Get next piece of data.
May block if not ready, or it could throw an DataNotReadyC exception. NB. This function MUST be provided by client class.

bool Get(InT & buff)
Try and get next piece of data.
This may not NOT block, if no data is ready it will return false, and not set buff. NB. The default version of this function uses the Get() method defined above and so need not be provided by derived classes.

IntT GetArray(SArray1dC<InT> & data)
Get an array of data from stream.
returns the number of elements succesfully processed. NB. This need NOT be overridden in client classes unless fast handling of arrays of data elements is required.

const type_info & InputType() const
Input type.

bool Save(ostream & out) const
Save to ostream.

bool Discard()
Discard the next input datum.

bool Put(const OutT &)
Put data.
This function MUST be provided by client class.

IntT PutArray(const SArray1dC<OutT> & data)
Put an array of data to stream.
returns number of elements processed. NB. This need NOT be overridden in client classes unless fast handling of arrays of data elements is required.

const type_info & OutputType() const
Input type.

bool Save(ostream & out) const
Save to ostream.

#include "Ravl/DP/StreamOp.hh"
StringC OpName() const
Op type name.

DListC<DPIPlugBaseC> IPlugs() const
Input plugs.

DListC<DPOPlugBaseC> OPlugs() const
Output plugs

DListC<DPIPortBaseC> IPorts() const
Input ports.

DListC<DPOPortBaseC> OPorts() const
Output ports

#include "Ravl/DP/Port.hh"
bool IsGetReady() const
Is some data ready ?
true = yes. Defaults to !IsGetEOS().

bool IsGetEOS() const
Has the End Of Stream been reached ?
true = yes.

const type_info & InputType() const
Input type.

bool Save(ostream & out) const
Save to ostream.

bool Discard()
Discard the next input datum.

void PutEOS()
Put End Of Stream marker.

bool IsPutReady() const
Is port ready for data ?

const type_info & OutputType() const
Output type.

bool Save(ostream & out) const
Save to ostream.

#include "Ravl/DP/Entity.hh"
bool Save(ostream & out) const
Save to ostream.

bool Save(BinOStreamC & out) const
Save to binary stream.

RCBodyVC & Copy() const
Creat a copy of this object.

#include "Ravl/DP/Port.hh"
bool IsAsync() const
Does port work asynchronously ?

bool Save(ostream & out) const
Save to ostream.

DPPortC ConnectedTo() const
Is this port connected to another ?
If not returns invalid handle.

bool GetAttr(const StringC & attrName,StringC & attrValue)
Get a stream attribute.
Returns false if the attribute name is unknown. This is for handling stream attributes such as frame rate, and compression ratios.

bool SetAttr(const StringC & attrName,const StringC & attrValue)
Set a stream attribute.
Returns false if the attribute name is unknown. This is for handling stream attributes such as frame rate, and compression ratios.

bool IsAsync() const
Does port work asynchronously ?

bool Save(ostream & out) const
Save to ostream.

DPPortC ConnectedTo() const
Is this port connected to another ?
If not returns invalid handle.

bool GetAttr(const StringC & attrName,StringC & attrValue)
Get a stream attribute.
Returns false if the attribute name is unknown. This is for handling stream attributes such as frame rate, and compression ratios.

bool SetAttr(const StringC & attrName,const StringC & attrValue)
Set a stream attribute.
Returns false if the attribute name is unknown. This is for handling stream attributes such as frame rate, and compression ratios.

#include "Ravl/RCHandleV.hh"
bool Save(ostream & out) const
Save to stream 'out'.

bool Save(BinOStreamC & out) const
Save to binary stream 'out'.

RCBodyVC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

RCBodyC & DeepCopy(UIntT levels = ((UIntT))) const
Make a deep copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

#include "Ravl/DP/Entity.hh"
bool Save(ostream & out) const
Save to ostream.

bool Save(BinOStreamC & out) const
Save to binary stream.

RCBodyVC & Copy() const
Creat a copy of this object.

#include "Ravl/RefCounter.hh"
UIntT References() const
Access count of handles open to this object.

RCBodyC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

RCBodyC & DeepCopy(UIntT levels = ((UIntT))) const
Make a deep copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

void IncRefCounter()
Increment reference counter.

bool DecRefCounter()
Decrement reference counter.


Maintainer:Charles Galambos, Created: 04/07/1998, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002