avcap::Control Class Reference

#include <avcap/Control_avcap.h>

Inheritance diagram for avcap::Control:

Inheritance graph
[legend]

Detailed Description

Abstract Base class for all device controls.

Capture devices possess various controls (e.g. hue, saturation,...) of different type. This class provides the interface that all controls share. Objects derived from this class are managed by a ControlManager which is obtained by the concrete CaptureDevice object. A concrete control may expose an extended interface to provide additional functionality. Applications can use the getType()-method or RTTI to determine the type of the concrete control.


Public Types

enum  Type {
  INTEGER_CONTROL = 0, BOOL_CONTROL, BUTTON_CONTROL, MENU_CONTROL,
  CTRLCLASS_CONTROL, USERDEFINED_CONTROL
}

Public Member Functions

 Control (Type t)
 Constructor.
virtual ~Control ()
 Destructor.
virtual int getId () const=0
 Get the unique identifier of the control.
virtual int getDefaultValue () const=0
 Get the default value of the control.
virtual const std::string & getName () const=0
 Get the name of the control.
virtual int setValue (int val)=0
 Set the new value of the control.
virtual int getValue () const=0
 Get the current value of the control.
virtual int reset ()=0
 Set the value of the control to the default value.
virtual Type getType () const
 Return the type of the control.


Member Enumeration Documentation

enum avcap::Control::Type

Enumerator:
INTEGER_CONTROL 
BOOL_CONTROL 
BUTTON_CONTROL 
MENU_CONTROL 
CTRLCLASS_CONTROL 
USERDEFINED_CONTROL 


Constructor & Destructor Documentation

avcap::Control::Control ( Type  t  )  [inline]

Constructor.

virtual avcap::Control::~Control (  )  [inline, virtual]

Destructor.


Member Function Documentation

virtual int avcap::Control::getId (  )  const [pure virtual]

Get the unique identifier of the control.

Returns:
id

Implemented in avcap::V4L1_Control, avcap::V4L2_BoolControl, avcap::V4L2_ButtonControl, avcap::V4L2_CtrlClassControl, avcap::V4L2_IntControl, avcap::V4L2_MenuControl, avcap::QT_Control, avcap::DS_IntControl, and avcap::DS_BoolControl.

virtual int avcap::Control::getDefaultValue (  )  const [pure virtual]

Get the default value of the control.

Returns:
default value

Implemented in avcap::V4L1_Control, avcap::V4L2_BoolControl, avcap::V4L2_ButtonControl, avcap::V4L2_CtrlClassControl, avcap::V4L2_IntControl, avcap::V4L2_MenuControl, avcap::QT_Control, avcap::DS_IntControl, and avcap::DS_BoolControl.

virtual const std::string& avcap::Control::getName (  )  const [pure virtual]

Get the name of the control.

Returns:
control name

Implemented in avcap::V4L1_Control, avcap::V4L2_BoolControl, avcap::V4L2_ButtonControl, avcap::V4L2_CtrlClassControl, avcap::V4L2_IntControl, avcap::V4L2_MenuControl, avcap::QT_Control, avcap::DS_IntControl, and avcap::DS_BoolControl.

virtual int avcap::Control::setValue ( int  val  )  [pure virtual]

Set the new value of the control.

Parameters:
val : The new value.
Returns:
0, if successful, -1 else

Implemented in avcap::V4L1_Control, avcap::V4L2_BoolControl, avcap::V4L2_ButtonControl, avcap::V4L2_CtrlClassControl, avcap::V4L2_IntControl, avcap::V4L2_MenuControl, avcap::QT_Control, avcap::DS_IntControl, and avcap::DS_BoolControl.

virtual int avcap::Control::getValue (  )  const [pure virtual]

Get the current value of the control.

Returns:
the value

Implemented in avcap::V4L1_Control, avcap::V4L2_BoolControl, avcap::V4L2_ButtonControl, avcap::V4L2_CtrlClassControl, avcap::V4L2_IntControl, avcap::V4L2_MenuControl, avcap::QT_Control, avcap::DS_IntControl, and avcap::DS_BoolControl.

virtual int avcap::Control::reset (  )  [pure virtual]

Set the value of the control to the default value.

Returns:
0, if successful, -1 else

Implemented in avcap::V4L1_Control, avcap::V4L2_BoolControl, avcap::V4L2_ButtonControl, avcap::V4L2_CtrlClassControl, avcap::V4L2_IntControl, avcap::V4L2_MenuControl, avcap::QT_Control, avcap::DS_IntControl, and avcap::DS_BoolControl.

virtual Type avcap::Control::getType (  )  const [inline, virtual]

Return the type of the control.


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