VECTOR_BLF_OBJECTQUEUE(3)

πŸ“¦ version 2.4.2, in arch rolling

πŸ’… Vector::BLF::ObjectQueue< T > β€” like, the whole vibe

okay bestie, so this is a page from the Library Functions Manual for Vector::BLF::ObjectQueue< T >, and I'm gonna walk you through it like we're texting at 2am 🫢


✨ NAME ✨

Vector::BLF::ObjectQueue< T > β€” that's the whole name, that's the icon, no notes πŸ’…


🌸 SYNOPSIS 🌸

first things first, you gotta bring it in:

#include <ObjectQueue.h>

πŸŽ€ Public Member Functions πŸŽ€

  • T * read()
  • uint32_t tellg() const
  • void write(T *obj)
  • uint32_t tellp() const
  • bool good() const
  • bool eof() const
  • void abort()
  • void setFileSize(uint32_t fileSize)
  • void setBufferSize(uint32_t bufferSize)

πŸ¦‹ Public Attributes πŸ¦‹

  • std::condition_variable tellgChanged {}
  • std::condition_variable tellpChanged {}

πŸ’œ Detailed Description πŸ’œ

so it's a template, right:

template<typename T>
class Vector::BLF::ObjectQueue< T >

and its whole deal is that it's a "Thread-safe queue for ObjectHeaderBase" β€” that's the literal description, no cap. threads can pile in and it just works. slay ✨


πŸ”₯ Member Function Documentation πŸ”₯

okay so this is the part where we go one by one, and honestly? each one ate πŸ’€

abort()

template<typename T> void Vector::BLF::ObjectQueue< T >::abort ()

stops any further operations, and β€” this is the key part β€” it returns from waiting reads. so anyone stuck in a read just gets to leave. iconic honestly.

eof() const

template<typename T> bool Vector::BLF::ObjectQueue< T >::eof () const

checks whether eofbit is set.

Returns: true if eofbit is set

good() const

template<typename T> bool Vector::BLF::ObjectQueue< T >::good () const

vibe check on the stream state, basically.

Returns: true if no error flags are set

read()

template<typename T> T * Vector::BLF::ObjectQueue< T >::read ()

gives you access to the front of the queue.

Returns: the object (or nullptr if it's empty 😭)

setBufferSize(uint32_t bufferSize)

template<typename T> void Vector::BLF::ObjectQueue< T >::setBufferSize
   (uint32_t bufferSize)

sets the maximum file size. and heads up β€” write operations block if the size is reached. so it's not playing around 🫢

Parameters:

  • bufferSize β€” maximum file size

setFileSize(uint32_t fileSize)

template<typename T> void Vector::BLF::ObjectQueue< T >::setFileSize
   (uint32_t fileSize)

sets the file size, resp. the end-of-file position.

Parameters:

  • fileSize β€” file size

tellg() const

template<typename T> uint32_t Vector::BLF::ObjectQueue< T >::tellg () const

gets the position in the input sequence.

Returns: the read position

tellp() const

template<typename T> uint32_t Vector::BLF::ObjectQueue< T >::tellp () const

gets the position in the output sequence.

Returns: the write position

write(T *obj)

template<typename T> void Vector::BLF::ObjectQueue< T >::write (T * obj)

enqueues an object to the end of the queue.

and yes, nullptr can be pushed to indicate eof β€” that's literally in the docs, bestie, it's a whole feature 🌈

Parameters:

  • obj β€” object

🌟 Member Data Documentation 🌟

tellgChanged

template<typename T> std::condition_variable Vector::BLF::ObjectQueue< T
   >::tellgChanged {}

data was dequeued πŸ‘‘

tellpChanged

template<typename T> std::condition_variable Vector::BLF::ObjectQueue< T
   >::tellpChanged {}

data was enqueued πŸ‘‘


⭐ Author ⭐

"Generated automatically by Doxygen for Vector BLF from the source code." β€” so nobody hand-wrote this, it's giving robot authorship, and honestly? respect πŸ’€


aaaand that's the tea πŸ“ this page came to you straight from Vector BLF (that's the source/version, mwah) β€” and if there was a date on the footer I'd tell you, but this one's just rocking the version tag. go forth and queue safely, bestie πŸ’–βœ¨

πŸ“¦ where this page comes from