45#include "types/Component.hpp"
52 Component::Component() : moleculeStamp_(NULL) {
53 DefineParameter(Type,
"type");
54 DefineParameter(NMol,
"nMol");
55 DefineParameter(Region,
"region");
58 Component::~Component() {}
60 void Component::validate() {
61 CheckParameter(Type, isNotEmpty());
62 CheckParameter(NMol, isPositive());
63 CheckParameter(Region, isNonNegative());
66 bool Component::findMoleculeStamp(
67 const std::map<std::string, MoleculeStamp*>& molStamps) {
69 std::map<std::string, MoleculeStamp*>::const_iterator i;
70 i = molStamps.find(getType());
71 if (i != molStamps.end()) {
72 moleculeStamp_ = i->second;
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.