LowLevelEncoderMap Class Reference

A partial implementation of FrameOstream, using a map between 'shortnames' and LowLevelEncoder objects. More...

#include <Transport/LowLevelEncoderMap.H>

Inheritance diagram for LowLevelEncoderMap:
Inheritance graph
[legend]
Collaboration diagram for LowLevelEncoderMap:
Collaboration graph
[legend]

List of all members.

Classes

struct  Impl

Public Member Functions

 LowLevelEncoderMap (OptionManager &mgr, const std::string &descrName, const std::string &tagName)
virtual void writeFrame (const GenericFrame &frame, const std::string &shortname, const FrameInfo &auxinfo)
 Send the frame to the LowLevelEncoder corresponding to shortname.
virtual void closeStream (const std::string &shortname)
 Close and delete the LowLevelEncoder corresponding to shortname.

Protected Member Functions

virtual rutz::shared_ptr
< LowLevelEncoder
makeEncoder (const GenericFrameSpec &spec, const std::string &shortname, const FrameInfo &auxinfo)=0
 Must be implemented by subclasses to return a type-appropriate encoder object.
virtual void stop2 ()
 Overridden to destroy our encoder map.

Detailed Description

A partial implementation of FrameOstream, using a map between 'shortnames' and LowLevelEncoder objects.

Subclasses must implement makeEncoderForStem(), but do not need to implement writeFrame() or closeStream(). Subclasses may implement setConfigInfo() as needed.

Definition at line 51 of file LowLevelEncoderMap.H.


Member Function Documentation

void LowLevelEncoderMap::closeStream ( const std::string shortname  )  [virtual]

Close and delete the LowLevelEncoder corresponding to shortname.

This means that if additional frames are later sent to that same shortname, then a new LowLevelEncoder object will be created for that shortname (possibly overwriting previous files or output destinations, etc.).

Implements FrameOstream.

Definition at line 99 of file LowLevelEncoderMap.C.

virtual rutz::shared_ptr<LowLevelEncoder> LowLevelEncoderMap::makeEncoder ( const GenericFrameSpec spec,
const std::string shortname,
const FrameInfo auxinfo 
) [protected, pure virtual]

Must be implemented by subclasses to return a type-appropriate encoder object.

Implemented in UcbMpegOutputStream.

void LowLevelEncoderMap::stop2 (  )  [protected, virtual]

Overridden to destroy our encoder map.

Reimplemented from ModelComponent.

Definition at line 114 of file LowLevelEncoderMap.C.

References ModelComponent::stop().

void LowLevelEncoderMap::writeFrame ( const GenericFrame frame,
const std::string shortname,
const FrameInfo auxinfo 
) [virtual]

Send the frame to the LowLevelEncoder corresponding to shortname.

If no such encoder exists yet, then a new one will be created by calling the subclass's implementation of makeEncoderForStem().

Implements FrameOstream.

Definition at line 72 of file LowLevelEncoderMap.C.

References ASSERT, GenericFrame::frameSpec(), and rutz::shared_ptr< T >::is_valid().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:37 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3