Isis 3 Programmer Reference
ChooserNameFilter.cpp
1
7/* SPDX-License-Identifier: CC0-1.0 */
8
9#include "ChooserNameFilter.h"
10
11#include <QPair>
12#include <QString>
13
14#include "ControlMeasure.h"
15#include "ControlNet.h"
16#include "ControlPoint.h"
17#include "IString.h"
18
19
20namespace Isis {
21 ChooserNameFilter::ChooserNameFilter(
22 AbstractFilter::FilterEffectivenessFlag flag,
23 int minimumForSuccess) : AbstractStringFilter(flag, minimumForSuccess) {
24 }
25
26
27 ChooserNameFilter::ChooserNameFilter(const ChooserNameFilter &other)
28 : AbstractStringFilter(other) {
29 }
30
31
32 ChooserNameFilter::~ChooserNameFilter() {
33 }
34
35
36 bool ChooserNameFilter::evaluate(const QPair<QString, ControlNet *> *imageAndNet) const {
37 return evaluateImageFromPointFilter(imageAndNet);
38 }
39
40
41 bool ChooserNameFilter::evaluate(const ControlPoint *point) const {
42 return AbstractStringFilter::evaluate((QString) point->GetChooserName());
43 }
44
45
46 bool ChooserNameFilter::evaluate(const ControlMeasure *) const {
47 return true;
48 }
49
50
51 AbstractFilter *ChooserNameFilter::clone() const {
52 return new ChooserNameFilter(*this);
53 }
54
55
56 QString ChooserNameFilter::getImageDescription() const {
57 QString description = AbstractFilter::getImageDescription();
58
59 if (getMinForSuccess() == 1)
60 description += "point with it's chooser name ";
61 else
62 description += "points with chooser names ";
63
64 description += descriptionSuffix();
65 return description;
66 }
67
68
69 QString ChooserNameFilter::getPointDescription() const {
70 return "have chooser names " + descriptionSuffix();
71 }
72}
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16