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