Keyple C++  0.9.0
Keyple, an Open Source SDK for Ticketing
Public Member Functions | Protected Member Functions | List of all members
keyple::calypso::command::po::AbstractPoResponseParser Class Reference

#include <AbstractPoResponseParser.h>

Inherits keyple::core::command::AbstractApduResponseParser.

Inherited by keyple::calypso::command::po::parser::AppendRecordRespPars, keyple::calypso::command::po::parser::DecreaseRespPars, keyple::calypso::command::po::parser::GetDataFciRespPars, keyple::calypso::command::po::parser::GetDataTraceRespPars, keyple::calypso::command::po::parser::IncreaseRespPars, keyple::calypso::command::po::parser::ReadRecordsRespPars, keyple::calypso::command::po::parser::security::AbstractOpenSessionRespPars, keyple::calypso::command::po::parser::security::ChangeKeyRespPars, keyple::calypso::command::po::parser::security::CloseSessionRespPars, keyple::calypso::command::po::parser::security::InvalidateRespPars, keyple::calypso::command::po::parser::security::PoGetChallengeRespPars, keyple::calypso::command::po::parser::security::RehabilitateRespPars, keyple::calypso::command::po::parser::security::VerifyPinRespPars, keyple::calypso::command::po::parser::SelectFileRespPars, keyple::calypso::command::po::parser::storedvalue::SvDebitRespPars, keyple::calypso::command::po::parser::storedvalue::SvGetRespPars, keyple::calypso::command::po::parser::storedvalue::SvReloadRespPars, keyple::calypso::command::po::parser::storedvalue::SvUndebitRespPars, keyple::calypso::command::po::parser::UpdateRecordRespPars, and keyple::calypso::command::po::parser::WriteRecordRespPars.

Public Member Functions

 AbstractPoResponseParser (std::shared_ptr< ApduResponse > response, AbstractPoCommandBuilder< AbstractPoResponseParser > *builder)
 
 AbstractPoResponseParser (const AbstractPoResponseParser &arp)=default
 
virtual ~AbstractPoResponseParser ()=default
 
virtual AbstractPoCommandBuilder< AbstractPoResponseParser > * getBuilder () const override
 
void checkStatus () const override
 
- Public Member Functions inherited from keyple::core::command::AbstractApduResponseParser
 AbstractApduResponseParser (const std::shared_ptr< ApduResponse > response, AbstractApduCommandBuilder *builder)
 
 AbstractApduResponseParser (const AbstractApduResponseParser &aarp)=default
 
virtual ~AbstractApduResponseParser ()=default
 
void setApduResponse (const std::shared_ptr< ApduResponse > &response)
 
const std::shared_ptr< ApduResponsegetApduResponse () const
 
virtual bool isSuccessful () const
 
std::string getStatusInformation () const
 

Protected Member Functions

const KeypleSeCommandException buildCommandException (const std::type_info &exceptionClass, const std::string &message, const std::shared_ptr< SeCommand > commandRef, const int statusCode) const override
 
- Protected Member Functions inherited from keyple::core::command::AbstractApduResponseParser
virtual const std::map< int, std::shared_ptr< StatusProperties > > & getStatusTable () const
 
virtual const std::shared_ptr< SeCommandgetCommandRef () const
 

Additional Inherited Members

- Protected Attributes inherited from keyple::core::command::AbstractApduResponseParser
std::shared_ptr< ApduResponsemResponse
 
AbstractApduCommandBuildermBuilder
 
- Static Protected Attributes inherited from keyple::core::command::AbstractApduResponseParser
static const std::map< int, std::shared_ptr< StatusProperties > > STATUS_TABLE
 

Constructor & Destructor Documentation

◆ AbstractPoResponseParser() [1/2]

keyple::calypso::command::po::AbstractPoResponseParser::AbstractPoResponseParser ( std::shared_ptr< ApduResponse response,
AbstractPoCommandBuilder< AbstractPoResponseParser > *  builder 
)

The generic abstract constructor to build a parser of the APDU response.

Parameters
responseresponse to parse
builderthe reference of the builder that created the parser

◆ AbstractPoResponseParser() [2/2]

keyple::calypso::command::po::AbstractPoResponseParser::AbstractPoResponseParser ( const AbstractPoResponseParser arp)
default

Copy Constructor

Required by macOS/CLang

◆ ~AbstractPoResponseParser()

virtual keyple::calypso::command::po::AbstractPoResponseParser::~AbstractPoResponseParser ( )
virtualdefault

Member Function Documentation

◆ buildCommandException()

const KeypleSeCommandException keyple::calypso::command::po::AbstractPoResponseParser::buildCommandException ( const std::type_info &  exceptionClass,
const std::string &  message,
const std::shared_ptr< SeCommand commandRef,
const int  statusCode 
) const
overrideprotectedvirtual

Build a command exception.
This method should be override in subclasses in order to create specific exceptions.

Parameters
exceptionClassthe exception class
messagethe message
commandRefthe command reference
statusCodethe status code
Returns
a new instance not null

Reimplemented from keyple::core::command::AbstractApduResponseParser.

◆ checkStatus()

void keyple::calypso::command::po::AbstractPoResponseParser::checkStatus ( ) const
overridevirtual

This method check the status code.
If status code is not referenced, then status is considered unsuccessful.

Exceptions
KeypleSeCommandExceptionif status is not successful.

Reimplemented from keyple::core::command::AbstractApduResponseParser.

◆ getBuilder()

AbstractPoCommandBuilder< AbstractPoResponseParser > * keyple::calypso::command::po::AbstractPoResponseParser::getBuilder ( ) const
overridevirtual
Returns
the associated builder reference

Reimplemented from keyple::core::command::AbstractApduResponseParser.


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