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

Function vtable_ptr

library/include/DataDefs.h:417–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415 static void *get_vtable(virtual_ptr instance_ptr) { return *(void**)instance_ptr; }
416
417 void* vtable_ptr() const
418 {
419 auto& lst = (*vtable_ptr_map);
420 auto it = lst.find(this);
421 return it != lst.end() ? it->second : nullptr;
422 }
423
424 bool can_allocate() const { return struct_identity::can_allocate() && (vtable_ptr() != nullptr); }
425

Callers 7

~virtual_identityMethod · 0.85
adjust_vtableMethod · 0.85
get_vmethod_ptrMethod · 0.85
set_vmethod_ptrMethod · 0.85
can_allocateFunction · 0.85
is_instanceFunction · 0.85
is_direct_instanceFunction · 0.85

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected