diff options
author | Pixel <> | 2001-03-05 01:30:36 +0000 |
---|---|---|
committer | Pixel <> | 2001-03-05 01:30:36 +0000 |
commit | dfd868ecf9e37a5e6954a073c3ba43a970f7ca54 (patch) | |
tree | 3c85775253afaa6c43148a8da46fa8a7803de62e /include | |
parent | f1eb23d8a489aa0353b68aba47c065e3206920ac (diff) |
Projet quasi fini...
Diffstat (limited to 'include')
-rw-r--r-- | include/BHeap.h | 2 | ||||
-rw-r--r-- | include/BinHeap.h | 2 | ||||
-rw-r--r-- | include/CList.h | 2 | ||||
-rw-r--r-- | include/FHeap.h | 2 | ||||
-rw-r--r-- | include/HTree.h | 6 | ||||
-rw-r--r-- | include/Huffman.h | 10 | ||||
-rw-r--r-- | include/Makefile.am | 2 | ||||
-rw-r--r-- | include/PCommon.h | 2 | ||||
-rw-r--r-- | include/PLList.h | 2 |
9 files changed, 21 insertions, 9 deletions
diff --git a/include/BHeap.h b/include/BHeap.h index d67ab29..9c31467 100644 --- a/include/BHeap.h +++ b/include/BHeap.h @@ -17,7 +17,7 @@ class BHeap:public PriorityList { public: BHeap(void); // Constructor - ~BHeap(void); // Destructor + virtual ~BHeap(void); // Destructor virtual int rn(void); virtual Key_t ReadKey(Cell C); virtual Datas_t ReadDatas(Cell C); diff --git a/include/BinHeap.h b/include/BinHeap.h index 8273365..41872f7 100644 --- a/include/BinHeap.h +++ b/include/BinHeap.h @@ -14,7 +14,7 @@ typedef class BinHeap:public PriorityList { private: void PackUp(int i); public: BinHeap(void); // Constructor - ~BinHeap(void); // Destructor + virtual ~BinHeap(void); // Destructor virtual int rn(void); diff --git a/include/CList.h b/include/CList.h index 147fe71..1bc7fe2 100644 --- a/include/CList.h +++ b/include/CList.h @@ -18,7 +18,7 @@ class CList { public: CList(void); - ~CList(void); + virtual ~CList(void); virtual Datas_t ReadDatas(Cell C); virtual Key_t ReadKey(Cell C); diff --git a/include/FHeap.h b/include/FHeap.h index 65d9253..6cbbeb6 100644 --- a/include/FHeap.h +++ b/include/FHeap.h @@ -19,7 +19,7 @@ typedef class FHeap:public PriorityList { public: FHeap(void); // Constructor - ~FHeap(void); // Destructor + virtual ~FHeap(void); // Destructor virtual int rn(void); diff --git a/include/HTree.h b/include/HTree.h index 18150b1..c153415 100644 --- a/include/HTree.h +++ b/include/HTree.h @@ -11,12 +11,14 @@ class HTree { private: HTree * left, *right; int freq; - Datas_t objet; + char * objet; public: - HTree(int n_freq, char *n_objet); + HTree(int n_freq, char * n_objet); HTree(HTree * n_left, HTree * n_right); ~HTree(); ostream & Trace(ostream & os, int d = 0); + int ReadFreq(void); + char * ReadObj(void); }; #else diff --git a/include/Huffman.h b/include/Huffman.h new file mode 100644 index 0000000..aacbf79 --- /dev/null +++ b/include/Huffman.h @@ -0,0 +1,10 @@ +#ifndef __HUFFMAN_H__ +#define __HUFFMAN_H__ + +#include "PCommon.h" +#include "HTree.h" + +HTree * Coder(PriorityList * P); +void HInsert(PriorityList * P, int freq, char * object); + +#endif
\ No newline at end of file diff --git a/include/Makefile.am b/include/Makefile.am index c0518e5..eeda5cf 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -1 +1 @@ -include_HEADERS = PCommon.h PLList.h FHeap.h BHeap.h BinHeap.h CList.h SList.h PTypes.h +include_HEADERS = PCommon.h PLList.h FHeap.h BHeap.h BinHeap.h CList.h SList.h PTypes.h Huffman.h diff --git a/include/PCommon.h b/include/PCommon.h index 1d90a21..e1190fb 100644 --- a/include/PCommon.h +++ b/include/PCommon.h @@ -28,7 +28,7 @@ class PriorityList { public: PriorityList(void); - ~PriorityList(void); + virtual ~PriorityList(void); virtual Key_t ReadKey(Cell C); virtual Datas_t ReadDatas(Cell C); diff --git a/include/PLList.h b/include/PLList.h index 6e9af25..c722900 100644 --- a/include/PLList.h +++ b/include/PLList.h @@ -10,7 +10,7 @@ class PLList:public PriorityList { private: public: PLList(void); - ~PLList(void); + virtual ~PLList(void); virtual Key_t ReadKey(Cell C); virtual Datas_t ReadDatas(Cell C); |