Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Uniform.h

Go to the documentation of this file.
00001 /* SimData: Data Infrastructure for Simulations
00002  * Copyright (C) 2002, 2003 Mark Rose <tm2@stm.lbl.gov>
00003  * 
00004  * This file is part of SimData.
00005  * 
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  * 
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019  */
00020 
00026 #ifndef __SIMDATA_UNIFORM_H__
00027 #define __SIMDATA_UNIFORM_H__
00028 
00029 #include <SimData/Namespace.h>
00030 
00031 NAMESPACE_SIMDATA
00032 
00033 
00048 typedef signed char int8;
00049 typedef unsigned char uint8;
00050 typedef signed short int16;
00051 typedef unsigned short uint16;
00052 typedef signed int int32;
00053 typedef unsigned int uint32;
00055 
00057 inline bool isBigEndian() { 
00058         static uint16 test=0x1234; 
00059         return (*reinterpret_cast<uint8*>(&test)) == 0x12; 
00060 }
00061 
00063 inline bool isLittleEndian() { 
00064         return !isBigEndian(); 
00065 }
00066 
00067 
00068 NAMESPACE_SIMDATA_END
00069 
00070 #endif // __SIMDATA_UNIFORM_H__
00071 

SimData version pre-0.4.0. For more information on SimData, visit the SimData Homepage.

Generated on Tue Oct 14 12:06:39 2003, using Doxygen 1.2.18.

[SF.net]