|
STK++ 1.0
|
00001 /*--------------------------------------------------------------------*/ 00002 /* Copyright (C) 2004 Serge Iovleff 00003 00004 This program is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU Lesser General Public License as 00006 published by the Free Software Foundation; either version 2 of the 00007 License, or (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU Lesser General Public License for more details. 00013 00014 You should have received a copy of the GNU Lesser General Public 00015 License along with this program; if not, write to the 00016 Free Software Foundation, Inc., 00017 59 Temple Place, 00018 Suite 330, 00019 Boston, MA 02111-1307 00020 USA 00021 00022 Contact : Serge.Iovleff@stkpp.org 00023 */ 00024 00025 /* 00026 * Project: stkpp::Sdk::TContainer 00027 * Purpose: Define the Interface base class for all containers classes. 00028 * Author: Serge Iovleff, serge.iovleff@stkpp.org 00029 **/ 00030 00035 #ifndef STK_ICONTAINERBASE_H 00036 #define STK_ICONTAINERBASE_H 00037 00038 #include <vector> 00039 00040 #include "STK_IRecursiveTemplate.h" 00041 #include "../../STKernel/include/STK_Range.h" 00042 00043 namespace STK 00044 { 00068 template <class Container> 00069 class IContainerBase : public IRecursiveTemplate<Container> 00070 { 00071 public: 00074 enum Dimension 00075 { 00076 _1D_ = 1, 00077 _2D_ = 2, 00078 _3D_ = 3, 00079 _4D_ = 4 00080 }; 00081 00082 protected: 00089 IContainerBase( Dimension dim) 00090 : IRecursiveTemplate<Container>() 00091 , ranges_(dim) 00092 , dim_(dim) 00093 { ;} 00094 00096 virtual ~IContainerBase() { ;} 00097 00098 public: 00102 inline Dimension const& dim() const { return dim_;} 00103 00104 protected: 00106 std::vector<Range const* > ranges_; 00107 00108 private: 00112 const Dimension dim_; 00113 }; 00114 00115 } // namespace STK 00116 00117 #endif 00118 // STK_ICONTAINERBASE_H