DataPointVector.hpp

Go to the documentation of this file.
00001 //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
00002 //
00003 //        This file is part of E-Cell Simulation Environment package
00004 //
00005 //                Copyright (C) 2002-2002 Keio University
00006 //
00007 //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
00008 //
00009 //
00010 // E-Cell is free software; you can redistribute it and/or
00011 // modify it under the terms of the GNU General Public
00012 // License as published by the Free Software Foundation; either
00013 // version 2 of the License, or (at your option) any later version.
00014 //
00015 // E-Cell is distributed in the hope that it will be useful,
00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00018 // See the GNU General Public License for more details.
00019 //
00020 // You should have received a copy of the GNU General Public
00021 // License along with E-Cell -- see the file COPYING.
00022 // If not, write to the Free Software Foundation, Inc.,
00023 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00024 //
00025 //END_HEADER
00026 //
00027 // written by Gabor Bereczki <gabor.bereczki@talk21.com>
00028 //
00029 
00030 
00031 #if !defined( __DATAPOINTVECTOR_HPP )
00032 #define __DATAPOINTVECTOR_HPP
00033 
00034 #include "DataPoint.hpp"
00035 #include "Defs.hpp"
00036 #include <sys/types.h>
00037 
00038 
00039 namespace libecs
00040 {
00041 
00042   /** @addtogroup logging
00043    *@{
00044    */
00045 
00046   /** @file */
00047 
00048 
00049   DECLARE_TYPE( size_t, DataPointVectorIterator );
00050 
00051   DECLARE_SHAREDPTR( DataPointVector );
00052 
00053   class DataPointVector
00054   {
00055 
00056   public:
00057 
00058     DataPointVector( DataPointVectorIterator, int aPointSize );
00059 
00060     ~DataPointVector();
00061 
00062     ECELL_API DataPointRef asShort( DataPointVectorIterator aPosition );
00063 
00064     DataPointCref asShort( DataPointVectorIterator aPosition ) const;
00065 
00066     ECELL_API LongDataPointRef asLong( DataPointVectorIterator aPosition );
00067 
00068     LongDataPointCref asLong( DataPointVectorIterator aPosition ) const;
00069 
00070     DataPointVectorIterator getSize() const
00071     {
00072       return theSize;
00073     }
00074 
00075     size_t getElementSize() const;
00076         
00077     DataPointVectorIterator begin() const
00078     {
00079       return 0;
00080     }
00081         
00082     DataPointVectorIterator end() const
00083     {
00084       return getSize();
00085     }
00086         
00087     const void* getRawArray() const;
00088 
00089     ECELL_API Integer getPointSize();
00090 
00091   private:
00092 
00093     DataPointVectorIterator theSize;
00094 
00095     Integer thePointSize;
00096     
00097     DataPoint* theRawArray;
00098 
00099     LongDataPoint* theRawArrayLong;
00100 
00101   };
00102 
00103   //@}
00104 
00105 } // namespace libecs
00106 
00107 
00108 #endif /* __DATAPOINTVECTOR_HPP */

Generated on Fri Aug 31 18:42:38 2007 for E-CELL C++ libraries (libecs and libemc) 3.1.105 by  doxygen 1.5.3