Shadowrun: Awakened 29 September 2011 - Build 871
Public Member Functions | Private Attributes
RakNet::HuffmanEncodingTreeFactory Class Reference

Creates instances of the class HuffmanEncodingTree. More...

#include <DS_HuffmanEncodingTreeFactory.h>

List of all members.

Public Member Functions

void AddToFrequencyTable (unsigned char *array, int size)
 Pass an array of bytes to this to add those elements to the frequency table.
HuffmanEncodingTreeGenerateTree (void)
 Generate a HuffmanEncodingTree.
unsigned int * GetFrequencyTable (void)
 Returns the frequency table as a pointer.
void GetFrequencyTable (unsigned int _frequency[256])
 Copies the frequency table to the array passed. Retrieve the frequency table.
 HuffmanEncodingTreeFactory ()
 Default constructor.
void Reset (void)
 Reset the frequency table.

Private Attributes

unsigned int frequency [256]
 Frequency table.

Detailed Description

This class takes a frequency table and given that frequence table, will generate an instance of HuffmanEncodingTree

Definition at line 21 of file DS_HuffmanEncodingTreeFactory.h.


Constructor & Destructor Documentation

RakNet::HuffmanEncodingTreeFactory::HuffmanEncodingTreeFactory ( )

Member Function Documentation

void RakNet::HuffmanEncodingTreeFactory::AddToFrequencyTable ( unsigned char *  array,
int  size 
)
Parameters:
[in]arraythe data to insert into the frequency table
[in]sizethe size of the data to insert
HuffmanEncodingTree* RakNet::HuffmanEncodingTreeFactory::GenerateTree ( void  )

You can also use GetFrequencyTable and GenerateFromFrequencyTable in the tree itself

Returns:
The generated instance of HuffmanEncodingTree
unsigned int* RakNet::HuffmanEncodingTreeFactory::GetFrequencyTable ( void  )
Returns:
the address of the frenquency table
void RakNet::HuffmanEncodingTreeFactory::GetFrequencyTable ( unsigned int  _frequency[256])
Parameters:
[in]_frequencyThe frequency table used currently
void RakNet::HuffmanEncodingTreeFactory::Reset ( void  )

You don't need to call this unless you want to reuse the class for a new tree


Member Data Documentation

unsigned int RakNet::HuffmanEncodingTreeFactory::frequency[256] [private]

Definition at line 52 of file DS_HuffmanEncodingTreeFactory.h.


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

Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net