Keypop Card C++ API 2.0.0
Reference Card API for C++
CardSelectionRequestSpi.hpp
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2024 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * This program and the accompanying materials are made available under the *
5 * terms of the MIT License which is available at https://opensource.org/licenses/MIT. *
6 * *
7 * SPDX-License-Identifier: MIT *
8 **************************************************************************************************/
9
10#pragma once
11
12#include <memory>
13#include <ostream>
14#include <vector>
15
17
18namespace keypop {
19namespace card {
20namespace spi {
21
32public:
36 virtual ~CardSelectionRequestSpi() = default;
37
44 virtual const std::shared_ptr<CardRequestSpi> getCardRequest() const = 0;
45
49 friend std::ostream&
50 operator<<(std::ostream& os, const std::shared_ptr<CardSelectionRequestSpi> csr) {
51 (void)csr;
52
53 os << "CARD_SELECTION_REQUEST_SPI: {"
54 << "<TODO>"
55 << "}";
56
57 return os;
58 }
59
63 friend std::ostream&
65 std::ostream& os, const std::vector<std::shared_ptr<CardSelectionRequestSpi>>& csrs) {
66 os << "CARD_SELECTION_REQUEST_SPIS: {";
67
68 for (auto it = std::begin(csrs); it != std::end(csrs); ++it) {
69 os << *it;
70 if (it != csrs.end() - 1) {
71 os << ", ";
72 }
73 }
74
75 os << "}";
76
77 return os;
78 }
79};
80
81} /* namespace spi */
82} /* namespace card */
83} /* namespace keypop */
friend std::ostream & operator<<(std::ostream &os, const std::shared_ptr< CardSelectionRequestSpi > csr)
virtual const std::shared_ptr< CardRequestSpi > getCardRequest() const =0