Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PASNString Class Reference

#include <pasn.h>

Inheritance diagram for PASNString:

PASNObject PObject PASNIPAddress

List of all members.

Detailed Description

A descendant of PASNObject which is a simple ASN OctetStr type

Definition at line 325 of file pasn.h.

Comparison functions

virtual Comparison Compare (const PObject &obj) const
virtual Comparison CompareObjectMemoryDirect (const PObject &obj) const
bool operator!= (const PObject &obj) const
bool operator< (const PObject &obj) const
bool operator<= (const PObject &obj) const
bool operator== (const PObject &obj) const
bool operator> (const PObject &obj) const
bool operator>= (const PObject &obj) const
enum  Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }

Run Time Type functions

virtual const char * GetClass (unsigned=0) const
virtual BOOL InternalIsDescendant (const char *clsName) const
BOOL IsClass (const char *cls) const
static const char * Class ()

I/O functions

virtual void ReadFrom (istream &strm)
ostream & operator<< (ostream &strm, const PObject &obj)
istream & operator>> (istream &strm, PObject &obj)

Public Types

enum  ASNType {
  Integer, String, ObjectID, Sequence,
  Choice, IPAddress, Counter, Gauge,
  TimeTicks, Opaque, NsapAddress, Counter64,
  UInteger32, Null, Unknown, ASNTypeMax

Public Member Functions

PObjectClone () const
void Encode (PBYTEArray &buffer)
int GetChoice () const
WORD GetEncodedLength ()
virtual PASNInt GetInteger () const
virtual PIPSocket::Address GetIPAddress () const
virtual const PASNSequenceGetSequence () const
PString GetString () const
ASNType GetType () const
PString GetTypeAsString () const
virtual PASNUnsigned GetUnsigned () const
 PASNString (const PBYTEArray &buffer, PINDEX &ptr, PASNObject::ASNType=String)
 PASNString (const PBYTEArray &buffer, PASNObject::ASNType=String)
 PASNString (const BYTE *ptr, int len)
 PASNString (const PString &str)
void PrintOn (ostream &strm) const
Miscellaneous functions
virtual PINDEX HashFunction () const

Static Public Member Functions

static BOOL DecodeASNInteger (const PBYTEArray &buffer, PINDEX &ptr, PASNInt &value, ASNType type=Integer)
static BOOL DecodeASNLength (const PBYTEArray &buffer, PINDEX &ptr, WORD &len)
static BOOL DecodeASNUnsigned (const PBYTEArray &buffer, PINDEX &ptr, PASNUnsigned &value, ASNType type=TimeTicks)
static void EncodeASNHeader (PBYTEArray &buffer, PASNObject::ASNType type, WORD length)
static void EncodeASNInteger (PBYTEArray &buffer, PASNInt data, PASNObject::ASNType type)
static void EncodeASNLength (PBYTEArray &buffer, WORD length)
static void EncodeASNSequenceStart (PBYTEArray &buffer, BYTE type, WORD length)
static void EncodeASNUnsigned (PBYTEArray &buffer, PASNUnsigned data, PASNObject::ASNType type)
static WORD GetASNHeaderLength (WORD length)
static WORD GetASNIntegerLength (PASNInt data)
static WORD GetASNLengthLength (WORD length)
static WORD GetASNSequenceStartLength (WORD length)
static WORD GetASNUnsignedLength (PASNUnsigned data)

Protected Member Functions

BOOL Decode (const PBYTEArray &buffer, PINDEX &i, PASNObject::ASNType type)
void Encode (PBYTEArray &buffer, PASNObject::ASNType type)

Protected Attributes

PString value
WORD valueLen

Static Protected Attributes

static BYTE ASNTypeToType [ASNTypeMax]

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

Generated by  Doxygen 1.6.0   Back to index