BALL
1.4.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
BALL
STRUCTURE
defaultProcessors.h
Go to the documentation of this file.
1
// -*- Mode: C++; tab-width: 2; -*-
2
// vi: set ts=2:
3
//
4
5
#ifndef BALL_STRUCTURE_DEFAULTPROCESSORS_H
6
#define BALL_STRUCTURE_DEFAULTPROCESSORS_H
7
8
#ifndef BALL_COMMON_H
9
# include <
BALL/common.h
>
10
#endif
11
12
#ifndef BALL_KERNEL_atom_H
13
# include <
BALL/KERNEL/atom.h
>
14
#endif
15
16
#ifndef BALL_MATHS_VECTOR3_H
17
# include <
BALL/MATHS/vector3.h
>
18
#endif
19
20
#ifndef BALL_CONCEPT_PROCESSOR_H
21
# include <
BALL/CONCEPT/processor.h
>
22
#endif
23
24
#ifndef BALL_DATATYPE_STRINGHASHMAP_H
25
# include <
BALL/DATATYPE/stringHashMap.h
>
26
#endif
27
28
namespace
BALL
29
{
33
class
BALL_EXPORT
ClearChargeProcessor
34
:
public
UnaryProcessor
<Atom>
35
{
36
public
:
37
39
virtual
Processor::Result
operator()(
Atom
& atom);
40
};
41
42
46
class
BALL_EXPORT
ClearRadiusProcessor
47
:
public
UnaryProcessor
<Atom>
48
{
49
public
:
50
52
virtual
Processor::Result
operator()(
Atom
& atom);
53
};
54
55
62
class
BALL_EXPORT
AssignRadiusProcessor
63
:
public
UnaryProcessor
<Atom>
64
{
65
public
:
66
68
AssignRadiusProcessor
();
69
73
AssignRadiusProcessor
(
const
String
& filename)
74
throw
(
Exception::FileNotFound
);
75
81
virtual
bool
start();
82
86
virtual
bool
finish();
87
103
virtual
Processor::Result
operator()(
Atom
& atom);
104
108
void
setFilename(
const
String
& filename)
109
throw
(
Exception::FileNotFound
);
110
113
String
& getFilename();
114
117
Size
getNumberOfAssignments();
118
123
Size
getNumberOfErrors();
124
125
126
protected
:
127
128
//_ Extract the data from the file.
129
bool
buildTable_()
130
throw
(
Exception::FileNotFound
);
131
132
String
filename_
;
133
StringHashMap<float>
table_
;
134
Size
number_of_errors_
;
135
Size
number_of_assignments_
;
136
};
137
138
145
class
BALL_EXPORT
AssignChargeProcessor
146
:
public
AssignRadiusProcessor
147
{
148
public
:
149
151
AssignChargeProcessor
();
152
156
AssignChargeProcessor
(
const
String
& filename)
157
throw
(
Exception::FileNotFound
);
158
164
virtual
bool
start();
165
170
virtual
Processor::Result
operator () (
Atom
& atom);
171
174
float
getTotalCharge();
175
176
177
protected
:
178
179
float
total_charge_
;
180
};
181
182
183
}
// namespace BALL
184
185
#endif // BALL_STRUCTURE_DEFAULTPROCESSORS_H
Generated by
1.8.3.1