libscratchcpp
A library for C++ based Scratch project players
Toggle main menu visibility
Loading...
Searching...
No Matches
project.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: Apache-2.0
2
3
#pragma once
4
5
#include <memory>
6
#include <functional>
7
#include "spimpl.h"
8
9
#include "
global.h
"
10
#include "signal.h"
11
12
namespace
libscratchcpp
13
{
14
15
class
ProjectPrivate;
16
17
class
IEngine
;
18
24
class
LIBSCRATCHCPP_EXPORT
Project
25
{
26
public
:
27
Project
();
28
Project
(
const
std::string &
fileName
);
29
Project
(
const
Project
&) =
delete
;
30
31
bool
load
();
32
void
stopLoading
();
33
34
void
start
();
35
void
run
();
36
void
runEventLoop
();
37
38
const
std::string &
fileName
()
const
;
39
void
setFileName
(
const
std::string &newFileName);
40
41
std::shared_ptr<IEngine>
engine
()
const
;
42
43
sigslot::signal<unsigned int, unsigned int> &
downloadProgressChanged
();
44
45
private
:
46
spimpl::unique_impl_ptr<ProjectPrivate> impl;
47
};
48
49
}
// namespace libscratchcpp
libscratchcpp::IEngine
The IEngine interface provides an API for running Scratch projects.
Definition
iengine.h:41
libscratchcpp::Project::run
void run()
Definition
project.cpp:55
libscratchcpp::Project::load
bool load()
Definition
project.cpp:27
libscratchcpp::Project::setFileName
void setFileName(const std::string &newFileName)
Definition
project.cpp:76
libscratchcpp::Project::start
void start()
Definition
project.cpp:44
libscratchcpp::Project::fileName
const std::string & fileName() const
Definition
project.cpp:70
libscratchcpp::Project::engine
std::shared_ptr< IEngine > engine() const
Definition
project.cpp:82
libscratchcpp::Project::Project
Project(const Project &)=delete
libscratchcpp::Project::Project
Project()
Definition
project.cpp:15
libscratchcpp::Project::stopLoading
void stopLoading()
Definition
project.cpp:33
libscratchcpp::Project::runEventLoop
void runEventLoop()
Definition
project.cpp:64
libscratchcpp::Project::downloadProgressChanged
sigslot::signal< unsigned int, unsigned int > & downloadProgressChanged()
Definition
project.cpp:91
global.h
LIBSCRATCHCPP_EXPORT
#define LIBSCRATCHCPP_EXPORT
Definition
global.h:17
libscratchcpp
The main namespace of the library.
Definition
asset.h:10
include
scratchcpp
project.h
Generated by
1.17.0