sc::StateOutBin(3)

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

πŸ’Ύ sc::StateOutBin β€” aka "save ur state to a binary file, bestie" πŸ’Ύ

Okay so picture this: you're deep in MPQC land, you've got state, and you need to save it to a binary file β€” that's literally this whole class. It's giving "persistence but make it binary." No cap.

It inherits from sc::StateOutFile, so it's got that whole family tree going on. Iykyk. 🫢


✨ SYNOPSIS ✨

Like, just include the header and you're in:

#include <state_bin.h>

And it inherits from sc::StateOutFile β€” main character energy inherited, periodt. πŸ‘‘

🌸 Public Member Functions 🌸

  • StateOutBin (std::ostream &) β€” constructor that takes an std::ostream &, slay
  • StateOutBin (const char *) β€” constructor that takes a const char *, also slay
  • int open (const char *name) β€” state information will be written to name, iconic
  • void close () β€” closes the output stream, bye bestie πŸ‘‹
  • int use_directory () β€” returns true if this object uses a directory, no cap
  • int tell () β€” returns the current position in the file, very demure
  • void seek (int loc) β€” sets the current position in the file, lowkey useful
  • int seekable () β€” returns non-zero if tell and seek do anything sensible, vibe check fr fr

πŸ¦‹ Additional Inherited Members πŸ¦‹

Yeah there's more stuff inherited from the parent class, but that's above my pay grade for this page β€” check sc::StateOutFile if you're curious, bestie πŸ’…


πŸŽ€ Detailed Description πŸŽ€

Save state to a binary file.

That's it. That's the whole vibe. You're saving state. To a binary file. Simple as. ✨


πŸ’– Member Function Documentation πŸ’–

πŸ’… void sc::StateOutBin::seek (int loc) [virtual]

Sets the current position in the file. The way this works β€” the default implementation does nothing. Yup, literally nothing. It's a no-op, bestie, it's giving "I'm just here for the vibes." 😭

Reimplemented from sc::StateOut.

πŸ’… int sc::StateOutBin::seekable () [virtual]

Returns non-zero if tell and seek do anything sensible. The default implementation returns 0 β€” so like, by default, nope, not seekable, don't @ me.

Reimplemented from sc::StateOut.

πŸ’… int sc::StateOutBin::tell () [virtual]

Returns the current position in the file. The default implementation returns 0 β€” so it always says you're at position zero, which is a whole mood ngl.

Reimplemented from sc::StateOut.


🌈 Author 🌈

Generated automatically by Doxygen for MPQC from the source code. Not me writing it by hand, the robots did it. Respect the robots. πŸ€–πŸ’–


So yeah, that's sc::StateOutBin(3) β€” this very demure, very mindful manual page is brought to you by MPQC Version 2.3.1, dated Sun Oct 4 2020. Byeee bestie, go save some binary state! πŸŽ€πŸ’œβœ¨πŸ‘‘

πŸ“¦ where this page comes from