OpenWalnut  1.3.1
WRoiProjectFileIO.h
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 #ifndef WROIPROJECTFILEIO_H
26 #define WROIPROJECTFILEIO_H
27 
28 #include <string>
29 
30 #include "../common/WProjectFileIO.h"
31 
32 
33 
34 /**
35  * IO Class for writing the ROI structure to a project file.
36  */
38 {
39 public:
40  /**
41  * Default constructor.
42  */
44 
45  /**
46  * Destructor.
47  */
48  virtual ~WRoiProjectFileIO();
49 
50  /**
51  * This method parses the specified line and interprets it. It gets called line by line by WProjectFile.
52  *
53  * \param line the current line as string
54  * \param lineNumber the current line number. Useful for error/warning/debugging output.
55  *
56  * \return true if the line could be parsed.
57  */
58  virtual bool parse( std::string line, unsigned int lineNumber );
59 
60  /**
61  * Called whenever the end of the project file has been reached. This is useful if your specific parser class wants to do some post
62  * processing after parsing line by line.
63  */
64  virtual void done();
65 
66  /**
67  * Saves the state to the specified stream.
68  *
69  * \param output the stream to print the state to.
70  */
71  virtual void save( std::ostream& output ); // NOLINT
72 
73 protected:
74 private:
75 };
76 
77 #endif // WROIPROJECTFILEIO_H
78