Merge branch 'daemon-ext'
[libi2ncommon] / src / tmpfstream.cpp
CommitLineData
0e23f538
TJ
1/*
2The software in this package is distributed under the GNU General
3Public License version 2 (with a special exception described below).
4
5A copy of GNU General Public License (GPL) is included in this distribution,
6in the file COPYING.GPL.
7
8As a special exception, if other files instantiate templates or use macros
9or inline functions from this file, or you compile this file and link it
10with other works to produce a work based on this file, this file
11does not by itself cause the resulting work to be covered
12by the GNU General Public License.
13
14However the source code for this file must still be made available
15in accordance with section (3) of the GNU General Public License.
16
17This exception does not invalidate any other reasons why a work based
18on this file might be covered by the GNU General Public License.
19*/
52d6f7fc
GE
20/** @file
21 * @brief fstream which creates files with mkstemp.
22 *
23 * @author Gerd v. Egidy
24 *
25 * @copyright © Copyright 2010 by Intra2net AG
52d6f7fc
GE
26 */
27
28#include <string>
29#include <fstream>
30#include <sstream>
31#include <iostream>
32
52d6f7fc 33#include "tmpfstream.hpp"
82b461e4 34#include "tmpfstream_impl.hpp"
52d6f7fc
GE
35
36using namespace std;
37
38namespace I2n
39{
52d6f7fc 40
ff09d317
GE
41template< typename Device, typename Tr, typename Alloc >
42const std::string tmpfcopystreamTempl<Device, Tr, Alloc>
43 ::default_template_suffix=".tmp.XXXXXX";
44
82b461e4
GE
45// explicitly instantiate the most used versions.
46// means they get compiled into the lib and you don't need tmpfstream_impl.hpp
47// if you want to use anything else, include tmpfstream_impl.hpp.
48template class tmpfstreamTempl<bio::file_descriptor_sink>;
49template class tmpfstreamTempl<bio::file_descriptor>;
52d6f7fc 50
ff09d317
GE
51template class tmpfcopystreamTempl<bio::file_descriptor_sink>;
52template class tmpfcopystreamTempl<bio::file_descriptor>;
52d6f7fc
GE
53
54}