PTLib  Version 2.14.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PASNSequence Class Reference

A descendant of PASNObject which is the complex sequence type. More...

#include <pasn.h>

Inheritance diagram for PASNSequence:
Collaboration diagram for PASNSequence:

Public Member Functions

 PASNSequence ()
 
 PASNSequence (BYTE selector)
 
 PASNSequence (const PBYTEArray &buffer)
 
 PASNSequence (const PBYTEArray &buffer, PINDEX &i)
 
void Append (PASNObject *obj)
 
PINDEX GetSize () const
 
PASNObjectoperator[] (PINDEX idx) const
 
const PASNSequenceGetSequence () const
 Return the value of the object as a PString. More...
 
void AppendInteger (PASNInt value)
 
void AppendString (const PString &str)
 
void AppendObjectID (const PString &str)
 
void AppendObjectID (PASNOid *val, BYTE len)
 
int GetChoice () const
 
void PrintOn (ostream &strm) const
 Virtual functions used by the PObject::operator<< function to print the value of the object. More...
 
void Encode (PBYTEArray &buffer)
 Virtual function used to encode the object into ASN format. More...
 
PBoolean Decode (const PBYTEArray &buffer, PINDEX &i)
 
WORD GetEncodedLength ()
 Virtual function used to get the length of object when encoded into ASN format. More...
 
ASNType GetType () const
 Return a value of type enum ASNType which indicates the type of the object. More...
 
PString GetTypeAsString () const
 Return a string giving the type of the object. More...
 
PBoolean Encode (PBYTEArray &buffer, PINDEX maxLen)
 
- Public Member Functions inherited from PASNObject
int GetChoice () const
 Return the descriminator for Choice sequences. More...
 
virtual PASNInt GetInteger () const
 Return the value of the ASN object as a PASNInt. More...
 
virtual PASNUnsigned GetUnsigned () const
 Return the value of the object as a PASNUnsigned. More...
 
virtual PString GetString () const
 Return the value of the object as a PString. More...
 
virtual PIPSocket::Address GetIPAddress () const
 Return the value of the object as an IPAddress. More...
 
virtual PObjectClone () const
 Virtual function used to duplicate objects. More...
 
- Public Member Functions inherited from PObject
unsigned GetTraceContextIdentifier () const
 Get PTRACE context identifier. More...
 
void SetTraceContextIdentifier (unsigned id)
 
void GetTraceContextIdentifier (PObject &obj)
 
void GetTraceContextIdentifier (PObject *obj)
 
void SetTraceContextIdentifier (const PObject &obj)
 
void SetTraceContextIdentifier (const PObject *obj)
 
virtual ~PObject ()
 
template<class CLS >
CLS * CloneAs () const
 As for Clone() but converts to specified type. More...
 
virtual PINDEX HashFunction () const
 This function yields a hash value required by the PDictionary class. More...
 
virtual Comparison Compare (const PObject &obj) const
 Compare the two objects and return their relative rank. More...
 
virtual Comparison CompareObjectMemoryDirect (const PObject &obj) const
 Determine the byte wise comparison of two objects. More...
 
bool operator== (const PObject &obj) const
 Compare the two objects. More...
 
bool operator!= (const PObject &obj) const
 Compare the two objects. More...
 
bool operator< (const PObject &obj) const
 Compare the two objects. More...
 
bool operator> (const PObject &obj) const
 Compare the two objects. More...
 
bool operator<= (const PObject &obj) const
 Compare the two objects. More...
 
bool operator>= (const PObject &obj) const
 Compare the two objects. More...
 
virtual const char * GetClass (unsigned ancestor=0) const
 Get the current dynamic type of the object instance. More...
 
PBoolean IsClass (const char *cls) const
 
virtual PBoolean InternalIsDescendant (const char *clsName) const
 Determine if the dynamic type of the current instance is a descendent of the specified class. More...
 
__inline const PObjectPTraceObjectInstance () const
 
virtual void ReadFrom (istream &strm)
 Input the contents of the object from the stream. More...
 

Additional Inherited Members

- Public Types inherited from PASNObject
enum  ASNType {
  Integer, String, ObjectID, Sequence,
  Choice, IPAddress, Counter, Gauge,
  TimeTicks, Opaque, NsapAddress, Counter64,
  UInteger32, Null, Unknown, ASNTypeMax
}
 Value returned by the GetType() function to indicate the type of an ASN object. More...
 
- Static Public Member Functions inherited from PASNObject
static void EncodeASNLength (PBYTEArray &buffer, WORD length)
 Encode an ASN length value. More...
 
static WORD GetASNLengthLength (WORD length)
 Return the length of an encoded ASN length value. More...
 
static PBoolean DecodeASNLength (const PBYTEArray &buffer, PINDEX &ptr, WORD &len)
 Decode an ASN length in the buffer at the given ptr. More...
 
static void EncodeASNSequenceStart (PBYTEArray &buffer, BYTE type, WORD length)
 Encode a sequence header into the buffer at the specified offset. More...
 
static WORD GetASNSequenceStartLength (WORD length)
 Return the encoded length of a sequence if it has the specified length. More...
 
static void EncodeASNHeader (PBYTEArray &buffer, PASNObject::ASNType type, WORD length)
 Encode an ASN object header into the buffer. More...
 
static WORD GetASNHeaderLength (WORD length)
 Return the length of an ASN object header if the object is the specified length. More...
 
static void EncodeASNInteger (PBYTEArray &buffer, PASNInt data, PASNObject::ASNType type)
 
static void EncodeASNUnsigned (PBYTEArray &buffer, PASNUnsigned data, PASNObject::ASNType type)
 
static WORD GetASNIntegerLength (PASNInt data)
 
static WORD GetASNUnsignedLength (PASNUnsigned data)
 
static PBoolean DecodeASNInteger (const PBYTEArray &buffer, PINDEX &ptr, PASNInt &value, ASNType type=Integer)
 
static PBoolean DecodeASNUnsigned (const PBYTEArray &buffer, PINDEX &ptr, PASNUnsigned &value, ASNType type=TimeTicks)
 
- Protected Member Functions inherited from PASNObject
 PASNObject ()
 Create an empty ASN object. More...
 
- Protected Attributes inherited from PObject
unsigned m_traceContextIdentifier
 
- Static Protected Attributes inherited from PASNObject
static BYTE ASNTypeToType [ASNTypeMax]
 Table to map enum ASNType values to ASN identifiers. More...
 
- Friends inherited from PObject

Detailed Description

A descendant of PASNObject which is the complex sequence type.

Constructor & Destructor Documentation

PASNSequence::PASNSequence ( )
PASNSequence::PASNSequence ( BYTE  selector)
PASNSequence::PASNSequence ( const PBYTEArray buffer)
PASNSequence::PASNSequence ( const PBYTEArray buffer,
PINDEX &  i 
)

Member Function Documentation

void PASNSequence::Append ( PASNObject obj)
void PASNSequence::AppendInteger ( PASNInt  value)
void PASNSequence::AppendObjectID ( const PString str)
void PASNSequence::AppendObjectID ( PASNOid val,
BYTE  len 
)
void PASNSequence::AppendString ( const PString str)
PBoolean PASNSequence::Decode ( const PBYTEArray buffer,
PINDEX &  i 
)
void PASNSequence::Encode ( PBYTEArray buffer)
virtual

Virtual function used to encode the object into ASN format.

Reimplemented from PASNObject.

PBoolean PASNSequence::Encode ( PBYTEArray buffer,
PINDEX  maxLen 
)
int PASNSequence::GetChoice ( ) const
WORD PASNSequence::GetEncodedLength ( )
virtual

Virtual function used to get the length of object when encoded into ASN format.

Reimplemented from PASNObject.

const PASNSequence& PASNSequence::GetSequence ( ) const
virtual

Return the value of the object as a PString.

This function will assert if the object is not a descendant of PASNSequence.

Reimplemented from PASNObject.

PINDEX PASNSequence::GetSize ( ) const
ASNType PASNSequence::GetType ( ) const
virtual

Return a value of type enum ASNType which indicates the type of the object.

Reimplemented from PASNObject.

PString PASNSequence::GetTypeAsString ( ) const
virtual

Return a string giving the type of the object.

Reimplemented from PASNObject.

PASNObject& PASNSequence::operator[] ( PINDEX  idx) const
void PASNSequence::PrintOn ( ostream &  strm) const
virtual

Virtual functions used by the PObject::operator<< function to print the value of the object.

Reimplemented from PASNObject.


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