# PASN_Object Class Reference

Base class for ASN encoding/decoding. More...

`#include <asner.h>`

Inheritance diagram for PASN_Object:

List of all members.

## Public Types

| UniversalTagClass
| ApplicationTagClass
| ContextSpecificTagClass
| PrivateTagClass
| DefaultTagClass
| InvalidUniversalTag
| UniversalBoolean
| UniversalInteger
| UniversalBitString
| UniversalOctetString
| UniversalNull
| UniversalObjectId
| UniversalObjectDescriptor
| UniversalExternalType
| UniversalReal
| UniversalEnumeration
| UniversalEmbeddedPDV
| UniversalSequence = 16
| UniversalSet
| UniversalNumericString
| UniversalPrintableString
| UniversalTeletexString
| UniversalVideotexString
| UniversalIA5String
| UniversalUTCTime
| UniversalGeneralisedTime
| UniversalGeneralizedTime = UniversalGeneralisedTime
| UniversalGraphicString
| UniversalVisibleString
| UniversalGeneralString
| UniversalUniversalString
| UniversalBMPString = 30
| Unconstrained
| PartiallyConstrained
| FixedConstraint
| ExtendableConstraint
| MinimumValue = INT_MIN
| MaximumValue = INT_MAX
enum | TagClass { UniversalTagClass, ApplicationTagClass, ContextSpecificTagClass, PrivateTagClass, DefaultTagClass }

enum

UniversalTags {
InvalidUniversalTag, UniversalBoolean, UniversalInteger, UniversalBitString,
UniversalOctetString, UniversalNull, UniversalObjectId, UniversalObjectDescriptor,
UniversalExternalType, UniversalReal, UniversalEnumeration, UniversalEmbeddedPDV,
UniversalSequence = 16, UniversalSet, UniversalNumericString, UniversalPrintableString,
UniversalTeletexString, UniversalVideotexString, UniversalIA5String, UniversalUTCTime,
UniversalGeneralisedTime, UniversalGeneralizedTime = UniversalGeneralisedTime, UniversalGraphicString, UniversalVisibleString,
UniversalGeneralString, UniversalUniversalString, UniversalBMPString = 30
}

enum | ConstraintType { Unconstrained, PartiallyConstrained, FixedConstraint, ExtendableConstraint }
enum | MinimumValueTag { MinimumValue = INT_MIN }
enum | MaximumValueTag { MaximumValue = INT_MAX }

## Public Member Functions

virtual PString | GetTypeAsString () const =0
| Return a string giving the type of the object.
PINDEX | GetObjectLength () const
virtual PINDEX | GetDataLength () const =0
virtual PBoolean | IsPrimitive () const
virtual PBoolean | Decode (PASN_Stream &)=0
virtual void | Encode (PASN_Stream &) const =0
PBoolean | IsExtendable () const
void | SetExtendable (PBoolean ext=true)
TagClass | GetTagClass () const
unsigned | GetTag () const
virtual void | SetTag (unsigned newTag, TagClass tagClass=DefaultTagClass)
void | SetConstraints (ConstraintType type, int value)
void | SetConstraints (ConstraintType, int lower, MaximumValueTag)
void | SetConstraints (ConstraintType, MinimumValueTag lower, unsigned upper)
void | SetConstraints (ConstraintType, MinimumValueTag lower, MaximumValueTag upper)
void | SetConstraints (ConstraintType type, int lower, unsigned upper)
virtual void | SetConstraintBounds (ConstraintType type, int lower, unsigned upper)
virtual void | SetCharacterSet (ConstraintType ctype, const char *charSet)
virtual void | SetCharacterSet (ConstraintType ctype, unsigned firstChar, unsigned lastChar)

## Static Public Member Functions

static PINDEX | GetMaximumArraySize ()
static void | SetMaximumArraySize (PINDEX sz)
static PINDEX | GetMaximumStringSize ()
static void | SetMaximumStringSize (PINDEX sz)

## Protected Member Functions

| PASN_Object (unsigned tag, TagClass tagClass, PBoolean extend=false)

## Protected Attributes

PBoolean | extendable
| PER extension capability.
TagClass | tagClass
| BER tag class.
unsigned | tag
| ASN object tag.

## Detailed Description

Base class for ASN encoding/decoding.

## Member Enumeration Documentation

enum PASN_Object::ConstraintType

Enumerator:

  Unconstrained |
  PartiallyConstrained |
  FixedConstraint |
  ExtendableConstraint |

enum PASN_Object::MaximumValueTag

Enumerator:

  MaximumValue |

enum PASN_Object::MinimumValueTag

Enumerator:

  MinimumValue |

enum PASN_Object::TagClass

Enumerator:

  UniversalTagClass |
  ApplicationTagClass |
  ContextSpecificTagClass |
  PrivateTagClass |
  DefaultTagClass |

enum PASN_Object::UniversalTags

Enumerator:

  InvalidUniversalTag |
  UniversalBoolean |
  UniversalInteger |
  UniversalBitString |
  UniversalOctetString |
  UniversalNull |
  UniversalObjectId |
  UniversalObjectDescriptor |
  UniversalExternalType |
  UniversalReal |
  UniversalEnumeration |
  UniversalEmbeddedPDV |
  UniversalSequence |
  UniversalSet |
  UniversalNumericString |
  UniversalPrintableString |
  UniversalTeletexString |
  UniversalVideotexString |
  UniversalIA5String |
  UniversalUTCTime |
  UniversalGeneralisedTime |
  UniversalGeneralizedTime |
  UniversalGraphicString |
  UniversalVisibleString |
  UniversalGeneralString |
  UniversalUniversalString |
  UniversalBMPString |

## Constructor & Destructor Documentation

PASN_Object::PASN_Object | ( | unsigned | tag,
|  | TagClass | tagClass,
|  | PBoolean | extend = `false` |
| ) |  |  | `[protected]`

## Member Function Documentation

virtual PBoolean PASN_Object::Decode | ( | PASN_Stream & |  | ) | `[pure virtual]`

Implemented in PASN_Null, PASN_Boolean, PASN_Integer, PASN_Enumeration, PASN_Real, PASN_ObjectId, PASN_BitString, PASN_OctetString, PASN_ConstrainedString, PASN_BMPString, PASN_Choice, PASN_Sequence, PASN_Array, PSNMP_PDUs, PSNMP_VarBind, PSNMP_PDU, PSNMP_Trap_PDU, and PSNMP_Message.

virtual void PASN_Object::Encode | ( | PASN_Stream & |  | ) | const`[pure virtual]`

Implemented in PASN_Null, PASN_Boolean, PASN_Integer, PASN_Enumeration, PASN_Real, PASN_ObjectId, PASN_BitString, PASN_OctetString, PASN_ConstrainedString, PASN_BMPString, PASN_Choice, PASN_Sequence, PASN_Array, PSNMP_PDUs, PSNMP_VarBind, PSNMP_PDU, PSNMP_Trap_PDU, and PSNMP_Message.

virtual PINDEX PASN_Object::GetDataLength | ( |  | ) | const`[pure virtual]`

Implemented in PASN_Null, PASN_Boolean, PASN_Integer, PASN_Enumeration, PASN_Real, PASN_ObjectId, PASN_BitString, PASN_OctetString, PASN_ConstrainedString, PASN_BMPString, PASN_Choice, PASN_Sequence, PASN_Array, PSNMP_VarBind, PSNMP_PDU, PSNMP_Trap_PDU, and PSNMP_Message.

static PINDEX PASN_Object::GetMaximumArraySize | ( |  | ) | `[static]`

static PINDEX PASN_Object::GetMaximumStringSize | ( |  | ) | `[static]`

PINDEX PASN_Object::GetObjectLength | ( |  | ) | const

unsigned PASN_Object::GetTag | ( |  | ) | const`[inline]`

TagClass PASN_Object::GetTagClass | ( |  | ) | const`[inline]`

virtual PString PASN_Object::GetTypeAsString | ( |  | ) | const`[pure virtual]`

Return a string giving the type of the object.

Implemented in PASN_Null, PASN_Boolean, PASN_Integer, PASN_Enumeration, PASN_Real, PASN_ObjectId, PASN_BitString, PASN_OctetString, PASN_BMPString, PASN_Choice, PASN_Sequence, PASN_Set, and PASN_Array.

PBoolean PASN_Object::IsExtendable | ( |  | ) | const`[inline]`

virtual PBoolean PASN_Object::IsPrimitive | ( |  | ) | const`[inline, virtual]`

Reimplemented in PASN_Choice, PASN_Sequence, and PASN_Array.

virtual void PASN_Object::SetCharacterSet | ( | ConstraintType | ctype,
|  | unsigned | firstChar,
|  | unsigned | lastChar |
| ) |  |  | `[virtual]`

virtual void PASN_Object::SetCharacterSet | ( | ConstraintType | ctype,
|  | const char * | charSet |
| ) |  |  | `[virtual]`

virtual void PASN_Object::SetConstraintBounds | ( | ConstraintType | type,
|  | int | lower,
|  | unsigned | upper |
| ) |  |  | `[virtual]`

void PASN_Object::SetConstraints | ( | ConstraintType | type,
|  | int | lower,
|  | unsigned | upper |
| ) |  |  | `[inline]`

void PASN_Object::SetConstraints | ( | ConstraintType | ,
|  | MinimumValueTag | lower,
|  | MaximumValueTag | upper |
| ) |  |  | `[inline]`

void PASN_Object::SetConstraints | ( | ConstraintType | ,
|  | MinimumValueTag | lower,
|  | unsigned | upper |
| ) |  |  | `[inline]`

void PASN_Object::SetConstraints | ( | ConstraintType | ,
|  | int | lower,
|  | MaximumValueTag |  |
| ) |  |  | `[inline]`

void PASN_Object::SetConstraints | ( | ConstraintType | type,
|  | int | value |
| ) |  |  | `[inline]`

void PASN_Object::SetExtendable | ( | PBoolean | ext = `true` | ) | `[inline]`

static void PASN_Object::SetMaximumArraySize | ( | PINDEX | sz | ) | `[static]`

static void PASN_Object::SetMaximumStringSize | ( | PINDEX | sz | ) | `[static]`

virtual void PASN_Object::SetTag | ( | unsigned | newTag,
|  | TagClass | tagClass = `DefaultTagClass` |
| ) |  |  | `[virtual]`

## Member Data Documentation

PBoolean PASN_Object::extendable `[protected]`

PER extension capability.

unsigned PASN_Object::tag `[protected]`

ASN object tag.

TagClass PASN_Object::tagClass `[protected]`

BER tag class.

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

- asner.h