Last change
on this file since 2e06c4 was 01d28a, checked in by Tillmann Crueger <crueger@…>, 16 years ago |
Added templates that allow arbitrary calculations on atoms to be mapped to sets of Atoms
|
-
Property mode
set to
100644
|
File size:
549 bytes
|
Rev | Line | |
---|
[01d28a] | 1 | /*
|
---|
| 2 | * AtomsCalculation.hpp
|
---|
| 3 | *
|
---|
| 4 | * Created on: Feb 19, 2010
|
---|
| 5 | * Author: crueger
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #ifndef ATOMSCALCULATION_HPP_
|
---|
| 9 | #define ATOMSCALCULATION_HPP_
|
---|
| 10 |
|
---|
| 11 | #include "Actions/Calculation.hpp"
|
---|
| 12 |
|
---|
| 13 | template<typename T>
|
---|
| 14 | class AtomsCalculation : public Calculation<std::vector<T> >
|
---|
| 15 | {
|
---|
| 16 | public:
|
---|
| 17 | AtomsCalculation(boost::function<T(atom*)> op,std::string name,AtomDescriptor descr);
|
---|
| 18 | virtual ~AtomsCalculation();
|
---|
| 19 |
|
---|
| 20 | protected:
|
---|
| 21 | virtual std::vector<T>* doCalc();
|
---|
| 22 |
|
---|
| 23 | private:
|
---|
| 24 | AtomDescriptor descr;
|
---|
| 25 | boost::function<T(atom*)> op;
|
---|
| 26 | };
|
---|
| 27 |
|
---|
| 28 | #endif /* ATOMSCALCULATION_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.