liborigin2 29/08/2011

/build/liborigin2/src/liborigin2/OriginFile.h
Go to the documentation of this file.
1 /***************************************************************************
2 File : OriginFile.h
3 --------------------------------------------------------------------
4 Copyright : (C) 2007-2011 Ion Vasilief
5 (C) 2007-2008 Alex Kargovsky
6 Email (use @ for *) : ion_vasilief*yahoo.fr
7 Description : Origin file import class
8
9 ***************************************************************************/
10
11 /***************************************************************************
12 * *
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. *
17 * *
18 * This program is distributed in the hope that it will be useful, *
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
21 * GNU General Public License for more details. *
22 * *
23 * You should have received a copy of the GNU General Public License *
24 * along with this program; if not, write to the Free Software *
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
26 * Boston, MA 02110-1301 USA *
27 * *
28 ***************************************************************************/
29
30 #ifndef ORIGIN_FILE_H
31 #define ORIGIN_FILE_H
32
33 /* version 0.0 2011-08-29 */
34 #define LIBORIGIN_VERSION 0x00110829
35 #define LIBORIGIN_VERSION_STRING "2011-08-29"
36
37 #include "OriginObj.h"
38 #include "OriginParser.h"
39 #include <memory>
40
41 using namespace std;
42
43 class OriginFile
44 {
45 public:
46 OriginFile(const string& fileName);
47
48 bool parse();
49 double version() const;
50
51 vector<Origin::SpreadSheet>::size_type spreadCount() const;
52 Origin::SpreadSheet& spread(vector<Origin::SpreadSheet>::size_type s) const;
53
54 vector<Origin::Matrix>::size_type matrixCount() const;
55 Origin::Matrix& matrix(vector<Origin::Matrix>::size_type m) const;
56
57 vector<Origin::Function>::size_type functionCount() const;
58 vector<Origin::Function>::size_type functionIndex(const string& name) const;
59 Origin::Function& function(vector<Origin::Function>::size_type f) const;
60
61 vector<Origin::Graph>::size_type graphCount() const;
62 Origin::Graph& graph(vector<Origin::Graph>::size_type g) const;
63
64 vector<Origin::Note>::size_type noteCount() const;
65 Origin::Note& note(vector<Origin::Note>::size_type n) const;
66
67 const tree<Origin::ProjectNode>* project() const;
68 string resultsLogString() const;
69
70 private:
71 unsigned int fileVersion, buildVersion;
72 auto_ptr<OriginParser> parser;
73 };
74
75 #endif // ORIGIN_FILE_H
OriginObj.h
std
Definition: endianfstream.hh:35
Origin::Matrix
Definition: OriginObj.h:249
OriginFile::parser
auto_ptr< OriginParser > parser
Definition: OriginFile.h:72
OriginParser.h
OriginFile::fileVersion
unsigned int fileVersion
Definition: OriginFile.h:71
Origin::Note
Definition: OriginObj.h:779
Origin::SpreadSheet
Definition: OriginObj.h:189
tree< Origin::ProjectNode >
Origin::Function
Definition: OriginObj.h:264
OriginFile
Definition: OriginFile.h:43
Origin::Graph
Definition: OriginObj.h:760