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 class StateIn; 00053 class StateOut; 00054 #include <util/container/ssartem.h> 00055 #include <util/container/ssarmac.h> 00056 #define SSB_ARRAY_dec(Type) SSBArray_declare(Type) 00057 #define SSB_ARRAY_def(Type) 00058 00059 // Two dimensional versions of the above class. 00060 #include <util/container/ar2tem.h> 00061 #include <util/container/ar2mac.h> 00062 #define ARRAY2_dec(Type) Array2_declare(Type) 00063 #define ARRAY2_def(Type) 00064 00065 #include <util/container/ssar2tem.h> 00066 #include <util/container/ssar2mac.h> 00067 #define SSB_ARRAY2_dec(Type) SSBArray2_declare(Type) 00068 #define SSB_ARRAY2_def(Type) 00069 00070 // Declare arrays of the basic types. 00071 // The SSB versions cannot be declared because state.h cannot be included 00072 // yet. Use the template versions instead. 00073 00074 ARRAY_dec(int); 00075 ARRAY2_dec(int); 00076 00077 ARRAY_dec(Arrayint); 00078 00079 ARRAY_dec(double); 00080 ARRAY2_dec(double); 00081 00082 ARRAY_dec(Arraydouble); 00083 00084 #endif