File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ class LIBSCRATCHCPP_EXPORT IProjectReader
1919
2020 virtual bool load () = 0;
2121 virtual bool isValid () = 0;
22+ virtual void clear () = 0;
2223 virtual std::vector<std::shared_ptr<Target>> targets () = 0;
2324 virtual std::vector<std::shared_ptr<Broadcast>> broadcasts () = 0;
2425 virtual std::vector<std::string> extensions () = 0;
Original file line number Diff line number Diff line change @@ -257,6 +257,14 @@ bool Scratch3Reader::isValid()
257257 return (semver.substr (0 , semver.find (" ." )) == " 3" );
258258}
259259
260+ void Scratch3Reader::clear ()
261+ {
262+ m_json = " " ;
263+ m_targets.clear ();
264+ m_broadcasts.clear ();
265+ m_extensions.clear ();
266+ }
267+
260268std::vector<std::shared_ptr<Target>> Scratch3Reader::targets ()
261269{
262270 return m_targets;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ class LIBSCRATCHCPP_EXPORT Scratch3Reader : public IProjectReader
1414 public:
1515 bool load () override ;
1616 bool isValid () override ;
17+ void clear () override ;
1718 std::vector<std::shared_ptr<Target>> targets () override ;
1819 std::vector<std::shared_ptr<Broadcast>> broadcasts () override ;
1920 std::vector<std::string> extensions () override ;
You can’t perform that action at this time.
0 commit comments