casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
MemoryStMan.h
Go to the documentation of this file.
00001 //# MemoryStMan.h: Storage manager for tables using memory
00002 //# Copyright (C) 2003
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: MemoryStMan.h 20551 2009-03-25 00:11:33Z Malte.Marquarding $
00027 
00028 #ifndef TABLES_MEMORYSTMAN_H
00029 #define TABLES_MEMORYSTMAN_H
00030 
00031 
00032 //# Includes
00033 #include <casa/aips.h>
00034 #include <tables/Tables/MSMBase.h>
00035 
00036 
00037 namespace casa { //# NAMESPACE CASA - BEGIN
00038 
00039 // <summary>
00040 // Memory-based table storage manager class
00041 // </summary>
00042 
00043 // <use visibility=export>
00044 
00045 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="">
00046 // </reviewed>
00047 
00048 // <prerequisite>
00049 //# Classes you should understand before using this one.
00050 //   <li> <linkto class=DataManager>DataManager</linkto>
00051 //   <li> <linkto class=MSMColumn>MSMColumn</linkto>
00052 // </prerequisite>
00053 
00054 // <synopsis> 
00055 // MemoryStMan is a table storage manager based in memory.
00056 // It holds all data in the columns in memory and deletes them
00057 // when the table gets closed.
00058 // It contains pointers to the underlying MSMColumn objects,
00059 // which do the actual data handling.
00060 //
00061 // The Memory storage manager does fully support addition and removal
00062 // of rows and columns.
00063 //
00064 // The primary use of this storage manager is for a memory-based table,
00065 // but it can also be used for temporary columns in disk-based tables.
00066 // When reopening a disk-based table, possible columns stored with
00067 // MemoryStMan will be initialized to 0.
00068 // An important issue is synchronizing tables containing MemoryStMan
00069 // storage managers in case of concurrent access. Because its data are
00070 // not stored on disk, there is no way to synchronize the data if another
00071 // process changed data or added or deleted rows. If the number or rows
00072 // has changed, rows will be added or deleted as needed. Row deletion
00073 // will be done at the end of the table.
00074 // </synopsis> 
00075 
00076 //# <todo asof="$DATE:$">
00077 //# A List of bugs, limitations, extensions or planned refinements.
00078 //# </todo>
00079 
00080 
00081 class MemoryStMan: public MSMBase
00082 {
00083 public:
00084   // Create an Memory storage manager.
00085   // Its name will be blank.
00086   MemoryStMan();
00087 
00088   // Create an Memory storage manager with the given name.
00089   // Its name can be used later in e.g. Table::addColumn to
00090   // add a column to this storage manager.
00091   MemoryStMan (const String& storageManagerName);
00092 
00093   ~MemoryStMan();
00094 };
00095 
00096 
00097 
00098 } //# NAMESPACE CASA - END
00099 
00100 #endif