source: trunk/ETSI-Testsuites/ETSI_auto_IOT/adapter/src/Capture/CaptureFactory.h @ 22

Last change on this file since 22 was 22, checked in by rings, 14 years ago
  • Property svn:executable set to *
File size: 1.3 KB
Line 
1/**
2 * @file CaptureFactory.h
3 * This header file defines the CaptureFactory class.
4 * @author Tomas Urban
5 * @version 0.1
6 * @date 16/07/2009
7 */
8#ifndef CAPTURE_FACTORY_H
9#define CAPTURE_FACTORY_H
10
11#include "GenericCapture.h"
12#include "Helper/Singleton.h"
13
14/**
15 * A singleton factory class for instantiating received data messages.
16 */
17class CaptureFactory  : public Singleton<CaptureFactory>
18{
19private:
20        friend class Singleton<CaptureFactory>;
21        CaptureFactory(void);
22public:
23        ~CaptureFactory(void);
24        /**
25         * The factory method for creating capture device instances based on supplied
26         * device type and mode. The objects returned by this method are allocated on the heap, so they
27         * have to be disposed when they are not needed anymore by the \c delete operator or
28         * calling the #DisposeCaptureInstance method.
29         * @param captureType Type of the capturing device
30         * @param captureMode Capturing mode (live or offline)
31         * @return Created device instance or \c NULL if any error has ocurred (e.g. unknown
32         * or unsupported device).
33         */
34        GenericCapture * CreateCaptureInstance(ECaptureType captureType,
35                ECaptureMode captureMode);
36        /**
37         * This method is used for disposing instances allocated by the #CreateCaptureInstance method.
38         * @param pInstance Capture device instance to be disposed
39         */
40        void DisposeCaptureInstance(GenericCapture * pInstance);
41};
42
43#endif
Note: See TracBrowser for help on using the repository browser.