18#include "rxdock/geneticprogram/GPTypes.h"
24 static const std::string _CT;
25 enum VbleType { CTE, LIG, SCORE, SITE };
26 Vble() : vt(CTE), value(0.0), name(
"") {
27 _RBTOBJECTCOUNTER_CONSTR_(_CT);
29 Vble(std::string s, ReturnType val = 0.0) : value(val), name(s) {
30 if (s.find(
"LIG_") == 0)
32 else if (s.find(
"SITE_") == 0)
34 else if (s.find(GetMetaDataPrefix() +
"score") == 0)
38 _RBTOBJECTCOUNTER_CONSTR_(_CT);
40 Vble(
const Vble &v) : vt(v.vt), value(v.value), name(v.name) {
41 _RBTOBJECTCOUNTER_COPYCONSTR_(_CT);
43 void SetValue(ReturnType val) {
46 name = std::to_string(value);
49 ReturnType GetValue()
const {
return value; }
50 virtual ~Vble() { _RBTOBJECTCOUNTER_DESTR_(_CT); }
59 void SetName(std::string nm) { name = nm; }
60 std::string GetName()
const {
return name; }
62 bool IsLig() {
return (vt == LIG); }
63 bool IsScore() {
return (vt == SCORE); }
64 bool IsSite() {
return (vt == SITE); }
74typedef std::vector<VblePtr> VbleList;
75typedef VbleList::iterator VbleListIter;
76typedef VbleList::const_iterator VbleListConstIter;
Definition SmartPointer.h:48