Keyple Card Calypso C++ Library 2.2.2
Reference Terminal Reader API for C++
SearchCommandDataAdapter.cpp
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2022 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
14
15namespace keyple {
16namespace card {
17namespace calypso {
18
19SearchCommandData& SearchCommandDataAdapter::setSfi(const uint8_t sfi)
20{
21 mSfi = sfi;
22
23 return *this;
24}
25
26SearchCommandData& SearchCommandDataAdapter::startAtRecord(const uint8_t recordNumber)
27{
28 mRecordNumber = recordNumber;
29
30 return *this;
31}
32
33SearchCommandData& SearchCommandDataAdapter::setOffset(const int offset)
34{
35 mOffset = offset;
36
37 return *this;
38}
39
41{
42 mEnableRepeatedOffset = true;
43
44 return *this;
45}
46
47SearchCommandData& SearchCommandDataAdapter::setSearchData(const std::vector<uint8_t>& data)
48{
49 mSearchData = data;
50
51 return *this;
52}
53
54SearchCommandData& SearchCommandDataAdapter::setMask(const std::vector<uint8_t>& mask)
55{
56 mMask = mask;
57
58 return *this;
59}
60
62{
63 mFetchFirstMatchingResult = true;
64
65 return *this;
66}
67
69{
70 return mMatchingRecordNumbers;
71}
72
74{
75 return mSfi;
76}
77
79{
80 return mRecordNumber;
81}
82
84{
85 return mOffset;
86}
87
89{
90 return mEnableRepeatedOffset;
91}
92
93const std::vector<uint8_t>& SearchCommandDataAdapter::getSearchData() const
94{
95 return mSearchData;
96}
97
98const std::vector<uint8_t>& SearchCommandDataAdapter::getMask() const
99{
100 return mMask;
101}
102
104{
105 return mFetchFirstMatchingResult;
106}
107
108}
109}
110}
const std::vector< uint8_t > & getMask() const
std::vector< uint8_t > & getMatchingRecordNumbers() override
SearchCommandData & setSfi(const uint8_t sfi) override
SearchCommandData & startAtRecord(const uint8_t recordNumber) override
SearchCommandData & setOffset(const int offset) override
SearchCommandData & setMask(const std::vector< uint8_t > &mask) override
const std::vector< uint8_t > & getSearchData() const
SearchCommandData & setSearchData(const std::vector< uint8_t > &data) override