sc::ParsedKeyVal(3)

πŸ“¦
version 2.3.1 Β· 5 versions
, in ubuntu jammy

πŸ’… sc::ParsedKeyVal β€” the MPQC manual page, bestie

Okay so this is the whole tea on sc::ParsedKeyVal from the MPQC manual, and yes it’s giving β€œtext goes in, keyword/value assocations come out” energy. πŸŽ€


🌸 NAME

sc::ParsedKeyVal β€” converts textual information into keyword/value assocations. Yes, that’s the spelling on the page, and honestly? Iconic. 😭


✨ SYNOPSIS

#include <keyval.h>

Inherits sc::StringKeyVal. Slay. πŸ‘‘


πŸ‘‘ Public Member Functions

  • ParsedKeyVal () β€” creates an empty ParsedKeyVal. Blank canvas, main character energy. πŸ¦‹
  • ParsedKeyVal (const char *file) β€” parses the given input file.
  • ParsedKeyVal (std::istream &s) β€” reads input from s.
  • ParsedKeyVal (IPV2 *) β€” uses the given IPV2* object.
  • ParsedKeyVal (const char *, const Ref< KeyVal > &) β€” this ctor gets a string that’s used to form keywords sought in the keyval argument.
  • ~ParsedKeyVal () β€” cleanup time, deleting the IPV2 object. πŸ’…
  • void read (const char *) β€” reads input data from the given filename.
  • void read (std::istream &) β€” reads input data from the given stream.
  • void parse_string (const char *) β€” reads input data from the given string.

🌟 Overrides of parent members.

See parent class documentation. That’s the whole note, bestie. 🫢

  • const char * stringrep (const char *) β€” returns the string representation of the value assigned to key.
  • const char * classname (const char *) β€” returns the name of the exact class of the object at the keyword.
  • const char * truekeyword (const char *) β€” returns a string which is the actual keyword if some sort of variable substitution takes place (needed to make multiple references to the same object work in input files).
  • void errortrace (std::ostream &fp=ExEnv::err0()) β€” writes a message to fp describing the error.
  • void dump (std::ostream &fp=ExEnv::err0()) β€” writes a message to fp describing the error.
  • void print_unseen (std::ostream &fp=ExEnv::out0()) β€” prints keywords that were never looked at, if possible.
  • int have_unseen () β€” returns 1 if there were unseen keywords, 0 if there are none, or -1 if this keyval doesn’t keep track of unseen keywords.

⭐ Static Public Member Functions

  • static void cat_files (const char *, const Ref< KeyVal > &, std::ostream &o) β€” this is like the ParsedKeyVal(const char*,const Ref<KeyVal>&) ctor, but writes the contents of the files to the given ostream o. Cute. πŸŽ€

🫢 Additional Inherited Members

There are additional inherited members, and the page just says that. No extra deets here, bestie. 😌


🌈 Detailed Description

Converts textual information into keyword/value assocations.

The parsing is done with an IPV2 object. For the keyval tea on the input format, that’s where you look. πŸ’–


πŸ¦‹ Constructor & Destructor Documentation

🧚 sc::ParsedKeyVal::ParsedKeyVal (IPV2 *)

Use the given IPV2* object. The new ParsedKeyVal takes ownership of the passed IPV2 object. It said β€œwnership” in the source but we all know what she meant. πŸ’€

🧚 sc::ParsedKeyVal::ParsedKeyVal (const char *, const Ref< KeyVal > &)

This ctor is given a string which is used to form keywords that are sought in the keyval argument. The associated values are used to construct file names that are used to initialize the ParsedKeyVal. The keywords sought are string'dir' for the directory prefix and string'files' for an array of file names. Periodt. ✨


πŸ’œ Member Function Documentation

πŸ’– const char* sc::ParsedKeyVal::classname (const char *) [virtual]

Returns the name of the exact class of the object at the keyword. If no classname is assigned then 0 is returned.

Reimplemented from sc::StringKeyVal. πŸ‘‘


πŸŽ€ Author

Generated automatically by Doxygen for MPQC from the source code. She was built by the machine, bestie. πŸ€–πŸ’…


okay that’s the whole page! πŸ’– This one is version 2.3.1, dated Sun Oct 4 2020, and the manpage is sc::ParsedKeyVal(3). Laterrr! πŸ¦‹πŸŒ·

πŸ“¦ where this page comes from