Go to the documentation of this file.
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 & getnew(uInt &nrval, Bool *&values)
Read in values as written by the function put.
void testgeterrLength()
Throw exception for testgetLength.
AipsIO is the object persistency mechanism of Casacore
OpenOption
Define the possible ByteIO open options.
void testputerr()
Throw exception for testput.
ByteIO::OpenOption fileOption() const
Return the file option.
uInt getstart(const String &objectType)
Start reading an object.
std::complex< Double > DComplex
Block< uInt > objlen_p
Object length at each level.
Int64 setpos(Int64 offset)
void testgeterr()
Throw exception for testget.
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.
Int64 getpos()
Get and set file-offset.
Bool seekable_p
Is the file is seekable?
Int opened_p
1 = file was opened by AipsIO 0 = file not opened -1 = file opened by user (=fd passed)
AipsIO & operator<<(const Bool &value)
Put a single value.
uInt maxlev_p
Current size of objlen and objptr.
ByteIO::OpenOption fopt_p
File open option.
int swget_p
<0 = not opened for get 0 = no getstart done >0 = get is possible
void testgetLength()
Test if get did not exceed object.
Block< uInt > objtln_p
Object length to be read at each level.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
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 close()
Close file opened.
Abstract base class to combine multiple files in a single one.
Block< Int64 > objptr_p
Offset of length at each level.
void testput()
Test if put is possible (throw exception if not).
uInt level_p
Nested object level.
int swput_p
<0 = not opened for put 0 = no putstart done >0 = put is possible
AipsIO()
No file attached yet.
this file contains all the compiler specific defines
Abstract base class for IO of data in a type-dependent format.
ByteIO * file_p
The file object.
AipsIO & get(uInt nrval, Bool *values)
Read in nrval values into the user-supplied values buffer.
TypeIO * io_p
The actual IO object.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
static const uInt magicval_p
magic value to check sync.
Bool hasCachedType_p
True = the object type has already been read.
void openInit(ByteIO::OpenOption)
Initialize everything for the open.
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
std::complex< Float > Complex
AipsIO & put(uInt nrval, const Bool *values, Bool putNR=True)
Put an array of values with the given number of values.
uInt putend()
End putting an object.
Abstract base class for IO on a byte stream.
~AipsIO()
Close if not done yet.
AipsIO & get(vector< T > &vec)
Get a vector as an array of values (similar to getnew).
String objectType_p
The cached object type.
AipsIO & operator>>(Bool &value)
Get a single value.
void testget()
Test if get is possible (throw exception if not).
uInt getend()
End reading an object.
const String & getNextType()
Get the type of the next object stored.
unsigned long long uInt64