Blender V5.0
blo_core_bhead.cc File Reference
#include "BLI_filereader.h"
#include "BLO_core_bhead.hh"

Go to the source code of this file.

Functions

static BHead bhead_from_bhead4 (const BHead4 &bhead4)
static const void * old_ptr_from_uint64_ptr (const uint64_t ptr)
static BHead bhead_from_small_bhead8 (const SmallBHead8 &small_bhead8)
static BHead bhead_from_large_bhead8 (const LargeBHead8 &large_bhead8)
std::optional< BHeadBLO_readfile_read_bhead (FileReader *file, const BHeadType type)

Function Documentation

◆ bhead_from_bhead4()

BHead bhead_from_bhead4 ( const BHead4 & bhead4)
static

◆ bhead_from_large_bhead8()

◆ bhead_from_small_bhead8()

◆ BLO_readfile_read_bhead()

std::optional< BHead > BLO_readfile_read_bhead ( FileReader * file,
BHeadType type )

Parse the next BHead in the file, increasing the file reader to after the BHead. This automatically converts the stored BHead (one of BHeadType) to the runtime BHead type.

Returns
The next #BHEad or #std::nullopt if the file is exhausted.

Definition at line 52 of file blo_core_bhead.cc.

References BHead4, bhead_from_bhead4(), bhead_from_large_bhead8(), bhead_from_small_bhead8(), BLO_CODE_DATA, BLO_CODE_ENDB, BHead4::code, LargeBHead8::code, SmallBHead8::code, LargeBHead8, FileReader::read, and SmallBHead8.

Referenced by blendthumb_extract_from_file_impl(), and get_bhead().

◆ old_ptr_from_uint64_ptr()

const void * old_ptr_from_uint64_ptr ( const uint64_t ptr)
static

Definition at line 20 of file blo_core_bhead.cc.

References ptr, and uint32_from_uint64_ptr().

Referenced by bhead_from_large_bhead8(), and bhead_from_small_bhead8().