Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
CardSelectionRequestAdapter.h
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
13#pragma once
14
15#include <memory>
16#include <ostream>
17
18/* Calypsonet Terminal Card */
19#include "CardRequestSpi.h"
20#include "CardSelectionRequestSpi.h"
21#include "CardSelectorSpi.h"
22
23namespace keyple {
24namespace card {
25namespace calypso {
26
27using namespace calypsonet::terminal::card::spi;
28
42class CardSelectionRequestAdapter final : public CardSelectionRequestSpi {
43public:
52 CardSelectionRequestAdapter(const std::shared_ptr<CardSelectorSpi> cardSelector);
53
62 CardSelectionRequestAdapter(const std::shared_ptr<CardSelectorSpi> cardSelector,
63 const std::shared_ptr<CardRequestSpi> cardRequest);
64
70 const std::shared_ptr<CardSelectorSpi> getCardSelector() const override;
71
78 const std::shared_ptr<CardRequestSpi> getCardRequest() const override;
79
83 friend std::ostream& operator<<(std::ostream& os, const CardSelectionRequestAdapter& csra);
84
88 friend std::ostream& operator<<(std::ostream& os,
89 const std::shared_ptr<CardSelectionRequestAdapter> csra);
90
91private:
95 const std::shared_ptr<CardSelectorSpi> mCardSelector;
96
100 const std::shared_ptr<CardRequestSpi> mCardRequest;
101
102};
103
104}
105}
106}
friend std::ostream & operator<<(std::ostream &os, const CardSelectionRequestAdapter &csra)
CardSelectionRequestAdapter(const std::shared_ptr< CardSelectorSpi > cardSelector)
const std::shared_ptr< CardRequestSpi > getCardRequest() const override
const std::shared_ptr< CardSelectorSpi > getCardSelector() const override