Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

array.h

00001 //
00002 // array.h
00003 //
00004 // Copyright (C) 1996 Limit Point Systems, Inc.
00005 //
00006 // Author: Curtis Janssen <cljanss@ca.sandia.gov>
00007 // Maintainer: LPS
00008 //
00009 // This file is part of the SC Toolkit.
00010 //
00011 // The SC Toolkit is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Library General Public License as published by
00013 // the Free Software Foundation; either version 2, or (at your option)
00014 // any later version.
00015 //
00016 // The SC Toolkit is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 // GNU Library General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Library General Public License
00022 // along with the SC Toolkit; see the file COPYING.LIB.  If not, write to
00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00024 //
00025 // The U.S. Government is granted a limited license as per AL 91-7.
00026 //
00027 
00028 #ifdef __GNUC__
00029 #pragma interface
00030 #endif
00031 
00032 #ifndef _util_container_array_h
00033 #define _util_container_array_h
00034 
00035 #include <iostream>
00036 #include <iomanip>
00037 #include <stdlib.h>
00038 
00039 #include <util/misc/exenv.h>
00040 
00041 // Simple array template and macro classes.
00042 #include <util/container/artem.h>
00043 #include <util/container/armac.h>
00044 #define ARRAY_dec(Type) Array_declare(Type)
00045 #define ARRAY_def(Type)
00046 
00047 // These are simple arrays that have StateIn CTORS and save_object_state,
00048 // but do not actually inherit from SavableState at this time.  They only
00049 // work if Type is a basic type like int, double, etc.
00050 // The SSB macros and templates cannot be used unless <util/state/state.h>
00051 // is included.  This cannot be done here since state.h grabs this file.
00052 namespace sc {
00053 class StateIn;
00054 class StateOut;
00055 }
00056 #include <util/container/ssartem.h>
00057 #include <util/container/ssarmac.h>
00058 #define SSB_ARRAY_dec(Type) SSBArray_declare(Type)
00059 #define SSB_ARRAY_def(Type)
00060 
00061 // Two dimensional versions of the above class.
00062 #include <util/container/ar2tem.h>
00063 #include <util/container/ar2mac.h>
00064 #define ARRAY2_dec(Type) Array2_declare(Type)
00065 #define ARRAY2_def(Type)
00066 
00067 #include <util/container/ssar2tem.h>
00068 #include <util/container/ssar2mac.h>
00069 #define SSB_ARRAY2_dec(Type) SSBArray2_declare(Type)
00070 #define SSB_ARRAY2_def(Type)
00071 
00072 // Declare arrays of the basic types.
00073 // The SSB versions cannot be declared because state.h cannot be included
00074 // yet.  Use the template versions instead.
00075 
00076 namespace sc {
00077 
00078 ARRAY_dec(int);
00079 ARRAY2_dec(int);
00080 
00081 ARRAY_dec(Arrayint);
00082 
00083 ARRAY_dec(double);
00084 ARRAY2_dec(double);
00085 
00086 ARRAY_dec(Arraydouble);
00087 
00088 }
00089 
00090 #endif

Generated at Fri Jan 10 08:14:08 2003 for MPQC 2.1.3 using the documentation package Doxygen 1.2.14.