PhoenixFileParser  1.0.0
Set of tools to ease file parsing
Loading...
Searching...
No Matches
PParseSeq.h
Go to the documentation of this file.
1/***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5****************************************/
6
7
8
9//You should not modify this file
10
11#ifndef __PPARSESEQ_H__
12#define __PPARSESEQ_H__
13
14#include <vector>
15#include <stdio.h>
16#include <stdlib.h>
17#include <string.h>
18#include <iostream>
19// #include <inttypes.h>
20#include "PString.h"
21
22#define VERSION_PPARSECMD 0lu
23#define VERSION_PPARSESTEP 0lu
24#define VERSION_PPARSESEQ 0lu
25
26
27class PParseCmd;
28class PParseStep;
29class PParseSeq;
30
31
34 public:
35 PParseCmd();
36 PParseCmd(const PParseCmd & other);
37 virtual ~PParseCmd();
38 PParseCmd & operator =(const PParseCmd & other);
39 void setIsMatch(bool isMatch);
40 void setStr(const PString & str);
41 bool getIsMatch() const;
42 bool & getIsMatch();
43 const PString & getStr() const;
44 PString & getStr();
45 private:
47 void copyPParseCmd(const PParseCmd & other);
51 PString p_str;
52};
53
56 public:
57 PParseStep();
58 PParseStep(const PParseStep & other);
59 virtual ~PParseStep();
60 PParseStep & operator =(const PParseStep & other);
61 void setIsOptional(bool isOptional);
62 void setVecCmd(const std ::vector<PParseCmd> & vecCmd);
63 bool getIsOptional() const;
64 bool & getIsOptional();
65 const std ::vector<PParseCmd> & getVecCmd() const;
66 std ::vector<PParseCmd> & getVecCmd();
67 private:
69 void copyPParseStep(const PParseStep & other);
73 std ::vector<PParseCmd> p_vecCmd;
74};
75
78 public:
79 PParseSeq();
80 PParseSeq(const PParseSeq & other);
81 virtual ~PParseSeq();
82 PParseSeq & operator =(const PParseSeq & other);
83 void setVecStep(const std ::vector<PParseStep> & vecStep);
84 const std ::vector<PParseStep> & getVecStep() const;
85 std ::vector<PParseStep> & getVecStep();
86 private:
88 void copyPParseSeq(const PParseSeq & other);
90 std ::vector<PParseStep> p_vecStep;
91};
92
93
94
95
96
97#endif
98
99
Parser command.
Definition PParseSeq.h:33
void setIsMatch(bool isMatch)
Set the variable p_isMatch, of type 'bool'.
Definition PParseSeq.cpp:51
virtual ~PParseCmd()
Destructor of the class PParseCmd.
Definition PParseSeq.cpp:35
void setStr(const PString &str)
Set the variable p_str, of type 'PString'.
Definition PParseSeq.cpp:58
bool getIsMatch() const
Get the variable p_isMatch.
Definition PParseSeq.cpp:65
bool p_isMatch
True to use isMatch function instead of strComposedOf.
Definition PParseSeq.h:49
void copyPParseCmd(const PParseCmd &other)
Copy function of the class PParseCmd.
void initialisationPParseCmd()
Initialisation function of the class PParseCmd.
Definition PParseSeq.cpp:98
PString p_str
String to be used for the parsing.
Definition PParseSeq.h:51
const PString & getStr() const
Get the variable p_str.
Definition PParseSeq.cpp:79
PParseCmd & operator=(const PParseCmd &other)
Equal operator of the class PParseCmd.
Definition PParseSeq.cpp:43
PParseCmd()
Constructor of the class PParseCmd.
Definition PParseSeq.cpp:22
Parsing sequence.
Definition PParseSeq.h:77
PParseSeq & operator=(const PParseSeq &other)
Equal operator of the class PParseSeq.
void copyPParseSeq(const PParseSeq &other)
Copy function of the class PParseSeq.
PParseSeq()
Constructor of the class PParseSeq.
std ::vector< PParseStep > p_vecStep
Vector of all the steps of the parsing sequence.
Definition PParseSeq.h:90
virtual ~PParseSeq()
Destructor of the class PParseSeq.
const std ::vector< PParseStep > & getVecStep() const
Get the variable p_vecStep.
void initialisationPParseSeq()
Initialisation function of the class PParseSeq.
void setVecStep(const std ::vector< PParseStep > &vecStep)
Set the variable p_vecStep, of type 'std ::vector<PParseStep>'.
Describes a parsing step.
Definition PParseSeq.h:55
void setIsOptional(bool isOptional)
Set the variable p_isOptional, of type 'bool'.
PParseStep()
Constructor of the class PParseStep.
bool p_isOptional
True if the step is optional (as soon as the previous one or the next one is Ok)
Definition PParseSeq.h:71
PParseStep & operator=(const PParseStep &other)
Equal operator of the class PParseStep.
std ::vector< PParseCmd > p_vecCmd
Vector of command to be used for parsing.
Definition PParseSeq.h:73
const std ::vector< PParseCmd > & getVecCmd() const
Get the variable p_vecCmd.
virtual ~PParseStep()
Destructor of the class PParseStep.
void initialisationPParseStep()
Initialisation function of the class PParseStep.
void setVecCmd(const std ::vector< PParseCmd > &vecCmd)
Set the variable p_vecCmd, of type 'std ::vector<PParseCmd>'.
void copyPParseStep(const PParseStep &other)
Copy function of the class PParseStep.
bool getIsOptional() const
Get the variable p_isOptional.