Struct GffValue

GFF value that can contain any type of GFF node

struct GffValue ;

Constructors

NameDescription
this (_value)
this (_type)
this (json) Create a GffValue by parsing JSON. JSON format should be like {"„ype": "resref", 2value": "hello world"}

Fields

NameTypeDescription
value std.variant.VariantN!(32L,ubyte,byte,ushort,short,uint,int,ulong,long,float,double,string,nwn.gff.GffResRef,nwn.gff.GffLocString,ubyte[],nwn.gff.GffStruct,nwn.gff.GffList)

Properties

NameTypeDescription
type[get] GffTypeGet currently stored GFF type

Methods

NameDescription
dup () Duplicates the GFF value
get () Retrieve a reference to the GFF value or throws
opIndex (label) Shorthand for modifying the GffValue as a GffStruct
opIndex (index) Shorthand for modifying the GffValue as a GffList
opIndexAssign (rhs, label) Shorthand for modifying the GffValue as a GffStruct
opIndexAssign (rhs, index) Shorthand for modifying the GffValue as a GffList
to () Converts the stored value into the given type
toJson (structAsList) Converts to JSON
toPrettyString (tabs) Converts to a user-readable string

Aliases

NameDescription
Value