00001 /* 00002 * This file is part of openMask © INRIA, CNRS, Universite de Rennes 1 1993-2002, thereinafter the Software 00003 * 00004 * The Software has been developped within the Siames Project. 00005 * INRIA, the University of Rennes 1 and CNRS jointly hold intellectual property rights 00006 * 00007 * The Software has been registered with the Agence pour la Protection des 00008 * Programmes (APP) under registration number IDDN.FR.001.510008.00.S.P.2001.000.41200 00009 * 00010 * This file may be distributed under the terms of the Q Public License 00011 * version 1.0 as defined by Trolltech AS of Norway and appearing in the file 00012 * LICENSE.QPL included in the packaging of this file. 00013 * 00014 * Licensees holding valid specific licenses issued by INRIA, CNRS or Université de Rennes 1 00015 * for the software may use this file in accordance with that specific license 00016 * 00017 */ 00018 00019 /* file created 2002/01/23 by David Margery */ 00020 #ifndef PsNullOutputHEADER 00021 #define PsNullOutputHEADER 00022 00023 #include "PsOutput.h" 00031 template <typename Type> 00032 class PsNullOutput : public PsOutput<Type> 00033 { 00034 public: 00038 PsNullOutput ( PsSimulatedObject & owner ) ; 00039 00042 virtual ~PsNullOutput () ; 00043 00052 virtual const Type & get (int & distanceToExactValue, 00053 const int precisionLevel, 00054 const PsDate & deltaT, 00055 Type & calculatedResult ) const ; 00056 00057 00061 virtual const Type & getLastExactValue () const ; 00062 00066 virtual const PsDate & getDateOfLastExactValue () const ; 00067 00068 }; 00069 00071 #include <typeinfo> 00072 #include "PsInvalidOutputException.h" 00073 00074 template <typename Type> 00075 PsNullOutput<Type>::PsNullOutput (PsSimulatedObject & owner ) : 00076 PsAttribute(owner, typeid(Type).name() ) , 00077 PsOutput<Type> ( typeid(Type).name(), 00078 owner, 00079 0, 00080 NULL ) 00081 { 00082 00083 } 00084 00085 00086 template <typename Type> 00087 PsNullOutput<Type>::~PsNullOutput() 00088 { 00089 00090 } 00091 00092 00093 template <typename Type> 00094 const Type & PsNullOutput<Type>::get (int & distanceToExactValue, 00095 const int precisionLevel, 00096 const PsDate & deltaT, 00097 Type & calculatedResult ) const 00098 { 00099 throw PsInvalidOutputException() ; 00100 return calculatedResult ; 00101 } 00102 00103 00104 template <typename Type> 00105 const Type & PsNullOutput<Type>::getLastExactValue () const 00106 { 00107 throw PsInvalidOutputException() ; 00108 return _history->getPreceedingValue ( 0 ) ; 00109 } 00110 00111 00112 00113 template <typename Type> 00114 const PsDate & PsNullOutput<Type>::getDateOfLastExactValue () const 00115 { 00116 throw PsInvalidOutputException() ; 00117 return _history->getPreceedingDate ( 0 ) ; 00118 } 00119 00120 00121 #endif 00122 00123 00124 00125 00126
| Documentation generated on Mon Nov 25 15:25:01 2002 |
Generated with doxygen 1.2.12 by Dimitri van Heesch , 1997-2001 |