Keyple Card Calypso C++ Library 2.2.5.6
Reference Terminal Reader API for C++
Public Member Functions | List of all members
keyple::card::calypso::AbstractCardCommand Class Referenceabstract

#include <AbstractCardCommand.h>

Inheritance diagram for keyple::card::calypso::AbstractCardCommand:
Inheritance graph
[legend]
Collaboration diagram for keyple::card::calypso::AbstractCardCommand:
Collaboration graph
[legend]

Public Member Functions

 AbstractCardCommand (const CalypsoCardCommand &commandRef, const int expectedResponseLength, const std::shared_ptr< CalypsoCardAdapter > calypsoCard)
 
const CalypsoCardCommandgetCommandRef () const override
 
virtual bool isSessionBufferUsed () const =0
 
const CalypsoApduCommandException buildCommandException (const std::type_info &exceptionClass, const std::string &message) const final
 
const CalypsoApduCommandException buildUnexpectedResponseLengthException (const std::string &message) const final
 
void parseApduResponse (const std::shared_ptr< ApduResponseApi > apduResponse) override
 
std::shared_ptr< CalypsoCardAdaptergetCalypsoCard () const
 
void parseApduResponse (const std::shared_ptr< ApduResponseApi > apduResponse, const std::shared_ptr< CalypsoCardAdapter > calypsoCard)
 
- Public Member Functions inherited from keyple::card::calypso::AbstractApduCommand
 AbstractApduCommand (const CardCommand &commandRef, const int expectedResponseLength)
 
virtual void addSubName (const std::string &subName) final
 
virtual const std::string & getName () const final
 
virtual void setExpectedResponseLength (const int expectedResponseLength) final
 
virtual void setApduRequest (const std::shared_ptr< ApduRequestAdapter > apduRequest) final
 
virtual const std::shared_ptr< ApduRequestAdaptergetApduRequest () const final
 
virtual const std::shared_ptr< ApduResponseApi > getApduResponse () const final
 
virtual const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable () const
 
virtual bool isSuccessful () const final
 
virtual const std::string getStatusInformation () const final
 

Additional Inherited Members

- Static Public Attributes inherited from keyple::card::calypso::AbstractApduCommand
static const std::map< const int, const std::shared_ptr< StatusProperties > > STATUS_TABLE
 

Detailed Description

(package-private)
Superclass for all card commands.

Since
2.0.1

Definition at line 32 of file AbstractCardCommand.h.

Constructor & Destructor Documentation

◆ AbstractCardCommand()

keyple::card::calypso::AbstractCardCommand::AbstractCardCommand ( const CalypsoCardCommand commandRef,
const int  expectedResponseLength,
const std::shared_ptr< CalypsoCardAdapter calypsoCard 
)

(package-private)
Constructor dedicated for the building of referenced Calypso commands

Parameters
commandRefa command reference from the Calypso command table.
expectedResponseLengthThe expected response length or -1 if not specified.
calypsoCardThe Calypso card (it may be null if the card selection has not yet been made).
Since
2.0.1

Definition at line 34 of file AbstractCardCommand.cpp.

Member Function Documentation

◆ buildCommandException()

const CalypsoApduCommandException keyple::card::calypso::AbstractCardCommand::buildCommandException ( const std::type_info &  exceptionClass,
const std::string &  message 
) const
finalvirtual

(package-private)
Builds a specific APDU command exception.

Parameters
messageThe message.
Returns
A not null reference.
A not null value
Since
2.0.1

Since
2.0.1

Implements keyple::card::calypso::AbstractApduCommand.

Definition at line 44 of file AbstractCardCommand.cpp.

◆ buildUnexpectedResponseLengthException()

const CalypsoApduCommandException keyple::card::calypso::AbstractCardCommand::buildUnexpectedResponseLengthException ( const std::string &  message) const
finalvirtual

(package-private)
Builds a specific APDU command exception for the case of an unexpected response length.

Parameters
messageThe message.
Returns
A not null reference.
Since
2.1.1

Since
2.1.1

Implements keyple::card::calypso::AbstractApduCommand.

Definition at line 75 of file AbstractCardCommand.cpp.

◆ getCalypsoCard()

std::shared_ptr< CalypsoCardAdapter > keyple::card::calypso::AbstractCardCommand::getCalypsoCard ( ) const

(package-private)
Returns the Calypso card.

Returns
Null if the card selection has not yet been made.
Since
2.2.3

Definition at line 89 of file AbstractCardCommand.cpp.

◆ getCommandRef()

const CalypsoCardCommand & keyple::card::calypso::AbstractCardCommand::getCommandRef ( ) const
overridevirtual

(package-private)
Gets CardCommand the current command identification

Returns
A not null reference.
Since
2.0.1

Since
2.0.1

Reimplemented from keyple::card::calypso::AbstractApduCommand.

Definition at line 39 of file AbstractCardCommand.cpp.

◆ isSessionBufferUsed()

virtual bool keyple::card::calypso::AbstractCardCommand::isSessionBufferUsed ( ) const
pure virtual

◆ parseApduResponse() [1/2]

void keyple::card::calypso::AbstractCardCommand::parseApduResponse ( const std::shared_ptr< ApduResponseApi >  apduResponse)
overridevirtual

◆ parseApduResponse() [2/2]

void keyple::card::calypso::AbstractCardCommand::parseApduResponse ( const std::shared_ptr< ApduResponseApi >  apduResponse,
const std::shared_ptr< CalypsoCardAdapter calypsoCard 
)

(package-private)
Sets the Calypso card and invoke the parseApduResponse(ApduResponseApi) method.

Since
2.2.3

Definition at line 94 of file AbstractCardCommand.cpp.


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