Numworks Epsilon
1.4.1
Graphing Calculator Operating System
script_node.h
Go to the documentation of this file.
1
#ifndef CODE_SCRIPT_NODE_H
2
#define CODE_SCRIPT_NODE_H
3
4
#include <
stdint.h
>
5
6
namespace
Code
{
7
8
class
ScriptNode
{
9
public
:
10
enum class
Type
{
11
Function
= 0,
12
Variable
= 1
13
};
14
ScriptNode
() :
15
m_type(
Type
::Function), m_name(nullptr), m_scriptIndex(0) {}
16
static
ScriptNode
FunctionNode
(
const
char
*
name
,
uint16_t
scriptIndex
) {
17
return
ScriptNode
(
Type::Function
,
name
,
scriptIndex
);
18
}
19
static
ScriptNode
VariableNode
(
const
char
*
name
,
uint16_t
scriptIndex
) {
20
return
ScriptNode
(
Type::Variable
,
name
,
scriptIndex
);
21
}
22
Type
type
()
const
{
return
m_type; }
23
const
char
*
name
()
const
{
return
m_name; }
24
uint16_t
scriptIndex
()
const
{
return
m_scriptIndex; }
25
private
:
26
ScriptNode
(
Type
type
,
const
char
*
name
,
uint16_t
scriptIndex
) :
27
m_type(
type
), m_name(
name
), m_scriptIndex(
scriptIndex
) {}
28
Type
m_type;
29
const
char
* m_name;
30
uint16_t
m_scriptIndex;
31
};
32
33
}
34
35
#endif
Code::ScriptNode::FunctionNode
static ScriptNode FunctionNode(const char *name, uint16_t scriptIndex)
Definition:
script_node.h:16
Code::ScriptNode::name
const char * name() const
Definition:
script_node.h:23
Code::ScriptNode::Type::Function
uint16_t
unsigned short uint16_t
Definition:
stdint.h:5
Code
Definition:
app.cpp:7
Code::ScriptNode::scriptIndex
uint16_t scriptIndex() const
Definition:
script_node.h:24
Code::ScriptNode::type
Type type() const
Definition:
script_node.h:22
Code::ScriptNode::Type
Type
Definition:
script_node.h:10
stdint.h
Code::ScriptNode::Type::Variable
Code::ScriptNode::ScriptNode
ScriptNode()
Definition:
script_node.h:14
Code::ScriptNode::VariableNode
static ScriptNode VariableNode(const char *name, uint16_t scriptIndex)
Definition:
script_node.h:19
Code::ScriptNode
Definition:
script_node.h:8
epsilon
apps
code
script_node.h
Generated by
1.8.14