SoMemoryError(3)
π SoMemoryError(3) π
okay bestie, pull up a chair, we're reading SoMemoryError(3) from the Library Functions Manual and honestly? it's giving "the library has feelings about RAM" and I'm obsessed. π«Ά
β¨ NAME β¨
SoMemoryError β the class whose whole entire job is to be like "bestieβ¦ we could not get the memory." it's used to inform of problems with memory allocation. that's it, that's the vibe. π
π SYNOPSIS π
#include <Inventor/errors/SoMemoryError.h>
Inherits SoError. yes she's a nepo baby, she inherited everything from SoError and she's thriving. π
πΈ Public Member Functions πΈ
virtual SoType getTypeId (void) const
π Public Member Functions inherited from SoError π
virtual ~SoError ()
const SbString & getDebugString (void) const
SbBool isOfType (const SoType type) const
β Static Public Member Functions β
static void setHandlerCallback (SoErrorCB *const callback, void *const data)
static SoErrorCB * getHandlerCallback (void)
static void * getHandlerData (void)
static SoType getClassTypeId (void)
static void post (const char *const whatWasAllocated)
static void initClass (void)
π Static Public Member Functions inherited from SoError π
static void setHandlerCallback (SoErrorCB *const func, void *const data)
static SoErrorCB * getHandlerCallback (void)
static void * getHandlerData (void)
static SoType getClassTypeId (void)
static void post (const char *const format,...)
static SbString getString (const SoNode *const node)
static SbString getString (const SoPath *const path)
static SbString getString (const SoEngine *const engine)
static void initClass (void)
static void initClasses (void)
π Protected Member Functions π
virtual SoErrorCBPtr getHandler (void *&data) const
π¦ Protected Member Functions inherited from SoError π¦
void setDebugString (const char *const str)
void appendToDebugString (const char *const str)
void handleError (void)
π§ Additional Inherited Members π§
πΈ Static Protected Member Functions inherited from SoError πΈ
static void defaultHandlerCB (const SoError *error, void *userdata)
π Detailed Description π
so. The SoMemoryError class is used to inform of problems with memory allocation. that's the whole assignment. no cap. π
Modern operating systems take care of handling most out of memory conditions for you, but in certain situations it can be wise to do some manual checking and intervention. this class is provided as an aid to help out in these situations. she's not trying to be the main character, she's just here to help. π«Ά
The basic design of the Coin library is to pass on the responsibility for handling failed attempts at memory allocation to you, the application programmer. yes, you. π If you want to detect and take care of these, you should compile Coin with the C++ exception throwing on and wrap your code within try{} and catch{} blocks. The most you can do if you get a failed allocation is typically to notify the user and then exit the application, though, and this is something most operating systems will do for you, so you probably need not consider this at all. likeβ¦ the OS literally has it covered, babe, go touch grass. π±
okay so where does SoMemoryError actually come in handy then? There are certain things which could happen within the library which are best taken care of by internally handling failed attempts at memory allocation. An example: the user tries to load a model file which contains a filename pointer to a huge bitmapfile with a texture map. The end-user's system does not provide enough memory to load the file and prepare the texture image for rendering, though. This is a case where it is possible to just emit a warning and continue. The warning will then be passed through this class. β¨
Note that SoMemoryError is probably not of much use to the application programmer. not me finding out I'm not the target audience π it's fine. it's fine. π
π Member Function Documentation π
π SoType SoMemoryError::getTypeId (void ) const [virtual] π
This method returns the SoType of a particular object instance. it's giving "who am I, really?" energy. π¦
See also: getClassTypeId()
Reimplemented from SoError.
π void SoMemoryError::post (const char *const whatWasAllocated) [static] π
Posts a warning about a failed memory allocation. whatWasAllocated should contain a description of what we tried to allocate. so like, tell her what you were reaching for and she'll make the announcement for you. π£
References SoError::appendToDebugString(), SoError::handleError(), and SoError::setDebugString().
π SoErrorCB * SoMemoryError::getHandler (void *& data) const [protected], [virtual] π
This is just a convenience wrapper around the getHandlerCallback() and getHandlerData() methods. she's a lil shortcut, a helper, a girly who does the fetching so you don't have to. π«Ά
Reimplemented from SoError.
π Author π
Generated automatically by Doxygen for Coin from the source code. the robot wrote it, I just gave it a makeover. π β¨
π and that's the whole page, bestie!! no skips, no cuts, every single flag, signature and footnote accounted for. you ate. π
much love from the Coin docs, Version 2.5.0 β catch you in the next manpage!! πππ¦πΈ
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms