GDCM 3.0.24
gdcmByteSwap.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
14#ifndef GDCMBYTESWAP_H
15#define GDCMBYTESWAP_H
16
17#include "gdcmTypes.h"
18#include "gdcmSwapCode.h"
19
20namespace gdcm
21{
22
29template<class T>
31{
32public:
34 static bool SystemIsBigEndian ();
35 static bool SystemIsLittleEndian ();
36
37 static void Swap(T &p);
38 static void SwapFromSwapCodeIntoSystem(T &p, SwapCode const &sc);
39 static void SwapRange(T *p, unsigned int num);
40 static void SwapRangeFromSwapCodeIntoSystem(T *p, SwapCode const &sc,
41 std::streamoff num);
42
43protected:
44// ByteSwap() {}
45// ~ByteSwap() {}
46
47private:
48
49};
50
56} // end namespace gdcm
57
58#include "gdcmByteSwap.txx"
59
60#endif //GDCMBYTESWAP_H
ByteSwap.
Definition gdcmByteSwap.h:31
static bool SystemIsBigEndian()
static bool SystemIsLittleEndian()
static void SwapRangeFromSwapCodeIntoSystem(T *p, SwapCode const &sc, std::streamoff num)
static void Swap(T &p)
static void SwapFromSwapCodeIntoSystem(T &p, SwapCode const &sc)
static void SwapRange(T *p, unsigned int num)
SwapCode representation.
Definition gdcmSwapCode.h:27
Definition gdcmASN1.h:21