28 #ifndef _util_state_translate_h
29 #define _util_state_translate_h
35 #if defined(WORDS_BIGENDIAN)
65 virtual void to_native (
unsigned int *,
int n);
78 virtual void to_native (
char *target,
const void *source,
int n);
81 virtual void to_external(
void *target,
const char *source,
int n);
82 virtual void to_native (
short *,
const void *,
int n);
83 virtual void to_external(
void *,
const short *,
int n);
84 virtual void to_native (
unsigned int *,
const void *,
int n);
85 virtual void to_external(
void *,
const unsigned int *,
int n);
86 virtual void to_native (
int *,
const void *,
int n);
87 virtual void to_external(
void *,
const int *,
int n);
88 virtual void to_native (
long *,
const void *,
int n);
89 virtual void to_external(
void *,
const long *,
int n);
90 virtual void to_native (
float *,
const void *,
int n);
91 virtual void to_external(
void *,
const float *,
int n);
92 virtual void to_native (
double *,
const void *,
int n);
93 virtual void to_external(
void *,
const double *,
int n);
112 virtual void to_native (
unsigned int *,
int n);
120 virtual void to_native (
double *,
int n);
124 virtual void to_native (
char *,
const void *,
int n);
126 virtual void to_external(
void *,
const char *,
int n);
127 virtual void to_native (
short *,
const void *,
int n);
128 virtual void to_external(
void *,
const short *,
int n);
129 virtual void to_native (
unsigned int *,
const void *,
int n);
130 virtual void to_external(
void *,
const unsigned int *,
int n);
131 virtual void to_native (
int *,
const void *,
int n);
132 virtual void to_external(
void *,
const int *,
int n);
133 virtual void to_native (
long *,
const void *,
int n);
134 virtual void to_external(
void *,
const long *,
int n);
135 virtual void to_native (
float *,
const void *,
int n);
136 virtual void to_external(
void *,
const float *,
int n);
137 virtual void to_native (
double *,
const void *,
int n);
138 virtual void to_external(
void *,
const double *,
int n);
159 enum { bufsize = 8192 };
162 int putv(
const void*d,
int s);
171 virtual int put(
const char*,
int);
172 virtual int put(
const short*,
int);
173 virtual int put(
const unsigned int*,
int);
174 virtual int put(
const int*,
int);
175 virtual int put(
const long*,
int);
176 virtual int put(
const float*,
int);
177 virtual int put(
const double*,
int);
193 int getv(
void*d,
int s);
202 virtual int get(
char*,
int);
203 virtual int get(
short*,
int);
204 virtual int get(
unsigned int*,
int);
205 virtual int get(
int*,
int);
206 virtual int get(
long*,
int);
207 virtual int get(
float*,
int);
208 virtual int get(
double*,
int);
virtual void to_native(char *, int n)
Overridden translation routines exist for all the basic types.
virtual int get(char *, int)
Read and translate data.
virtual void to_native(char *, int n)
Translates to native format in-place.
virtual char format_code()
Returns a code for the type of format for the external data.
virtual void to_external(char *, int n)
Translates to external format in-place.
virtual char format_code()
Returns a code for the type of format for the external data.
virtual void to_external(char *, int n)
Overridden translation routines exist for all the basic types.
static TranslateData * vctor(char code)
A virtual constructor that choses a specialization based on the format code.
Restores objects that derive from SavableState.
Definition: statein.h:70
virtual int put(const char *, int)
Translate and write the data.
TranslateDataIn(StateIn *s, TranslateData *t)
Input data will come from s.
TranslateDataOut(StateOut *s, TranslateData *t)
Write to s using the translation defined by t.
Convert data from other formats.
Definition: translate.h:188
TranslateData * translator()
Returns the translator.
Definition: translate.h:180
Convert data to other formats.
Definition: translate.h:154
Serializes objects that derive from SavableState.
Definition: stateout.h:61
Generic data translation.
Definition: translate.h:45
TranslateData * translator()
Return the translator.
Definition: translate.h:211
Data translation to an external representation with bytes swapped.
Definition: translate.h:98
Generated at Sun Jan 26 2020 23:33:05 for MPQC
2.3.1 using the documentation package Doxygen
1.8.16.