liborigin ..
/home/iurt/rpmbuild/BUILD/liborigin-3.0.3-build/liborigin-3.0.3/OriginFile.h
Go to the documentation of this file.
1/*
2 File : OriginFile.h
3 Description : Origin file import class
4 --------------------------------------------------------------------
5 SPDX-FileCopyrightText: 2005-2007 Stefan Gerlach
6 SPDX-FileCopyrightText: 2007-2008 Alex Kargovsky <kargovsky*yumr.phys.msu.su>
7 SPDX-FileCopyrightText: 2007-2008 Ion Vasilief <ion_vasilief*yahoo.fr>
8 SPDX-License-Identifier: GPL-2.0-or-later
9*/
10
11#ifndef ORIGIN_FILE_H
12#define ORIGIN_FILE_H
13
14#include "OriginObj.h"
15#include "OriginParser.h"
16
17#include <memory>
18
20{
21public:
22 explicit OriginFile(const std::string &fileName);
23
24 bool parse();
25 double version() const;
26
27 std::vector<Origin::SpreadColumn>::size_type datasetCount() const;
29 dataset(std::vector<Origin::SpreadColumn>::size_type ds) const;
30
31 std::vector<Origin::SpreadSheet>::size_type spreadCount() const;
33 spread(std::vector<Origin::SpreadSheet>::size_type s) const;
34
35 std::vector<Origin::Matrix>::size_type matrixCount() const;
36 Origin::Matrix &matrix(std::vector<Origin::Matrix>::size_type m) const;
37
38 std::vector<Origin::Function>::size_type functionCount() const;
39 std::vector<Origin::Function>::difference_type
40 functionIndex(const std::string &name) const;
42 function(std::vector<Origin::Function>::size_type f) const;
43
44 std::vector<Origin::Graph>::size_type graphCount() const;
45 Origin::Graph &graph(std::vector<Origin::Graph>::size_type g) const;
46
47 std::vector<Origin::Note>::size_type noteCount() const;
48 Origin::Note &note(std::vector<Origin::Note>::size_type n) const;
49
50 std::vector<Origin::Excel>::size_type excelCount() const;
51 Origin::Excel &excel(std::vector<Origin::Excel>::size_type e) const;
52
53 const tree<Origin::ProjectNode> *project() const;
54 std::string resultsLogString() const;
55
56private:
58 std::unique_ptr<OriginParser> parser;
59};
60
62unsigned int ORIGIN_EXPORT liboriginVersion();
66
67#endif // ORIGIN_FILE_H
unsigned int ORIGIN_EXPORT liboriginVersion()
Definition OriginFile.cpp:276
unsigned int ORIGIN_EXPORT liboriginVersionBugfix()
unsigned int ORIGIN_EXPORT liboriginVersionMinor()
Definition OriginFile.cpp:286
unsigned int ORIGIN_EXPORT liboriginVersionMajor()
Definition OriginFile.cpp:281
std::string ORIGIN_EXPORT liboriginVersionString()
Definition OriginFile.cpp:271
#define ORIGIN_EXPORT
Definition OriginObj.h:26
Origin::SpreadColumn & dataset(std::vector< Origin::SpreadColumn >::size_type ds) const
get dataset ds
Definition OriginFile.cpp:196
Origin::SpreadSheet & spread(std::vector< Origin::SpreadSheet >::size_type s) const
get spreadsheet s
Definition OriginFile.cpp:206
const tree< Origin::ProjectNode > * project() const
get project tree
Definition OriginFile.cpp:186
std::vector< Origin::Graph >::size_type graphCount() const
get number of graphs
Definition OriginFile.cpp:236
double version() const
get version of Origin file
Definition OriginFile.cpp:181
std::string resultsLogString() const
get Results Log
Definition OriginFile.cpp:266
bool parse()
parse Origin file
Definition OriginFile.cpp:172
unsigned int fileVersion
Definition OriginFile.h:57
std::vector< Origin::Excel >::size_type excelCount() const
get number of excels
Definition OriginFile.cpp:256
std::unique_ptr< OriginParser > parser
Definition OriginFile.h:58
std::vector< Origin::Matrix >::size_type matrixCount() const
get number of matrices
Definition OriginFile.cpp:211
std::vector< Origin::Function >::difference_type functionIndex(const std::string &name) const
get index (or -1) of function named name
Definition OriginFile.cpp:226
std::vector< Origin::SpreadColumn >::size_type datasetCount() const
get number of datasets
Definition OriginFile.cpp:191
Origin::Note & note(std::vector< Origin::Note >::size_type n) const
get note n
Definition OriginFile.cpp:251
unsigned int ioError
Definition OriginFile.h:57
Origin::Matrix & matrix(std::vector< Origin::Matrix >::size_type m) const
get matrix m
Definition OriginFile.cpp:216
std::vector< Origin::Note >::size_type noteCount() const
get number of notes
Definition OriginFile.cpp:246
Origin::Excel & excel(std::vector< Origin::Excel >::size_type e) const
get excel e
Definition OriginFile.cpp:261
Origin::Function & function(std::vector< Origin::Function >::size_type f) const
get function f
Definition OriginFile.cpp:231
std::vector< Origin::SpreadSheet >::size_type spreadCount() const
get number of spreadsheets
Definition OriginFile.cpp:201
std::vector< Origin::Function >::size_type functionCount() const
get number of functions
Definition OriginFile.cpp:221
OriginFile(const std::string &fileName)
Definition OriginFile.cpp:20
unsigned int buildVersion
Definition OriginFile.h:57
Origin::Graph & graph(std::vector< Origin::Graph >::size_type g) const
get graph g
Definition OriginFile.cpp:241
Definition OriginObj.h:385
Definition OriginObj.h:448
Definition OriginObj.h:1087
Definition OriginObj.h:436
Definition OriginObj.h:1106
Definition OriginObj.h:334
Definition OriginObj.h:374