33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/Containers/Block.h>
35 #include <casacore/casa/BasicSL/String.h>
36 #include <casacore/casa/BasicSL/Complex.h>
37 #include <casacore/casa/IO/ByteIO.h>
38 #include <casacore/casa/vector.h>
181 uInt filebufSize=65536,
282 { *
this <<
uInt(vec.size());
283 for (
typename vector<T>::const_iterator iter=vec.begin();
284 iter!=vec.end(); ++iter) {
363 for (
typename vector<T>::iterator iter=vec.begin();
364 iter!=vec.end(); ++iter) {
AipsIO(const String &fileName, ByteIO::OpenOption=ByteIO::Old, uInt filebufSize=65536,/uInt filebufSize=1048576, */MultiFileBase *mfile=0)
Construct and open/create a file with the given name.
AipsIO & put(uInt nrval, const Char *values, Bool putNR=True)
uInt getstart(const Char *objectType)
AipsIO & getnew(uInt &nrval, Bool *&values)
Read in values as written by the function put.
uInt getstart(const String &objectType)
Start reading an object.
AipsIO & get(uInt nrval, uInt64 *values)
ByteIO::OpenOption fileOption() const
Return the file option.
AipsIO & put(uInt nrval, const uInt64 *values, Bool putNR=True)
AipsIO & put(uInt nrval, const int *values, Bool putNR=True)
void testput()
Test if put is possible (throw exception if not).
AipsIO()
No file attached yet.
AipsIO(TypeIO *)
Construct from a stream object derived from TypeIO, thus from a stream on top of ByteIOn doing the po...
uInt level_p
Nested object level.
AipsIO & getnew(uInt &nrval, Char *&values)
String objectType_p
The cached object type.
void open(TypeIO *)
Open by connecting to the given typed byte stream.
ByteIO::OpenOption fopt_p
File open option.
AipsIO & put(const vector< T > &vec)
Put a vector as an array of values For standard types it has the same result as put with putNR=True.
void testgetLength()
Test if get did not exceed object.
AipsIO & getnew(uInt &nrval, short *&values)
Int64 getpos()
Get and set file-offset.
Bool hasCachedType_p
True = the object type has already been read.
AipsIO & put(uInt nrval, const Int64 *values, Bool putNR=True)
int swget_p
<0 = not opened for get 0 = no getstart done >0 = get is possible
uInt putend()
End putting an object.
AipsIO & getnew(uInt &nrval, DComplex *&values)
AipsIO & put(uInt nrval, const unsigned short *values, Bool putNR=True)
Bool seekable_p
Is the file is seekable?
AipsIO & get(uInt nrval, unsigned int *values)
AipsIO & get(uInt nrval, double *values)
AipsIO & get(vector< T > &vec)
Get a vector as an array of values (similar to getnew).
AipsIO & getnew(uInt &nrval, unsigned short *&values)
AipsIO & get(uInt nrval, uChar *values)
void testputerr()
Throw exception for testput.
Int opened_p
1 = file was opened by AipsIO 0 = file not opened -1 = file opened by user (=fd passed)
AipsIO & get(uInt nrval, float *values)
AipsIO & put(uInt nrval, const String *values, Bool putNR=True)
uInt maxlev_p
Current size of objlen and objptr.
const String & getNextType()
Get the type of the next object stored.
AipsIO & put(uInt nrval, const uChar *values, Bool putNR=True)
AipsIO & getnew(uInt &nrval, float *&values)
AipsIO & getnew(uInt &nrval, int *&values)
uInt putstart(const Char *objectType, uInt objectVersion)
TypeIO * io_p
The actual IO object.
AipsIO & getnew(uInt &nrval, Int64 *&values)
AipsIO & get(uInt nrval, int *values)
void testgeterrLength()
Throw exception for testgetLength.
ByteIO * file_p
The file object.
AipsIO & getnew(uInt &nrval, uChar *&values)
AipsIO & operator>>(Bool &value)
Get a single value.
Int64 setpos(Int64 offset)
AipsIO & put(uInt nrval, const DComplex *values, Bool putNR=True)
void open(const String &fileName, ByteIO::OpenOption=ByteIO::Old, uInt filebufSize=65536, MultiFileBase *mfile=0)
Open/create file (either a regular file or a MultiFileBase virtual file).
uInt putstart(const String &objectType, uInt objectVersion)
Start putting an object.
AipsIO & getnew(uInt &nrval, unsigned int *&values)
AipsIO & put(uInt nrval, const Complex *values, Bool putNR=True)
~AipsIO()
Close if not done yet.
Block< uInt > objlen_p
Object length at each level.
Block< uInt > objtln_p
Object length to be read at each level.
AipsIO & getnew(uInt &nrval, double *&values)
AipsIO & put(const vector< Bool > &vec)
AipsIO & get(uInt nrval, String *values)
AipsIO & getnew(uInt &nrval, Complex *&values)
AipsIO & put(uInt nrval, const double *values, Bool putNR=True)
AipsIO & get(uInt nrval, short *values)
AipsIO & get(uInt nrval, Int64 *values)
AipsIO & put(uInt nrval, const float *values, Bool putNR=True)
void testgeterr()
Throw exception for testget.
AipsIO & get(uInt nrval, DComplex *values)
void testget()
Test if get is possible (throw exception if not).
int swput_p
<0 = not opened for put 0 = no putstart done >0 = put is possible
AipsIO & getnew(uInt &nrval, uInt64 *&values)
AipsIO & get(uInt nrval, Char *values)
AipsIO & get(uInt nrval, unsigned short *values)
AipsIO(ByteIO *)
Construct from a stream object derived from ByteIO.
uInt getend()
End reading an object.
AipsIO & put(uInt nrval, const short *values, Bool putNR=True)
void open(ByteIO *)
Open by connecting to the given byte stream.
AipsIO & getnew(uInt &nrval, String *&values)
AipsIO & get(uInt nrval, Complex *values)
AipsIO & put(uInt nrval, const unsigned int *values, Bool putNR=True)
void openInit(ByteIO::OpenOption)
Initialize everything for the open.
AipsIO & get(uInt nrval, Bool *values)
Read in nrval values into the user-supplied values buffer.
AipsIO & get(vector< Bool > &vec)
static const uInt magicval_p
magic value to check sync.
AipsIO & put(uInt nrval, const Bool *values, Bool putNR=True)
Put an array of values with the given number of values.
Block< Int64 > objptr_p
Offset of length at each level.
void close()
Close file opened.
AipsIO & operator<<(const Bool &value)
Put a single value.
OpenOption
Define the possible ByteIO open options.
Abstract base class to combine multiple files in a single one.
String: the storage and methods of handling collections of characters.
std::complex< Float > Complex
std::complex< Double > DComplex
this file contains all the compiler specific defines
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
bool Bool
Define the standard types used by Casacore.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
unsigned long long uInt64