Keyple Service C++ Library - 3.3.5
Component of the Keyple C++ middleware
CardSelectionScenarioAdapter.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/core/service/CardSelectionScenarioAdapter.hpp"
15
16#include <memory>
17#include <vector>
18
19#include "keyple/core/util/KeypleAssert.hpp"
20#include "keypop/card/spi/CardSelectionRequestSpi.hpp"
21
22namespace keyple {
23namespace core {
24namespace service {
25
26using keyple::core::util::Assert;
27using keypop::card::spi::CardSelectionRequestSpi;
28
29CardSelectionScenarioAdapter::CardSelectionScenarioAdapter(
30 const std::vector<std::shared_ptr<CardSelectorBase>>& cardSelectors,
31 const std::vector<std::shared_ptr<CardSelectionRequestSpi>>&
32 cardSelectionRequests,
33 const MultiSelectionProcessing multiSelectionProcessing,
34 const ChannelControl channelControl)
35: mCardSelectors(cardSelectors)
36, mCardSelectionRequests(cardSelectionRequests)
37, mMultiSelectionProcessing(multiSelectionProcessing)
38, mChannelControl(channelControl)
39{
40 Assert::getInstance().notEmpty(
41 cardSelectionRequests, "cardSelectionRequests");
42}
43
44const std::vector<std::shared_ptr<CardSelectorBase>>&
45CardSelectionScenarioAdapter::getCardSelectors() const
46{
47 return mCardSelectors;
48}
49
50const std::vector<std::shared_ptr<CardSelectionRequestSpi>>&
51CardSelectionScenarioAdapter::getCardSelectionRequests() const
52{
53 return mCardSelectionRequests;
54}
55
56MultiSelectionProcessing
57CardSelectionScenarioAdapter::getMultiSelectionProcessing() const
58{
59 return mMultiSelectionProcessing;
60}
61
62ChannelControl
63CardSelectionScenarioAdapter::getChannelControl() const
64{
65 return mChannelControl;
66}
67
68std::ostream&
70 std::ostream& os, const std::shared_ptr<CardSelectionScenarioAdapter> sa)
71{
72 (void)sa;
73
74 os << "CARD_SELECTION_SCENARIO : {"
75 << "<TODO> CardSelectionRequest, "
76 << "<TODO> MultiSelectionProcessing, "
77 << "<TODO> ChannelControl"
78 << "}";
79
80 return os;
81}
82
83} /* namespace service */
84} /* namespace core */
85} /* namespace keyple */
std::ostream & operator<<(std::ostream &os, const std::shared_ptr< CardSelectionScenarioAdapter > sa)