sc::StateInText(3)
β¨ NAME β¨
okay bestie, welcome to sc::StateInText(3) β the page for sc::StateInText, which reads state information written with StateOutText. That's the whole main-character job: it's the reader for that text state. π
πΈ SYNOPSIS πΈ
#include <state_text.h>
Inherits sc::StateInFile.
π Public Member Functions
StateInText (std::istream &s)β one constructor, taking astd::istream &s.StateInText (const char *)β another constructor, taking aconst char *.StateInText (const Ref< KeyVal > &)β and a constructor taking aconst Ref< KeyVal > &.int getstring (char *&)β this restores strings saved withStateOut::putstring.int get_array_char (char *, int)β these restore data saved withStateOut'sput. members. The data must be preallocated by the user, per the member docs below.int get_array_uint (unsigned int *, int)β array-restore business, sameStateOut'sput. members note.int get_array_int (int *, int)β yep, restores data saved withStateOut'sput. members.int get_array_float (float *, int)β same array-restore energy: data saved withStateOut'sput. members.int get_array_double (double *, int)β restores data saved withStateOut'sput. members.int get (const ClassDesc **)β this restoresClassDesc's.int get (char &r, const char *key=0)β these restore data saved withStateOut'sput. members.int get (unsigned int &r, const char *key=0)β scalar-restore crew, sameStateOut'sput. members note.int get (int &r, const char *key=0)β restores data saved withStateOut'sput. members.int get (float &r, const char *key=0)β restores data saved withStateOut'sput. members.int get (double &r, const char *key=0)β restores data saved withStateOut'sput. members.int get (char *&)β these restore data saved withStateOut'sput. The data is allocated byStateIn, as the member docs say.int get (unsigned int *&)β restores data saved withStateOut'sput.int get (int *&)β restores data saved withStateOut'sput.int get (float *&)β restores data saved withStateOut'sput.int get (double *&)β restores data saved withStateOut'sput.
π¦ Protected Member Functions
void no_newline ()β protected member function.void no_array ()β protected member function.int read (char *)β protected read helper.int read (unsigned int &)β protected read helper.int read (int &)β protected read helper.int read (float &)β protected read helper.int read (double &)β protected read helper.void newline ()β protected member function.void start_array ()β protected member function.void end_array ()β protected member function.int getobject (Ref< SavableState > &)β this is used to restore an object.void abort ()β protected member function.
π Protected Attributes
int newlines_β protected attribute.int no_newline_β protected attribute.int no_array_β protected attribute.
π¦ DETAILED DESCRIPTION π¦
Reads state information written with StateOutText. That's it, that's the whole mood. π¦
π§ MEMBER FUNCTION DOCUMENTATION π§
π int sc::StateInText::get (char *&) [virtual]
These restore data saved with StateOut's put. members. The data is allocated by StateIn.
Reimplemented from sc::StateIn.
π₯ int sc::StateInText::get (const ClassDesc **) [virtual]
This restores ClassDesc's. It will set the pointer to the address of the static ClassDesc for the class which has the same name as the class that had the ClassDesc that was saved by put(const ClassDesc*).
Reimplemented from sc::StateIn.
π int sc::StateInText::get_array_char (char * p, int size) [virtual]
These restore data saved with StateOut's put. members. The data must be preallocated by the user.
Reimplemented from sc::StateIn.
π int sc::StateInText::getobject (Ref< SavableState > &) [protected], [virtual]
This is used to restore an object. It is called with the reference to the reference being restored. If the data being restored has previously been restored, then the pointer being restored is set to a reference to the previously restored object.
Reimplemented from sc::StateIn.
π AUTHOR π
Generated automatically by Doxygen for MPQC from the source code.
okay bye bestie π«Ά β this was sc::StateInText(3), Version 2.3.1, dated Sun Oct 4 2020. πβ¨
π¦ where this page comes from
- ubuntu jammy: libsc-doc 2.3.1-21
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms