Vector::BLF::File(3)

๐Ÿ“ฆ version 2.4.2, in arch rolling

๐Ÿ’– NAME ๐Ÿ’–

Vector::BLF::File โ€” hii bestie, welcome to the Vector::BLF::File(3) page from the Library Functions Manual โœจ This one is literally the BLF file object, and it's giving main-character file I/O energy ๐Ÿ’…

๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <File.h>

๐ŸŽ€ Public Member Functions ๐ŸŽ€

virtual void open (const char *filename, const std::ios_base::openmode mode=std::ios_base::in)
virtual void open (const std::string &filename, const std::ios_base::openmode mode=std::ios_base::in)
virtual bool is_open () const
virtual bool good () const
virtual bool eof () const
virtual ObjectHeaderBase * read ()
virtual void write (ObjectHeaderBase *ohb)
virtual void close ()
virtual uint32_t defaultLogContainerSize () const
virtual void setDefaultLogContainerSize (uint32_t defaultLogContainerSize)

๐Ÿฆ‹ Static Public Member Functions ๐Ÿฆ‹

static ObjectHeaderBase * createObject (ObjectType type)

๐Ÿ“ Public Attributes ๐Ÿ“

FileStatistics fileStatistics {}
uint64_t currentUncompressedFileSize {}
std::atomic< uint32_t > currentObjectCount {}
int compressionLevel {1}
bool writeRestorePoints {true}

๐ŸŒˆ Detailed Description ๐ŸŒˆ

Okay so File is literally the BLF version of std::fstream โ€” same "open, read, write, close" bestie energy, but for BLFs ๐Ÿฆ‹ no cap.

๐Ÿงš Member Function Documentation ๐Ÿงš

void Vector::BLF::File::close () [virtual]

Closes the file. Bye-bye, file handle ๐Ÿ‘‹๐Ÿ’…

ObjectHeaderBase * Vector::BLF::File::createObject (ObjectType type) [static]

Makes you a new object of the given type โญ

Parameters

  • type โ€” object type

Returns

  • new object

uint32_t Vector::BLF::File::defaultLogContainerSize () const [virtual]

Gets the default log container size, bestie ๐ŸŽ€

Returns

  • default log container size

bool Vector::BLF::File::eof () const [virtual]

Checks whether eofbit is set โ€” aka are we at the end of the file? ๐Ÿ˜ญ

Returns

  • true if end-of-file reached

bool Vector::BLF::File::good () const [virtual]

Checks whether the stream state is good โ€” no error flags, no drama โœจ

Returns

  • true if no error flags set

bool Vector::BLF::File::is_open () const [virtual]

Is the file open? The people wanna know ๐Ÿ‘€

Returns

  • true if file is open

void Vector::BLF::File::open (const char * filename, const std::ios_base::openmode mode = std::ios_base::in) [virtual]

Opens the file using a const char * filename, honey ๐Ÿ“

Parameters

  • filename โ€” file name
  • mode โ€” open mode, either in (read) or out (write)

void Vector::BLF::File::open (const std::string & filename, const std::ios_base::openmode mode = std::ios_base::in) [virtual]

Same open-file slay, but with a std::string filename this time ๐Ÿ’–

Parameters

  • filename โ€” file name
  • mode โ€” open mode, either in (read) or out (write)

ObjectHeaderBase * Vector::BLF::File::read () [virtual]

Reads an object from the file ๐Ÿ“–โœจ

Ownership is taken over from the library to the user. The user has to take care to delete the object โ€” yes, that means you, bestie, gotta clean up ๐Ÿงน๐Ÿ˜ญ

Todo: Use std::unique_ptr in future versions.

Returns

  • read object or nullptr

void Vector::BLF::File::setDefaultLogContainerSize (uint32_t defaultLogContainerSize) [virtual]

Sets the default log container size โ€” customize that container, icon behavior ๐Ÿ’…

Parameters

  • defaultLogContainerSize โ€” default log container size

void Vector::BLF::File::write (ObjectHeaderBase * ohb) [virtual]

Writes an object to the file ๐Ÿ–Š๏ธ๐Ÿ”ฅ

Ownership is taken over from the user to the library. The object should not be further accessed any more โ€” like, let it go, it's the library's problem now ๐Ÿ™ˆ

Todo: Use std::unique_ptr in future versions.

Parameters

  • ohb โ€” write object

๐Ÿ‘‘ Member Data Documentation ๐Ÿ‘‘

int Vector::BLF::File::compressionLevel {1}

Compression level ๐Ÿ—œ๏ธโœจ

zlib compression levels:

  • 0: Z_NO_COMPRESSION
  • 1: Z_BEST_SPEED
  • 9: Z_BEST_COMPRESSION

Vector BLF compression levels:

  • 0: no compression
  • 6: default compression
  • 10: maximum compression

std::atomic<uint32_t> Vector::BLF::File::currentObjectCount {}

Current number of objects read ๐Ÿ”ข

Unknown115 is not counted. Don't ask, bestie, it's just not ๐Ÿ’€

uint64_t Vector::BLF::File::currentUncompressedFileSize {}

Current uncompressed file size ๐Ÿ“

This includes the LogContainer headers, and the uncompressed content. So yeah, the headers are part of the vibe ๐ŸŽ€

FileStatistics Vector::BLF::File::fileStatistics {}

File statistics from the file header โ€” contains total counts/sizes ๐Ÿงฎโœจ

bool Vector::BLF::File::writeRestorePoints {true}

Write restore points at file close โ€” and yes, it's true by default โœ…

๐ŸŒธ Author ๐ŸŒธ

Generated automatically by Doxygen for Vector BLF from the source code. Yes, the robots wrote this one โ€” we just gave it the group-chat makeover ๐Ÿ’–


Mwah ๐Ÿ’‹ โ€” this cutie comes from Vector BLF, page Vector::BLF::File(3). The footer didn't hand us a date, so no fake timestamp here, bestie ๐Ÿ’…๐Ÿซถ

๐Ÿ“ฆ where this page comes from