| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#ifndef BALL_MOLMEC_COMMON_ASSIGNTYPES_H |
| 10 |
#define BALL_MOLMEC_COMMON_ASSIGNTYPES_H |
| 11 |
|
| 12 |
#ifndef BALL_CONCEPT_PROCESSOR_H |
| 13 |
# include <BALL/CONCEPT/processor.h> |
| 14 |
#endif |
| 15 |
|
| 16 |
#ifndef BALL_MOLMEC_PARAMETER_ATOMTYPES_H |
| 17 |
# include <BALL/MOLMEC/PARAMETER/atomTypes.h> |
| 18 |
#endif |
| 19 |
|
| 20 |
#include <vector> |
| 21 |
|
| 22 |
namespace BALL |
| 23 |
{ |
| 24 |
|
| 25 |
class BALL_EXPORT AssignBaseProcessor |
| 26 |
: public UnaryProcessor<Atom> |
| 27 |
{ |
| 28 |
public: |
| 29 |
|
| 30 |
|
| 31 |
AssignBaseProcessor(); |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
void setMaximumUnassignedAtoms(Size nr); |
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
Size getMaximumUnassignedAtoms() const; |
| 43 |
|
| 44 |
|
| 45 |
Size getNumberOfUnassignedAtoms() const; |
| 46 |
|
| 47 |
|
| 48 |
HashSet<const Atom*>& getUnassignedAtoms(); |
| 49 |
|
| 50 |
protected: |
| 51 |
|
| 52 |
|
| 53 |
HashSet<const Atom*> unassigned_atoms_; |
| 54 |
|
| 55 |
|
| 56 |
Size max_number_unassigned_atoms_; |
| 57 |
}; |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
class BALL_EXPORT AssignTypeProcessor |
| 64 |
: public AssignBaseProcessor |
| 65 |
{ |
| 66 |
public: |
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
AssignTypeProcessor(const AtomTypes& atom_types); |
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
virtual Processor::Result operator () (Atom& atom); |
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
protected: |
| 88 |
|
| 89 |
AtomTypes atom_types_; |
| 90 |
|
| 91 |
}; |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
class BALL_EXPORT AssignTypeNameProcessor |
| 98 |
: public AssignBaseProcessor |
| 99 |
{ |
| 100 |
public: |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
AssignTypeNameProcessor(const String& filename, bool overwrite = false); |
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
virtual Processor::Result operator () (Atom& atom); |
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
protected: |
| 122 |
|
| 123 |
StringHashMap<String> type_map_; |
| 124 |
|
| 125 |
bool overwrite_; |
| 126 |
}; |
| 127 |
} |
| 128 |
|
| 129 |
|
| 130 |
#endif |