-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathblockprototype.h
More file actions
48 lines (33 loc) · 1.12 KB
/
Copy pathblockprototype.h
File metadata and controls
48 lines (33 loc) · 1.12 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
38
39
40
41
42
43
44
45
46
47
48
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <vector>
#include "spimpl.h"
#include "value.h"
namespace libscratchcpp
{
class BlockPrototypePrivate;
/*! \brief The BlockPrototype class represents the prototype of a custom block. */
class LIBSCRATCHCPP_EXPORT BlockPrototype
{
public:
enum class ArgType
{
StringNum,
Bool
};
BlockPrototype();
BlockPrototype(const std::string &procCode);
const std::string &procCode() const;
void setProcCode(const std::string &newProcCode);
const std::vector<std::string> &argumentIds() const;
void setArgumentIds(const std::vector<std::string> &newArgumentIds);
const std::vector<std::string> &argumentNames() const;
void setArgumentNames(const std::vector<std::string> &newArgumentNames);
const std::vector<Value> &argumentDefaults() const;
const std::vector<ArgType> &argumentTypes() const;
bool warp() const;
void setWarp(bool newWarp);
private:
spimpl::impl_ptr<BlockPrototypePrivate> impl;
};
} // namespace libscratchcpp