Commit 503aab0bd5d1447c8666d8228f3e3f7cca90c37c

Authored by Josh Klontz
1 parent e214a85a

remove fileexclusion

openbr/plugins/metadata/fileexclusion.cpp deleted
1   -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2   - * Copyright 2012 The MITRE Corporation *
3   - * *
4   - * Licensed under the Apache License, Version 2.0 (the "License"); *
5   - * you may not use this file except in compliance with the License. *
6   - * You may obtain a copy of the License at *
7   - * *
8   - * http://www.apache.org/licenses/LICENSE-2.0 *
9   - * *
10   - * Unless required by applicable law or agreed to in writing, software *
11   - * distributed under the License is distributed on an "AS IS" BASIS, *
12   - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13   - * See the License for the specific language governing permissions and *
14   - * limitations under the License. *
15   - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
16   -
17   -#include <openbr/plugins/openbr_internal.h>
18   -
19   -namespace br
20   -{
21   -
22   -/*!
23   - * \brief DOCUMENT ME CHARLES
24   - * \author Unknown \cite Unknown
25   - */
26   -class FileExclusionTransform : public UntrainableMetaTransform
27   -{
28   - Q_OBJECT
29   -
30   - Q_PROPERTY(QString exclusionGallery READ get_exclusionGallery WRITE set_exclusionGallery RESET reset_exclusionGallery STORED false)
31   - BR_PROPERTY(QString, exclusionGallery, "")
32   -
33   - QSet<QString> excluded;
34   -
35   - void project(const Template &, Template &) const
36   - {
37   - qFatal("FileExclusion can't do anything here");
38   - }
39   -
40   - void project(const TemplateList &src, TemplateList &dst) const
41   - {
42   - foreach (const Template &srcTemp, src) {
43   - if (!excluded.contains(srcTemp.file))
44   - dst.append(srcTemp);
45   - }
46   - }
47   -
48   - void init()
49   - {
50   - if (exclusionGallery.isEmpty())
51   - return;
52   - File rFile(exclusionGallery);
53   - rFile.remove("append");
54   -
55   - FileList temp = FileList::fromGallery(rFile);
56   - excluded = QSet<QString>::fromList(temp.names());
57   - }
58   -};
59   -
60   -BR_REGISTER(Transform, FileExclusionTransform)
61   -
62   -} // namespace br
63   -
64   -#include "metadata/fileexclusion.moc"