-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNexusReader.h
42 lines (35 loc) · 982 Bytes
/
NexusReader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
#include "ncl/ncl.h"
#include "myostream.h"
class CNexusReader : public MultiFormatReader
{
public:
CNexusReader(string *infname, string *outfname);
~CNexusReader();
void ExecuteStarting();
void ExecuteStopping();
bool EnteringBlock(NxsString blockName);
void SkippingBlock(NxsString blockName);
void SkippingDisabledBlock(NxsString blockName);
void OutputComment(const NxsString &msg);
void NexusError(NxsString msg, file_pos pos, unsigned line, unsigned col);
ostream &GetOutStream();
istream &GetInStream();
string &GetOutFileName();
string &GetInFileName();
void statusMessage(const std::string & m) const;
private:
myofstream m_fOut;
myifstream m_fIn;
};
class CNexusToken : public NxsToken
{
public:
CNexusToken(istream &is, ostream &os) : NxsToken(is), m_fOut(os){}
void OutputComment(const NxsString &msg)
{
m_fOut << msg << endl;
}
private:
ostream &m_fOut;
};