ArkScript
A small, fast, functional and scripting language for video games
Ark::internal::IR::Entity Class Reference

#include <Entity.hpp>

Public Member Functions

 Entity (Kind kind)
 
 Entity (Instruction inst, uint16_t arg=0)
 
 Entity (Instruction inst, uint16_t primary_arg, uint16_t secondary_arg)
 
Word bytecode () const
 
label_t label () const
 
Kind kind () const
 
Instruction inst () const
 
uint16_t primaryArg () const
 
uint16_t secondaryArg () const
 

Static Public Member Functions

static Entity Label (label_t value)
 
static Entity Goto (const Entity &label)
 
static Entity GotoIf (const Entity &label, bool cond)
 

Private Attributes

Kind m_kind
 
label_t m_label { 0 }
 
Instruction m_inst { NOP }
 
uint16_t m_primary_arg { 0 }
 
uint16_t m_secondary_arg { 0 }
 

Detailed Description

Definition at line 38 of file Entity.hpp.

Constructor & Destructor Documentation

◆ Entity() [1/3]

Ark::internal::IR::Entity::Entity ( Kind kind)
explicit

Definition at line 5 of file Entity.cpp.

Referenced by Goto(), GotoIf(), and Label().

◆ Entity() [2/3]

Ark::internal::IR::Entity::Entity ( Instruction inst,
uint16_t arg = 0 )
explicit

Definition at line 10 of file Entity.cpp.

◆ Entity() [3/3]

Ark::internal::IR::Entity::Entity ( Instruction inst,
uint16_t primary_arg,
uint16_t secondary_arg )

Definition at line 15 of file Entity.cpp.

Member Function Documentation

◆ bytecode()

Word Ark::internal::IR::Entity::bytecode ( ) const
nodiscard

◆ Goto()

Entity Ark::internal::IR::Entity::Goto ( const Entity & label)
static

◆ GotoIf()

Entity Ark::internal::IR::Entity::GotoIf ( const Entity & label,
bool cond )
static

◆ inst()

Instruction Ark::internal::IR::Entity::inst ( ) const
inlinenodiscard

◆ kind()

Kind Ark::internal::IR::Entity::kind ( ) const
inlinenodiscard

Definition at line 57 of file Entity.hpp.

References m_kind.

◆ Label()

Entity Ark::internal::IR::Entity::Label ( label_t value)
static

◆ label()

label_t Ark::internal::IR::Entity::label ( ) const
inlinenodiscard

Definition at line 55 of file Entity.hpp.

References m_label.

Referenced by Goto(), GotoIf(), and Label().

◆ primaryArg()

uint16_t Ark::internal::IR::Entity::primaryArg ( ) const
inlinenodiscard

◆ secondaryArg()

uint16_t Ark::internal::IR::Entity::secondaryArg ( ) const
inlinenodiscard

Definition at line 63 of file Entity.hpp.

References m_secondary_arg.

Member Data Documentation

◆ m_inst

Instruction Ark::internal::IR::Entity::m_inst { NOP }
private

Definition at line 68 of file Entity.hpp.

Referenced by bytecode(), and inst().

◆ m_kind

Kind Ark::internal::IR::Entity::m_kind
private

Definition at line 66 of file Entity.hpp.

Referenced by bytecode(), and kind().

◆ m_label

label_t Ark::internal::IR::Entity::m_label { 0 }
private

Definition at line 67 of file Entity.hpp.

Referenced by label().

◆ m_primary_arg

uint16_t Ark::internal::IR::Entity::m_primary_arg { 0 }
private

Definition at line 69 of file Entity.hpp.

Referenced by bytecode(), and primaryArg().

◆ m_secondary_arg

uint16_t Ark::internal::IR::Entity::m_secondary_arg { 0 }
private

Definition at line 70 of file Entity.hpp.

Referenced by bytecode(), and secondaryArg().


The documentation for this class was generated from the following files: