On this page
  1. Kind
  2. DialogueValue
  3. kind
  4. as_number
  5. as_bool
  6. as_string

rmp::DialogueValue

class #include <rmp/dialogue.h> include/rmp/dialogue.h:59
class DialogueValue

A value of the Yarn language: a number, a string or a bool.

Kind

enum class Kind : std::uint8_t

Which of Yarn's three types it holds.

ValueMeans
NUMBERA number; Yarn has one kind, a float
STRINGA piece of text
BOOLTrue or false

DialogueValue

DialogueValue(float number)
DialogueValue(int number)
DialogueValue(double number)
DialogueValue(bool value)
DialogueValue(std::string text)
template <std::size_t N> // NOLINTNEXTLINE(google-explicit-con

Each one implicit, so out = 3; or set_variable("$met", true) reads as Yarn does.

DialogueValue: A number

DialogueValue: A number, as a float

DialogueValue: A number, as a float

DialogueValue: A bool

DialogueValue: A string

kind

Kind kind() const

Which type it holds

as_number

float as_number() const

A string read as a number; a bool 1 or 0

as_bool

bool as_bool() const

A number not 0; a string "true"

as_string

std::string as_string() const

As a line shows it: 2, 2.5, True