MCPcopy Create free account
hub / github.com/DFHack/dfhack / enum_identity

Method enum_identity

library/DataDefs.cpp:157–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157enum_identity::enum_identity(size_t size,
158 const compound_identity *scope_parent, const char *dfhack_name,
159 const type_identity *base_type,
160 int64_t first_item_value, int64_t last_item_value,
161 const char *const *keys,
162 const ComplexData *complex,
163 const void *attrs, const struct_identity *attr_type)
164 : compound_identity(size, NULL, scope_parent, dfhack_name),
165 keys(keys), complex(complex),
166 first_item_value(first_item_value), last_item_value(last_item_value),
167 base_type(base_type), attrs(attrs), attr_type(attr_type)
168{
169 if (complex) {
170 count = complex->size();
171 last_item_value = complex->index_value_map.back();
172 }
173 else {
174 count = int(last_item_value-first_item_value+1);
175 }
176}
177
178enum_identity::enum_identity(const enum_identity *base_enum, const type_identity *override_base_type)
179 : enum_identity(override_base_type->byte_size(), base_enum->getScopeParent(),

Callers

nothing calls this directly

Calls 3

byte_sizeMethod · 0.80
sizeMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected