• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

okteta

  • Okteta
  • HexadecimalByteCodec
Public Member Functions | Protected Attributes | List of all members
Okteta::HexadecimalByteCodec Class Reference

#include <hexadecimalbytecodec.h>

Inheritance diagram for Okteta::HexadecimalByteCodec:
Inheritance graph
[legend]

Public Member Functions

 HexadecimalByteCodec (bool lowerCaseDigits=false)
 
virtual bool appendDigit (Byte *byte, unsigned char digit) const
 
virtual Byte digitsFilledLimit () const
 
virtual void encode (QString &digits, unsigned int pos, Byte byte) const
 
virtual void encodeShort (QString &digits, unsigned int pos, Byte byte) const
 
virtual unsigned int encodingWidth () const
 
bool isLowerCaseDigits () const
 
virtual bool isValidDigit (unsigned char digit) const
 
virtual void removeLastDigit (Byte *byte) const
 
bool setLowerCaseDigits (bool lowerCaseDigits)
 
virtual bool turnToValue (unsigned char *digit) const
 
- Public Member Functions inherited from Okteta::ValueCodec
virtual ~ValueCodec ()
 
unsigned int decode (Byte *byte, const QString &text, unsigned int pos=0) const
 

Protected Attributes

const QChar * mDigits
 

Additional Inherited Members

- Static Public Member Functions inherited from Okteta::ValueCodec
static ValueCodec * createCodec (ValueCoding valueCoding)
 
- Protected Member Functions inherited from Okteta::ValueCodec
 ValueCodec ()
 

Detailed Description

Definition at line 35 of file hexadecimalbytecodec.h.

Constructor & Destructor Documentation

Okteta::HexadecimalByteCodec::HexadecimalByteCodec ( bool  lowerCaseDigits = false)
explicit

Definition at line 45 of file hexadecimalbytecodec.cpp.

Member Function Documentation

bool Okteta::HexadecimalByteCodec::appendDigit ( Byte *  byte,
unsigned char  digit 
) const
virtual

Tries to increase the byte value by appending a digit to the digits of the current encoding.

Parameters
digitdigit to append to encoding of current value.
posoffset in digits where to write the code to
Returns
true if successful, false otherwise

Implements Okteta::ValueCodec.

Definition at line 117 of file hexadecimalbytecodec.cpp.

Byte Okteta::HexadecimalByteCodec::digitsFilledLimit ( ) const
virtual
Returns
largest value which could get another digit appended and stay below 256.

Implements Okteta::ValueCodec.

Definition at line 65 of file hexadecimalbytecodec.cpp.

void Okteta::HexadecimalByteCodec::encode ( QString &  digits,
unsigned int  pos,
Byte  byte 
) const
virtual

Encodes the byte using full coding width, prefixing with 0s if needed, and writes the result to digits.

Parameters
digitsstring to write the digits into
posoffset in digits where to write the code to
bytedata to encode

Implements Okteta::ValueCodec.

Definition at line 67 of file hexadecimalbytecodec.cpp.

void Okteta::HexadecimalByteCodec::encodeShort ( QString &  digits,
unsigned int  pos,
Byte  byte 
) const
virtual

Encodes the byte and writes the result to digits, no leading 0s.

Parameters
digitsstring to write the digits into
posoffset in digits where to write the code to
bytedata to encode

Implements Okteta::ValueCodec.

Definition at line 73 of file hexadecimalbytecodec.cpp.

unsigned int Okteta::HexadecimalByteCodec::encodingWidth ( ) const
virtual
Returns
number of digits the greatest byte gets decoded into

Implements Okteta::ValueCodec.

Definition at line 64 of file hexadecimalbytecodec.cpp.

bool Okteta::HexadecimalByteCodec::isLowerCaseDigits ( ) const

Definition at line 61 of file hexadecimalbytecodec.cpp.

bool Okteta::HexadecimalByteCodec::isValidDigit ( unsigned char  digit) const
virtual

Checks if the given digit is used in the encoding.

Parameters
digitvalue to check
Returns
true if digit is valid, false otherwise

Implements Okteta::ValueCodec.

Definition at line 98 of file hexadecimalbytecodec.cpp.

void Okteta::HexadecimalByteCodec::removeLastDigit ( Byte *  byte) const
virtual

Tries to remove the last (least significant) digit from byte.

Parameters
bytevalue to remove the last digit from
Returns
true if successful, false otherwise

Implements Okteta::ValueCodec.

Definition at line 135 of file hexadecimalbytecodec.cpp.

bool Okteta::HexadecimalByteCodec::setLowerCaseDigits ( bool  lowerCaseDigits)

Definition at line 50 of file hexadecimalbytecodec.cpp.

bool Okteta::HexadecimalByteCodec::turnToValue ( unsigned char *  digit) const
virtual

Turns the digit into a byte with the value of the digit.

Parameters
digitdigit to turn into the value
Returns
true if successful, false otherwise

Implements Okteta::ValueCodec.

Definition at line 103 of file hexadecimalbytecodec.cpp.

Member Data Documentation

const QChar* Okteta::HexadecimalByteCodec::mDigits
protected

Definition at line 56 of file hexadecimalbytecodec.h.


The documentation for this class was generated from the following files:
  • hexadecimalbytecodec.h
  • hexadecimalbytecodec.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

Skip menu "okteta"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal