Yet Another Robot Platform
No Matches
yarp::os::PortReaderCreator Class Referenceabstract

A creator for readers. More...

#include <yarp/os/PortReaderCreator.h>

+ Inheritance diagram for yarp::os::PortReaderCreator:

Public Member Functions

virtual ~PortReaderCreator ()
virtual PortReadercreate () const =0
 Factory for PortReader objects.

Detailed Description

A creator for readers.

This is used when you want a Port to create a different reader for every input connection it receives. This is a very quick way to make a multi-threaded server that keeps track of which input is which. Inherit from this class, defining the PortReaderCreator::create method. Then pass an instance to Port::setReaderCreator. The create() method will be called every time the Port receives a new connection, and all input coming in via that connection will be channeled appropriately.

Definition at line 29 of file PortReaderCreator.h.

Constructor & Destructor Documentation

◆ ~PortReaderCreator()

yarp::os::PortReaderCreator::~PortReaderCreator ( )


Member Function Documentation

◆ create()

virtual PortReader * yarp::os::PortReaderCreator::create ( ) const
pure virtual

Factory for PortReader objects.

A new PortReader object – used to read from a connection to a Port

Implemented in yarp::name::NameServerManager.

The documentation for this class was generated from the following files: