Keyple Card Generic C++ Library - 3.1.2
Component of the Keyple C++ middleware
GenericCardSelectionRequestAdapter.cpp
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2025 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * See the NOTICE file(s) distributed with this work for additional *
5 * information regarding copyright ownership. *
6 * *
7 * This program and the accompanying materials are made available under the *
8 * terms of the Eclipse Public License 2.0 which is available at *
9 * http://www.eclipse.org/legal/epl-2.0 *
10 * *
11 * SPDX-License-Identifier: EPL-2.0 *
12 ******************************************************************************/
13
14#include "keyple/card/generic/GenericCardSelectionRequestAdapter.hpp"
15
16#include "keyple/core/util/cpp/KeypleStd.hpp"
17
18namespace keyple {
19namespace card {
20namespace generic {
21
22GenericCardSelectionRequestAdapter::GenericCardSelectionRequestAdapter(
23 const std::vector<int>& successfulSelectionStatusWords)
24: mSuccessfulSelectionStatusWords(successfulSelectionStatusWords)
25{
26}
27
28const std::vector<int>&
29GenericCardSelectionRequestAdapter::getSuccessfulSelectionStatusWords() const
30{
31 return mSuccessfulSelectionStatusWords;
32}
33
34const std::shared_ptr<CardRequestSpi>
35GenericCardSelectionRequestAdapter::getCardRequest() const
36{
37 /* No additional command following the card selection in this extension. */
38 return nullptr;
39}
40
41std::ostream&
42operator<<(std::ostream& os, const GenericCardSelectionRequestAdapter& gcsra)
43{
44 os << "CARD_SELECTION_REQUEST: {"
45 << "SUCCESSFUL_STATUS_WORD: " << gcsra.mSuccessfulSelectionStatusWords
46 << "}";
47
48 return os;
49}
50
51std::ostream&
53 std::ostream& os,
54 const std::shared_ptr<GenericCardSelectionRequestAdapter> gcsra)
55{
56 os << *gcsra.get();
57
58 return os;
59}
60
61} /* namespace generic */
62} /* namespace card */
63} /* namespace keyple */
std::ostream & operator<<(std::ostream &os, const std::shared_ptr< GenericCardSelectionRequestAdapter > gcsra)