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

void PASN_BitString::Clear unsigned  bit  ) 
 

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 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 BOOL PASN_BitString::Decode PASN_Stream  )  [virtual]
 

Implements PASN_Object.

BOOL PASN_BitString::DecodeBER PBER_Stream &  strm,
unsigned  len
 

BOOL PASN_BitString::DecodePER PPER_Stream &  strm  ) 
 

BOOL PASN_BitString::DecodeSequenceExtensionBitmap PPER_Stream &  strm  ) 
 

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

Implements PASN_Object.

void PASN_BitString::EncodeBER PBER_Stream &  strm  )  const
 

void PASN_BitString::EncodePER PPER_Stream &  strm  )  const
 

void PASN_BitString::EncodeSequenceExtensionBitmap PPER_Stream &  strm  )  const
 

virtual PINDEX PASN_BitString::GetDataLength  )  const [virtual]
 

Implements PASN_Object.

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

unsigned PASN_BitString::GetSize  )  const [inline]
 

virtual PString PASN_BitString::GetTypeAsString  )  const [virtual]
 

Return a string giving the type of the object

Implements PASN_Object.

void PASN_BitString::Invert unsigned  bit  ) 
 

PASN_BitString& PASN_BitString::operator= const PASN_BitString other  ) 
 

bool PASN_BitString::operator[] PINDEX  bit  )  const
 

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.

void PASN_BitString::Set unsigned  bit  ) 
 

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

Reimplemented from PASN_ConstrainedObject.

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

void PASN_BitString::SetData unsigned  nBits,
const PBYTEArray bytes
 

BOOL PASN_BitString::SetSize unsigned  nBits  ) 
 


Member Data Documentation

PBYTEArray PASN_BitString::bitData [protected]
 

unsigned PASN_BitString::totalBits [protected]
 


The documentation for this class was generated from the following file:
Generated on Mon Jan 7 22:04:03 2008 for PWLib by  doxygen 1.4.6