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<OutputBase<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 00024 out.pushItem(2); 00025 out.pushEquisupportItem(4); 00026 out.write(7); 00027 out.popItem(); 00028 00029 out.write(10); 00030 00031 out.pushItemWithWrite(3, 3); 00032 00033 00034 }