[docs]defset_debug_callback(fn:Callable[[str],None])->None:""" Set receiver for debug messages. Arguments: fn (fn<str>): function that accepts a msg as string """py_jps.set_debug_callback(fn)
[docs]defset_info_callback(fn:Callable[[str],None])->None:""" Set receiver for info messages. Arguments: fn (fn<str>): function that accepts a msg as string """py_jps.set_info_callback(fn)
[docs]defset_warning_callback(fn:Callable[[str],None])->None:""" Set receiver for warning messages. Arguments: fn (fn<str>): function that accepts a msg as string """py_jps.set_warning_callback(fn)
[docs]defset_error_callback(fn:Callable[[str],None])->None:""" Set receiver for error messages. Arguments: fn (fn<str>): function that accepts a msg as string """py_jps.set_error_callback(fn)
[docs]defgit_commit_hash(self)->str:"""SHA1 commit hash of this version. Returns: SHA1 of this version. """returnself.__obj.git_commit_hash
@property
[docs]defgit_commit_date(self)->str:"""Date this commit was created. Returns: Date the commit of this version as string. """returnself.__obj.git_commit_date
@property
[docs]defgit_branch(self)->str:"""Branch this commit was crated from. Returns: name of the branch this version was build from. """returnself.__obj.git_branch
@property
[docs]defcompiler(self)->str:"""Compiler the native code was compiled with. Returns: Compiler identification. """returnself.__obj.compiler
@property
[docs]defcompiler_version(self)->str:"""Compiler version the native code was compiled with. Returns: Compiler version number. """returnself.__obj.compiler_version
def__repr__(self):returndedent(f"""\ JuPedSim {self.library_version}: -------------------------------- Commit: {self.git_commit_hash} from {self.git_branch} on {self.git_commit_date} Compiler: {self.compiler} ({self.compiler_version})""")
[docs]defget_build_info()->BuildInfo:"""Get build information about jupedsim. The received :class:`BuildInfo` is printable, e.g. .. code:: python print(get_build_info()) This will display a human-readable string stating basic information about this library. """returnBuildInfo()