NeuralEngine
A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes.
NeEFStream.h
1
11#pragma once
12
13#include <NeCoreLib.h>
14#include <fstream>
15#include <algorithm>
16
17namespace NeuralEngine
18{
19 class NE_IMPEXP EFStream : public std::fstream
20 {
21 public:
22
29
37 bool ByteSwap(void);
38
46 void SetByteSwap(bool state);
47
56 void SwapEndian(char *s, std::streamsize N);
57
68 std::istream& Read(char *s, std::streamsize n);
69
70 private:
71 bool byte_swap_;
72 };
73}
void SwapEndian(char *s, std::streamsize N)
Method to swap the Endianness of a stream.
EFStream()
Default constructor.
bool ByteSwap(void)
Gets byte swap state.
void SetByteSwap(bool state)
Sets byte swap state.
std::istream & Read(char *s, std::streamsize n)
Overloaded fstream read method with byte swapping capacity.