#ifndef AFUN_TOOL_BYTE_H #define AFUN_TOOL_BYTE_H #include "aFunToolExport.h" #ifdef __cplusplus #include // NOLINT #include #else #include #endif #ifndef AFUN_TOOL_C namespace aFuntool { #endif enum EndianType { little_endian = 0, big_endian }; AFUN_TOOL_C_EXPORT_VAR enum EndianType endian; AFUN_TOOL_C_EXPORT_VAR enum EndianType save_as; AFUN_TOOL_C_EXPORT_FUNC void getEndian(); #ifdef __cplusplus template bool byteWriteInt(FILE *file, T num); #endif AFUN_TOOL_C_EXPORT_FUNC bool byteWriteStr(FILE *file, const char *str); #ifdef __cplusplus AFUN_TOOL_EXPORT bool byteWriteStr(FILE *file, const std::string &str); #endif #ifdef __cplusplus template bool byteReadInt(FILE *file, T *num); #endif AFUN_TOOL_EXPORT bool byteReadStr(FILE *file, char **str); #ifdef __cplusplus AFUN_TOOL_C_EXPORT_FUNC bool byteReadStr(FILE *file, std::string &str); #endif #ifndef AFUN_TOOL_C } #endif #include "tool_byte.template.h" #endif //AFUN_TOOL_BYTE_H