Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.atnf.csiro.au/computing/software/casacore/casacore-1.2.0/doc/html/Sequence_8h_source.html
Дата изменения: Unknown Дата индексирования: Mon Feb 14 20:07:20 2011 Кодировка: Поисковые слова: heart nebula |
00001 //# Sequence.h: provides sequences 00002 //# Copyright (C) 1993,1994,1995,1999,2001 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: Sequence.h 20551 2009-03-25 00:11:33Z Malte.Marquarding $ 00027 00028 #ifndef CASA_SEQUENCE_H 00029 #define CASA_SEQUENCE_H 00030 00031 #include <casa/aips.h> 00032 00033 namespace casa { //# NAMESPACE CASA - BEGIN 00034 00035 // <summary> virtual templated base class for sequences </summary> 00036 // <use visibility=export> 00037 // <reviewed reviewer="Friso Olnon" date="1995/03/17" tests="" demos=""> 00038 // </reviewed> 00039 00040 // <synopsis> 00041 // The virtual base class for sequences in the library. 00042 // It is templated to allow users to derive sequences of any type, 00043 // e.g. libg++'s Integers. 00044 // </synopsis> 00045 00046 template<class t> class Sequence { 00047 public: 00048 virtual ~Sequence(){}; 00049 00050 // Force derived classes to provide this function, to return the 00051 // next value in the sequence. 00052 virtual t getNext () = 0; 00053 }; 00054 00055 00056 // <summary> uInt sequence for general use </summary> 00057 // <use visibility=export> 00058 // <reviewed reviewer="Friso Olnon" date="1995/03/17" tests="" demos=""> 00059 // </reviewed> 00060 00061 // <synopsis> 00062 // This class provides a <src>uInt</src> based sequence for general use. 00063 // </synopsis> 00064 00065 class uIntSequence : public Sequence<uInt> { 00066 00067 public: 00068 // Get the next <src>uInt</src> value in the sequence. 00069 // <group> 00070 uInt getNext(); 00071 static uInt SgetNext() {return ++num;} 00072 // </group> 00073 00074 private: 00075 static uInt num; 00076 }; 00077 00078 00079 } //# NAMESPACE CASA - END 00080 00081 #ifndef CASACORE_NO_AUTO_TEMPLATES 00082 #include <casa/Utilities/Sequence.tcc> 00083 #endif //# CASACORE_NO_AUTO_TEMPLATES 00084 #endif