19 #ifndef OST_CONOP_COMPOUND_HH
20 #define OST_CONOP_COMPOUND_HH
24 #include <boost/shared_ptr.hpp>
31 namespace ost {
namespace conop {
35 year(y), month(m), day(d)
38 year(1900), month(1), day(1)
42 return year<date.
year && month<date.
month && day<date.
day;
46 return year==date.
year && month==date.
month && day==date.
day;
56 std::vector<StringRef> parts=str.
split(
'-');
57 assert(parts.size()==3);
58 std::pair<bool, int> year=parts[0].to_int();
59 std::pair<bool, int> month=parts[1].to_int();
60 std::pair<bool, int> day=parts[2].to_int();
61 assert(year.first); assert(month.first); assert(day.first);
62 return Date(year.second, month.second, day.second);
115 BondSpec(
int a,
int b,
int o): atom_one(a), atom_two(b), order(o) {}
195 chem_class_=chem_class;
203 chem_type_=chem_type;
215 return chem_class_.IsPeptideLinking();
219 return chem_class_.IsNucleotideLinking();
223 atom_specs_.push_back(atom);
227 bond_specs_.push_back(bond);
234 int GetAtomSpecIndex(
const String& name)
const;
247 const Date& GetModificationDate()
const
251 const Date& GetCreationDate()
const
253 return creation_date_;
256 void SetModificationDate(
const Date& mod_date)
261 void SetCreationDate(
const Date& creation_date)
263 creation_date_=creation_date;