GDCM: gdcmByteSwap.h Source File

GDCM 3.2.11

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>
30 class ByteSwap
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
55
56} // end namespace gdcm
57
58#include "gdcmByteSwap.txx"
59
60#endif //GDCMBYTESWAP_H
gdcm::ByteSwap
ByteSwap.
Definition gdcmByteSwap.h:31
gdcm::ByteSwap::SystemIsBigEndian
static bool SystemIsBigEndian()
gdcm::ByteSwap::SystemIsLittleEndian
static bool SystemIsLittleEndian()
gdcm::ByteSwap::SwapRangeFromSwapCodeIntoSystem
static void SwapRangeFromSwapCodeIntoSystem(T *p, SwapCode const &sc, std::streamoff num)
gdcm::ByteSwap::Swap
static void Swap(T &p)
gdcm::ByteSwap::SwapFromSwapCodeIntoSystem
static void SwapFromSwapCodeIntoSystem(T &p, SwapCode const &sc)
gdcm::ByteSwap::SwapRange
static void SwapRange(T *p, unsigned int num)
gdcm::SwapCode
SwapCode representation.
Definition gdcmSwapCode.h:27
gdcmSwapCode.h
gdcmTypes.h
gdcm
Definition gdcmASN1.h:21