libscratchcpp
A library for C++ based Scratch project players
Toggle main menu visibility
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
9
namespace
libscratchcpp
10
{
11
12
struct
StringPtr
;
13
14
enum class
LIBSCRATCHCPP_EXPORT
ValueType
15
{
16
Number
= 0,
17
Bool
= 1,
18
String
= 2,
19
Pointer = 3
20
};
21
22
extern
"C"
23
{
25
struct
LIBSCRATCHCPP_EXPORT
ValueData
26
{
27
// NOTE: Any changes must also be done in the LLVM code builder!
28
union
29
{
30
double
numberValue
;
31
bool
boolValue
;
32
StringPtr
*
stringValue
;
33
const
void
*
pointerValue
;
34
};
35
36
ValueType
type
;
37
};
38
}
39
40
}
// namespace libscratchcpp
global.h
LIBSCRATCHCPP_EXPORT
#define LIBSCRATCHCPP_EXPORT
Definition
global.h:17
libscratchcpp
The main namespace of the library.
Definition
asset.h:10
libscratchcpp::StringPtr
The StringPtr struct holds a string data pointer and string size.
Definition
stringptr.h:14
libscratchcpp::ValueData
The ValueData struct holds the data of Value. It's used in compiled Scratch code for better performan...
Definition
valuedata.h:26
libscratchcpp::ValueData::numberValue
double numberValue
Definition
valuedata.h:30
libscratchcpp::ValueData::boolValue
bool boolValue
Definition
valuedata.h:31
libscratchcpp::ValueData::stringValue
StringPtr * stringValue
Definition
valuedata.h:32
libscratchcpp::ValueData::type
ValueType type
Definition
valuedata.h:36
libscratchcpp::ValueData::pointerValue
const void * pointerValue
Definition
valuedata.h:33
Bool
Bool
Definition
valuedata.h:17
String
String
Definition
valuedata.h:18
Number
Number
Definition
valuedata.h:16
include
scratchcpp
valuedata.h
Generated by
1.17.0