IMP
2.0.0
The Integrative Modeling Platform
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
InContainerPairFilter.h
Go to the documentation of this file.
1
/**
2
* \file IMP/container/InContainerPairFilter.h
3
* \brief A filter for Pairs.
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_PAIR_FILTER_H
12
#define IMPCONTAINER_IN_CONTAINER_PAIR_FILTER_H
13
14
#include <IMP/container/container_config.h>
15
#include <
IMP/PairPredicate.h
>
16
#include <
IMP/PairContainer.h
>
17
#include <IMP/internal/container_helpers.h>
18
#include "internal/PairContainerIndex.h"
19
#include <
IMP/pair_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 Pair
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
InContainerPairFilter
:
32
public
PairPredicate
33
{
34
IMP::base::OwnerPointer<internal::PairContainerIndex>
c_;
35
public
:
36
InContainerPairFilter
(
PairContainer
*c,
37
std::string name=
"PairFilter %1%"
);
38
InContainerPairFilter
(
PairContainer
*c,
39
bool
handle_permutations,
40
std::string name=
"PairFilter %1%"
);
41
42
IMP_INDEX_PAIR_PREDICATE
(
InContainerPairFilter
,{
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
(
InContainerPairFilter
,
InContainerPairFilters
);
55
56
IMPCONTAINER_END_NAMESPACE
57
58
#endif
/* IMPCONTAINER_IN_CONTAINER_PAIR_FILTER_H */