SourceXtractorPlusPlus
0.8
Please provide a description of the project.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SEImplementation
SEImplementation
Plugin
SourceIDs
SourceIDTask.h
Go to the documentation of this file.
1
17
/*
18
* SourceIDTask.h
19
*
20
* Created on: May 30, 2018
21
* Author: mschefer
22
*/
23
24
#ifndef _SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDTASK_H_
25
#define _SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDTASK_H_
26
27
#include "
SEFramework/Task/SourceTask.h
"
28
#include "
SEImplementation/Property/SourceId.h
"
29
#include "
SEImplementation/Plugin/SourceIDs/SourceID.h
"
30
31
namespace
SourceXtractor {
32
33
class
SourceIDTask
:
public
SourceTask
{
34
35
public
:
36
virtual
~SourceIDTask
() =
default
;
37
38
SourceIDTask
() {}
39
40
virtual
void
computeProperties
(
SourceInterface
& source)
const override
{
41
auto
detection_id = source.
getProperty
<
SourceId
>().getDetectionId();
42
source.
setProperty
<
SourceID
>(
getNewId
(), detection_id);
43
}
44
45
private
:
46
static
unsigned
int
getNewId
() {
47
static
unsigned
int
s_id = 1;
48
return
s_id++;
49
}
50
51
};
52
53
}
/* namespace SourceXtractor */
54
55
#endif
/* _SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDTASK_H_ */
SourceXtractor::SourceInterface::getProperty
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
Definition:
SourceInterface.h:57
SourceId.h
SourceXtractor::SourceIDTask::SourceIDTask
SourceIDTask()
Definition:
SourceIDTask.h:38
SourceID.h
SourceXtractor::SourceTask
A Task that acts on a Source to compute one or more properties.
Definition:
SourceTask.h:36
SourceTask.h
SourceXtractor::SourceIDTask::computeProperties
virtual void computeProperties(SourceInterface &source) const override
Computes one or more properties for the Source.
Definition:
SourceIDTask.h:40
SourceXtractor::SourceIDTask::getNewId
static unsigned int getNewId()
Definition:
SourceIDTask.h:46
SourceXtractor::SourceInterface::setProperty
void setProperty(Args...args)
Definition:
SourceInterface.h:72
SourceXtractor::SourceIDTask::~SourceIDTask
virtual ~SourceIDTask()=default
SourceXtractor::SourceID
Definition:
SourceID.h:33
SourceXtractor::SourceId
Definition:
SourceId.h:31
SourceXtractor::SourceIDTask
Definition:
SourceIDTask.h:33
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition:
SourceInterface.h:46
Generated by
1.8.5