casacore
Loading...
Searching...
No Matches
AipsIO.h
Go to the documentation of this file.
1// # AipsIO.h: AipsIO is the object persistency mechanism of Casacore
2// # Copyright (C) 1993,1994,1995,1996,1998,2000,2001
3// # Associated Universities, Inc. Washington DC, USA.
4// #
5// # This library is free software; you can redistribute it and/or modify it
6// # under the terms of the GNU Library General Public License as published by
7// # the Free Software Foundation; either version 2 of the License, or (at your
8// # option) any later version.
9// #
10// # This library is distributed in the hope that it will be useful, but WITHOUT
11// # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12// # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13// # License for more details.
14// #
15// # You should have received a copy of the GNU Library General Public License
16// # along with this library; if not, write to the Free Software Foundation,
17// # Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18// #
19// # Correspondence concerning AIPS++ should be addressed as follows:
20// # Internet email: casa-feedback@nrao.edu.
21// # Postal address: AIPS++ Project Office
22// # National Radio Astronomy Observatory
23// # 520 Edgemont Road
24// # Charlottesville, VA 22903-2475 USA
25
26#ifndef CASA_AIPSIO_H
27#define CASA_AIPSIO_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/casa/Containers/Block.h>
32#include <casacore/casa/BasicSL/String.h>
33#include <casacore/casa/BasicSL/Complex.h>
34#include <casacore/casa/IO/ByteIO.h>
35#include <casacore/casa/vector.h>
36
37namespace casacore { // # NAMESPACE CASACORE - BEGIN
38
39// # Forward Declarations
40class TypeIO;
41class ByteIO;
42class RegularFileIO;
43class MultiFileBase;
44
45// <summary>
46// AipsIO is the object persistency mechanism of Casacore
47// </summary>
48
49// <use visibility=export>
50
51// <reviewed reviewer="ghunt" date="95Feb21" tests="" demos="">
52
53// <etymology>
54// AipsIO is simply the conventional shorthand for "AIPS++ input/output".
55// Note that Casacore is the successor of the old AIPS++ project.
56// </etymology>
57
58// <synopsis>
59// AipsIO is a class designed to do I/O for objects.
60// It reads/writes the data using a class derived from
61// <linkto class=TypeIO>TypeIO</linkto>. For instance, class
62// <linkto class=CanonicalIO>CanonicalIO</linkto> can be used
63// to read/write the data in canonical format.
64// <p>
65// The TypeIO class in its turn uses a class derived from
66// <linkto class=ByteIO>ByteIO</linkto> to determine where the data
67// has to be written.
68// <p>
69// An object is written by writing all its data members. It will be
70// preceeded by a header containing type and version.
71// The I/O can be done via de overloaded << and >> operators to write or
72// read a single item (e.g., an int or an object). These operators are
73// already defined for all built-in data types and for Complex, DComplex,
74// String, and Bool.
75// Since each enumeration is a specific type, it is hard to handle them.
76// Casting to Bool (which is also an enumerated type) is a possibility,
77// but that assumes that each enumerated type has the same size (which
78// is probably true for all compilers).
79// Another possibility is to store it in an int when writing. Reading
80// can be done the opposite way, although the ARM says that an int
81// cannot be assigned to an enumerated type.
82// <p>
83// There are also functions put, get and getnew to write or read an
84// array of values. These functions are defined for the same data types
85// as << and >> (so one can write, for example, an array of Strings).
86// AipsIO.put (nr, arr) writes nr values from the given array.
87// AipsIO.get (nr, arr) reads nr values into the given user-supplied array.
88// AipsIO.getnew (&nr, &arr) reads the number of values written into
89// a new array allocated on the heap. It returns the nr of values read
90// and a pointer to the array.
91// The data must be read back in the same order as it was written.
92// <p>
93// The functions <src>putstart(type,version)</src>
94// and <src>putend()</src> must be called
95// before resp. after writing all values of the object.
96// It stores the given type and version of the object.
97// Similarly <src>getstart(type)</src> and <src>getend()</src> must be called.
98// getstart checks the type and returns the version. By using the version
99// the read function of the object can convert older versions of the
100// object (which may still reside on disk) to the latest version.
101// The function getNextType is available to get the type of the next
102// object stored. This can be used to check the type or to open (i.e.
103// issue a getstart) in the correct way.
104// <p>
105// When implementing a class, one should also define the operators << and >>
106// for the class to allow users to write or read an object in this
107// simple way (e.g., as io >> obj; to read an object).
108// One has to define the friend functions:
109// <srcblock>
110// friend AipsIO& operator<< (AipsIO&, const YourClass&);
111// friend AipsIO& operator>> (AipsIO&, YourClass&);
112// </srcblock>
113// since they cannot be stored in the class itself.
114// The type of an object is usually passed as the class name.
115// <srcblock>
116// AipsIO& operator<< (AipsIO& ios, const YourClass& object) {
117// ios.putstart ("YourClass", version);
118// ios << ....;
119// ios.putend ();
120// }
121// </srcblock>
122//
123// The functions getpos() and setpos(offset) can be used to get and set
124// the offset in the file to a given point. They can be used to point
125// to a position in the file where an object must be written or read.
126// Obviously these functions are to be used by a storage manager and
127// are not for public use. Someday they should be made private with
128// a friend defined.
129// </synopsis>
130
131// <example>
132// <srcblock>
133// MyClass myObject(...); // some object
134// AipsIO ios("file.name", ByteIO::New); // create new file
135// ios << myObject; // write object
136// MyClass myObject2;
137// ios >> myObject2; // read it back
138// </srcblock>
139// This example creates an object, writes it to AipsIO and reads it
140// back into another object.
141// The shift functions for MyClass could be defined as follows:
142// <srcblock>
143// AipsIO& operator<< (AipsIO& ios, const MyClass& myObject)
144// {
145// ios.putstart ("MyClass", 1); // MyClass version 1
146// ios << ...; // write all data members
147// ios.putend();
148// }
149// AipsIO& operator>> (AipsIO& ios, const MyClass& myObject)
150// {
151// // If needed, delete current data members first.
152// // Now read in the object.
153// uInt version = ios.getstart ("MyClass");
154// ios >> ...; // read all data members
155// ios.getend();
156// }
157// </srcblock>
158// In this example the version is not used. In more complex objects
159// it will probably be used when data members get added or changed
160// in future versions of a software system.
161// </example>
162
163class AipsIO {
164 public:
165 // No file attached yet
167
168 // Construct and open/create a file with the given name.
169 // The actual IO is done via a CanonicalIO object on a regular file
170 // using buffered IO with a buffer of the given size.
171 // <br>If the MultiFileBase pointer is not null, a virtual file in the
172 // MultiFileBase will be used instead of a regular file.
173 explicit AipsIO(const String& fileName, ByteIO::OpenOption = ByteIO::Old,
174 uInt filebufSize = 65536,
175 const std::shared_ptr<MultiFileBase>& = std::shared_ptr<MultiFileBase>());
176
177 // Construct from a stream object derived from ByteIO.
178 // This can for instance by used to use AipsIO on a file descriptor
179 // for which a <linkto class=FilebufIO>FilebufIO</linkto>
180 // object has been created.
181 // The actual IO is done via a CanonicalIO object on top of it.
182 explicit AipsIO(const std::shared_ptr<ByteIO>&);
183
184 // Construct from a stream object derived from TypeIO, thus from
185 // a stream on top of ByteIOn doing the possible conversions.
186 explicit AipsIO(const std::shared_ptr<TypeIO>&);
187
188 // Close if not done yet
190
191 // Copy constructor and assignment are not allowed.
192 AipsIO(const AipsIO&) = delete;
193 AipsIO& operator=(const AipsIO&) = delete;
194
195 // Open/create file (either a regular file or a MultiFileBase virtual file).
196 // An exception is thrown if the object contains an already open file.
197 void open(const String& fileName, ByteIO::OpenOption = ByteIO::Old, uInt filebufSize = 65536,
198 const std::shared_ptr<MultiFileBase>& = std::shared_ptr<MultiFileBase>());
199
200 // Open by connecting to the given byte stream.
201 // This can for instance by used to use AipsIO on a file descriptor
202 // for which a <linkto class=FilebufIO>FilebufIO</linkto>
203 // object has been created.
204 // The actual IO is done via a CanonicalIO object on top of it.
205 // An exception is thrown if the object contains an already open file.
206 void open(const std::shared_ptr<ByteIO>&);
207
208 // Open by connecting to the given typed byte stream.
209 // An exception is thrown if the object contains an already open file.
210 void open(const std::shared_ptr<TypeIO>&);
211
212 // Close file opened
213 void close();
214
215 // Return the file option.
217
218 // Start putting an object.
219 // This writes the object type and version. When reading back getstart
220 // calls have to be done in the same way. Getstart
221 // checks the type and returns the version. The user can use that to
222 // correctly read back objects with different versions.
223 // <br>
224 // Data in the outermost object cannot be put before a putstart is done.
225 // Data in nested objects can be put without an intermediate putstart.
226 // However, for complex objects it is recommended to do a putstart
227 // to have a better checking.
228 // <br>
229 // After all values (inclusing nested objects) of the object have
230 // been put, a call to putend has to be done.
231 // <group>
232 uInt putstart(const String& objectType, uInt objectVersion);
233 uInt putstart(const Char* objectType, uInt objectVersion);
234 // </group>
235
236 // Put a single value.
237 // <group>
241 AipsIO& operator<<(const short& value);
242 AipsIO& operator<<(const unsigned short& value);
243 AipsIO& operator<<(const int& value);
244 AipsIO& operator<<(const unsigned int& value);
247 AipsIO& operator<<(const float& value);
248 AipsIO& operator<<(const double& value);
249 AipsIO& operator<<(const Complex& value);
250 AipsIO& operator<<(const DComplex& value);
253 // </group>
254
255 // Put an array of values with the given number of values.
256 // If the flag putNr is set, the number of values is put first.
257 // <group>
258 AipsIO& put(uInt nrval, const Bool* values, Bool putNR = True);
259 AipsIO& put(uInt nrval, const Char* values, Bool putNR = True);
260 AipsIO& put(uInt nrval, const uChar* values, Bool putNR = True);
261 AipsIO& put(uInt nrval, const short* values, Bool putNR = True);
262 AipsIO& put(uInt nrval, const unsigned short* values, Bool putNR = True);
263 AipsIO& put(uInt nrval, const int* values, Bool putNR = True);
264 AipsIO& put(uInt nrval, const unsigned int* values, Bool putNR = True);
265 AipsIO& put(uInt nrval, const Int64* values, Bool putNR = True);
266 AipsIO& put(uInt nrval, const uInt64* values, Bool putNR = True);
267 AipsIO& put(uInt nrval, const float* values, Bool putNR = True);
268 AipsIO& put(uInt nrval, const double* values, Bool putNR = True);
269 AipsIO& put(uInt nrval, const Complex* values, Bool putNR = True);
270 AipsIO& put(uInt nrval, const DComplex* values, Bool putNR = True);
271 AipsIO& put(uInt nrval, const String* values, Bool putNR = True);
272 // </group>
273
274 // Put a vector as an array of values
275 // For standard types it has the same result as put with putNR=True.
276 template <typename T>
277 AipsIO& put(const vector<T>& vec) {
278 *this << uInt(vec.size());
279 for (typename vector<T>::const_iterator iter = vec.begin(); iter != vec.end(); ++iter) {
280 *this << *iter;
281 }
282 return *this;
283 }
284 // # Possibly specialize for standard types to make it faster.
285 // # Specialize for a bool vector.
286 AipsIO& put(const vector<Bool>& vec);
287
288 // End putting an object. It returns the object length (including
289 // possible nested objects).
291
292 // Get and set file-offset.
293 // <group>
296 // </group>
297
298 // Get the type of the next object stored.
299 // This is not possible if a put is in progress.
301
302 // Start reading an object. It will check if the given type matches
303 // the one stored by putstart. It returns the object version which
304 // can be used to read in older version of the object correctly.
305 // <br>
306 // After all values (inclusing nested objects) of the object have
307 // been read, a call to getend has to be done.
308 // <group>
309 uInt getstart(const String& objectType);
310 uInt getstart(const Char* objectType);
311 // </group>
312
313 // Get a single value.
314 // <group>
319 AipsIO& operator>>(unsigned short& value);
321 AipsIO& operator>>(unsigned int& value);
329 // </group>
330
331 // Read in nrval values into the user-supplied values buffer.
332 // The buffer must be long enough.
333 // <group>
334 AipsIO& get(uInt nrval, Bool* values);
335 AipsIO& get(uInt nrval, Char* values);
336 AipsIO& get(uInt nrval, uChar* values);
337 AipsIO& get(uInt nrval, short* values);
338 AipsIO& get(uInt nrval, unsigned short* values);
339 AipsIO& get(uInt nrval, int* values);
340 AipsIO& get(uInt nrval, unsigned int* values);
341 AipsIO& get(uInt nrval, Int64* values);
342 AipsIO& get(uInt nrval, uInt64* values);
343 AipsIO& get(uInt nrval, float* values);
344 AipsIO& get(uInt nrval, double* values);
345 AipsIO& get(uInt nrval, Complex* values);
346 AipsIO& get(uInt nrval, DComplex* values);
347 AipsIO& get(uInt nrval, String* values);
348 // </group>
349
350 // Get a vector as an array of values (similar to getnew).
351 // It resizes the vector as needed.
352 template <typename T>
353 AipsIO& get(vector<T>& vec) {
354 uInt sz;
355 *this >> sz;
356 vec.resize(sz);
357 for (typename vector<T>::iterator iter = vec.begin(); iter != vec.end(); ++iter) {
358 *this >> *iter;
359 }
360 return *this;
361 }
362 // # Specialize for a bool vector.
363 AipsIO& get(vector<Bool>& vec);
364
365 // Read in values as written by the function put.
366 // It will read the number of values (into nrval), allocate a
367 // values buffer of that length and read the values into that buffer.
368 // A pointer to the buffer is returned into values.
369 // <warn=caution> Although the buffer is allocated by this function,
370 // the user has to delete it (using <src>delete [] values;</src>).
371 // <group>
372 AipsIO& getnew(uInt& nrval, Bool*& values);
373 AipsIO& getnew(uInt& nrval, Char*& values);
374 AipsIO& getnew(uInt& nrval, uChar*& values);
375 AipsIO& getnew(uInt& nrval, short*& values);
376 AipsIO& getnew(uInt& nrval, unsigned short*& values);
377 AipsIO& getnew(uInt& nrval, int*& values);
378 AipsIO& getnew(uInt& nrval, unsigned int*& values);
379 AipsIO& getnew(uInt& nrval, Int64*& values);
380 AipsIO& getnew(uInt& nrval, uInt64*& values);
381 AipsIO& getnew(uInt& nrval, float*& values);
382 AipsIO& getnew(uInt& nrval, double*& values);
383 AipsIO& getnew(uInt& nrval, Complex*& values);
384 AipsIO& getnew(uInt& nrval, DComplex*& values);
385 AipsIO& getnew(uInt& nrval, String*& values);
386 // </group>
387
388 // End reading an object. It returns the object length (including
389 // possible nested objects).
390 // It checks if the entire object has been read (to keep the data
391 // stream in sync). If not, an exception is thrown.
393
394 private:
395 // Initialize everything for the open.
396 // It checks if there is no outstanding open file.
398
399 // Test if put is possible (throw exception if not).
400 void testput();
401
402 // Test if get is possible (throw exception if not).
403 void testget();
404
405 // Test if get did not exceed object.
406 void testgetLength();
407
408 // Throw exception for testput
410
411 // Throw exception for testget
413
414 // Throw exception for testgetLength
416
417 // 1 = file was opened by AipsIO
418 // 0 = file not opened
419 // -1 = file opened by user (=fd passed)
421 // File open option
423 // <0 = not opened for put
424 // 0 = no putstart done
425 // >0 = put is possible
427 // <0 = not opened for get
428 // 0 = no getstart done
429 // >0 = get is possible
431 // Nested object level
433 // Current size of objlen and objptr
435 // Object length at each level
437 // Object length to be read at each level
439 // Offset of length at each level
441 // True = the object type has already been read
443 // The cached object type.
445 // The file object.
446 std::shared_ptr<ByteIO> file_p;
447 // The actual IO object.
448 std::shared_ptr<TypeIO> io_p;
449 // Is the file is seekable?
451 // magic value to check sync.
452 static const uInt magicval_p;
453};
454
455// Return the file option.
457
458// testput tests if a put can be done; ie. if putstart has been done.
459// It throws an exception if not.
460// testget is similar to test if a get can be done.
461inline void AipsIO::testput() {
462 if (swput_p <= 0) {
463 testputerr();
464 }
465}
466inline void AipsIO::testget() {
467 if (swget_p <= 0) {
468 testgeterr();
469 }
470}
474 }
475}
476
477} // namespace casacore
478
479#endif
AipsIO & operator<<(const double &value)
AipsIO & put(uInt nrval, const unsigned int *values, Bool putNR=True)
AipsIO & get(uInt nrval, uInt64 *values)
uInt getstart(const Char *objectType)
AipsIO & get(uInt nrval, Int64 *values)
AipsIO & put(uInt nrval, const Char *values, Bool putNR=True)
uInt getstart(const String &objectType)
Start reading an object.
ByteIO::OpenOption fileOption() const
Return the file option.
Definition AipsIO.h:456
void testput()
Test if put is possible (throw exception if not).
Definition AipsIO.h:461
std::shared_ptr< ByteIO > file_p
The file object.
Definition AipsIO.h:446
AipsIO & getnew(uInt &nrval, uInt64 *&values)
AipsIO()
No file attached yet.
AipsIO(const std::shared_ptr< ByteIO > &)
Construct from a stream object derived from ByteIO.
AipsIO & put(uInt nrval, const DComplex *values, Bool putNR=True)
AipsIO & getnew(uInt &nrval, Complex *&values)
AipsIO & get(uInt nrval, unsigned int *values)
uInt level_p
Nested object level.
Definition AipsIO.h:432
AipsIO & get(uInt nrval, unsigned short *values)
String objectType_p
The cached object type.
Definition AipsIO.h:444
ByteIO::OpenOption fopt_p
File open option.
Definition AipsIO.h:422
AipsIO(const String &fileName, ByteIO::OpenOption=ByteIO::Old, uInt filebufSize=65536, const std::shared_ptr< MultiFileBase > &=std::shared_ptr< MultiFileBase >())
Construct and open/create a file with the given name.
AipsIO & put(uInt nrval, const unsigned short *values, Bool putNR=True)
void testgetLength()
Test if get did not exceed object.
Definition AipsIO.h:471
AipsIO & operator>>(double &value)
AipsIO & operator>>(uInt64 &value)
Int64 getpos()
Get and set file-offset.
Bool hasCachedType_p
True = the object type has already been read.
Definition AipsIO.h:442
int swget_p
<0 = not opened for get 0 = no getstart done >0 = get is possible
Definition AipsIO.h:430
AipsIO & operator>>(float &value)
AipsIO & get(uInt nrval, float *values)
uInt putend()
End putting an object.
AipsIO & operator>>(DComplex &value)
AipsIO & put(uInt nrval, const String *values, Bool putNR=True)
Bool seekable_p
Is the file is seekable?
Definition AipsIO.h:450
AipsIO & operator>>(Char &value)
AipsIO & getnew(uInt &nrval, Char *&values)
AipsIO & getnew(uInt &nrval, uChar *&values)
AipsIO & operator<<(const Char *value)
AipsIO & get(uInt nrval, Complex *values)
AipsIO & get(uInt nrval, double *values)
void testputerr()
Throw exception for testput.
AipsIO & getnew(uInt &nrval, short *&values)
AipsIO & put(const vector< Bool > &vec)
AipsIO & operator=(const AipsIO &)=delete
AipsIO & operator>>(Int64 &value)
AipsIO & put(uInt nrval, const Int64 *values, Bool putNR=True)
Int opened_p
1 = file was opened by AipsIO 0 = file not opened -1 = file opened by user (=fd passed)
Definition AipsIO.h:420
AipsIO & operator>>(uChar &value)
void open(const std::shared_ptr< ByteIO > &)
Open by connecting to the given byte stream.
AipsIO & getnew(uInt &nrval, DComplex *&values)
uInt maxlev_p
Current size of objlen and objptr.
Definition AipsIO.h:434
AipsIO & operator<<(const Complex &value)
AipsIO & operator<<(const Bool &value)
Put a single value.
AipsIO & put(uInt nrval, const uInt64 *values, Bool putNR=True)
AipsIO & get(uInt nrval, String *values)
AipsIO & put(uInt nrval, const Complex *values, Bool putNR=True)
std::shared_ptr< TypeIO > io_p
The actual IO object.
Definition AipsIO.h:448
AipsIO & getnew(uInt &nrval, unsigned short *&values)
const String & getNextType()
Get the type of the next object stored.
uInt putstart(const Char *objectType, uInt objectVersion)
AipsIO & operator>>(unsigned short &value)
AipsIO & operator<<(const unsigned int &value)
AipsIO & getnew(uInt &nrval, String *&values)
void testgeterrLength()
Throw exception for testgetLength.
AipsIO & operator>>(String &value)
AipsIO & get(vector< T > &vec)
Get a vector as an array of values (similar to getnew).
Definition AipsIO.h:353
void open(const String &fileName, ByteIO::OpenOption=ByteIO::Old, uInt filebufSize=65536, const std::shared_ptr< MultiFileBase > &=std::shared_ptr< MultiFileBase >())
Open/create file (either a regular file or a MultiFileBase virtual file).
AipsIO & operator<<(const uChar &value)
Int64 setpos(Int64 offset)
AipsIO & operator>>(Bool &value)
Get a single value.
AipsIO & operator>>(unsigned int &value)
AipsIO & get(uInt nrval, int *values)
AipsIO & get(uInt nrval, DComplex *values)
uInt putstart(const String &objectType, uInt objectVersion)
Start putting an object.
AipsIO & operator>>(Complex &value)
AipsIO & getnew(uInt &nrval, unsigned int *&values)
AipsIO & getnew(uInt &nrval, int *&values)
AipsIO & get(uInt nrval, Char *values)
AipsIO & getnew(uInt &nrval, Bool *&values)
Read in values as written by the function put.
AipsIO & get(uInt nrval, Bool *values)
Read in nrval values into the user-supplied values buffer.
AipsIO(const std::shared_ptr< TypeIO > &)
Construct from a stream object derived from TypeIO, thus from a stream on top of ByteIOn doing the po...
~AipsIO()
Close if not done yet.
AipsIO & getnew(uInt &nrval, double *&values)
AipsIO & get(vector< Bool > &vec)
Block< uInt > objlen_p
Object length at each level.
Definition AipsIO.h:436
Block< uInt > objtln_p
Object length to be read at each level.
Definition AipsIO.h:438
AipsIO & operator>>(int &value)
AipsIO & put(uInt nrval, const int *values, Bool putNR=True)
AipsIO & put(uInt nrval, const double *values, Bool putNR=True)
AipsIO & operator<<(const Char &value)
AipsIO & operator<<(const int &value)
AipsIO & operator<<(const String &value)
AipsIO & put(uInt nrval, const float *values, Bool putNR=True)
AipsIO & put(uInt nrval, const short *values, Bool putNR=True)
void testgeterr()
Throw exception for testget.
AipsIO & operator<<(const Int64 &value)
AipsIO & operator<<(const uInt64 &value)
AipsIO & get(uInt nrval, uChar *values)
AipsIO & operator>>(short &value)
void testget()
Test if get is possible (throw exception if not).
Definition AipsIO.h:466
int swput_p
<0 = not opened for put 0 = no putstart done >0 = put is possible
Definition AipsIO.h:426
AipsIO & put(uInt nrval, const Bool *values, Bool putNR=True)
Put an array of values with the given number of values.
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.
Definition AipsIO.h:277
AipsIO & getnew(uInt &nrval, float *&values)
AipsIO(const AipsIO &)=delete
Copy constructor and assignment are not allowed.
AipsIO & operator<<(const DComplex &value)
AipsIO & operator<<(const unsigned short &value)
uInt getend()
End reading an object.
AipsIO & getnew(uInt &nrval, Int64 *&values)
AipsIO & get(uInt nrval, short *values)
AipsIO & put(uInt nrval, const uChar *values, Bool putNR=True)
AipsIO & operator<<(const short &value)
void openInit(ByteIO::OpenOption)
Initialize everything for the open.
static const uInt magicval_p
magic value to check sync.
Definition AipsIO.h:452
void open(const std::shared_ptr< TypeIO > &)
Open by connecting to the given typed byte stream.
Block< Int64 > objptr_p
Offset of length at each level.
Definition AipsIO.h:440
void close()
Close file opened.
AipsIO & operator<<(const float &value)
OpenOption
Define the possible ByteIO open options.
Definition ByteIO.h:60
Abstract base class to combine multiple logical files in a single one.
String: the storage and methods of handling collections of characters.
Definition String.h:355
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
unsigned char uChar
Definition aipstype.h:45
int offset(int, int) const
compute a linear offset from array indicies
unsigned int uInt
Definition aipstype.h:49
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size).
Definition aipsxtype.h:36
int Int
Definition aipstype.h:48
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40
const Bool True
Definition aipstype.h:41
NewDelAllocator< T > NewDelAllocator< T >::value
Definition Allocator.h:360
char Char
Definition aipstype.h:44
unsigned long long uInt64
Definition aipsxtype.h:37