Yate
Public Types | Public Member Functions | Static Public Member Functions
AsnTag Class Reference

Class for ASN.1 tags. More...

#include <yateasn.h>

List of all members.

Public Types

enum  Class { Universal = 0x00, Application = 0x40, Context = 0x80, Private = 0xc0 }
enum  Type { Primitive = 0x00, Constructor = 0x20 }

Public Member Functions

 AsnTag ()
 AsnTag (Class clas, Type type, unsigned int code)
 ~AsnTag ()
void encode ()
bool operator== (const AsnTag &tag) const
bool operator!= (const AsnTag &tag) const
AsnTagoperator= (const AsnTag &value)
const Class classType () const
void classType (Class clas)
const Type type () const
void type (Type type)
const unsigned int code () const
void code (unsigned int code)
const DataBlockcoding () const

Static Public Member Functions

static void decode (AsnTag &tag, DataBlock &data)
static void encode (Class clas, Type type, unsigned int code, DataBlock &data)

Detailed Description

Class for ASN.1 tags.

Class AsnTag


Member Enumeration Documentation

enum Class

ASN.1 Tag class types enum

enum Type

ASN.1 Type of tag enum


Constructor & Destructor Documentation

AsnTag ( ) [inline]

Constructor

AsnTag ( Class  clas,
Type  type,
unsigned int  code 
) [inline]

Constructor

Parameters:
clasClass of the ASN.1 Tag
typeType of the ASN.1 Tag
codeCode ot the ASN.1 Tag

References AsnTag::encode().

~AsnTag ( ) [inline]

Destructor


Member Function Documentation

const Class classType ( ) const [inline]

Get the tag class

Returns:
The class of the tag

Referenced by AsnTag::operator!=(), AsnTag::operator=(), and AsnTag::operator==().

void classType ( Class  clas) [inline]

Set the tag class

Parameters:
clasThe clas to set for the tag
const unsigned int code ( ) const [inline]

Get the tag code

Returns:
The code of the tag

Referenced by AsnTag::operator!=(), AsnTag::operator=(), and AsnTag::operator==().

void code ( unsigned int  code) [inline]

Set the tag code

Parameters:
codeThe code to set for the tag

References AsnTag::code().

Referenced by AsnTag::code().

const DataBlock& coding ( ) const [inline]

Get the tag encoding

Returns:
The DataBlock containing the encoding for the tag
static void decode ( AsnTag tag,
DataBlock data 
) [static]

Decode an ASN.1 tag from the given data

Parameters:
tagTag to fill
dataData from which the tag should be filled
static void encode ( Class  clas,
Type  type,
unsigned int  code,
DataBlock data 
) [static]

Encode an ASN.1 tag and put the encoded form into the given data

Parameters:
clasClass of the tag
typeType of the tag
codeTag code
dataDataBlock into which to insert the encoded tag
void encode ( ) [inline]

Encode self

Referenced by AsnTag::AsnTag(), and AsnTag::operator=().

bool operator!= ( const AsnTag tag) const [inline]

Inequality operator

References AsnTag::classType(), AsnTag::code(), and AsnTag::type().

AsnTag& operator= ( const AsnTag value) [inline]

Assignment operator

References AsnTag::classType(), AsnTag::code(), AsnTag::encode(), and AsnTag::type().

bool operator== ( const AsnTag tag) const [inline]

Equality operator

References AsnTag::classType(), AsnTag::code(), and AsnTag::type().

const Type type ( ) const [inline]

Get the tag type

Returns:
The type of the tag

Referenced by AsnTag::operator!=(), AsnTag::operator=(), and AsnTag::operator==().

void type ( Type  type) [inline]

Set the tag type

Parameters:
typeThe type to set for the tag

References AsnTag::type().

Referenced by AsnTag::type().


The documentation for this class was generated from the following file: