28 #ifndef _util_state_stateout_h
29 #define _util_state_stateout_h
39 #include <util/class/class.h>
40 #include <util/state/state.h>
73 int next_object_number_;
75 std::map<ClassDescP,int> classidmap_;
78 virtual int put_array_void(
const void*,
int);
85 void have_classdesc() { have_cd_ = 1; }
86 int need_classdesc() {
int tmp = have_cd_; have_cd_ = 0;
return !tmp; }
108 virtual int put(
const std::string &);
111 virtual int put(
char r);
112 virtual int put(
unsigned int r);
113 virtual int put(
int r);
114 virtual int put(
bool r);
115 virtual int put(
unsigned long r);
116 virtual int put(
float r);
117 virtual int put(
double r);
120 virtual int put(
const char*,
int);
121 virtual int put(
const unsigned int*,
int);
122 virtual int put(
const int*,
int);
123 virtual int put(
const float*,
int);
124 virtual int put(
const double*,
int);
128 virtual int put_array_uint(
const unsigned int*p,
int size);
129 virtual int put_array_int(
const int*p,
int size);
130 virtual int put_array_float(
const float*p,
int size);
131 virtual int put_array_double(
const double*p,
int size);
135 int put(
typename std::vector<T> &v) {
138 if (l) {
for (
int i=0; i<l; i++) r +=
put(v[i]); }
156 virtual void flush();
169 virtual void seek(
int loc);
void copy_references()
If a reference to an object that has already been written is encountered, copy it instead of generati...
virtual int use_directory()
Returns true if this object uses a directory.
Definition: stateout.h:44
A template class that maintains references counts.
Definition: ref.h:332
virtual int seekable()
Return non-zero if tell and seek do anything sensible.
virtual int putobject(const Ref< SavableState > &)
This will prepare StateOut to output a pointer to data.
int put(typename std::vector< T > &v)
Write an STL vector of data.
Definition: stateout.h:135
virtual int tell()
Returns the current position in the file.
virtual void flush()
Flush out any remaining data.
This class is used to contain information about classes.
Definition: class.h:158
virtual void seek(int loc)
Set the current position in the file.
Convert data to other formats.
Definition: translate.h:154
Serializes objects that derive from SavableState.
Definition: stateout.h:61
Classes which need runtime information about themselves and their relationship to other classes can v...
Definition: class.h:244
void forget_references()
Don't keep track of pointers to objects.
virtual int put_array_char(const char *p, int size)
Put arrays of data.
virtual int put(const ClassDesc *)
Write out information about the given ClassDesc.
virtual void put_header()
Write out header information.
Base class for objects that can save/restore state.
Definition: state.h:46
virtual int putstring(const char *)
This is like put except the length of the char array is determined by interpreting the character arra...
int node_to_node() const
True if this is a node to node save/restore.
Definition: stateout.h:162
Generated at Sun Jan 26 2020 23:33:05 for MPQC
2.3.1 using the documentation package Doxygen
1.8.16.