![]() |
Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
|
#include <FileDataAdapter.h>


Public Member Functions | |
| FileDataAdapter () | |
| FileDataAdapter (const std::shared_ptr< FileData > source) | |
| const std::map< const uint8_t, std::vector< uint8_t > > & | getAllRecordsContent () const override |
| const std::vector< uint8_t > | getContent () const override |
| const std::vector< uint8_t > | getContent (const uint8_t numRecord) const override |
| const std::vector< uint8_t > | getContent (const uint8_t numRecord, const uint8_t dataOffset, const uint8_t dataLength) const override |
| const std::shared_ptr< int > | getContentAsCounterValue (const int numCounter) const override |
| const std::map< const int, const int > | getAllCountersValue () const override |
| void | setContent (const uint8_t numRecord, const std::vector< uint8_t > &content) |
| void | setCounter (const uint8_t numCounter, const std::vector< uint8_t > &content) |
| void | setContent (const uint8_t numRecord, const std::vector< uint8_t > content, const uint8_t offset) |
| void | fillContent (const uint8_t numRecord, const std::vector< uint8_t > content, const uint8_t offset) |
| void | addCyclicContent (const std::vector< uint8_t > &content) |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const FileDataAdapter &fda) |
(package-private)
Implementation of FileData.
Definition at line 40 of file FileDataAdapter.h.
| keyple::card::calypso::FileDataAdapter::FileDataAdapter | ( | ) |
| keyple::card::calypso::FileDataAdapter::FileDataAdapter | ( | const std::shared_ptr< FileData > | source | ) |
(package-private)
Constructor used to create a clone of the provided file file data.
| source | the header to be cloned. |
Definition at line 33 of file FileDataAdapter.cpp.
| void keyple::card::calypso::FileDataAdapter::addCyclicContent | ( | const std::vector< uint8_t > & | content | ) |
(package-private)
Adds cyclic content at record #1 by rolling previously all actual records contents (record #1 -> record #2, record #2 -> record #3,...).
This is useful for cyclic files.
Note that records are infinitely shifted.
| content | the content (should be not empty). |
Definition at line 212 of file FileDataAdapter.cpp.
| void keyple::card::calypso::FileDataAdapter::fillContent | ( | const uint8_t | numRecord, |
| const std::vector< uint8_t > | content, | ||
| const uint8_t | offset | ||
| ) |
(package-private)
Fills the content at the specified offset of the specified record using a binary OR operation with the provided content.
If actual record content is not set or has a size
offset + content size, then missing data will be completed by the provided content.
| numRecord | the record number (should be >=
|
| content | the content (should be not empty). |
| offset | the offset (should be >=
|
Definition at line 180 of file FileDataAdapter.cpp.
|
override |
Definition at line 123 of file FileDataAdapter.cpp.
|
override |
Definition at line 43 of file FileDataAdapter.cpp.
|
override |
Definition at line 49 of file FileDataAdapter.cpp.
|
override |
Definition at line 54 of file FileDataAdapter.cpp.
|
override |
Definition at line 65 of file FileDataAdapter.cpp.
|
override |
Definition at line 95 of file FileDataAdapter.cpp.
| void keyple::card::calypso::FileDataAdapter::setContent | ( | const uint8_t | numRecord, |
| const std::vector< uint8_t > & | content | ||
| ) |
(package-private)
Sets or replaces the entire content of the specified record #numRecord by the provided content.
| numRecord | the record number (should be >=
|
| content | the content (should be not empty). |
Definition at line 143 of file FileDataAdapter.cpp.
| void keyple::card::calypso::FileDataAdapter::setContent | ( | const uint8_t | numRecord, |
| const std::vector< uint8_t > | content, | ||
| const uint8_t | offset | ||
| ) |
(package-private)
Sets or replaces the content at the specified offset of record #numRecord by a copy of the provided content.
If actual record content is not set or has a size
offset, then missing data will be padded with 0.
| numRecord | the record number (should be >=
|
| content | the content (should be not empty). |
| offset | the offset (should be >=
|
Definition at line 153 of file FileDataAdapter.cpp.
| void keyple::card::calypso::FileDataAdapter::setCounter | ( | const uint8_t | numCounter, |
| const std::vector< uint8_t > & | content | ||
| ) |
(package-private)
Sets a counter value in record #1.
| numCounter | the counter number (should be >=
|
| content | the counter value (should be not null and 3 bytes length). |
Definition at line 148 of file FileDataAdapter.cpp.
|
friend |
Definition at line 227 of file FileDataAdapter.cpp.