Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PsNullOutput< Type > Class Template Reference

class PsNullOutput. More...

#include <PsNullOutput.h>

Inheritance diagram for PsNullOutput< Type >:

Inheritance graph
[legend]
Collaboration diagram for PsNullOutput< Type >:

Collaboration graph
[legend]
List of all members.

Public Methods

 PsNullOutput (PsSimulatedObject &owner)
 Constructor.

virtual ~PsNullOutput ()
 Destructor.

virtual const Type & get (int &distanceToExactValue, const int precisionLevel, const PsDate &deltaT, Type &calculatedResult) const
 get a value for this output throws PsInvalidOutputException

virtual const Type & getLastExactValue () const
 get the last exact value produced and stored in this output throws PsInvalidOutputException

virtual const PsDategetDateOfLastExactValue () const
 get the date of the last exact value produced and stored in this output throws PsInvalidOutputException


Detailed Description

template<typename Type>
class PsNullOutput< Type >

class PsNullOutput.

Object of tis class represent an undefined output, to which inbuts are by default connected. This enables to avoid any testing for validity of the connected output in the PsInput class, specialy if the connected output has been dynamically destrioyed.

Author:
David Margery
Version:
1.1

Definition at line 31 of file PsNullOutput.h.


Constructor & Destructor Documentation

template<typename Type>
PsNullOutput< Type >::PsNullOutput PsSimulatedObject   owner
 

Constructor.

Parameters:
owner the owner of this output

Definition at line 74 of file PsNullOutput.h.

00075                                                             :
00076    PsAttribute(owner, typeid(Type).name() ) ,
00077    PsOutput<Type> ( typeid(Type).name(),
00078                     owner,
00079                     0,
00080                     NULL )
00081 {
00082 
}

template<typename Type>
PsNullOutput< Type >::~PsNullOutput   [virtual]
 

Destructor.

Definition at line 86 of file PsNullOutput.h.

00088 {
00089 


Member Function Documentation

template<typename Type>
const Type & PsNullOutput< Type >::get int &    distanceToExactValue,
const int    precisionLevel,
const PsDate   deltaT,
Type &    calculatedResult
const [virtual]
 

get a value for this output throws PsInvalidOutputException

Parameters:
distanceToExactValue where to store the distance to the nearest exact value returned by get
precisionLevel the degre of precision of any polation operation
deltaT age of the desired value seeked for
calculatedResult placeholder for any calculated result
Returns:
a reference to the desired result

Reimplemented from PsOutput< Type >.

Definition at line 93 of file PsNullOutput.h.

References PsDate.

00098 {
00099    throw PsInvalidOutputException() ;
00100    return calculatedResult ;

template<typename Type>
const PsDate & PsNullOutput< Type >::getDateOfLastExactValue   const [virtual]
 

get the date of the last exact value produced and stored in this output throws PsInvalidOutputException

Reimplemented from PsOutput< Type >.

Definition at line 113 of file PsNullOutput.h.

References PsOutput< Type >::_history, and PsDate.

00115 {
00116    throw PsInvalidOutputException() ;
00117    return _history->getPreceedingDate ( 0 ) ;

template<typename Type>
const Type & PsNullOutput< Type >::getLastExactValue   const [virtual]
 

get the last exact value produced and stored in this output throws PsInvalidOutputException

Reimplemented from PsOutput< Type >.

Definition at line 104 of file PsNullOutput.h.

References PsOutput< Type >::_history.

00106 {
00107    throw PsInvalidOutputException() ;
00108    return _history->getPreceedingValue ( 0 ) ;


The documentation for this class was generated from the following file:
logo OpenMask

Documentation generated on Mon Nov 25 15:26:16 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001