IMP
2.0.0
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
InContainerTripletFilter.h
Go to the documentation of this file.
1
/**
2
* \file IMP/container/InContainerTripletFilter.h
3
* \brief A filter for Triplets.
4
*
5
* This file is generated by a script (core/tools/make-containers).
6
* Do not edit directly.
7
*
8
* Copyright 2007-2013 IMP Inventors. All rights reserved.
9
*/
10
11
#ifndef IMPCONTAINER_IN_CONTAINER_TRIPLET_FILTER_H
12
#define IMPCONTAINER_IN_CONTAINER_TRIPLET_FILTER_H
13
14
#include <IMP/container/container_config.h>
15
#include <
IMP/TripletPredicate.h
>
16
#include <
IMP/TripletContainer.h
>
17
#include <IMP/internal/container_helpers.h>
18
#include "internal/TripletContainerIndex.h"
19
#include <
IMP/triplet_macros.h
>
20
#include <
IMP/base/warning_macros.h
>
21
22
IMPCONTAINER_BEGIN_NAMESPACE
23
24
25
//! A filter which returns true if a container containers the Triplet
26
/** This predicate returns 1 if the passed tuple is in the container.
27
\note Use the handle_permutations parameter to the constructor to
28
determine whether only exact matchers, or matches under permutation
29
are considered matching. By default they are are.
30
*/
31
class
IMPCONTAINEREXPORT
InContainerTripletFilter
:
32
public
TripletPredicate
33
{
34
IMP::base::OwnerPointer<internal::TripletContainerIndex>
c_;
35
public
:
36
InContainerTripletFilter
(
TripletContainer
*c,
37
std::string name=
"TripletFilter %1%"
);
38
InContainerTripletFilter
(
TripletContainer
*c,
39
bool
handle_permutations,
40
std::string name=
"TripletFilter %1%"
);
41
42
IMP_INDEX_TRIPLET_PREDICATE
(
InContainerTripletFilter
,{
43
IMP_UNUSED
(m);
44
return
c_->get_contains(pi);
45
},{
46
ModelObjectsTemp ret;
47
ret+=
IMP::get_particles
(m, pi);
48
ret.push_back(c_);
49
return
ret;
50
});
51
};
52
53
54
IMP_OBJECTS
(
InContainerTripletFilter
,
InContainerTripletFilters
);
55
56
IMPCONTAINER_END_NAMESPACE
57
58
#endif
/* IMPCONTAINER_IN_CONTAINER_TRIPLET_FILTER_H */