RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
StringTokenIter.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// Abstract StringTokenIter class. Defines the interface for a token iterator
14// to be used by the parser.
15
16#ifndef _RBT_STRINGTOKENITER_H_
17#define _RBT_STRINGTOKENITER_H_
18
19#include "rxdock/Config.h"
20#include "rxdock/Context.h"
21#include "rxdock/TokenIter.h"
22#include "rxdock/geneticprogram/GPChromosome.h"
23#include <fstream>
24#include <stack>
25
26namespace rxdock {
27
28typedef SmartPtr<std::istream> istreamPtr;
29class StringTokenIter : public TokenIter {
30public:
31 static const std::string _CT;
33 // Constructors
37
39 // Destructor
41 virtual ~StringTokenIter();
42
43 void copy(const StringTokenIter &);
44 // void First();
45 void Next(ContextPtr);
46 // Bool IsDone() const;
47 TokenPtr Current();
48
49 // Bool operator==(const StringTokenIter&) const;
50 // std::ostream& Print(std::ostream&) const;
51 // friend std::ostream& operator<<(std::ostream& s, const StringTokenIter
52 // &p);
53
55 // Private methods
57
58private:
59 StringTokenIter(); // Default constructor disabled
60 TokenPtr translate(std::string);
61
62 istreamPtr filep;
63 TokenPtr current;
64 std::string strtok;
65 ContextPtr contextp;
66};
67
68// Useful typedefs
69typedef SmartPtr<StringTokenIter> StringTokenIterPtr; // Smart pointer
70typedef std::vector<StringTokenIterPtr>
71 StringTokenIterList; // Vector of smart pointers
72typedef StringTokenIterList::iterator StringTokenIterListIter;
73typedef StringTokenIterList::const_iterator StringTokenIterListConstIter;
74
75} // namespace rxdock
76
77#endif //_StringTokenIter_H_
Definition StringTokenIter.h:29
Definition TokenIter.h:24