Keyple Util C++ Library 2.0.0
Reference Terminal Reader API for C++
src
main
cpp
Pattern.h
Go to the documentation of this file.
1
/**************************************************************************************************
2
* Copyright (c) 2021 Calypso Networks Association https://calypsonet.org/ *
3
* *
4
* See the NOTICE file(s) distributed with this work for additional information regarding *
5
* copyright ownership. *
6
* *
7
* This program and the accompanying materials are made available under the terms of the Eclipse *
8
* Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0 *
9
* *
10
* SPDX-License-Identifier: EPL-2.0 *
11
**************************************************************************************************/
12
13
#pragma once
14
15
#include <string>
16
17
#include "
KeypleUtilExport.h
"
18
#include "
Matcher.h
"
19
20
namespace
keyple
{
21
namespace
core {
22
namespace
util {
23
namespace
cpp {
24
25
class
KEYPLEUTIL_API
Pattern
{
26
public
:
30
const
std::regex
mPattern
;
31
35
Pattern
(
const
std::string& pattern,
const
int
flags);
36
42
std::unique_ptr<Pattern> compile(
const
std::string& regularExpression,
const
int
flags)
const
;
43
47
static
std::unique_ptr<Pattern> compile(
const
std::string& pattern);
48
49
/*
50
* Returns a Matcher for this pattern applied to the given input. The Matcher can be used to
51
* match the Pattern against the whole input, find occurences of the Pattern in the input, or
52
* replace parts of the input.
53
*/
54
std::unique_ptr<Matcher> matcher(
const
std::string& input)
const
;
55
56
private
:
57
61
const
int
mFlags;
62
};
63
64
}
65
}
66
}
67
}
KeypleUtilExport.h
KEYPLEUTIL_API
#define KEYPLEUTIL_API
Definition:
KeypleUtilExport.h:22
Matcher.h
keyple::core::util::cpp::Pattern
Definition:
Pattern.h:25
keyple::core::util::cpp::Pattern::mPattern
const std::regex mPattern
Definition:
Pattern.h:30
keyple
Definition:
ApduUtil.cpp:18
Generated by
1.9.2