libscratchcpp
A library for C++ based Scratch project players
Loading...
Searching...
No Matches
blockprototype.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2
3#pragma once
4
5#include <vector>
6
7#include "spimpl.h"
8#include "value.h"
9
10namespace libscratchcpp
11{
12
13class BlockPrototypePrivate;
14
17{
18 public:
19 enum class ArgType
20 {
23 };
24
26 BlockPrototype(const std::string &procCode);
27
28 const std::string &procCode() const;
29 void setProcCode(const std::string &newProcCode);
30
31 const std::vector<std::string> &argumentIds() const;
32 void setArgumentIds(const std::vector<std::string> &newArgumentIds);
33
34 const std::vector<std::string> &argumentNames() const;
35 void setArgumentNames(const std::vector<std::string> &newArgumentNames);
36
37 const std::vector<Value> &argumentDefaults() const;
38
39 const std::vector<ArgType> &argumentTypes() const;
40
41 bool warp() const;
42 void setWarp(bool newWarp);
43
44 private:
45 spimpl::impl_ptr<BlockPrototypePrivate> impl;
46};
47
48} // namespace libscratchcpp
The BlockPrototype class represents the prototype of a custom block.
Definition blockprototype.h:17
ArgType
Definition blockprototype.h:20
@ StringNum
Definition blockprototype.h:21
@ Bool
Definition blockprototype.h:22
BlockPrototype()
Definition blockprototype.cpp:10
#define LIBSCRATCHCPP_EXPORT
Definition global.h:17
The main namespace of the library.
Definition asset.h:10