casacore
Loading...
Searching...
No Matches
DataManAccessor.h
Go to the documentation of this file.
1//# DataManAccessor.h: Base class for the Data Manager Accessor classes
2//# Copyright (C) 1996,1999
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 TABLES_DATAMANACCESSOR_H
27#define TABLES_DATAMANACCESSOR_H
28
29//# Includes
30#include <casacore/casa/aips.h>
31#include <casacore/tables/DataMan/DataManager.h>
32#include <iosfwd>
33
34namespace casacore { //# NAMESPACE CASACORE - BEGIN
35
36// <summary>
37// Base class for the Data Manager Accessor classes.
38// </summary>
39
40// <use visibility=local>
41
42// <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
43// </reviewed>
44
45// <prerequisite>
46//# Classes you should understand before using this one.
47// <li> <linkto class=DataManager>DataManager</linkto>
48// </prerequisite>
49
50// <synopsis>
51// The Table system has one or more data managers underneath.
52// Once a table is constructed, these data managers are invisible
53// and there is no way to get access to them.
54// However, sometimes limited access to them is needed (e.g. to
55// set the size of an internal cache).
56// <p>
57// This class should be used as the base class for specialized
58// Data Manager Accessor classes (e.g. class
59// <linkto class=ROIncrementalStManAccessor:description>
60// ROIncrementalStManAccessor</linkto>.
61// This base class provides the functionality to get the
62// <src>DataManager</src> object for a given column.
63// </synopsis>
64
65// <motivation>
66// This base class makes it possible that every derived class can get the
67// data manager, because RODataManAccessor is a friend of class Table.
68// Otherwise all accessor classes needed to be friend of Table.
69// </motivation>
70
71//# <todo asof="$DATE:$">
72//# </todo>
73
74
76{
77public:
78 // Construct an empty object.
82
83 // Construct the accessor object for a data manager in the table.
84 // An exception is thrown if the name of the data manager or column is
85 // unknown.
86 RODataManAccessor (const Table& table, const String& name,
87 Bool byColumn);
88
90
91 // Set data manager properties using the fields in the record.
92 // Each data manager has its specific set of properties.
93 void setProperties (const Record&) const;
94
95 // Get data manager properties as a record.
97
98 // Get the data manager type.
101
102 // Get the data manager name.
105
106 // Get the data manager sequence nr.
108 { return itsDataManager->sequenceNr(); }
109
110 // Show IO statistics.
111 void showCacheStatistics (ostream& os) const
113
114protected:
115 // Get the data manager for the given data manager or column name.
118
119private:
121};
122
123
124} //# NAMESPACE CASACORE - END
125
126#endif
Abstract base class for a data manager.
virtual String dataManagerType() const =0
Return the type name of the data manager (in fact its class name).
virtual void showCacheStatistics(std::ostream &) const
Show the data manager's IO statistics.
virtual String dataManagerName() const
Return the name of the data manager.
uInt sequenceNr() const
Get the (unique) sequence nr of this data manager.
void showCacheStatistics(ostream &os) const
Show IO statistics.
void setProperties(const Record &) const
Set data manager properties using the fields in the record.
RODataManAccessor(const Table &table, const String &name, Bool byColumn)
Construct the accessor object for a data manager in the table.
uInt dataManagerSeqNr() const
Get the data manager sequence nr.
String dataManagerType() const
Get the data manager type.
RODataManAccessor()
Construct an empty object.
Record getProperties() const
Get data manager properties as a record.
DataManager * baseDataManager() const
Get the data manager for the given data manager or column name.
String dataManagerName() const
Get the data manager name.
String: the storage and methods of handling collections of characters.
Definition String.h:223
this file contains all the compiler specific defines
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40