28 #ifndef _util_state_translate_h
29 #define _util_state_translate_h
32 #include <mpqc_config.h>
35 #if defined(WORDS_BIGENDIAN)
65 virtual void to_native (
unsigned int *,
int n);
69 virtual void to_native (
unsigned long *,
int n);
80 virtual void to_native (
char *target,
const void *source,
int n);
83 virtual void to_external(
void *target,
const char *source,
int n);
84 virtual void to_native (
short *,
const void *,
int n);
85 virtual void to_external(
void *,
const short *,
int n);
86 virtual void to_native (
unsigned int *,
const void *,
int n);
87 virtual void to_external(
void *,
const unsigned int *,
int n);
88 virtual void to_native (
int *,
const void *,
int n);
89 virtual void to_external(
void *,
const int *,
int n);
90 virtual void to_native (
unsigned long *,
const void *,
int n);
91 virtual void to_external(
void *,
const unsigned long *,
int n);
92 virtual void to_native (
long *,
const void *,
int n);
93 virtual void to_external(
void *,
const long *,
int n);
94 virtual void to_native (
float *,
const void *,
int n);
95 virtual void to_external(
void *,
const float *,
int n);
96 virtual void to_native (
double *,
const void *,
int n);
97 virtual void to_external(
void *,
const double *,
int n);
116 virtual void to_native (
unsigned int *,
int n);
120 virtual void to_native (
unsigned long *,
int n);
126 virtual void to_native (
double *,
int n);
130 virtual void to_native (
char *,
const void *,
int n);
132 virtual void to_external(
void *,
const char *,
int n);
133 virtual void to_native (
short *,
const void *,
int n);
134 virtual void to_external(
void *,
const short *,
int n);
135 virtual void to_native (
unsigned int *,
const void *,
int n);
136 virtual void to_external(
void *,
const unsigned int *,
int n);
137 virtual void to_native (
int *,
const void *,
int n);
138 virtual void to_external(
void *,
const int *,
int n);
139 virtual void to_native (
unsigned long *,
const void *,
int n);
140 virtual void to_external(
void *,
const unsigned long *,
int n);
141 virtual void to_native (
long *,
const void *,
int n);
142 virtual void to_external(
void *,
const long *,
int n);
143 virtual void to_native (
float *,
const void *,
int n);
144 virtual void to_external(
void *,
const float *,
int n);
145 virtual void to_native (
double *,
const void *,
int n);
146 virtual void to_external(
void *,
const double *,
int n);
167 enum { bufsize = 8192 };
170 int putv(
const void*d,
int s);
179 virtual int put(
const char*,
int);
180 virtual int put(
const short*,
int);
181 virtual int put(
const unsigned int*,
int);
182 virtual int put(
const int*,
int);
183 virtual int put(
const unsigned long*,
int);
184 virtual int put(
const long*,
int);
185 virtual int put(
const float*,
int);
186 virtual int put(
const double*,
int);
202 int getv(
void*d,
int s);
211 virtual int get(
char*,
int);
212 virtual int get(
short*,
int);
213 virtual int get(
unsigned int*,
int);
214 virtual int get(
int*,
int);
215 virtual int get(
unsigned long*,
int);
216 virtual int get(
long*,
int);
217 virtual int get(
float*,
int);
218 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.
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:197
TranslateData * translator()
Returns the translator.
Definition: translate.h:189
Convert data to other formats.
Definition: translate.h:162
Definition: stateout.h:71
Generic data translation.
Definition: translate.h:45
TranslateData * translator()
Return the translator.
Definition: translate.h:221
Data translation to an external representation with bytes swapped.
Definition: translate.h:102
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
Generated at Sun Jan 26 2020 23:24:02 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.