feat: establish reproducible FreeCAD web compatibility baseline
This commit is contained in:
40
native/planegcs/stubs/Base/Console.h
Normal file
40
native/planegcs/stubs/Base/Console.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef WEB_FREECAD_BASE_CONSOLE_H
|
||||
#define WEB_FREECAD_BASE_CONSOLE_H
|
||||
|
||||
#include <chrono>
|
||||
|
||||
namespace Base
|
||||
{
|
||||
class TimeElapsed: public std::chrono::time_point<std::chrono::steady_clock>
|
||||
{
|
||||
public:
|
||||
TimeElapsed()
|
||||
: std::chrono::time_point<std::chrono::steady_clock>(std::chrono::steady_clock::now())
|
||||
{}
|
||||
|
||||
static float diffTimeF(const TimeElapsed& start, const TimeElapsed& end = TimeElapsed())
|
||||
{
|
||||
return std::chrono::duration<float>(end - start).count();
|
||||
}
|
||||
};
|
||||
|
||||
class ConsoleSingleton
|
||||
{
|
||||
public:
|
||||
template<typename... Args>
|
||||
void log(const char*, Args&&...)
|
||||
{}
|
||||
|
||||
template<typename... Args>
|
||||
void warning(const char*, Args&&...)
|
||||
{}
|
||||
};
|
||||
|
||||
inline ConsoleSingleton& Console()
|
||||
{
|
||||
static ConsoleSingleton console;
|
||||
return console;
|
||||
}
|
||||
} // namespace Base
|
||||
|
||||
#endif
|
||||
3
native/planegcs/stubs/FCConfig.h
Normal file
3
native/planegcs/stubs/FCConfig.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#ifndef WEB_FREECAD_FCCONFIG_H
|
||||
#define WEB_FREECAD_FCCONFIG_H
|
||||
#endif
|
||||
6
native/planegcs/stubs/FCGlobal.h
Normal file
6
native/planegcs/stubs/FCGlobal.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef WEB_FREECAD_FCGLOBAL_H
|
||||
#define WEB_FREECAD_FCGLOBAL_H
|
||||
#define FREECAD_DECL_EXPORT
|
||||
#define FREECAD_DECL_IMPORT
|
||||
#define BaseExport
|
||||
#endif
|
||||
Reference in New Issue
Block a user