Ultra
0.9.4
Loading...
Searching...
No Matches
src
kernel
nullary.h
Go to the documentation of this file.
1
12
13
#if !defined(ULTRA_NULLARY_H)
14
#define ULTRA_NULLARY_H
15
16
#include "
kernel/terminal.h
"
17
18
namespace
ultra
19
{
30
class
nullary
:
public
terminal
31
{
32
public
:
33
using
terminal::terminal;
34
35
[[nodiscard]]
virtual
value_t
eval()
const
= 0;
36
[[nodiscard]]
value_t
instance
() const final {
return
this
; }
37
38
[[nodiscard]] std::string to_string(
format
= c_format)
const override
39
{
return
name
() +
"()"
; }
40
};
41
42
}
// namespace ultra
43
44
#endif
// include guard
ultra::nullary
Definition
nullary.h:31
ultra::nullary::instance
value_t instance() const final
Definition
nullary.h:36
ultra::symbol::format
format
Supported rendering formats for symbol stringification.
Definition
symbol.h:72
ultra::symbol::name
const std::string & name() const noexcept
Definition
symbol.cc:51
ultra::terminal
Definition
terminal.h:41
ultra
ultra::value_t
std::variant< D_VOID, D_INT, D_DOUBLE, D_STRING, const D_NULLARY *, D_ADDRESS, const D_VARIABLE *, D_IVECTOR > value_t
Definition
value.h:54
terminal.h
Generated by
1.15.0