Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

CTTLV Class Reference
[This and That]

#include <cttlv.h>

List of all members.

Public Member Functions

 CTTLV ()
 CTTLV (const string &s, unsigned int &pos, bool simple=false)
 CTTLV (unsigned int tag, unsigned int cl, bool cstrc, string d)
 CTTLV (unsigned int tag, string d)
 ~CTTLV ()
unsigned int getTag () const
unsigned int getLength () const
string getValue () const
unsigned int getSize () const
bool isValid () const
bool isConstructed () const
bool isSimple () const
unsigned int getClass () const
string toString ()


Detailed Description

This class handles BER-TLV tags also used by ASN.1. Such a tag consists of at least two bytes:


Constructor & Destructor Documentation

CTTLV::CTTLV  ) 
 

CTTLV::CTTLV const string &  s,
unsigned int &  pos,
bool  simple = false
 

Constructor for a tag from a string.

Author:
Martin Preuss<martin@libchipcard.de>
Parameters:
s string which is assumed to contain a tag
pos reference to a variable containing the position start position within the given string. Upon return this variable will contain the first position behind the tag.
simple if true then the tag in the given string is assumed to be a Simple-TLV tag. Otherwise a BER-TLV tag is assumed.

CTTLV::CTTLV unsigned int  tag,
unsigned int  cl,
bool  cstrc,
string  d
 

Constructor for a BER-TLV tag. A BER_TLV tag is a rather advanced tag compared to Simple-TLV. Such a tag contains information about the class this tag belongs to, or if this tag consists of sub tags.

CTTLV::CTTLV unsigned int  tag,
string  d
 

Constructor for a Simple-TLV tag. A Simple-TLV tag has no encodings for the class type, it is very simple.

CTTLV::~CTTLV  ) 
 


Member Function Documentation

unsigned int CTTLV::getClass  )  const [inline]
 

This is only usefull with BER-TLV tags, since Simple-TLV tags don't have classes.

unsigned int CTTLV::getLength  )  const [inline]
 

unsigned int CTTLV::getSize  )  const [inline]
 

unsigned int CTTLV::getTag  )  const [inline]
 

string CTTLV::getValue  )  const [inline]
 

bool CTTLV::isConstructed  )  const [inline]
 

This is only usefull with BER-TLV tags, since Simple-TLV tags don't tell if they are constructed. Constructed means that this tag is assumed to have sub tags in it.

bool CTTLV::isSimple  )  const [inline]
 

bool CTTLV::isValid  )  const [inline]
 

string CTTLV::toString  ) 
 

Writes the content of this tag into a string.


The documentation for this class was generated from the following file:
Generated on Mon Jan 5 20:56:29 2004 for libchipcard by doxygen 1.3.4