Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
alvar::CaptureFactory Class Reference

CaptureFactory for creating Capture classes. More...

#include <CaptureFactory.h>

Classes

class  CaptureFactoryDestroyer
 CaptureFactoryDestroyer for deleting the CaptureFactory singleton. More...
 

Public Types

typedef std::vector< CaptureDeviceCaptureDeviceVector
 Vector of CaptureDevices. More...
 
typedef std::vector< std::string > CapturePluginVector
 Vector of strings. More...
 

Public Member Functions

CapturecreateCapture (const CaptureDevice captureDevice)
 Create Capture class. Transfers onwership to the caller. More...
 
CaptureDeviceVector enumerateDevices (const std::string &captureType="")
 Enumerate capture devices currently available. More...
 
CapturePluginVector enumeratePlugins ()
 Enumerate capture plugins currently available. More...
 

Static Public Member Functions

static CaptureFactoryinstance ()
 The singleton instance of CaptureFactory. More...
 

Protected Member Functions

 ~CaptureFactory ()
 Destructor. More...
 

Private Member Functions

 CaptureFactory ()
 
 CaptureFactory (const CaptureFactory &)
 
CaptureFactoryoperator= (const CaptureFactory &)
 

Private Attributes

CaptureFactoryPrivated
 

Static Private Attributes

static CaptureFactoryDestroyer mDestroyer
 
static CaptureFactorymInstance = NULL
 
static Mutex mMutex
 

Detailed Description

CaptureFactory for creating Capture classes.

CaptureFactory is a singleton that creates Capture classes used to perform camera acquisition. Different backends are implemented as dynamicly loaded plugins so that platform dependancies can be handled at runtime and not compile time.

Definition at line 52 of file CaptureFactory.h.

Member Typedef Documentation

Vector of CaptureDevices.

Definition at line 77 of file CaptureFactory.h.

typedef std::vector<std::string> alvar::CaptureFactory::CapturePluginVector

Vector of strings.

Definition at line 63 of file CaptureFactory.h.

Constructor & Destructor Documentation

alvar::CaptureFactory::~CaptureFactory ( )
protected

Destructor.

Definition at line 215 of file CaptureFactory.cpp.

alvar::CaptureFactory::CaptureFactory ( )
private

Definition at line 210 of file CaptureFactory.cpp.

alvar::CaptureFactory::CaptureFactory ( const CaptureFactory )
private

Member Function Documentation

Capture * alvar::CaptureFactory::createCapture ( const CaptureDevice  captureDevice)

Create Capture class. Transfers onwership to the caller.

If the needed backend plugin is not loaded, an attempt is made to load it and an instance of it is kept such that it is available for subsequent calls.

Parameters
captureDeviceCaptureDevice object specifying the plugin to use.
Returns
A new Capture class for which the caller takes ownership.
Examples:
SampleCamCalib.cpp, SampleCvTestbed.cpp, SampleIntegralImage.cpp, SampleLabeling.cpp, SampleMarkerDetector.cpp, SampleMarkerHide.cpp, SampleMarkerlessDetector.cpp, SampleMultiMarker.cpp, SampleMultiMarkerBundle.cpp, SamplePointcloud.cpp, and SampleTrack.cpp.

Definition at line 257 of file CaptureFactory.cpp.

CaptureFactory::CaptureDeviceVector alvar::CaptureFactory::enumerateDevices ( const std::string &  captureType = "")

Enumerate capture devices currently available.

This method should be used carfully since it will load all the known plugins and call their respective enumeration methods. The vector of CaptureDevice objects returned should be cached.

Parameters
captureTypeForce the enumeration of only one type of plugin.
Returns
A vector of CaptureDevice objects that are currently available.
Examples:
SampleCamCalib.cpp, SampleCvTestbed.cpp, SampleIntegralImage.cpp, SampleLabeling.cpp, SampleMarkerDetector.cpp, SampleMarkerHide.cpp, SampleMarkerlessDetector.cpp, SampleMultiMarker.cpp, SampleMultiMarkerBundle.cpp, SamplePointcloud.cpp, and SampleTrack.cpp.

Definition at line 234 of file CaptureFactory.cpp.

CaptureFactory::CapturePluginVector alvar::CaptureFactory::enumeratePlugins ( )

Enumerate capture plugins currently available.

This method should be used carfully since it will load all the available plugins.

Returns
A vector of strings identifying all currently available capture plugins.
Examples:
SampleCamCalib.cpp, SampleCvTestbed.cpp, SampleIntegralImage.cpp, SampleLabeling.cpp, SampleMarkerDetector.cpp, SampleMarkerHide.cpp, SampleMarkerlessDetector.cpp, SampleMultiMarker.cpp, SampleMultiMarkerBundle.cpp, SamplePointcloud.cpp, and SampleTrack.cpp.

Definition at line 220 of file CaptureFactory.cpp.

CaptureFactory * alvar::CaptureFactory::instance ( )
static
CaptureFactory& alvar::CaptureFactory::operator= ( const CaptureFactory )
private

Member Data Documentation

CaptureFactoryPrivate* alvar::CaptureFactory::d
private

Definition at line 133 of file CaptureFactory.h.

CaptureFactory::CaptureFactoryDestroyer alvar::CaptureFactory::mDestroyer
staticprivate

Definition at line 130 of file CaptureFactory.h.

CaptureFactory * alvar::CaptureFactory::mInstance = NULL
staticprivate

Definition at line 128 of file CaptureFactory.h.

Mutex alvar::CaptureFactory::mMutex
staticprivate

Definition at line 129 of file CaptureFactory.h.


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


ar_track_alvar
Author(s): Scott Niekum
autogenerated on Thu Jun 6 2019 19:27:24