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

PsSensitiveInputAlias< Type > Class Template Reference

defines an alias of a sensitive input More...

#include <PsSensitiveInputAlias.h>

Inheritance diagram for PsSensitiveInputAlias< Type >:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 PsSensitiveInputAlias (const PsName &sensitiveInputAliasName, PsSimulatedObject &owner, PsAbstractInput< Type > *aliasedInput, const int requestedPrecisionLevel=PsPolatorNT::defaultPrecisionLevel)
 Constructor.

virtual ~PsSensitiveInputAlias (void)
 Destructor.

virtual bool valueChanged (bool keepChanged=false)
 query to find out if the value of the connected output has changed since last query.

virtual void signalChange ()
 called by the connected output when it's value has changed


Detailed Description

template<typename Type>
class PsSensitiveInputAlias< Type >

defines an alias of a sensitive input

See also:
PsSensitiveInput. aliases are used to shared an input with the object that is the father of there owner
Author:
David Margery
Version:
1.0

Definition at line 34 of file PsSensitiveInputAlias.h.


Constructor & Destructor Documentation

template<typename Type>
PsSensitiveInputAlias< Type >::PsSensitiveInputAlias const PsName   sensitiveInputAliasName,
PsSimulatedObject   owner,
PsAbstractInput< Type > *    aliasedInput,
const int    requestedPrecisionLevel = PsPolatorNT::defaultPrecisionLevel
[inline]
 

Constructor.

Parameters:
sensitiveInputAliasName the name of the alias as known by it's owner
owner the owner of the attribute
aliasedInput the aliased input
requestedPrecisionLevel the polation level asked for when the connected output is queried

Definition at line 44 of file PsSensitiveInputAlias.h.

References PsnSensitiveInputNT::_changed, and PsPolatorNT::defaultPrecisionLevel.

00048      : PsInputAlias<Type>(sensitiveInputAliasName,
00049                           owner,
00050                           aliasedInput,
00051                           requestedPrecisionLevel) 
00052    {
00053       _changed = true;
00054    };

template<typename Type>
virtual PsSensitiveInputAlias< Type >::~PsSensitiveInputAlias void    [inline, virtual]
 

Destructor.

Definition at line 57 of file PsSensitiveInputAlias.h.

00058    {
00059    };


Member Function Documentation

template<typename Type>
virtual void PsSensitiveInputAlias< Type >::signalChange   [inline, virtual]
 

called by the connected output when it's value has changed

Implements PsnSensitiveInputNT.

Reimplemented in PsSensitiveNotifyingInputAlias< Type >.

Definition at line 72 of file PsSensitiveInputAlias.h.

References PsnSensitiveInputNT::_changed, PsAbstractInput< Type >::_listOfAliases, list< PsInputAlias< Type > * >::begin(), list< PsInputAlias< Type > * >::end(), and PsnSensitiveInputNT::signalChange().

00073    {
00074 #ifdef _DEBUGALIAS
00075       cerr<<"PsSensitiveInputAlias<Type>::signalChange()"<<endl;
00076 #endif 
00077       _changed = true ;
00078 #ifdef _TYPENAMENOTIMPLICIT
00079    typename 
00080 #endif
00081       list<PsInputAlias<Type> *>::iterator i;
00082       for (i = _listOfAliases.begin();
00083            i != _listOfAliases.end();
00084            i++) 
00085          {
00086 #ifdef _DEBUGALIAS
00087             cerr<<"PsSensitiveInputAlias<Type>::signalChange() : je vais prévenir un de mes alias"<<(*i)<<endl;
00088 #endif
00089             PsnSensitiveInputNT * sensitiveInput = dynamic_cast<PsnSensitiveInputNT *>(*i) ;
00090             if ( sensitiveInput != NULL ) 
00091                {
00092                   sensitiveInput->signalChange();
00093                }
00094 #ifdef _DEBUGALIAS
00095             cerr<<"PsSensitiveInputAlias<Type>::signalChange() : j'ai prévenu un de mes alias"<<endl;
00096 #endif
00097          }
00098    }

template<typename Type>
virtual bool PsSensitiveInputAlias< Type >::valueChanged bool    keepChanged = false [inline, virtual]
 

query to find out if the value of the connected output has changed since last query.

Implements PsnSensitiveInputNT.

Definition at line 63 of file PsSensitiveInputAlias.h.

References PsnSensitiveInputNT::_changed.

00063                                                          {
00064       if (_changed) {
00065          _changed = keepChanged ;
00066          return true;
00067       }
00068       else return false;
00069    }


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

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

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