34#include <data/aslDataWrapper.h>
49 class ABDFileIn:
public std::ifstream{
68 template <typename T> inline ABDFileIn & operator >>(ABDFileIn & f,T & a);
145 ifstream(name,ios::
in | ios::
binary)
154 inline ABDFileOut &
operator <<(ABDFileOut & f,
const int a)
156 f.write((
char*)&
a,
sizeof(
int));
162 f.read((
char*)&
a,
sizeof(
int));
166 inline ABDFileOut &
operator <<(ABDFileOut & f,
const unsigned int a)
168 f.write((
char*)&
a,
sizeof(
unsigned int));
172 inline ABDFileIn &
operator >>(ABDFileIn & f,
unsigned int &
a)
174 f.read((
char*)&
a,
sizeof(
unsigned int));
178 inline ABDFileOut &
operator <<(ABDFileOut & f,
const float a)
180 f.write((
char*)&
a,
sizeof(
float));
186 f.read((
char*)&
a,
sizeof(
float));
190 inline ABDFileOut &
operator <<(ABDFileOut & f,
const double a)
192 f.write((
char*)&
a,
sizeof(
double));
196 inline ABDFileIn &
operator >>(ABDFileIn & f,
double &
a)
198 f.read((
char*)&
a,
sizeof(
double));
205 f.write((
char*)
a.first,
sizeof(T)*
a.second);
210 f.read((
char*)
a.first,
sizeof(T)*
a.second);
214 inline ABDFileOut &
operator <<(ABDFileOut & f,
const string &
a){
215 unsigned int n=
a.size();
220 inline ABDFileIn &
operator >>(ABDFileIn & f,
string &
a){
229 unsigned int n(
a.getSize());
ABD (ASL Binary Dump) file, input.
ABDFileIn & get(ABDFileIn &f, AbstractData &a, std::shared_ptr< double > d)
reads data. It is assumed that the class has the propper size
ABD (ASL Binary Dump) file, output.
SPDataWrapperACLData generateDataContainerACL_SP(const Block &b, unsigned int n=1)
generates pointer to ACL Data field with n components
Advanced Simulation Library.
bool in(const T &xx, const T &x1, const T &x2)
Checks the belonging to a closed interval [x1,x2], .
std::ostream & operator<<(std::ostream &output, const std::vector< T > &vector)
Prints elements of the vector separated by space.
ABDFileIn & operator>>(ABDFileIn &f, int &a)