Keyple Card Calypso C++ Library 2.1.0
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 CalypsoCardCommandgetCommandRef () const override
 
virtual bool isSessionBufferUsed () const =0
 
const CalypsoApduCommandException buildCommandException (const std::type_info &exceptionClass, const std::string &message, const CardCommand &commandRef, const int statusWord) const final
 
AbstractCardCommandsetApduResponse (const std::shared_ptr< ApduResponseApi > apduResponse) override
 
void checkStatus () override
 
- Public Member Functions inherited from keyple::card::calypso::AbstractApduCommand
 AbstractApduCommand (const CardCommand &commandRef)
 
virtual void addSubName (const std::string &subName) final
 
virtual const std::string & getName () const 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 29 of file AbstractCardCommand.h.

Constructor & Destructor Documentation

◆ AbstractCardCommand()

keyple::card::calypso::AbstractCardCommand::AbstractCardCommand ( const CalypsoCardCommand commandRef)

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

Parameters
commandRefa command reference from the Calypso command table.
Since
2.0.1

Definition at line 33 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 CardCommand commandRef,
const int  statusWord 
) const
finalvirtual

(package-private)
Builds a command exception.This method should be override in subclasses in order to create specific exceptions.

Parameters
exceptionClassthe exception class.
messagethe message.
commandRefCardCommand the command reference.
statusWordthe status word.
Returns
A not null value
Since
2.0.1

Since
2.0.1

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

Definition at line 41 of file AbstractCardCommand.cpp.

◆ checkStatus()

void keyple::card::calypso::AbstractCardCommand::checkStatus ( )
overridevirtual

(package-private)
This method check the status word.
If status word is not referenced, then status is considered unsuccessful.

Exceptions
CalypsoApduCommandExceptionif status is not successful.
Since
2.0.1

Since
2.0.1

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

Definition at line 81 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 36 of file AbstractCardCommand.cpp.

◆ isSessionBufferUsed()

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

◆ setApduResponse()

AbstractCardCommand & keyple::card::calypso::AbstractCardCommand::setApduResponse ( const std::shared_ptr< ApduResponseApi >  apduResponse)
overridevirtual

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