OpenStructure
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
stage
include
ost
io
convert.hh
Go to the documentation of this file.
1
//------------------------------------------------------------------------------
2
// This file is part of the OpenStructure project <www.openstructure.org>
3
//
4
// Copyright (C) 2008-2011 by the OpenStructure authors
5
//
6
// This library is free software; you can redistribute it and/or modify it under
7
// the terms of the GNU Lesser General Public License as published by the Free
8
// Software Foundation; either version 3.0 of the License, or (at your option)
9
// any later version.
10
// This library is distributed in the hope that it will be useful, but WITHOUT
11
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13
// details.
14
//
15
// You should have received a copy of the GNU Lesser General Public License
16
// along with this library; if not, write to the Free Software Foundation, Inc.,
17
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
//------------------------------------------------------------------------------
19
20
#ifndef OST_IO_CONVERT_H
21
#define OST_IO_CONVERT_H
22
23
24
#include <boost/detail/endian.hpp>
25
26
namespace
ost {
namespace
io {
27
28
enum
Endianess
{
29
OST_BIG_ENDIAN
,
OST_LITTLE_ENDIAN
,
OST_VAX_DATA
,
30
#ifdef BOOST_BIG_ENDIAN
31
OST_LOCAL_ENDIAN
=
OST_BIG_ENDIAN
32
#else
33
OST_LOCAL_ENDIAN = OST_LITTLE_ENDIAN
34
#endif
35
};
36
37
38
39
template
<
int
CONVERSIONTYPE,
class
VALUETYPE>
40
class
Convert
{
41
public
:
42
static
VALUETYPE
From
(
const
VALUETYPE& value);
43
static
VALUETYPE
To
(
const
VALUETYPE& value);
44
static
void
FromIP
(VALUETYPE* value);
45
static
void
ToIP
(VALUETYPE* value);
46
};
47
48
49
}
// io ns
50
51
52
53
}
// ost ns
54
55
56
#endif
57
58
Generated on Mon Nov 11 2013 09:56:12 for OpenStructure by
1.8.1.1