4#include "MRPch/MRBindingMacros.h"
5#include "MRPch/MRExpected.h"
14#if MR_USE_STD_EXPECTED || defined(MR_DOT_NET_BUILD)
16template<
class T,
class E = std::
string>
19template<
class E = std::
string>
25 return std::unexpected( std::forward<E>( e ) );
30template<
class T,
class E = std::
string>
33template<
class E = std::
string>
39 return tl::make_unexpected( std::forward<E>( e ) );
47 return "Operation was canceled";
59 return "Unsupported file extension";
71 return "Unsupported file format";
81#define MR_RETURN_IF_UNEXPECTED( expr ) \
82 if ( auto&& res = ( expr ); !res ) \
83 return unexpected( std::move( res.error() ) );
MR_BIND_IGNORE std::string stringUnsupportedFileExtension()
common message about unknown file extension
Definition MRExpected.h:57
MR_BIND_IGNORE auto unexpected(E &&e)
Definition MRExpected.h:37
tl::expected< T, E > Expected
Definition MRExpected.h:31
MR_BIND_IGNORE auto unexpectedUnsupportedFileExtension()
returns Expected error with stringUnsupportedFileExtension()
Definition MRExpected.h:63
MR_BIND_IGNORE auto unexpectedUnsupportedFileFormat()
returns Expected error with stringUnsupportedFileFormat()
Definition MRExpected.h:75
MR_BIND_IGNORE auto unexpectedOperationCanceled()
returns Expected error with stringOperationCanceled()
Definition MRExpected.h:51
tl::unexpected< E > Unexpected
Definition MRExpected.h:34
std::array< Vector3f, 3 > MR_BIND_IGNORE
Definition MRMeshBuilderTypes.h:13
MR_BIND_IGNORE std::string stringUnsupportedFileFormat()
common message prefix about unsupported file format
Definition MRExpected.h:69
MR_BIND_IGNORE std::string stringOperationCanceled()
common message about user termination of an operation
Definition MRExpected.h:45
only for bindings generation
Definition MRCameraOrientationPlugin.h:8