RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
CellTokenIter.h
1/***********************************************************************
2 * The rDock program was developed from 1998 - 2006 by the software team
3 * at RiboTargets (subsequently Vernalis (R&D) Ltd).
4 * In 2006, the software was licensed to the University of York for
5 * maintenance and distribution.
6 * In 2012, Vernalis and the University of York agreed to release the
7 * program as Open Source software.
8 * This version is licensed under GNU-LGPL version 3.0 with support from
9 * the University of Barcelona.
10 * http://rdock.sourceforge.net/
11 ***********************************************************************/
12
13// Defines the interface for a token iterator to be used by the parser
14
15#ifndef _RBT_CELLTOKENITER_H_
16#define _RBT_CELLTOKENITER_H_
17
18#include "rxdock/Config.h"
19#include "rxdock/Context.h"
20#include "rxdock/Token.h"
21#include "rxdock/geneticprogram/GPChromosome.h"
22#include <stack>
23
24#include "rxdock/TokenIter.h"
25
26#include <nlohmann/json.hpp>
27
28using json = nlohmann::json;
29
30namespace rxdock {
31
32class CellTokenIter : public TokenIter {
33public:
34 static const std::string _CT;
36 // Constructors
40
42 // Destructor
44 virtual ~CellTokenIter();
45
46 friend void to_json(json &j, const CellTokenIter &callTokIt);
47 friend void from_json(const json &j, CellTokenIter &callTokIt);
48
49 virtual void copy(const CellTokenIter &);
50 // void First();
51 void Next(ContextPtr);
52 // Bool IsDone() const;
53 TokenPtr Current();
54
56 // Private methods
58
59private:
60 CellTokenIter(); // Default constructor disabled
62 TokenPtr current;
63 std::stack<int> cells;
64 ContextPtr contextp;
65};
66
67void to_json(json &j, const CellTokenIter &callTokIt);
68void from_json(const json &j, CellTokenIter &callTokIt);
69
70// Useful typedefs
71typedef SmartPtr<CellTokenIter> CellTokenIterPtr; // Smart pointer
72typedef std::vector<CellTokenIterPtr>
73 CellTokenIterList; // Vector of smart pointers
74typedef CellTokenIterList::iterator CellTokenIterListIter;
75typedef CellTokenIterList::const_iterator CellTokenIterListConstIter;
76
77} // namespace rxdock
78
79#endif //_CellTokenIter_H_
Definition CellTokenIter.h:32
Definition TokenIter.h:24