Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

WP_Endian.h

Go to the documentation of this file.
00001 /* Copyright (C) 2001 W.P. van Paassen - peter@paassen.tmfweb.nl
00002 
00003    This program is free software; you can redistribute it and/or modify it under
00004    the terms of the GNU General Public License as published by the Free
00005    Software Foundation; either version 2 of the License, or (at your
00006    option) any later version.
00007 
00008    This program is distributed in the hope that it will be useful, but WITHOUT
00009    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00010    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00011    for more details.
00012 
00013    You should have received a copy of the GNU General Public License
00014    along with this program; see the file COPYING.  If not, write to the Free
00015    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
00016 
00017 #ifndef WP_ENDIAN_H
00018 #define WP_ENDIAN_H
00019 
00020 #include <iostream>
00021 #include <fstream>
00022 using namespace std;
00023 
00024 #include "WP_Def.h"
00025 #include "WP_RGBA.h"
00026 
00027 namespace WPCG
00028 {
00047 class WP_Endian
00048 {
00049  public:
00050   ~WP_Endian(){};
00051   
00056   static WP_Endian* getInstance()
00057     {   
00058       if (!_instance)
00059         _instance = new WP_Endian();
00060       return _instance;
00061     }
00062 
00069    void getTypedData(void* destination, byte*& buffer, int size);
00070 
00074   bool little_endian;
00075 
00076 private:
00077         WP_Endian();
00078 
00082         static WP_Endian* _instance;
00083 };
00084 }
00085 #endif
00086 

Generated on Tue Jan 28 20:26:33 2003 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002