PASN_BitString Class Reference

#include <asner.h>

Inheritance diagram for PASN_BitString:

PASN_ConstrainedObject PASN_Object PObject List of all members.

Public Member Functions

 PASN_BitString (unsigned nBits=0, const BYTE *buf=NULL)
 PASN_BitString (unsigned tag, TagClass tagClass, unsigned nBits=0)
 PASN_BitString (const PASN_BitString &other)
PASN_BitStringoperator= (const PASN_BitString &other)
void SetData (unsigned nBits, const PBYTEArray &bytes)
void SetData (unsigned nBits, const BYTE *buf, PINDEX size=0)
const BYTE * GetDataPointer () const
unsigned GetSize () const
BOOL SetSize (unsigned nBits)
bool operator[] (PINDEX bit) const
void Set (unsigned bit)
void Clear (unsigned bit)
void Invert (unsigned bit)
virtual Comparison Compare (const PObject &obj) const
virtual PObjectClone () const
virtual void PrintOn (ostream &strm) const
virtual void SetConstraintBounds (ConstraintType type, int lower, unsigned upper)
virtual PString GetTypeAsString () const
virtual PINDEX GetDataLength () const
virtual BOOL Decode (PASN_Stream &)
virtual void Encode (PASN_Stream &) const
BOOL DecodeBER (PBER_Stream &strm, unsigned len)
void EncodeBER (PBER_Stream &strm) const
BOOL DecodePER (PPER_Stream &strm)
void EncodePER (PPER_Stream &strm) const
BOOL DecodeSequenceExtensionBitmap (PPER_Stream &strm)
void EncodeSequenceExtensionBitmap (PPER_Stream &strm) const

Protected Attributes

unsigned totalBits
PBYTEArray bitData

Detailed Description

Class for ASN Bit String type.


Constructor & Destructor Documentation

PASN_BitString::PASN_BitString ( unsigned  nBits = 0,
const BYTE *  buf = NULL 
)

PASN_BitString::PASN_BitString ( unsigned  tag,
TagClass  tagClass,
unsigned  nBits = 0 
)

PASN_BitString::PASN_BitString ( const PASN_BitString other  ) 


Member Function Documentation

PASN_BitString& PASN_BitString::operator= ( const PASN_BitString other  ) 

void PASN_BitString::SetData ( unsigned  nBits,
const PBYTEArray bytes 
)

void PASN_BitString::SetData ( unsigned  nBits,
const BYTE *  buf,
PINDEX  size = 0 
)

const BYTE* PASN_BitString::GetDataPointer (  )  const [inline]

unsigned PASN_BitString::GetSize (  )  const [inline]

BOOL PASN_BitString::SetSize ( unsigned  nBits  ) 

bool PASN_BitString::operator[] ( PINDEX  bit  )  const

void PASN_BitString::Set ( unsigned  bit  ) 

void PASN_BitString::Clear ( unsigned  bit  ) 

void PASN_BitString::Invert ( unsigned  bit  ) 

virtual Comparison PASN_BitString::Compare ( const PObject obj  )  const [virtual]

Compare the two objects and return their relative rank. This function is usually overridden by descendent classes to yield the ranking according to the semantics of the object.

The default function is to use the CompareObjectMemoryDirect()# function to do a byte wise memory comparison of the two objects.

Returns:
LessThan#, EqualTo# or GreaterThan# according to the relative rank of the objects.

Reimplemented from PObject.

virtual PObject* PASN_BitString::Clone (  )  const [virtual]

Create a copy of the class on the heap. The exact semantics of the descendent class determine what is required to make a duplicate of the instance. Not all classes can even { do} a clone operation.

The main user of the clone function is the PDictionary# class as it requires copies of the dictionary keys.

The default behaviour is for this function to assert.

Returns:
pointer to new copy of the class instance.

Reimplemented from PObject.

virtual void PASN_BitString::PrintOn ( ostream &  strm  )  const [virtual]

Output the contents of the object to the stream. The exact output is dependent on the exact semantics of the descendent class. This is primarily used by the standard operator<<# function.

The default behaviour is to print the class name.

Reimplemented from PObject.

virtual void PASN_BitString::SetConstraintBounds ( ConstraintType  type,
int  lower,
unsigned  upper 
) [virtual]

Reimplemented from PASN_Object.

virtual PString PASN_BitString::GetTypeAsString (  )  const [virtual]

Return a string giving the type of the object

Implements PASN_Object.

virtual PINDEX PASN_BitString::GetDataLength (  )  const [virtual]

Implements PASN_Object.

virtual BOOL PASN_BitString::Decode ( PASN_Stream  )  [virtual]

Implements PASN_Object.

virtual void PASN_BitString::Encode ( PASN_Stream  )  const [virtual]

Implements PASN_Object.

BOOL PASN_BitString::DecodeBER ( PBER_Stream &  strm,
unsigned  len 
)

void PASN_BitString::EncodeBER ( PBER_Stream &  strm  )  const

BOOL PASN_BitString::DecodePER ( PPER_Stream &  strm  ) 

void PASN_BitString::EncodePER ( PPER_Stream &  strm  )  const

BOOL PASN_BitString::DecodeSequenceExtensionBitmap ( PPER_Stream &  strm  ) 

void PASN_BitString::EncodeSequenceExtensionBitmap ( PPER_Stream &  strm  )  const


Member Data Documentation

unsigned PASN_BitString::totalBits [protected]

PBYTEArray PASN_BitString::bitData [protected]


The documentation for this class was generated from the following file:
Generated on Fri Mar 7 06:25:03 2008 for PTLib by  doxygen 1.5.1