-
Notifications
You must be signed in to change notification settings - Fork 22
/
FieldSelector.hpp
79 lines (64 loc) · 1.88 KB
/
FieldSelector.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef AVANGO_TOOLS_FIELDSELECTOR_HPP
#define AVANGO_TOOLS_FIELDSELECTOR_HPP
/**
* \file
* \ingroup av_tools
*/
#include <avango/tools/Selector.hpp>
#include <avango/tools/windows_specific_tools.hpp>
namespace av
{
namespace tools
{
/**
* FieldSelector class selects targets containing given field.
*
* \ingroup av_tools
*/
class AV_TOOLS_DLL FieldSelector : public Selector
{
AV_FC_DECLARE();
public:
/**
* Constructor.
*/
FieldSelector();
protected:
/**
* Destructor made protected to prevent allocation on stack.
*/
virtual ~FieldSelector();
public:
/**
* Defines the input targets from which the named objects are selected.
*/
MFTargetHolder Targets;
/**
* Defines the name which is used to select targets. The output is in SelectedTargets.
*/
SFString SelectableFieldName;
/**
* Set to false if also objects should be selectable, which contain the given names
* as substring. Otherwise only equal names are selectable, which is the default.
*/
SFBool EqualNameOnly;
/**
* Specify, if the given strings in SelectableNames and SelectableTargetNames should be treated
* as regular expressions. Default value: False.
* If EqualNameOnly and TreatAsRegularExpression are both set to True, each regular expression is
* surrounded by .*<Expression>.*
*/
SFBool TreatAsRegularExpression;
/* virtual */ void evaluate();
protected:
bool isSelectable(av::FieldContainer& object);
};
using SFFieldSelector = SingleField<Link<FieldSelector>>;
using MFFieldSelector = MultiField<Link<FieldSelector>>;
} // namespace tools
#ifdef AV_INSTANTIATE_FIELD_TEMPLATES
template class AV_TOOLS_DLL SingleField<Link<tools::FieldSelector>>;
template class AV_TOOLS_DLL MultiField<Link<tools::FieldSelector>>;
#endif
} // namespace av
#endif // AVANGO_TOOLS_FIELDSELECTOR_HPP