liborigin ..
/builddir/build/BUILD/liborigin-3.0.1/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 "OriginObj.h"
34#include "OriginParser.h"
35#include <memory>
36
37using namespace std;
38
40{
41public:
42 explicit OriginFile(const string& fileName);
43
44 bool parse();
45 double version() const;
46
47 vector<Origin::SpreadColumn>::size_type datasetCount() const;
48 Origin::SpreadColumn& dataset(vector<Origin::SpreadColumn>::size_type ds) const;
49
50 vector<Origin::SpreadSheet>::size_type spreadCount() const;
51 Origin::SpreadSheet& spread(vector<Origin::SpreadSheet>::size_type s) const;
52
53 vector<Origin::Matrix>::size_type matrixCount() const;
54 Origin::Matrix& matrix(vector<Origin::Matrix>::size_type m) const;
55
56 vector<Origin::Function>::size_type functionCount() const;
57 vector<Origin::Function>::difference_type functionIndex(const string& name) const;
58 Origin::Function& function(vector<Origin::Function>::size_type f) const;
59
60 vector<Origin::Graph>::size_type graphCount() const;
61 Origin::Graph& graph(vector<Origin::Graph>::size_type g) const;
62
63 vector<Origin::Note>::size_type noteCount() const;
64 Origin::Note& note(vector<Origin::Note>::size_type n) const;
65
66 vector<Origin::Excel>::size_type excelCount() const;
67 Origin::Excel& excel(vector<Origin::Excel>::size_type e) const;
68
69 const tree<Origin::ProjectNode>* project() const;
70 string resultsLogString() const;
71
72private:
74 unique_ptr<OriginParser> parser;
75};
76
78unsigned int liboriginVersion();
79unsigned int liboriginVersionMajor();
80unsigned int liboriginVersionMinor();
82
83#endif // ORIGIN_FILE_H
unsigned int liboriginVersion()
Definition: OriginFile.cpp:281
unsigned int liboriginVersionBugfix()
string liboriginVersionString()
Definition: OriginFile.cpp:279
unsigned int liboriginVersionMajor()
Definition: OriginFile.cpp:283
unsigned int liboriginVersionMinor()
Definition: OriginFile.cpp:285
Definition: OriginFile.h:40
unique_ptr< OriginParser > parser
Definition: OriginFile.h:74
const tree< Origin::ProjectNode > * project() const
get project tree
Definition: OriginFile.cpp:194
vector< Origin::Graph >::size_type graphCount() const
get number of graphs
Definition: OriginFile.cpp:244
Origin::SpreadColumn & dataset(vector< Origin::SpreadColumn >::size_type ds) const
get dataset ds
Definition: OriginFile.cpp:204
double version() const
get version of Origin file
Definition: OriginFile.cpp:189
Origin::Note & note(vector< Origin::Note >::size_type n) const
get note n
Definition: OriginFile.cpp:259
Origin::Graph & graph(vector< Origin::Graph >::size_type g) const
get graph g
Definition: OriginFile.cpp:249
string resultsLogString() const
get Results Log
Definition: OriginFile.cpp:274
Origin::Excel & excel(vector< Origin::Excel >::size_type e) const
get excel e
Definition: OriginFile.cpp:269
bool parse()
parse Origin file
Definition: OriginFile.cpp:180
unsigned int fileVersion
Definition: OriginFile.h:73
vector< Origin::Excel >::size_type excelCount() const
get number of excels
Definition: OriginFile.cpp:264
vector< Origin::Function >::difference_type functionIndex(const string &name) const
get index (or -1) of function named name
Definition: OriginFile.cpp:234
vector< Origin::Matrix >::size_type matrixCount() const
get number of matrices
Definition: OriginFile.cpp:219
vector< Origin::SpreadColumn >::size_type datasetCount() const
get number of datasets
Definition: OriginFile.cpp:199
OriginFile(const string &fileName)
Definition: OriginFile.cpp:35
unsigned int ioError
Definition: OriginFile.h:73
vector< Origin::Note >::size_type noteCount() const
get number of notes
Definition: OriginFile.cpp:254
Origin::SpreadSheet & spread(vector< Origin::SpreadSheet >::size_type s) const
get spreadsheet s
Definition: OriginFile.cpp:214
vector< Origin::SpreadSheet >::size_type spreadCount() const
get number of spreadsheets
Definition: OriginFile.cpp:209
Origin::Matrix & matrix(vector< Origin::Matrix >::size_type m) const
get matrix m
Definition: OriginFile.cpp:224
vector< Origin::Function >::size_type functionCount() const
get number of functions
Definition: OriginFile.cpp:229
unsigned int buildVersion
Definition: OriginFile.h:73
Origin::Function & function(vector< Origin::Function >::size_type f) const
get function f
Definition: OriginFile.cpp:239
Definition: OriginObj.h:302
Definition: OriginObj.h:365
Definition: OriginObj.h:957
Definition: OriginObj.h:350
Definition: OriginObj.h:977
Definition: OriginObj.h:246
Definition: OriginObj.h:287