sc::StateIn(3)
π¦ NAME π¦
okay so this is the sc::StateIn(3) manual page, MPQC edition β and sc::StateIn is literally the class that restores objects that derive from SavableState. that's the whole name section, bestie. π
β¨ SYNOPSIS β¨
#include <statein.h>
Inherits sc::DescribedClass.
Inherited by sc::MsgStateBufRecv, and sc::StateInFile.
π Public Member Functions π
virtual void get_header ()β reads in the header information.virtual int version (const ClassDesc *)β returns the version of theClassDescin the persistent object, or-1if there's no info on theClassDesc. no cap, that-1is doing its thing. π«Άvirtual int getstring (char *&)β restores strings saved withStateOut::putstring.virtual int get (std::string &)β restores astd::stringobject.virtual int get (char &r, const char *keyword=0)β restores data saved withStateOut'sputmembers.virtual int get (unsigned int &r, const char *keyword=0)β restores data saved withStateOut'sputmembers.virtual int get (int &r, const char *keyword=0)β restores data saved withStateOut'sputmembers.virtual int get (bool &r, const char *keyword=0)β restores data saved withStateOut'sputmembers.virtual int get (float &r, const char *keyword=0)β restores data saved withStateOut'sputmembers.virtual int get (double &r, const char *keyword=0)β restores data saved withStateOut'sputmembers.virtual int get (char *&)β restores data saved withStateOut'sput.virtual int get (unsigned int *&)β restores data saved withStateOut'sput.virtual int get (int *&)β restores data saved withStateOut'sput.virtual int get (float *&)β restores data saved withStateOut'sput.virtual int get (double *&)β restores data saved withStateOut'sput.virtual int get_array_char (char *p, int size)β restores data saved withStateOut'sput.virtual int get_array_uint (unsigned int *p, int size)β restores data saved withStateOut'sput.virtual int get_array_int (int *p, int size)β restores data saved withStateOut'sput.virtual int get_array_float (float *p, int size)β restores data saved withStateOut'sput.virtual int get_array_double (double *p, int size)β restores data saved withStateOut'sput.template<class T > int get (typename std::vector< T > &v)β reads an STL vector of data. cute. πΈint node_to_node () constβ true if this is a node to node save/restore.virtual int use_directory ()β returns true if this object uses a directory.virtual int tell ()β returns the current position in the file.virtual void seek (int)β sets the current position in the file.virtual int seekable ()β returns non-zero ifseekdoes anything sensible.int has_directory () constβ the page gives this one no description, so we're not inventing one, bestie. πvirtual void list_objects (std::ostream &=ExEnv::out0())β lists all the objects to the stream.void set_override (const Ref< KeyVal > &kv)β gives thisStateInaKeyValobject that is used to override values.const Ref< KeyVal > & override () constβ returns theKeyValused to override values.
π Protected Member Functions π
virtual int get_array_void (void *, int)β no description on the page. it's just there, being mysterious. πint push_key (const char *key)β no description on the page.void pop_key (int n)β no description on the page.const char * key ()β no description on the page.void get_directory ()β no description on the page.int directory_location () constβ no description on the page.void find_and_get_directory ()β no description on the page.virtual int getobject (Ref< SavableState > &)β used to restore an object.virtual int dir_getobject (Ref< SavableState > &, const char *name)β restores objects that are listed in the directory.virtual void haveobject (int, const Ref< SavableState > &)β when storage has been allocated during object restoration, this routine is called with the object reference number and the pointer to the new storage sogetpointercan find the data if it is referenced again.virtual void nextobject (int)β a call tonextobjectfollowed byhavepointer(int)is equiv tohavepointer(int,void**);. yes, that semicolon is invited to the function call. πvirtual void haveobject (const Ref< SavableState > &)β no description on the page.void have_classdesc ()β no description on the page.int need_classdesc ()β no description on the page.virtual int get (const ClassDesc **)β this restoresClassDesc's.
π§ Protected Attributes π§
Ref< KeyVal > override_TranslateDataIn * translate_std::map< int, StateInData > ps_int expected_object_num_std::map< ClassDescP, int > classidmap_std::map< int, StateClassData > classdatamap_int nextclassid_int node_to_node_int version_int date_char userid_ [9]char format_
π― Friends π―
class SavableStateclass TranslateDataIn
π Detailed Description π
sc::StateIn restores objects that derive from SavableState. that's the whole detailed description, and honestly? iconic. β¨
π₯ Member Function Documentation π₯
π
virtual int sc::StateIn::get (char *&) [virtual]
these restore data saved with StateOut's put members β and the data is allocated by StateIn. yes bestie, StateIn handles the allocation here. π«Ά
Reimplemented in sc::MsgStateRecv, and sc::StateInText.
π
virtual int sc::StateIn::get (const ClassDesc **) [protected], [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*). no cap, that's a whole mouthful. π
Reimplemented in sc::MsgStateRecv, and sc::StateInText.
Referenced by get().
π
virtual int sc::StateIn::get_array_char (char * p, int size) [virtual]
these restore data saved with StateOut's put members β and the data must be preallocated by the user. so don't come crying to StateIn if you forgot, bestie. π
Reimplemented in sc::StateInText.
π
virtual void sc::StateIn::get_header () [virtual]
reads in the header information, and changes the translation scheme if necessary. slay, adaptive behavior. π
π
virtual int sc::StateIn::getobject (Ref< SavableState > &) [protected], [virtual]
this is used to restore an object. it's 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. yes, reference-to-the-reference is real and it's invited. π
Reimplemented in sc::StateInText.
π
virtual void sc::StateIn::list_objects (std::ostream & = ExEnv::out0()) [virtual]
lists all the objects to the stream. only StateIn specializations with directories can list objects β so don't expect directory energy from the ones that don't have one. π
π
int sc::StateIn::node_to_node () const [inline]
true if this is a node to node save/restore. this is for classes that try to avoid saving databases to files that can otherwise be read in, but want to avoid reading the database from disk on all nodes. very "i have my reasons" of them. β¨
π
virtual void sc::StateIn::seek (int) [virtual]
sets the current position in the file. the default implementation does nothing. literally does not move. it's giving "i'm just here for the vibes." π
Reimplemented in sc::BcastStateInBin, and sc::StateInBin.
π
virtual int sc::StateIn::seekable () [virtual]
returns non-zero if seek does anything sensible. the default implementation returns 0. so yeah, default seek is not exactly main character energy. π
Reimplemented in sc::BcastStateInBin, and sc::StateInBin.
πΈ Author πΈ
generated automatically by Doxygen for MPQC from the source code. so no human wrote this bit, and honestly? it shows. ππ«Ά
version 2.3.1, dated Sun Oct 4 2020 β that's the footer, bestie, and we are done. go restore some SavableState objects and slay. π
ππ¦
π¦ 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