sc::KeyValValue(3)
π NAME π
sc::KeyValValue β bestie, this is a C++ class from MPQC, and it's living its life in section 3 of the manual (the library functions one, iykyk). π
That's literally all the NAME section says. No cute one-liner, no "does the thing" β just the class name. Iconic minimalism, honestly. β¨
π¦ SYNOPSIS π¦
Inherits sc::RefCount.
Inherited by sc::KeyValValueRefDescribedClass, sc::KeyValValueString,
sc::KeyValValueboolean, sc::KeyValValuechar, sc::KeyValValuedouble,
sc::KeyValValuefloat, sc::KeyValValueint, sc::KeyValValuepchar,
sc::KeyValValuesize, and sc::KeyValValuestring.
So sc::KeyValValue is the mom friend of this whole little family β it inherits from sc::RefCount, and a whole squad of subclasses inherits from it. It's giving main character energy, fr fr. π
πΈ Public Types πΈ
enum KeyValValueError { OK, WrongType }β two moods only, and honestly? Relatable. π
π Public Member Functions π
Okay so the source page lists these with no descriptions at all β just the signatures, standing there in their little outfits. So here's the full roster, verbatim, no notes:
KeyValValue (const KeyValValue &)virtual KeyValValue::KeyValValueError doublevalue (double &) constvirtual KeyValValue::KeyValValueError booleanvalue (int &) constvirtual KeyValValue::KeyValValueError floatvalue (float &) constvirtual KeyValValue::KeyValValueError charvalue (char &) constvirtual KeyValValue::KeyValValueError intvalue (int &) constvirtual KeyValValue::KeyValValueError sizevalue (size_t &) constvirtual KeyValValue::KeyValValueError pcharvalue (const char *&) constvirtual KeyValValue::KeyValValueError stringvalue (std::string &) constvirtual KeyValValue::KeyValValueError describedclassvalue (Ref< DescribedClass > &) constvirtual void print (std::ostream &o=ExEnv::out0()) const
Not me noticing there are exactly ten of the<something>valuetwins. Every single one of them returns aKeyValValueErrorand takes a reference to hand something back through. Copy the signatures exactly if you're using them, bestie β I'm not adding a single syllable the manpage didn't say. π«Ά
π Public Member Functions inherited from sc::RefCount π
The hand-me-downs, and they're cute:
int lock_ptr () constβ lock this object. πint unlock_ptr () constβ unlock this object. πvoid use_locks (bool inVal)β start and stop using locks on this object.refcount_t nreference () constβ return the reference count.refcount_t reference ()β increment the reference count and return the new count.refcount_t dereference ()β decrement the reference count and return the new count.int managed () constβ (yes, this one shows up in the source with no description attached, we don't ask questions) πvoid unmanage ()β turn off the reference counting mechanism for this object.int managed () constβ return 1 if the object is managed. Otherwise return 0.
Okay yes, int managed () const is listed twice in the original page β once bare, once with a description. That's not me being messy, that's just what the page says. Slay, I guess. π
π§ Public Member Functions inherited from sc::Identity π§
Identifier identifier ()β return theIdentifierfor this argument.
π Additional Inherited Members π
Protected Member Functions inherited from sc::RefCount
RefCount (const RefCount &)RefCount & operator= (const RefCount &)
Protected, so they're the VIP-section-only members. Respect the velvet rope. π
β Author β
Generated automatically by Doxygen for MPQC from the source code. So likeβ¦ the robots wrote it, and I just put a bow on it. π
And that's the whole page, bestie!! π This was sc::KeyValValue(3) from MPQC Version 2.3.1 β same manual, same facts, just with infinitely better vibes. Go forth and #include responsibly. πβ¨π
π¦ where this page comes from
- fedora 43: mpqc-devel 2.3.1-65.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+
- fedora 43: mpqc-devel 2.3.1-65.fc43 Β· GPL-2.0-or-later AND LicenseRef-Callaway-LGPLv2+
- ubuntu noble: libsc-doc 2.3.1-22build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms