GDCM  2.2.0
gdcmByteSwap.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program: GDCM (Grassroots DICOM). A DICOM library
00004 
00005   Copyright (c) 2006-2011 Mathieu Malaterre
00006   All rights reserved.
00007   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE.  See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00014 #ifndef GDCMBYTESWAP_H
00015 #define GDCMBYTESWAP_H
00016 
00017 #include "gdcmTypes.h"
00018 #include "gdcmSwapCode.h"
00019 
00020 namespace gdcm
00021 {
00022 
00029 template<class T>
00030 class ByteSwap
00031 {
00032 public:
00034   static bool SystemIsBigEndian ();
00035   static bool SystemIsLittleEndian ();
00036 
00037   static void Swap(T &p);
00038   static void SwapFromSwapCodeIntoSystem(T &p, SwapCode const &sc);
00039   static void SwapRange(T *p, unsigned int num);
00040   static void SwapRangeFromSwapCodeIntoSystem(T *p, SwapCode const &sc,
00041     std::streamoff num);
00042 
00043 protected:
00044 //  ByteSwap() {}
00045 //  ~ByteSwap() {}
00046 
00047 private:
00048 
00049 };
00050 
00056 } // end namespace gdcm
00057 
00058 #include "gdcmByteSwap.txx"
00059 
00060 #endif //GDCMBYTESWAP_H

Generated on Tue Mar 27 2012 13:33:39 for GDCM by doxygen 1.8.0
SourceForge.net Logo