Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Public Member Functions | Friends | List of all members
keyple::core::selection::AbstractMatchingSe Class Reference

#include <AbstractMatchingSe.h>

Inherits enable_shared_from_this< AbstractMatchingSe >.

Inherited by keyple::calypso::transaction::CalypsoPo, and keyple::calypso::transaction::CalypsoSam.

Public Member Functions

virtual ~AbstractMatchingSe ()
 
virtual const TransmissionModegetTransmissionMode () const
 
bool hasFci () const
 
bool hasAtr () const
 
const std::vector< uint8_t > & getFciBytes () const
 
const std::vector< uint8_t > & getAtrBytes () const
 
 AbstractMatchingSe (const std::shared_ptr< SeResponse > selectionResponse, const TransmissionMode &transmissionMode)
 

Friends

KEYPLECORE_API std::ostream & operator<< (std::ostream &os, const AbstractMatchingSe &ams)
 
KEYPLECORE_API std::ostream & operator<< (std::ostream &os, const std::shared_ptr< AbstractMatchingSe > &ams)
 

Detailed Description

AbstractMatchingSe is the class to manage the elements of the result of a selection.
This class should be extended for the management of specific SE.
Nevertheless it gives access to the generic parameters common to all SEs which are the transmission mode, the FCI (response to select command) and the ATR (SE's answer to reset) when they are available.

Constructor & Destructor Documentation

◆ ~AbstractMatchingSe()

virtual keyple::core::selection::AbstractMatchingSe::~AbstractMatchingSe ( )
inlinevirtual

◆ AbstractMatchingSe()

keyple::core::selection::AbstractMatchingSe::AbstractMatchingSe ( const std::shared_ptr< SeResponse selectionResponse,
const TransmissionMode transmissionMode 
)

Constructor

C++ vs. Java: constructor is protected in Java but prevents use of std::make_shared in C++.

Parameters
selectionResponsethe response from the SE
transmissionModethe transmission mode, contact or contactless

Member Function Documentation

◆ getAtrBytes()

const std::vector< uint8_t > & keyple::core::selection::AbstractMatchingSe::getAtrBytes ( ) const
Returns
the ATR
Exceptions
IllegalStateExceptionif no ATR is available (see hasAtr)

◆ getFciBytes()

const std::vector< uint8_t > & keyple::core::selection::AbstractMatchingSe::getFciBytes ( ) const
Returns
the FCI
Exceptions
IllegalStateExceptionif no FCI is available (see hasFci)

◆ getTransmissionMode()

const TransmissionMode & keyple::core::selection::AbstractMatchingSe::getTransmissionMode ( ) const
virtual
Returns
the SE keyple::core::seproxy::protocol::TransmissionMode (contacts or contactless)

◆ hasAtr()

bool keyple::core::selection::AbstractMatchingSe::hasAtr ( ) const
Returns
true if the matching SE has an ATR

◆ hasFci()

bool keyple::core::selection::AbstractMatchingSe::hasFci ( ) const
Returns
true if the matching SE has an FCI

Friends And Related Function Documentation

◆ operator<< [1/2]

KEYPLECORE_API std::ostream& operator<< ( std::ostream &  os,
const AbstractMatchingSe ams 
)
friend

◆ operator<< [2/2]

KEYPLECORE_API std::ostream& operator<< ( std::ostream &  os,
const std::shared_ptr< AbstractMatchingSe > &  ams 
)
friend

The documentation for this class was generated from the following files: