avcap::ControlManager Class Reference

#include <avcap/ControlManager.h>

Inheritance diagram for avcap::ControlManager:

Inheritance graph
[legend]

Detailed Description

Abstract base for classes that manage the controls of a capture device.

Devices have typically a number of user-setable controls (e.g. brightness, hue,...). The number of controls, the type and possible values will vary from device to device. The ControlManager queries for available controls, their type and valid values. It provides a STL-List of Control-derived objects which represents the functonality of a device control. The concrete ControlManager may not be instantiated by the application but can be obtained from the CaptureDevice object.


Public Member Functions

 ControlManager (DeviceDescriptor *dd)
 The constructor.
virtual ~ControlManager ()=0
 The destructor.
ControlgetControl (const std::string &name)
 Find a control by name.
ControlgetControl (int id)
 Find a control by id.
const ListTypegetControlList ()
 Returns the STL-list of Control objects.
virtual int resetAll ()
 Reset all controls to their default values,i.e. calls the reset()-method of all managed controls.
virtual void query ()=0

Protected Attributes

ListType mControls


Constructor & Destructor Documentation

ControlManager::ControlManager ( DeviceDescriptor dd  ) 

The constructor.

Parameters:
dd The device descriptor to access the device.

ControlManager::~ControlManager (  )  [pure virtual]

The destructor.


Member Function Documentation

Control * ControlManager::getControl ( const std::string &  name  ) 

Find a control by name.

Parameters:
name The name of the control to find.
Returns:
Pointer to the control or 0, if no control was found.

Reimplemented in avcap::DS_ControlManager.

Control * ControlManager::getControl ( int  id  ) 

Find a control by id.

Parameters:
id The id of the control to find.
Returns:
Pointer to the control or 0, if no control was found.

Reimplemented in avcap::DS_ControlManager.

const ListType& avcap::ControlManager::getControlList (  )  [inline]

Returns the STL-list of Control objects.

Returns:
The control list.

Reimplemented in avcap::DS_ControlManager.

int ControlManager::resetAll (  )  [virtual]

Reset all controls to their default values,i.e. calls the reset()-method of all managed controls.

Returns:
0 if successful, -1 else

virtual void avcap::ControlManager::query (  )  [pure virtual]

Called during initialisation by the CaptureDevice to query for the objects that the implementation of this class manages.

Implements avcap::Manager< T >.

Implemented in avcap::AVC_ControlManager, avcap::V4L1_ControlManager, avcap::V4L2_ControlManager, avcap::QT_ControlManager, and avcap::DS_ControlManager.


Field Documentation

ListType avcap::ControlManager::mControls [protected]


The documentation for this class was generated from the following files:
Generated on Mon Nov 30 11:10:32 2009 for avcap-0.1 by  doxygen 1.5.1