Fawkes API  Fawkes Development Version
firevision::CameraControlFactory Class Reference

Camera control factory. More...

#include <>>

List of all members.

Static Public Member Functions

static CameraControlinstance (const char *as)
 Get camera control instance.
static CameraControlinstance (Camera *camera)
 Get camera control instance.
static CameraControlinstance (const CameraArgumentParser *cap)
 Get camera control instance with parameters from given camera argument parser.
static CameraControlinstance (const std::type_info &typeinf, Camera *camera)
 Get camera control instance.

Detailed Description

Camera control factory.

This camera control factory provides access to all camera controls in a unified way. You just supply a camera argument string and depending on the camera ID and compile-time support of camera control types an instance of the desired camera control is returned or otherwise an exception is thrown. See instance() for a list of supported camera control types.

Author:
Tim Niemueller

Member Function Documentation

CameraControl * firevision::CameraControlFactory::instance ( const char *  as) [static]

Get camera control instance.

Get an instance of a camera of the given type. The argument string determines the type of camera to open. Supported camera types:

  • evid100p, SonyEviD100PControl, compiled if HAVE_EVID100P_CTRL is defined in fvconf.mk
  • dpptu, DPPTUControl, compiled if HAVE_DPPTU_CTRL is defined in fvconf.mk
    Parameters:
    ascamera argument string
    Returns:
    camera control instance of requested type
    Exceptions:
    UnknownCameraControlTypeExceptionthrown, if the desired camera control could not be instantiated. This could be either to a misspelled camera ID, generally missing support or unset definition due to configuration in fvconf.mk or missing libraries and camera support compile-time autodetection.

Definition at line 125 of file factory.cpp.

CameraControl * firevision::CameraControlFactory::instance ( Camera camera) [static]

Get camera control instance.

Get an instance of a camera control from the passed camera. It is tried to cast the camera to the appropriate camera control type. If that succeeds the camera control is returned, otherwise an exception is thrown.

Parameters:
cameracamera to cast
Returns:
camera control instance.
Exceptions:
UnknownCameraControlTypeExceptionthrown, if the desired camera control could not be instantiated. This could be either to a misspelled camera ID, generally missing support or unset definition due to configuration in fvconf.mk or missing libraries and camera support compile-time autodetection.

Definition at line 148 of file factory.cpp.

CameraControl * firevision::CameraControlFactory::instance ( const CameraArgumentParser cap) [static]

Get camera control instance with parameters from given camera argument parser.

This is a convenience method and works like instace(const char *as).

Parameters:
capcamera argument parser
Returns:
camera instance
Exceptions:
UnknownCameraControlTypeExceptionthrown if camera type is not known or was not available at build time.

Definition at line 76 of file factory.cpp.

References firevision::CameraArgumentParser::cam_type().

CameraControl * firevision::CameraControlFactory::instance ( const std::type_info &  typeinf,
Camera camera 
) [static]

Get camera control instance.

Get an instance of a camera of the given type based on the given camera. It is tried to cast the camera to the appropriate camera control type. If that succeeds the camera control is returned, otherwise an exception is thrown.

Parameters:
typeinftype info for the intended type of the camera control
cameracamera to cast
Returns:
camera control instance of requested type
Exceptions:
UnknownCameraControlTypeExceptionthrown, if the desired camera control could not be instantiated. This could be either to a misspelled camera ID, generally missing support or unset definition due to configuration in fvconf.mk or missing libraries and camera support compile-time autodetection.

Definition at line 172 of file factory.cpp.


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