Image Component Library (ICL)
GrabberDeviceDescription.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLIO/src/ICLIO/GrabberDeviceDescription.h **
10 ** Module : ICLIO **
11 ** Authors: Christof Elbrechter **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
33 #include <ICLUtils/Macros.h>
34 #include <string>
35 #include <iostream>
36 
37 namespace icl{
38  namespace io{
39 
43  GrabberDeviceDescription(const std::string &deviceType, const std::string &deviceID, const std::string &description):
44  type(deviceType),id(deviceID),description(description){}
45 
48 
50  std::string type;
51 
53  std::string id;
54 
56  std::string description;
57 
58  std::string name() const {
59  return "[" + type + "]:" + id;
60  }
61 
62  bool equals(const GrabberDeviceDescription other){
63  return (type == other.type) && (id == other.id);
64  }
65 
66  bool isEmpty(){
67  return type.size() && id.size();
68  }
69 
70  };
71 
73  inline std::ostream &operator<<(std::ostream &s, const GrabberDeviceDescription &d){
74  return s << "FoundDevice(" << d.type << "," << d.id << "," << d.description << ")";
75  }
76 
77  } // namespace io
78 }
79 
80 
81 
undocument this line if you encounter any issues!
Definition: Any.h:37
std::string type
type of the device (e.g. dc, pwc, sr or dc800)
Definition: GrabberDeviceDescription.h:50
bool isEmpty()
Definition: GrabberDeviceDescription.h:66
defines and explains an available grabber device
Definition: GrabberDeviceDescription.h:41
#define ICLIO_API
Definition: CompatMacros.h:176
std::string name() const
Definition: GrabberDeviceDescription.h:58
std::string id
ID of the device (e.g. 0 or 1)
Definition: GrabberDeviceDescription.h:53
std::string description
additional description of the device (obtained by calling getUniqueID)
Definition: GrabberDeviceDescription.h:56
bool equals(const GrabberDeviceDescription other)
Definition: GrabberDeviceDescription.h:62
std::ostream & operator<<(std::ostream &stream, const FourCC &fourCC)
overloaded ostream operator for type fourCC
Definition: FourCC.h:97
GrabberDeviceDescription(const std::string &deviceType, const std::string &deviceID, const std::string &description)
Constructor.
Definition: GrabberDeviceDescription.h:43
GrabberDeviceDescription()
Empty constructor.
Definition: GrabberDeviceDescription.h:47