firevision::CameraFactory Class Reference

Camera factory. More...

#include <cams/factory.h>

List of all members.

Static Public Member Functions

static Camerainstance (const char *as)
 Get camera instance.
static Camerainstance (const CameraArgumentParser *cap)
 Get camera instance with parameters from given camera argument parser.
template<class C>
static C * instance (const char *as)
 Get typed instance of camera.


Detailed Description

Camera factory.

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

Author:
Tim Niemueller

Definition at line 42 of file factory.h.


Member Function Documentation

template<class C>
static C* firevision::CameraFactory::instance ( const char *  as  )  [static]

Get typed instance of camera.

Creates a new instance and converts it to the requested type. If the type does not match the requested camera an exception is thrown.

Parameters:
as camera argument string
Returns:
typed camera instance
Exceptions:
TypeMismatchException thrown, if requested camera does not match requested type.

Camera * firevision::CameraFactory::instance ( const CameraArgumentParser cap  )  [static]

Get camera instance with parameters from given camera argument parser.

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

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

Definition at line 89 of file factory.cpp.

References firevision::CameraArgumentParser::cam_type().

C * firevision::CameraFactory::instance ( const char *  as  )  [static]

Get camera instance.

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

Definition at line 227 of file factory.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Feb 22 13:32:57 2011 for Fawkes API by  doxygen 1.4.7