1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
13 template<typename t_tStream, typename t_tData>
14 t_tStream readLittleEndian(t_tStream &File, t_tData &Data)
16 File.read(reinterpret_cast<char*>(&Data), sizeof(Data));
17 Data = nEndian::littleToNative(Data);
20 template<typename t_tStream, typename t_tData>
21 void readBigEndian(t_tStream &File, t_tData &Data)
23 File.read(reinterpret_cast<char*>(&Data), sizeof(Data));
24 Data = nEndian::bigToNative(Data);
27 template<typename t_tStream, typename t_tData>
28 void readData(t_tStream &File, t_tData *pData, size_t ElementCount)
30 File.read(reinterpret_cast<char*>(pData), ElementCount * sizeof(*pData));