sc::IPV2(3)

πŸ“¦
version 2.3.1 Β· 4 versions
, in fedora 43, ubuntu noble

πŸ’– sc::IPV2 πŸ’–

okay bestie, sit DOWN, because we're about to talk about sc::IPV2 from the MPQC library β€” that's the Library Functions Manual vibe, section 3, the "here's how you call this thing from C++" zone. she's an input-parser girlie, she reads your keywords, she tells you what went wrong, and honestly? iconic. let's go πŸ¦‹


✨ NAME ✨

sc::IPV2 β€” no cap, that's the whole name, that's her πŸ’…


✨ SYNOPSIS ✨

πŸŽ€ Public Types πŸŽ€

so first up, the enum energy:

enum Status { OK =0, KeyNotFound =1, OutOfBounds =2, Malloc =3,
    NotAnArray =4, NotAScalar =5, Type =6, HasNoValue =7, ValNotExpd =8
    }
enum { KEYWORD_LENGTH =256 }

like, Status is literally the mood ring of this whole class β€” OK means we slayed, and every other value is a different flavor of "girl, something went sideways." and KEYWORD_LENGTH is an anonymous enum sitting pretty at 256, that's the length budget for keywords, periodt.

🌸 Public Member Functions 🌸

here's the full roster, no skips, no skimming, every single one:

void read (std::istream &, std::ostream &, const char *filename=0)
void append_from_input (const char *, std::ostream &)
void done ()
const char * error_message (IPV2::Status)
void error (const char *)
void warn (const char *)
void cwk_root ()
void cwk_clear ()
void cwk_add (const char *)
void cwk_push ()
void cwk_pop ()
IPV2::Status boolean (const char *, int *, int,...)
IPV2::Status boolean_v (const char *, int *, int, int *)
int exist (const char *, int,...)
int exist_v (const char *, int, int *)
IPV2::Status data (const char *, const char *, void *, int,...)
IPV2::Status data_v (const char *, const char *, void *, int, int *)
IPV2::Status classname (const char *, const char **, int,...)
IPV2::Status classname_v (const char *, const char **, int, int *)
IPV2::Status truekeyword (const char *, const char **, int,...)
IPV2::Status truekeyword_v (const char *, const char **, int, int *)
IPV2::Status string (const char *, char **, int,...)
IPV2::Status string_v (const char *, char **, int, int *)
IPV2::Status value (const char *, const char **, int,...)
IPV2::Status value_v (const char *, const char **, int, int *)
IPV2::Status construct_key_v (const char *, char *, int, int *)
IPV2::Status count (const char *, int *, int,...)
IPV2::Status count_v (const char *, int *, int, int *)
void print_keyword (std::ostream &f=ExEnv::out0(), ip_keyword_tree_t
    *k=0)
void print_tree (std::ostream &f=ExEnv::out0(), ip_keyword_tree_t *k=0)
void print_unseen (std::ostream &f=ExEnv::out0(), ip_keyword_tree_t
    *k=0)
int have_unseen (ip_keyword_tree_t *k=0)

ngl the _v versions are just the varargs-free twins of their buddies β€” same energy, different signature. and yes, read defaults filename to 0, and all three print_* functions default their stream to ExEnv::out0() and their keyword tree pointer to 0. πŸ’œ

🧚 Static Public Member Functions 🧚

and the static girlies, the ones you can call without an instance:

static int have_global ()
static void set_global (IPV2 *)
static IPV2 * global ()

have_global() tells you if a global exists, set_global() sets it, global() hands it back. the trio ate and left no crumbs. ✨


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for MPQC from the source code.

(so technically a robot wrote her bio and honestly? relatable. Doxygen doesn't miss. 😭)


and that's the whole page, bestie β€” this came straight out of MPQC, Version 2.3.1, and that footer date stamp is living on sc::IPV2(3). go forth and parse those keywords, you absolute main character πŸ«ΆπŸ’–πŸŒˆ

πŸ“¦ where this page comes from