TPIE

2362a60
file_accessor.h
Go to the documentation of this file.
1 // -*- mode: c++; tab-width: 4; indent-tabs-mode: t; eval: (progn (c-set-style "stroustrup") (c-set-offset 'innamespace 0)); -*-
2 // vi:set ts=4 sts=4 sw=4 noet :
3 // Copyright 2009, The TPIE development team
4 //
5 // This file is part of TPIE.
6 //
7 // TPIE is free software: you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License as published by the
9 // Free Software Foundation, either version 3 of the License, or (at your
10 // option) any later version.
11 //
12 // TPIE is distributed in the hope that it will be useful, but WITHOUT ANY
13 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
15 // License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with TPIE. If not, see <http://www.gnu.org/licenses/>
19 #ifndef __tpie_file_accessor_file_accossor_h__
20 #define __tpie_file_accessor_file_accossor_h__
21 
25 
26 #include <tpie/file_accessor/stream_accessor.h>
27 
28 #ifdef WIN32
29 
31 namespace tpie {
32 namespace file_accessor {
33 typedef win32 raw_file_accessor;
34 typedef stream_accessor_base<win32> file_accessor;
35 }
36 }
37 
38 #else // WIN32
39 
41 namespace tpie {
42 namespace file_accessor {
43 typedef posix raw_file_accessor;
44 typedef stream_accessor_base<posix> file_accessor;
45 }
46 }
47 
48 #endif // WIN32
49 
50 namespace tpie {
51 typedef file_accessor::raw_file_accessor default_raw_file_accessor;
52 typedef file_accessor::stream_accessor<default_raw_file_accessor> default_file_accessor;
53 } // namespace tpie
54 
55 #endif //__tpie_file_accessor_file_accossor_h__
POSIX-style file accessor.
Win32 file accessor.