-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathlistblocks.h
More file actions
37 lines (28 loc) · 1.3 KB
/
listblocks.h
File metadata and controls
37 lines (28 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <scratchcpp/iextension.h>
namespace libscratchcpp
{
class List;
class ListBlocks : public IExtension
{
public:
std::string name() const override;
std::string description() const override;
Rgb color() const override;
void registerBlocks(IEngine *engine) override;
private:
static CompilerValue *compileListContents(Compiler *compiler);
static CompilerValue *compileAddToList(Compiler *compiler);
static CompilerValue *getListIndex(Compiler *compiler, CompilerValue *input, List *list, CompilerValue *listSize);
static CompilerValue *compileDeleteOfList(Compiler *compiler);
static CompilerValue *compileDeleteAllOfList(Compiler *compiler);
static CompilerValue *compileInsertAtList(Compiler *compiler);
static CompilerValue *compileReplaceItemOfList(Compiler *compiler);
static CompilerValue *compileItemOfList(Compiler *compiler);
static CompilerValue *compileItemNumOfList(Compiler *compiler);
static CompilerValue *compileLengthOfList(Compiler *compiler);
static CompilerValue *compileListContainsItem(Compiler *compiler);
static const std::string &listContentsMonitorName(Block *block);
};
} // namespace libscratchcpp