00001 //******************************************************************************* 00002 // 00003 // ******* *** *** * 00004 // * * * * 00005 // * * * ***** 00006 // * * *** * * ** * ** *** 00007 // * * * * * * * **** * * * 00008 // * * * * * * * * * * * 00009 // * *** *** * ** ** ** * * 00010 // * 00011 //******************************************************************************* 00012 // see http://sourceforge.net/projects/tcsystem/ for details. 00013 // Copyright (C) 2003 - 2008 Thomas Goessler. All Rights Reserved. 00014 //******************************************************************************* 00015 // 00016 // TCSystem is the legal property of its developers. 00017 // Please refer to the COPYRIGHT file distributed with this source distribution. 00018 // 00019 // This library is free software; you can redistribute it and/or 00020 // modify it under the terms of the GNU Lesser General Public 00021 // License as published by the Free Software Foundation; either 00022 // version 2.1 of the License, or (at your option) any later version. 00023 // 00024 // This library is distributed in the hope that it will be useful, 00025 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00026 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00027 // Lesser General Public License for more details. 00028 // 00029 // You should have received a copy of the GNU Lesser General Public 00030 // License along with this library; if not, write to the Free Software 00031 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 00032 //******************************************************************************* 00033 // $Id: TCFactory.h 894 2008-10-28 21:51:36Z the_____tiger $ 00034 //******************************************************************************* 00035 #ifndef _TC_FACTORY_H_ 00036 #define _TC_FACTORY_H_ 00037 00038 #include "TCCodec.h" 00039 #include "TCStream.h" 00040 #include "TCRng.h" 00041 00042 #include <vector> 00043 00044 namespace TC 00045 { 00060 namespace Factory 00061 { 00066 TCBASE_API CodecPtr CreateAsciiCodec(); 00071 TCBASE_API CodecPtr CreateBinaryCodec(); 00076 TCBASE_API CodecPtr CreateLittleEndianBinaryCodec(); 00081 TCBASE_API CodecPtr CreateBigEndianBinaryCodec(); 00082 00090 TCBASE_API StreamPtr CreateFileStream(std::FILE* stream, 00091 Stream::StreamDirection direction, 00092 CodecPtr codec); 00100 TCBASE_API StreamPtr CreateFileStream(const std::string &fileName, 00101 Stream::StreamDirection direction, 00102 CodecPtr codec); 00103 00109 TCBASE_API StreamPtr CreateMemoryStream(CodecPtr codec, std::vector< uchar >& memory); 00110 00115 TCBASE_API StreamPtr CreateStringStream(std::string& memory); 00116 00121 TCBASE_API StreamPtr CreateStdOutStream(); 00122 00127 TCBASE_API StreamPtr CreateStdErrorStream(); 00128 00133 TCBASE_API RngPtr Create69069Rng(); 00134 00135 } // namespace Factory 00136 00141 } // namespace TC 00142 00143 #endif // _TC_FACTORY_H_