Keyple C++
0.9.0
Keyple, an Open Source SDK for Ticketing
|
#include <Tag.h>
Inherits enable_shared_from_this< Tag >.
Public Types | |
enum | TagType { TagType::PRIMITIVE, TagType::CONSTRUCTED } |
enum | TagClass : uint8_t { TagClass::UNIVERSAL = 0, TagClass::APPLICATION, TagClass::CONTEXT, TagClass::PRIVATE } |
Public Member Functions | |
Tag (int tagNumber, const TagClass tagClass, const TagType tagType, int tagSize) | |
Tag (const std::vector< uint8_t > &binary, int offset) | |
int | getTagNumber () const |
TagClass | getTagClass () const |
TagType | getTagType () const |
int | getTagSize () const |
bool | operator== (const Tag &o) const |
bool | operator!= (const Tag &o) const |
Friends | |
KEYPLECORE_API std::ostream & | operator<< (std::ostream &os, const Tag::TagClass &tc) |
KEYPLECORE_API std::ostream & | operator<< (std::ostream &os, const Tag::TagType &tt) |
KEYPLECORE_API std::ostream & | operator<< (std::ostream &os, const Tag &t) |
This class represent a TAG as defined by the Basic Encoding Rules for ASN.1
This implementation limits the tag size to 2.
(ITU-T X.690 / ISO 8825)
|
strong |
|
strong |
keyple::core::util::bertlv::Tag::Tag | ( | int | tagNumber, |
const TagClass | tagClass, | ||
const TagType | tagType, | ||
int | tagSize | ||
) |
Creates a tag from its attributes.
tagNumber | the tag value. |
tagClass | the tag class. |
tagType | constructed or primitive |
tagSize | the tag size (1 or 2) |
keyple::core::util::bertlv::Tag::Tag | ( | const std::vector< uint8_t > & | binary, |
int | offset | ||
) |
Create a tag from a binary stream.
binary | the byte array containing the TLV data |
offset | the start offset in the byte array |
IndexOutOfBoundsException | if the offset is too large |
Tag::TagClass keyple::core::util::bertlv::Tag::getTagClass | ( | ) | const |
int keyple::core::util::bertlv::Tag::getTagNumber | ( | ) | const |
int keyple::core::util::bertlv::Tag::getTagSize | ( | ) | const |
Tag::TagType keyple::core::util::bertlv::Tag::getTagType | ( | ) | const |
bool keyple::core::util::bertlv::Tag::operator!= | ( | const Tag & | o | ) | const |
bool keyple::core::util::bertlv::Tag::operator== | ( | const Tag & | o | ) | const |
|
friend |
|
friend |
|
friend |