/* 
* 
* Copyright (C) 2013 UMPC
* 
* This file is part of CLaRiNet.
*  
* CLaRiNet is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* 
* CLaRiNet is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with CLaRiNet.  If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef INOUT_H
#define INOUT_H

#include <fstream>

using namespace std;

typedef unsigned char* pbyte;

int SYSTEM_IS_BIG_ENDIAN(void);

int ReadFloat(ifstream & bin, int TYPE_SRC, bool SWITCH_ENDIANNESS, float * _f);

int ReadUnsignedChar(ifstream & bin, int TYPE_SRC, bool SWITCH_ENDIANNESS, unsigned char * _uc);

int WriteFloat(ofstream & bin, int TYPE_DST, bool SWITCH_ENDIANNESS, float * _f);

int WriteUnsignedChar(ofstream & bin, int TYPE_DST, bool SWITCH_ENDIANNESS, unsigned char * _uc);

#endif
