nw::GffStruct

struct GffStruct

Public Functions

bool has_field(StringView label) const

Check if a struct has a field.

inline uint32_t id() const

Get struct id.

template<typename T>
std::optional<T> get(StringView label, bool warn_missing = true) const

Gets a value from a field in the struct.

template<typename T>
bool get_to(StringView label, T &out, bool warn_missing = true) const

Gets a value from a field in the struct.

inline size_t size() const

Number of fields in the struct.

inline bool valid() const

Check if Gff has been parsed without error.

GffField operator[](StringView label) const

Get field by label.

GffField operator[](size_t index) const

Get field by index.