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

PsOutputAlias< Type > Class Template Reference

#include <PsOutputAlias.h>

Inheritance diagram for PsOutputAlias< Type >:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 PsOutputAlias (const PsName &name, PsSimulatedObject &owner, PsOutput< Type > *outputAliased, int historyLength, PsPolatorNT *polator=NULL)
 constructor

virtual ~PsOutputAlias ()
 Destructor.

virtual void unsetAlias ()
 redefine so that changes propagate to the aliased output

virtual void setUsedOutput (PsOutput< Type > *output)
 redefine so that changes propagate to the aliased output

virtual void unalias ()
 unalias : break the alias link between this output and the output aliased

virtual void aliasedOutputDeleted ()
 call when the aliased output is deleted

virtual void alias (PsOutput< Type > *aliasedOutput)
 alias change the alias of this outputAlias


Protected Methods

virtual void notifyConnectedSensitiveInputs ()
 alert any sensitive input of a change of value


Protected Attributes

PsOutput< Type > * _aliasedOutput
 the output aliased

template<typename Type>
class PsOutputAlias< Type >


Constructor & Destructor Documentation

template<typename Type>
PsOutputAlias< Type >::PsOutputAlias const PsName   name,
PsSimulatedObject   owner,
PsOutput< Type > *    outputAliased,
int    historyLength,
PsPolatorNT   polator = NULL
[inline]
 

constructor

Definition at line 76 of file PsOutputAlias.h.

References PsOutput< Type >::setAlias(), and PsOutput< Type >::setUsedOutput().

00081    :
00082    PsAttribute( owner, aliasName),
00083    PsOutput<Type>(aliasName, owner, historyLength, polator),
00084    _aliasedOutput ( aliasedOutput )
00085 {
00086 
00087    assert ( aliasedOutput != NULL ) ;
00088    
00089    aliasedOutput->setAlias ( this ) ;
00090 
00091    aliasedOutput->setUsedOutput(this) ;
00092          
00093 }

template<class Type>
PsOutputAlias< Type >::~PsOutputAlias   [inline, virtual]
 

Destructor.

Definition at line 97 of file PsOutputAlias.h.

References PsOutputAlias< Type >::unalias().

00098 {
00099   unalias();
00100 }


Member Function Documentation

template<typename Type>
void PsOutputAlias< Type >::alias PsOutput< Type > *    aliasedOutput [inline, virtual]
 

alias change the alias of this outputAlias

Definition at line 144 of file PsOutputAlias.h.

References PsOutputAlias< Type >::_aliasedOutput, PsOutput< Type >::setAlias(), PsOutput< Type >::setUsedOutput(), and PsOutputAlias< Type >::unalias().

00145 {
00146    assert ( aliasedOutput != NULL ) ;
00147    
00148    if ( _aliasedOutput != NULL )
00149       {
00150          unalias() ;
00151          _aliasedOutput = aliasedOutput ;
00152       }
00153 
00154    aliasedOutput->setAlias ( this ) ;
00155 
00156    aliasedOutput->setUsedOutput(this) ;
00157 }

template<typename Type>
void PsOutputAlias< Type >::aliasedOutputDeleted   [inline, virtual]
 

call when the aliased output is deleted

Definition at line 160 of file PsOutputAlias.h.

References PsOutputAlias< Type >::_aliasedOutput.

00161 {
00162    _aliasedOutput = NULL ;
00163 }

template<typename Type>
void PsOutputAlias< Type >::notifyConnectedSensitiveInputs   [protected, virtual]
 

alert any sensitive input of a change of value

Reimplemented from PsOutput< Type >.

Definition at line 115 of file PsOutputAlias.h.

References PsOutputAlias< Type >::_aliasedOutput, and PsOutput< Type >::notifyConnectedSensitiveInputs().

00116 {
00117    PsOutput<Type>::notifyConnectedSensitiveInputs() ;
00118    if ( _aliasedOutput != NULL )
00119       {
00120          _aliasedOutput->notifyConnectedSensitiveInputs() ;
00121       }
00122 }

template<class Type>
void PsOutputAlias< Type >::setUsedOutput PsOutput< Type > *    output [virtual]
 

redefine so that changes propagate to the aliased output

Reimplemented from PsOutput< Type >.

Definition at line 104 of file PsOutputAlias.h.

References PsOutputAlias< Type >::_aliasedOutput, and PsOutput< Type >::setUsedOutput().

Referenced by PsOutputAlias< Type >::unalias().

00105 {
00106    PsOutput<Type>::setUsedOutput( output ) ;
00107    
00108    if ( _aliasedOutput != NULL )
00109       {
00110          _aliasedOutput->setUsedOutput( output ) ;
00111       }
00112 }

template<typename Type>
void PsOutputAlias< Type >::unalias   [inline, virtual]
 

unalias : break the alias link between this output and the output aliased

Definition at line 125 of file PsOutputAlias.h.

References PsOutputAlias< Type >::_aliasedOutput, and PsOutputAlias< Type >::setUsedOutput().

Referenced by PsOutputAlias< Type >::alias(), and PsOutputAlias< Type >::~PsOutputAlias().

00126 {
00127    if ( _aliasedOutput != NULL ) 
00128       {
00129          _aliasedOutput->unsetAlias() ;
00130          setUsedOutput ( this ) ;
00131          _aliasedOutput = NULL ;
00132       }
00133 }

template<typename Type>
void PsOutputAlias< Type >::unsetAlias   [inline, virtual]
 

redefine so that changes propagate to the aliased output

Reimplemented from PsOutput< Type >.

Definition at line 137 of file PsOutputAlias.h.

References PsOutput< Type >::unsetAlias().

00138 {
00139   PsOutput<Type>::unsetAlias () ;
00140 } 


Member Data Documentation

template<typename Type>
PsOutput<Type>* PsOutputAlias< Type >::_aliasedOutput [protected]
 

the output aliased

Definition at line 71 of file PsOutputAlias.h.

Referenced by PsOutputAlias< Type >::alias(), PsOutputAlias< Type >::aliasedOutputDeleted(), PsOutputAlias< Type >::notifyConnectedSensitiveInputs(), PsOutputAlias< Type >::setUsedOutput(), and PsOutputAlias< Type >::unalias().


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

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

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