MeshLib
 
Loading...
Searching...
No Matches
MREmbeddedPython.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
4#if !defined( __EMSCRIPTEN__) && !defined( MRMESH_NO_PYTHON )
5#include <string>
6#include <filesystem>
7
8namespace MR
9{
10
12{
13public:
14 static MRMESH_API void init();
15
16 static MRMESH_API bool isAvailable();
17
19
20 static MRMESH_API void finalize();
21
22 static MRMESH_API bool setupArgv( int argc, char** argv );
23
24 static MRMESH_API bool runString( const std::string& pythonString );
25
26 static MRMESH_API bool runScript( const std::filesystem::path& path );
27
28 static MRMESH_API bool isPythonScript( const std::filesystem::path& path );
29private:
31 ~EmbeddedPython() = default;
32
33 static EmbeddedPython& instance_();
34 bool available_{ false };
35};
36
37} //namespace MR
38
39#endif
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
#define MRMESH_CLASS
Definition MRMesh/MRMeshFwd.h:50
Definition MREmbeddedPython.h:12
static MRMESH_API void init()
static MRMESH_API bool runString(const std::string &pythonString)
static MRMESH_API bool isAvailable()
static MRMESH_API bool setupArgv(int argc, char **argv)
static MRMESH_API bool isPythonScript(const std::filesystem::path &path)
static MRMESH_API bool runScript(const std::filesystem::path &path)
static MRMESH_API bool isInitialized()
static MRMESH_API void finalize()
Definition MRCameraOrientationPlugin.h:7