add get_member_offset() function to _factory for computing struct offsets