SourceXtractorPlusPlus  0.14
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SourceId.h
Go to the documentation of this file.
1 
17 /*
18  * SourceId.h
19  *
20  * Created on: Apr 26, 2017
21  * Author: mschefer
22  */
23 
24 #ifndef _SEIMPLEMENTATION_PROPERTY_SOURCEID_H_
25 #define _SEIMPLEMENTATION_PROPERTY_SOURCEID_H_
26 
28 
29 namespace SourceXtractor {
30 
31 class SourceId : public Property {
32 
33 public:
34 
35  SourceId(unsigned int detection_id)
36  : m_source_id(getNewId()), m_detection_id(detection_id) {
37  }
38 
41  }
42 
43  virtual ~SourceId() = default;
44 
45  unsigned int getSourceId() const {
46  return m_source_id;
47  }
48 
49  unsigned int getDetectionId() const {
50  return m_detection_id;
51  }
52 
53 private:
54  unsigned int m_source_id, m_detection_id;
55 
56  static unsigned int getNewId() {
57  static unsigned int s_id = 1;
58  return s_id++;
59  }
60 
61 
62 
63 }; /* End of SourceId class */
64 
65 }
66 
67 
68 #endif /* _SEIMPLEMENTATION_PROPERTY_SOURCEID_H_ */
unsigned int getDetectionId() const
Definition: SourceId.h:49
unsigned int getSourceId() const
Definition: SourceId.h:45
SourceId(unsigned int detection_id)
Definition: SourceId.h:35
Base class for all Properties. (has no actual content)
Definition: Property.h:33
unsigned int m_detection_id
Definition: SourceId.h:54
unsigned int m_source_id
Definition: SourceId.h:54
virtual ~SourceId()=default
static unsigned int getNewId()
Definition: SourceId.h:56