ost::TypeManager(3)
π ost::TypeManager β bestie's guide to the persistence type registry π
okay so you're in the ost namespace and you found the manual page for ost::TypeManager(3). Welcome, queen. This is part of the Library Functions Manual and honestly? She's the backstage manager of your whole persistent-object situation. Let's get into it π
πΈ NAME πΈ
ost::TypeManager β literally the class that manages the types for generation of the persistent objects. That's the whole job. She runs the registry. Periodt.
β¨ SYNOPSIS β¨
#include <persist.h>
π¦ Classes π¦
class Registrationβ this one manages a registration to the typemanager, and the whole reason she exists is attempting to remove problems with the optimisers. no cap, the optimisers were being messy and this is the fix.
π Public Types π
typedef std::map< String, NewBaseObjectFunction > StringFunctionMapβ a map fromStringtoNewBaseObjectFunction, exactly like it sounds.
π Static Public Member Functions π
static void add (const char *name, NewBaseObjectFunction construction)β this adds a new construction function to the type manager.static void remove (const char *name)β and this one removes a type from the managers lists.static BaseObject * createInstanceOf (const char *name)β this function creates a new object of the required type and returns a pointer to it.
π Detailed Description π
This class manages the types for generation of the persistent objects. Say it with me. She's the type manager for the persistence engine, and she is thriving.
Here's the cute part: its data structures are managed automatically by the system. You don't hand-hold them, bestie. They are implicitly filled by the constructors who declare classes to the system. So the constructors do the declaring, and the system does the bookkeeping. It's giving teamwork, it's giving "I don't have to lift a finger" π
Author: Daniel Silverstone β ty for your service, icon π«Ά
Type manager for persistence engine.
π§ Member Typedef Documentation π§
β typedef std::map<String,NewBaseObjectFunction> ost::TypeManager::StringFunctionMap
Yeah. That's the typedef. It's a map from String to NewBaseObjectFunction, and that's all the lore we have on her.
π Member Function Documentation π
π₯ static void ost::TypeManager::add (const char * name, NewBaseObjectFunction construction) [static]
This adds a new construction function to the type manager. You bring the name, you bring the construction function, she files it away. Simple as that, no drama πΈ
π static BaseObject* ost::TypeManager::createInstanceOf (const char * name) [static]
This function creates a new object of the required type and returns a pointer to it.
β οΈ Heads up bestie:NULLis returned if we couldn't find the type. So like, always check your pointer before you go dereferencing it, because aNULLderef is not the vibe. Check it. Every time. π
π static void ost::TypeManager::remove (const char * name) [static]
And this one removes a type from the managers lists. She's out. Gone. Removed from the lists. Bye π
π Author π
Generated automatically by Doxygen for GNU CommonC++ from the source code. So like, Doxygen wrote this, not a human, but we're making it cute anyway π
okay that's the whole page, bestie!! π
signing off: this was GNU CommonC++'s ost::TypeManager(3), dated Sun Dec 27 2020 β yeah she's a little vintage but she still ate β¨ mwah, go register some types, ily ππ¦
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms