GffValue

GFF value that can contain any type of GFF node

Constructors

this
this(T _value)
this
this(GffType _type)
this
this(nwnlibd.orderedjson.JSONValue json)

Create a GffValue by parsing JSON. JSON format should be like {"type": "resref", "value": "hello world"}

Alias This

value

Members

Aliases

Value
alias Value = VariantN!(32, GffByte, GffChar, GffWord, GffShort, GffDWord, GffInt, GffDWord64, GffInt64, GffFloat, GffDouble, GffString, GffResRef, GffLocString, GffVoid, GffStruct, GffList)

Functions

get
inout(T) get()

Retrieve a reference to the GFF value or throws

opIndex
auto ref opIndex(string label)

Shorthand for modifying the GffValue as a GffStruct

opIndex
auto ref opIndex(size_t index)

Shorthand for modifying the GffValue as a GffList

opIndexAssign
auto ref opIndexAssign(T rhs, string label)

Shorthand for modifying the GffValue as a GffStruct

opIndexAssign
auto ref opIndexAssign(GffStruct rhs, size_t index)

Shorthand for modifying the GffValue as a GffList

to
T to()

Converts the stored value into the given type

toJson
nwnlibd.orderedjson.JSONValue toJson()

Converts to JSON

toPrettyString
string toPrettyString(string tabs)

Converts to a user-readable string

Properties

type
GffType type [@property getter]

Get currently stored GFF type

Variables

value
Value value;

Meta