SBTYPEDSTORAGE(3coin2)

πŸ“¦
version 2.5.0 Β· 2 versions
, in fedora 43

πŸ’– SbTypedStorage< Type > πŸ’–

okay bestie, welcome to the Library Functions Manual page for SbTypedStorage< Type > and honestly? she's a baddie. let's get into it 🫢


✨ NAME ✨

SbTypedStorage< Type > β€” the SbTypedStorage class manages generic thread-local memory.

like. that's the whole vibe. thread-local memory, managed, generically. iconic.


🌸 SYNOPSIS 🌸

#include <Inventor/threads/SbTypedStorage.h>

πŸŽ€ Public Member Functions πŸŽ€

  • SbTypedStorage (unsigned int size)
  • SbTypedStorage (unsigned int size, void(*constr)(void *), void(*destr)(void *))
  • ~SbTypedStorage (void)
  • Type get (void)

πŸ¦‹ Detailed Description πŸ¦‹

template<class Type>
class SbTypedStorage< Type >

"The SbTypedStorage class manages generic thread-local memory.

This class manages thread-local memory. When different threads access the memory an SbTypedStorage object manages, they will receive different memory blocks back.

This provides a mechanism for sharing read/write static data.

no cap, that's the entire pitch: every thread gets its own lil block of memory from the same object, so you can share read/write static data without everybody stepping on each other's toes πŸ’…


πŸ‘‘ Constructor & Destructor Documentation πŸ‘‘

⭐ template<class Type> SbTypedStorage< Type >::SbTypedStorage (unsigned int size) [inline]

Constructor. size specifies the number of bytes each thread should have in this thread-local memory management object.

like, <pink>size` = how much room each thread gets, in bytes. that's it, that's the tea πŸ“

⭐ template<class Type> SbTypedStorage< Type >::SbTypedStorage (unsigned int size, void(* constr )(void *), void(* destr )(void *)) [inline]

Constructor. size specifies the number of bytes each thread should have in this thread-local memory management object. Constructor and a destructor functions can be specified that will be called when the actual memory blocks are allocated and freed.

so you get <pink>sizebytes per thread **plus** aconstrfunction and adestr` function β€” and those get called when the actual memory blocks are allocated and freed. setup + cleanup, bestie. we love a full lifecycle 🧚

⭐ template<class Type> SbTypedStorage< Type >::~SbTypedStorage (void ) [inline]

The destructor.

yeah. she's the destructor. she does destructor things. πŸŽ€


πŸ’œ Member Function Documentation πŸ’œ

🌈 template<class Type> Type SbTypedStorage< Type >::get (void ) [inline]

This method returns the calling thread's thread-local memory block.

the calling thread's. not someone else's. yours. main character energy, fr fr πŸ‘‘


🫢 Author 🫢

Generated automatically by Doxygen for Coin from the source code.

(so yeah, not a human author β€” Doxygen did that. she's automated and she ATE πŸ’…)


lowkey a warning-ish note for you bestie: this whole page is Doxygen-generated documentation for the Coin library, so every word above comes straight from the source code. don't be out here assuming extra behaviour, okay? 😭

and that's the whole page!! thanks for coming to my ted talk 🌸 this was Coin, Version 2.5.0 β€” SbTypedStorage< Type >(3), mwah πŸ’–βœ¨

πŸ“¦ where this page comes from