log4shib::Properties(3)

πŸ“¦ version 2.0.1, in opensuse-leap 16.0

πŸ’… NAME πŸ’…

log4shib::Properties β€” bestie it's literally a std::map that learned some tricks, and this page is straight out of the Library Functions Manual (section 3, iykyk) 🫢


✨ SYNOPSIS ✨

Drop this include and you're in:

#include <Properties.hh>

Inherits std::map< std::string, std::string >. That's the whole vibe β€” it is a map of string β†’ string, it just has extra main-character energy on top πŸŽ€

🌸 Public Member Functions 🌸

  • Properties () β€” constructor, the classic.
  • virtual ~Properties () β€” destructor, also virtual, also iconic.
  • virtual void load (std::istream &in) β€” load stuff in from an input stream.
  • virtual void save (std::ostream &out) β€” save stuff out to an output stream.
  • virtual int getInt (const std::string &property, int defaultValue) β€” hand over a property as an int, or fall back to defaultValue.
  • virtual bool getBool (const std::string &property, bool defaultValue) β€” same deal but bool, with defaultValue as the safety net.
  • virtual std::string getString (const std::string &property, const char *defaultValue) β€” grab a property as a std::string, defaulting to that const char * if it's not there.

🧚 Protected Member Functions 🧚

  • virtual void _substituteVariables (std::string &value) β€” the internal one, protected, does its little substitution thing on value. Not for you, bestie, it's protected for a reason πŸ’…

πŸ¦‹ Constructor & Destructor Documentation πŸ¦‹

log4shib::Properties::Properties ()

The constructor. Makes a Properties. That's the update ✨

log4shib::Properties::~Properties () [virtual]

The destructor, and yes it's [virtual] β€” she cleans up properly for anyone inheriting from her, no cap.


πŸ”₯ Member Function Documentation πŸ”₯

void log4shib::Properties::_substituteVariables (std::string & value) [protected], [virtual]

Protected and virtual β€” so it's for the class and its subclasses only, and it can be overridden. It takes value by reference (std::string & value) so whatever it does, it does it in place πŸ‘€

bool log4shib::Properties::getBool (const std::string & property, bool defaultValue) [virtual]

Virtual getter that returns a bool. You give it a property and a defaultValue, and if the property isn't giving, defaultValue steps in 🫢

int log4shib::Properties::getInt (const std::string & property, int defaultValue) [virtual]

Same shape, but returns an int. property in, defaultValue as the backup. Virtual, obviously.

std::string log4shib::Properties::getString (const std::string & property, const char * defaultValue) [virtual]

Returns a std::string. Careful β€” the defaultValue here is a const char *, not a std::string, so don't come at her with the wrong type 😭

void log4shib::Properties::load (std::istream & in) [virtual]

Virtual. Takes an std::istream & in and loads from it. Stream goes in, properties come out, periodt.

void log4shib::Properties::save (std::ostream & out) [virtual]

Virtual. Takes an std::ostream & out and saves to it. Mirror image of load, equally slay.


Reminder bestie: _substituteVariables is protected, so it's not yours to call from the outside. Respect the boundary πŸ’€

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for log4shib from the source code. Not a human, just a very efficient little robot πŸŽ€


And that's the whole page, mwah πŸ’– This was log4shib, Version 2.0.1, stamped with the log4shib::Properties(3) footer energy β€” go forth and configure, bestie 🌈⭐