1 #pragma once 2 3 namespace APE 4 { 5 6 /************************************************************************************* 7 Definitions 8 *************************************************************************************/ 9 class CIO; 10 11 /************************************************************************************* 12 Read / Write from an IO source and return failure if the number of bytes specified 13 isn't read or written 14 *************************************************************************************/ 15 int ReadSafe(CIO * pIO, void * pBuffer, int nBytes); 16 intn WriteSafe(CIO * pIO, void * pBuffer, intn nBytes); 17 18 /************************************************************************************* 19 Checks for the existence of a file 20 *************************************************************************************/ 21 bool FileExists(wchar_t * pFilename); 22 23 /************************************************************************************* 24 Allocate aligned memory 25 *************************************************************************************/ 26 void * AllocateAligned(intn nBytes, intn nAlignment); 27 void FreeAligned(void * pMemory); 28 29 /************************************************************************************* 30 Test for CPU features 31 *************************************************************************************/ 32 bool GetMMXAvailable(); 33 bool GetSSEAvailable(); 34 35 /************************************************************************************* 36 String helpers 37 *************************************************************************************/ 38 bool StringIsEqual(const str_utfn * pString1, const str_utfn * pString2, bool bCaseSensitive, int nCharacters = -1); 39 40 } 41