-
Notifications
You must be signed in to change notification settings - Fork 0
/
saxmzdatahandler.h
70 lines (60 loc) · 1.97 KB
/
saxmzdatahandler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#if !defined(SAXMZDATAHANDLER_H)
#define SAXMZDATAHANDLER_H
#include "saxhandler.h"
#include <set>
/**
* Uses eXpat SAX parser to parse mzData XML.
*/
class SAXMzdataHandler : public SAXSpectraHandler
{
public:
SAXMzdataHandler( vector<mspectrum>& _pv, mspectrumcondition& _p, mscore& _m );
~SAXMzdataHandler();
// -----------------------------------------------------------------------
// Overrides of SAXHandler functions
// -----------------------------------------------------------------------
/**
* Receive notification of the start of an element.
*
* <p>By default, do nothing. Application writers may override this
* method in a subclass to take specific actions at the start of
* each element (such as allocating a new tree node or writing
* output to a file).</p>
*/
void startElement(const XML_Char *el, const XML_Char **attr);
/**
* Receive notification of the end of an element.
*
* <p>By default, do nothing. Application writers may override this
* method in a subclass to take specific actions at the end of
* each element (such as finalising a tree node or writing
* output to a file).</p>
*/
void endElement(const XML_Char *el);
/**
* Receive notification of character data inside an element.
*
* <p>By default, do nothing. Application writers may override this
* method to take specific actions for each chunk of character data
* (such as adding the data to a node or buffer, or printing it to
* a file).</p>
*/
void characters(const XML_Char *s, int len);
private:
/**
* Handle attributes for a peaksListBinaryType element.
*/
void startPeakListBinary(const XML_Char **attr);
set<size_t> m_sId;
/**
* Handle data collected in the characters() function.
*/
void processData();
private:
// Flags indicating parser is inside a particular tag.
bool m_bInMsLevel2;
bool m_bInmzArrayBinary;
bool m_bInintenArrayBinary;
bool m_bInData;
};
#endif //SAXMZDATAHANDLER_H