Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

DFDecoderWithEEManagement_Test.cpp

Go to the documentation of this file.
00001 
00002 #include <vector>
00003 
00004 #include "common.hpp"
00005 #include "io/FILERepr.hpp"
00006 #include "io/codec/decoder/df/DFDecoderWithEEManagement.hpp"
00007 
00008 typedef std::vector<item_t> ItemVector;
00009 typedef DFDecoderWithEEManagement< Bodon::CacheDFDecoder<FILERepr> > PatternOutput;
00010 
00011 int main(int argc, char** argv) {
00012   ItemVector codeInverses;
00013   for (int i = 0; i < 10; i++)
00014     codeInverses.push_back(i);
00015 
00016   PatternOutput::params_t par_d;
00017   par_d.file_name = "test.pat";
00018   par_d.mode=FileReprBase::WRITE;
00019   PatternOutput out(&par_d);
00020   out.setCodeInverse(codeInverses);
00021 
00022   out.pushItem(1);
00023   out.write(10); 
00024   
00025   out.pushItem(2);
00026   out.pushEquisupportItem(4);
00027   out.write(7);
00028 
00029   out.pushItem(3);
00030   out.pushEquisupportItem(5);
00031   out.pushEquisupportItem(6);
00032   out.write(3);
00033   out.popItem();
00034 
00035   out.popItem();
00036 
00037   out.pushItemWithWrite(3, 6);
00038 
00039 }

Generated on Sun Sep 17 17:50:38 2006 for FIM environment by  doxygen 1.4.4