]> git.tdb.fi Git - libs/datafile.git/blob - source/statement.h
6b3c54b8b7989d386fff3c3cb98ef3354f5433ad
[libs/datafile.git] / source / statement.h
1 /* $Id$
2
3 This file is part of libmspdatafile
4 Copyright © 2006  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7 #ifndef MSP_DATAFILE_STATEMENT_H_
8 #define MSP_DATAFILE_STATEMENT_H_
9
10 #include <list>
11 #include <sstream>
12 #include <vector>
13 #include "value.h"
14
15 namespace Msp {
16 namespace DataFile {
17
18 class Statement
19 {
20 public:
21         std::string keyword;
22         ValueArray  args;
23         bool        valid;
24         std::string source;
25         unsigned    line;
26         std::list<Statement> sub;
27
28         Statement(): valid(false), line(0) { }
29         std::string get_location() const
30         { std::ostringstream ss; ss<<source<<':'<<line; return ss.str(); }
31 };
32
33 } // namespace DataFile
34 } // namespace Msp
35
36 #endif