Octane v1.01.20 - The Open Compression Toolkit for C++ | http://octane.sourceforge.net/ |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 //--------------------------------------------------------------------------- 00011 00012 //--------------------------------------------------------------------------- 00013 // application includes 00014 #include "samplestatcompressor.hpp" 00015 // system includes 00016 using namespace std; 00017 //--------------------------------------------------------------------------- 00018 00019 00020 //--------------------------------------------------------------------------- 00021 // Create a global instance in order to register it automatically with the global manager 00022 SampleStatCompressor GloballyInstantiated_SampleStatCompressor(true); 00023 //--------------------------------------------------------------------------- 00024 00025 00026 //--------------------------------------------------------------------------- 00027 SampleStatCompressor::SampleStatCompressor(bool registerme) 00028 :OctaneCompressor_Statistical(registerme) 00029 { 00030 // create the children objects 00031 parserp=new SampleParser(); 00032 modelerp=new SampleModeler(); 00033 coderp=new SampleCoder(); 00034 00035 // REGISTER WITH COMPRESSOR MANAGER 00036 // this use a trick to make sure the global manager is ready for registration 00037 // and at the same time automatically register this instance with the global manager 00038 // note that the insurer is just temporary, and deletes when we exit the procedure 00039 if (registerme) 00040 CompressorManager_SingletonInsurer managerinsurance(this); 00041 00042 // now default setup of components 00043 SetupAnyDefaultParser(); 00044 } 00045 //---------------------------------------------------------------------------