libscratchcpp
A library for C++ based Scratch project players
Loading...
Searching...
No Matches
valuedata.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2
3#pragma once
4
5#include <string>
6
7#include "global.h"
8
9namespace libscratchcpp
10{
11
12struct StringPtr;
13
14enum class LIBSCRATCHCPP_EXPORT ValueType
15{
16 Number = 0,
17 Bool = 1,
18 String = 2,
19 Pointer = 3
20};
21
22extern "C"
23{
26 {
27 // NOTE: Any changes must also be done in the LLVM code builder!
28 union
29 {
33 const void *pointerValue;
34 };
35
36 ValueType type;
37 };
38}
39
40} // namespace libscratchcpp
#define LIBSCRATCHCPP_EXPORT
Definition global.h:17
The main namespace of the library.
Definition asset.h:10
The StringPtr struct holds a string data pointer and string size.
Definition stringptr.h:14
The ValueData struct holds the data of Value. It's used in compiled Scratch code for better performan...
Definition valuedata.h:26
double numberValue
Definition valuedata.h:30
bool boolValue
Definition valuedata.h:31
StringPtr * stringValue
Definition valuedata.h:32
ValueType type
Definition valuedata.h:36
const void * pointerValue
Definition valuedata.h:33
Bool
Definition valuedata.h:17
String
Definition valuedata.h:18
Number
Definition valuedata.h:16