Skip to content

Commit 68981ed

Browse files
committed
ScratchProject: Add engine getter
1 parent c466e42 commit 68981ed

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/scratchproject.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,9 @@ void ScratchProject::setScratchVersion(const Version &version)
120120
else
121121
std::cerr << "Unsupported Scratch version: " << static_cast<int>(version) << std::endl;
122122
}
123+
124+
/*! Returns a read-only pointer to the Engine of the project. */
125+
const Engine *ScratchProject::engine() const
126+
{
127+
return &m_engine;
128+
}

src/scratchproject.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ class LIBSCRATCHCPP_EXPORT ScratchProject
3636
Version scratchVersion() const;
3737
void setScratchVersion(const Version &version);
3838

39+
const Engine *engine() const;
40+
3941
private:
4042
std::string m_fileName;
4143
Version m_scratchVersion = Version::Invalid;

0 commit comments

Comments
 (0)