sbgPlatform.h
Go to the documentation of this file.
1 
25 #ifndef __SBG_PLATFORM_H__
26 #define __SBG_PLATFORM_H__
27 
28 #include "../sbgTypes.h"
29 #include "../sbgErrorCodes.h"
30 #include "../sbgDebug.h"
31 
32 //----------------------------------------------------------------------//
33 //- Add here any additional includes you want to share -//
34 //----------------------------------------------------------------------//
35 
36 // We would like to use the standard C library
37 #include <stdbool.h>
38 #include <stdlib.h>
39 #include <stdio.h>
40 #include <string.h>
41 
42 #ifdef _WIN32
43 #include <direct.h>
44 #else
45 #include <unistd.h>
46 #endif
47 
48 // We need the standard assert header as we use it to implement the SBG_ASSERT macro
49 #include <assert.h>
50 
51 //----------------------------------------------------------------------//
52 //- Specific timing methods to reimplement for your platform -//
53 //----------------------------------------------------------------------//
54 
59 uint32 sbgGetTime(void);
60 
65 void sbgSleep(uint32 ms);
66 
67 //----------------------------------------------------------------------//
68 //- Specific logging methods to reimplement for your platform -//
69 //----------------------------------------------------------------------//
70 
81 void sbgPlatformDebugLogMsg(const char *pFileName, const char *pFunctionName, uint32 line, SbgDebugLogType logType, SbgErrorCode errorCode, const char *pFormat, ...);
82 
83 //----------------------------------------------------------------------//
84 //- Errors and warning managment -//
85 //----------------------------------------------------------------------//
86 
91 #define SBG_PLATFORM_ASSERT(expression) assert((expression))
92 
93 #endif /* __SBG_PLATFORM_H__ */
unsigned int uint32
Definition: sbgTypes.h:58
uint32 sbgGetTime(void)
Definition: sbgPlatform.c:24
void sbgSleep(uint32 ms)
Definition: sbgPlatform.c:54
void sbgPlatformDebugLogMsg(const char *pFileName, const char *pFunctionName, uint32 line, SbgDebugLogType logType, SbgErrorCode errorCode, const char *pFormat,...)
Definition: sbgPlatform.c:80
enum _SbgDebugLogType SbgDebugLogType
enum _SbgErrorCode SbgErrorCode


sbg_driver
Author(s):
autogenerated on Sun Jan 27 2019 03:42:20