English Français

Documentation / Developer's manual

Available modules

Calibration,  DataServer,  Launcher,  MetaModelOptim,  Modeler,  Optimizer,  ReLauncher,  Reliability,  ReOptimizer,  Sampler,  Sensitivity,  UncertModeler,  XmlProblem,   Uranie / DataServer: TTokenizer.h Source File
Uranie / DataServer v4.9.0
/* @license-end */
TTokenizer.h
Go to the documentation of this file.
1
2// Copyright (C) 2013-2024 CEA/DES
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU Lesser General Public License as published
6// by the Free Software Foundation, either version 3 of the License, or any
7// later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU Lesser General Public License for more details.
13//
14// You should have received a copy of the GNU Lesser General Public License
15// along with this program. If not, see <http://www.gnu.org/licenses/>.
17#ifndef TTOKENIZER_H_
18#define TTOKENIZER_H_
19
20#include <string>
21#include <vector>
22
31{
32 std::string quotes;
33 std::string delimiters;
35 char comment;
36
37public:
38// TTokenizer(const char* = " ,\t", const char* = "\'\"", const int = -1);
39 TTokenizer(const std::string& = " ,\t\n\r", const std::string& = "\'\"",
40 const int = -1);
41
42 std::vector<std::string> getTokens(const std::string&);
43
44 void setDelimiters(const std::string&);
45 void setQuotes(const std::string&);
46 void setComment(char);
47
48//private:
49 bool isDelimiter(char);
50 bool isQuote(char);
51};
52
53#endif
Tokenizer class for parsing strings.
Definition TTokenizer.h:31
void setComment(char)
Definition TTokenizer.cxx:56
std::vector< std::string > getTokens(const std::string &)
Definition TTokenizer.cxx:61
void setDelimiters(const std::string &)
Definition TTokenizer.cxx:44
int nDelims
Definition TTokenizer.h:34
bool isQuote(char)
Definition TTokenizer.cxx:133
std::string delimiters
Definition TTokenizer.h:33
char comment
Definition TTokenizer.h:35
bool isDelimiter(char)
Definition TTokenizer.cxx:125
std::string quotes
Definition TTokenizer.h:32
void setQuotes(const std::string &)
Definition TTokenizer.cxx:50
int nQuotes
Definition TTokenizer.h:34