1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
|
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: ruleProcessor.h,v 1.17 2005/12/23 17:01:52 amoll Exp $
//
// Molecular Mechanics: rule-based assignment of properties (typenames, charges, radii, etc.)
#ifndef BALL_MOLMEC_COMMON_RULEPROCESSOR_H
#define BALL_MOLMEC_COMMON_RULEPROCESSOR_H
#ifndef BALL_MOLMEC_COMMON_RULEEVALUATOR_H
# include <BALL/MOLMEC/COMMON/ruleEvaluator.h>
#endif
#ifndef BALL_CONCEPT_PROCESSOR_H
# include <BALL/CONCEPT/processor.h>
#endif
namespace BALL
{
/** Rule Processor class.
\ingroup MolmecAssignment
*/
class BALL_EXPORT RuleProcessor
: public UnaryProcessor<Atom>
{
public:
BALL_CREATE(RuleProcessor)
/** Constructors and Destructors
*/
//@{
/** Default constructor
*/
RuleProcessor();
/** Detailed constructor
*/
RuleProcessor(INIFile& file, const String& prefix);
/** Copy constructor
*/
RuleProcessor(const RuleProcessor& rule_processor);
/** Destructor
*/
~RuleProcessor();
/**
*/
void clear();
/**
*/
void destroy();
//@}
/** @name Accessors
*/
//@{
/**
*/
bool initialize(INIFile& file, const String& prefix);
//@}
/** @name Assignment
*/
//@{
/**
*/
const RuleProcessor& operator = (const RuleProcessor& rule_processor);
/**
*/
void set(const RuleProcessor& rule_processor);
//@}
/** @name Processor related methods
*/
//@{
/**
*/
virtual bool start();
/**
*/
virtual bool finish();
/**
*/
String evaluate(const Atom& atom);
//@}
/** @name Debugging and Diagnostics
*/
//@{
///
bool isValid() const;
///
void dump(std::ostream& s = std::cout) const;
//@}
protected:
//_
RuleEvaluator evaluator_;
//_
bool valid_;
};
} // namespace BALL
#endif // BALL_MOLMEC_COMMON_RULEPROCESSOR_H
|