Panda3D
|
00001 // Filename: littleEndian.h 00002 // Created by: drose (09Feb00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef LITTLEENDIAN_H 00016 #define LITTLEENDIAN_H 00017 00018 #include "dtoolbase.h" 00019 00020 #include "numeric_types.h" 00021 #include "nativeNumericData.h" 00022 #include "reversedNumericData.h" 00023 00024 //////////////////////////////////////////////////////////////////// 00025 // Class : LittleEndian 00026 // Description : LittleEndian is a special class that automatically 00027 // reverses the byte-order of numeric values for 00028 // big-endian machines, and passes them through 00029 // unchanged for little-endian machines. 00030 //////////////////////////////////////////////////////////////////// 00031 00032 #ifdef WORDS_BIGENDIAN 00033 typedef ReversedNumericData LittleEndian; 00034 #else 00035 typedef NativeNumericData LittleEndian; 00036 #endif 00037 00038 #endif