KItinerary::UPERDecoder

Search for usage in LXR

KItinerary::UPERDecoder Class Reference

#include <uperdecoder.h>

Public Types

using size_type = BitVectorView::size_type
 

Public Member Functions

 UPERDecoder (BitVectorView data)
 
QByteArray errorMessage () const
 
bool hasError () const
 
size_type offset () const
 
template<std::size_t N>
std::bitset< N > readBitset ()
 
bool readBoolean ()
 
template<typename... Ts>
QVariant readChoiceWithExtensionMarker ()
 
int64_t readConstrainedWholeNumber (int64_t minimum, int64_t maximum)
 
template<typename T >
readEnumerated ()
 
template<typename T >
readEnumeratedWithExtensionMarker ()
 
QByteArray readIA5String ()
 
QByteArray readIA5String (size_type minLenght, size_type maxLength)
 
size_type readLengthDeterminant ()
 
QByteArray readOctetString ()
 
template<typename T >
QList< T > readSequenceOf ()
 
QList< int > readSequenceOfConstrainedWholeNumber (int64_t minimum, int64_t maximum)
 
QList< QByteArrayreadSequenceOfIA5String ()
 
QList< int > readSequenceOfUnconstrainedWholeNumber ()
 
QList< QStringreadSequenceOfUtf8String ()
 
int64_t readUnconstrainedWholeNumber ()
 
QString readUtf8String ()
 
void seek (size_type index)
 
void setError (const char *msg)
 

Detailed Description

Decoder for data encoded according to X.691 ASN.1 Unaligned Packed Encoding Rules (UPER).

Definition at line 16 of file uperdecoder.h.

Member Typedef Documentation

◆ size_type

using KItinerary::UPERDecoder::size_type = BitVectorView::size_type

Definition at line 22 of file uperdecoder.h.

Constructor & Destructor Documentation

◆ UPERDecoder()

UPERDecoder::UPERDecoder ( BitVectorView data)
explicit

Definition at line 12 of file uperdecoder.cpp.

Member Function Documentation

◆ errorMessage()

QByteArray UPERDecoder::errorMessage ( ) const

Definition at line 171 of file uperdecoder.cpp.

◆ hasError()

bool UPERDecoder::hasError ( ) const

Reading at any point encountered an error.

As uPER gives us no way to recover from that, everything read has to be considered invalid.

Definition at line 166 of file uperdecoder.cpp.

◆ offset()

UPERDecoder::size_type UPERDecoder::offset ( ) const

Definition at line 19 of file uperdecoder.cpp.

◆ readBitset()

template<std::size_t N>
std::bitset< N > KItinerary::UPERDecoder::readBitset ( )
inline

Read an.

Template Parameters
Nsized bitmap.

Definition at line 65 of file uperdecoder.h.

◆ readBoolean()

bool UPERDecoder::readBoolean ( )

Read boolean value.

Definition at line 81 of file uperdecoder.cpp.

◆ readChoiceWithExtensionMarker()

template<typename... Ts>
QVariant KItinerary::UPERDecoder::readChoiceWithExtensionMarker ( )
inline

Read a choice value.

See also
X.691 §23

Definition at line 117 of file uperdecoder.h.

◆ readConstrainedWholeNumber()

int64_t UPERDecoder::readConstrainedWholeNumber ( int64_t minimum,
int64_t maximum )

Read constrained whole number from the current position.

See also
X.691 §11.5

Definition at line 29 of file uperdecoder.cpp.

◆ readEnumerated()

template<typename T >
T KItinerary::UPERDecoder::readEnumerated ( )
inline

Read enumerated value.

See also
X.691 §14

Definition at line 97 of file uperdecoder.h.

◆ readEnumeratedWithExtensionMarker()

template<typename T >
T KItinerary::UPERDecoder::readEnumeratedWithExtensionMarker ( )
inline

Definition at line 104 of file uperdecoder.h.

◆ readIA5String() [1/2]

QByteArray UPERDecoder::readIA5String ( )

Read an unconstrained IA5String (7 bit ASCII).

See also
X.691 §30

Definition at line 98 of file uperdecoder.cpp.

◆ readIA5String() [2/2]

QByteArray UPERDecoder::readIA5String ( size_type minLenght,
size_type maxLength )

Read length-constrained IA5String (7 bit ASCII).

See also
X.691 §30

Definition at line 103 of file uperdecoder.cpp.

◆ readLengthDeterminant()

UPERDecoder::size_type UPERDecoder::readLengthDeterminant ( )

Read length determinant.

See also
X.691 §11.9

Definition at line 51 of file uperdecoder.cpp.

◆ readOctetString()

QByteArray UPERDecoder::readOctetString ( )

Read unconstrained octet string (8 bit data).

See also
X.691 §17

Definition at line 114 of file uperdecoder.cpp.

◆ readSequenceOf()

template<typename T >
QList< T > KItinerary::UPERDecoder::readSequenceOf ( )
inline

Read a sequence-of field with unrestricted size.

See also
X.691 §20

Definition at line 76 of file uperdecoder.h.

◆ readSequenceOfConstrainedWholeNumber()

QList< int > UPERDecoder::readSequenceOfConstrainedWholeNumber ( int64_t minimum,
int64_t maximum )

Definition at line 122 of file uperdecoder.cpp.

◆ readSequenceOfIA5String()

QList< QByteArray > UPERDecoder::readSequenceOfIA5String ( )

Definition at line 144 of file uperdecoder.cpp.

◆ readSequenceOfUnconstrainedWholeNumber()

QList< int > UPERDecoder::readSequenceOfUnconstrainedWholeNumber ( )

Definition at line 133 of file uperdecoder.cpp.

◆ readSequenceOfUtf8String()

QList< QString > UPERDecoder::readSequenceOfUtf8String ( )

Definition at line 155 of file uperdecoder.cpp.

◆ readUnconstrainedWholeNumber()

int64_t UPERDecoder::readUnconstrainedWholeNumber ( )

Read unconstrained whole number.

See also
X.691 §11.8

Definition at line 39 of file uperdecoder.cpp.

◆ readUtf8String()

QString UPERDecoder::readUtf8String ( )

Read UTF-8 string.

Definition at line 73 of file uperdecoder.cpp.

◆ seek()

void UPERDecoder::seek ( UPERDecoder::size_type index)

Definition at line 24 of file uperdecoder.cpp.

◆ setError()

void UPERDecoder::setError ( const char * msg)

Put the decoder into the error state.

Definition at line 176 of file uperdecoder.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.