Loading...
Searching...
No Matches
descriptor.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
//
#ifndef BALL_QSAR_DESCRIPTOR_H
#define BALL_QSAR_DESCRIPTOR_H
#ifndef BALL_CONCEPT_PROCESSOR_H
# include <BALL/CONCEPT/processor.h>
#endif
#ifndef BALL_KERNEL_ATOMCONTAINER_H
#include <BALL/KERNEL/atomContainer.h>
#endif
namespace BALL
{
template <typename Key, typename Value> class HashMap;
class BALL_EXPORT Descriptor
: public UnaryProcessor<AtomContainer>
{
public:
BALL_CREATE(Descriptor)
Descriptor();
Descriptor(const Descriptor& descriptor);
Descriptor(const String& name);
Descriptor(const String& name, const String& unit);
virtual ~Descriptor();
Descriptor& operator = (const Descriptor& descriptor);
Processor::Result operator () (AtomContainer& ac);
/*_ This getter resturns the name of the descriptor as
a string reference
*/
const String& getName() const;
/*_ This setter sets the name of a descriptor
@param name as string
*/
void setName(const String& name);
/*_ Setter, to set the unit of a descriptor
@param unit as string
*/
void setUnit(const String& name);
/*_ Getter, returns the unit of the descriptor
as a string reference
*/
const String& getUnit() const;
/*_ Generic compute method
*/
virtual double compute(AtomContainer& ac);
protected:
/*_ Generic calculate function
*/
virtual void calculate_(AtomContainer& ac);
/*_ Predicate which returns true if the descriptor
data is calculated and valid.
*/
virtual bool isValid_(AtomContainer& ac);
private:
//static HashMap<Handle, PreciseTime> mod_times_;
/*_ String which saves the name of the descriptor
*/
String name_;
/*_ String which saves the unit of the values
from the descriptor
*/
String unit_;
};
} // namespace BALL
#endif // BALL_QSAR_DESCRIPTOR_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
atomContainer.h
BALL::AtomContainer
Definition atomContainer.h:32
BALL::Descriptor::getUnit
const String & getUnit() const
BALL::Descriptor::isValid_
virtual bool isValid_(AtomContainer &ac)
BALL::Descriptor::setUnit
void setUnit(const String &name)
BALL::Descriptor::calculate_
virtual void calculate_(AtomContainer &ac)
BALL::Descriptor::compute
virtual double compute(AtomContainer &ac)
BALL::Descriptor::getName
const String & getName() const
BALL::Descriptor::Descriptor
Descriptor()
BALL::Descriptor::setName
void setName(const String &name)
BALL::HashMap
HashMap class based on the STL map (containing serveral convenience functions).
Definition hashMap.h:74
BALL::Processor
Definition processor.h:32
BALL::Result
Definition result.h:22
BALL::String
Definition string.h:57
BALL::UnaryProcessor< AtomContainer >::UnaryProcessor
UnaryProcessor()
Definition processor.h:69
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
BALL
Definition constants.h:13
processor.h