liborigin 2.0.0

/tmp/slackdce/slackrepo.5NA6jZ/build_liborigin/liborigin/OriginFile.h
Go to the documentation of this file.
1/***************************************************************************
2 File : OriginFile.h
3 --------------------------------------------------------------------
4 Copyright : (C) 2005-2007 Stefan Gerlach
5 (C) 2007-2008 Alex Kargovsky, Ion Vasilief
6 Email (use @ for *) : kargovsky*yumr.phys.msu.su, 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#include "config.h"
34#include "OriginObj.h"
35#include "OriginParser.h"
36#include <memory>
37
38 using namespace std;
39
40 class OriginFile
41{
42 public:
43 OriginFile(const string& fileName);
44
45 bool parse();
46 double version() const;
47
48 vector<Origin::SpreadSheet>::size_type spreadCount() const;
49 Origin::SpreadSheet& spread(vector<Origin::SpreadSheet>::size_type s) const;
50
51 vector<Origin::Matrix>::size_type matrixCount() const;
52 Origin::Matrix& matrix(vector<Origin::Matrix>::size_type m) const;
53
54 vector<Origin::Function>::size_type functionCount() const;
55 vector<Origin::Function>::size_type functionIndex(const string& name) const;
56 Origin::Function& function(vector<Origin::Function>::size_type f) const;
57
58 vector<Origin::Graph>::size_type graphCount() const;
59 Origin::Graph& graph(vector<Origin::Graph>::size_type g) const;
60
61 vector<Origin::Note>::size_type noteCount() const;
62 Origin::Note& note(vector<Origin::Note>::size_type n) const;
63
64 const tree<Origin::ProjectNode>* project() const;
65 string resultsLogString() const;
66
67 private:
68 unsigned int fileVersion, buildVersion;
69 auto_ptr<OriginParser> parser;
70};
71
72#endif // ORIGIN_FILE_H
OriginObj.h
OriginParser.h
OriginFile
Definition: OriginFile.h:41
OriginFile::project
const tree< Origin::ProjectNode > * project() const
get project tree
Definition: OriginFile.cpp:148
OriginFile::graphCount
vector< Origin::Graph >::size_type graphCount() const
get number of graphs
Definition: OriginFile.cpp:188
OriginFile::functionIndex
vector< Origin::Function >::size_type functionIndex(const string &name) const
get name of function s
Definition: OriginFile.cpp:178
OriginFile::version
double version() const
get version of Origin file
Definition: OriginFile.cpp:143
OriginFile::note
Origin::Note & note(vector< Origin::Note >::size_type n) const
get note n
Definition: OriginFile.cpp:203
OriginFile::graph
Origin::Graph & graph(vector< Origin::Graph >::size_type g) const
get graph g
Definition: OriginFile.cpp:193
OriginFile::resultsLogString
string resultsLogString() const
get Results Log
Definition: OriginFile.cpp:208
OriginFile::parse
bool parse()
parse Origin file
Definition: OriginFile.cpp:137
OriginFile::fileVersion
unsigned int fileVersion
Definition: OriginFile.h:68
OriginFile::parser
auto_ptr< OriginParser > parser
Definition: OriginFile.h:69
OriginFile::matrixCount
vector< Origin::Matrix >::size_type matrixCount() const
get number of matrices
Definition: OriginFile.cpp:163
OriginFile::OriginFile
OriginFile(const string &fileName)
Definition: OriginFile.cpp:35
OriginFile::noteCount
vector< Origin::Note >::size_type noteCount() const
get number of notes
Definition: OriginFile.cpp:198
OriginFile::spread
Origin::SpreadSheet & spread(vector< Origin::SpreadSheet >::size_type s) const
get spreadsheet s
Definition: OriginFile.cpp:158
OriginFile::spreadCount
vector< Origin::SpreadSheet >::size_type spreadCount() const
get number of spreadsheets
Definition: OriginFile.cpp:153
OriginFile::matrix
Origin::Matrix & matrix(vector< Origin::Matrix >::size_type m) const
get matrix m
Definition: OriginFile.cpp:168
OriginFile::functionCount
vector< Origin::Function >::size_type functionCount() const
get number of functions
Definition: OriginFile.cpp:173
OriginFile::buildVersion
unsigned int buildVersion
Definition: OriginFile.h:68
OriginFile::function
Origin::Function & function(vector< Origin::Function >::size_type f) const
get function f
Definition: OriginFile.cpp:183
tree< Origin::ProjectNode >
config.h
std
Definition: endianfstream.hh:36
Origin::Function
Definition: OriginObj.h:251
Origin::Graph
Definition: OriginObj.h:724
Origin::Matrix
Definition: OriginObj.h:215
Origin::Note
Definition: OriginObj.h:739
Origin::SpreadSheet
Definition: OriginObj.h:185