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

PsAttribute Class Reference

Base class for all attributes of a simulated object. More...

#include <PsAttribute.h>

Inheritance diagram for PsAttribute:

Inheritance graph
[legend]
Collaboration diagram for PsAttribute:

Collaboration graph
[legend]
List of all members.

Public Methods

 PsAttribute (PsSimulatedObject &owner, const PsName &attributeName)
 Constructor.

virtual ~PsAttribute ()
 Destructor.

virtual const PsSimulatedObjectgetOwner () const
 get the owner of this attribute

virtual const PsNamegetName () const
 get the name of the attribute

virtual void extract (istream &=cin)=0
 extract from a stream

virtual void insertInStream (ostream &=cout) const=0
 insert in a stream

virtual void printDebuggingInformation (ostream &err) const=0
 print any usefull debugging information for this attribute


Protected Methods

void touch () const

Protected Attributes

PsSimulatedObject_owner
 a reference to the owner of this attribute

const PsName _name
 name of the attribute for the owner


Detailed Description

Base class for all attributes of a simulated object.

Author:
Siames
Version:
1.0

Definition at line 32 of file PsAttribute.h.


Constructor & Destructor Documentation

PsAttribute::PsAttribute PsSimulatedObject   owner,
const PsName   attributeName
 

Constructor.

Parameters:
owner the owner of the attribute
attributeName the name by which this attribute is known by it's owner

Definition at line 23 of file PsAttribute.cxx.

00023                                                                                  : 
00024    PsFlowable(),
00025    _owner( owner ),
00026    _name ( attributeName )
00027 {
00028    
00029 }

PsAttribute::~PsAttribute   [virtual]
 

Destructor.

Definition at line 33 of file PsAttribute.cxx.

00033                           {
00034 
00035 }


Member Function Documentation

virtual void PsAttribute::extract istream &    = cin [pure virtual]
 

extract from a stream

Implements PsFlowable.

Implemented in PsControlParameterDuplique< Type >, PsGenericControlParameter< Type, AncestorClass >, PsInput< Type >, PsInputAlias< Type >, PsMomeOutput< Type >, and PsOutput< Type >.

Referenced by PsControlParameterDuplique< Type >::extract().

const PsName & PsAttribute::getName   const [virtual]
 

get the name of the attribute

Definition at line 46 of file PsAttribute.cxx.

References _name.

Referenced by PsOutputNT::connect(), PsOutput< Type >::empty(), PsUnInitialisedAttributeException::insertInStream(), PsOutput< Type >::pack(), PsOutput< Type >::packAllValues(), PsOutput< Type >::PsOutput(), PsInput< Type >::realConnect(), and PsAbstractInput< Type >::setConnectable().

00046                                           {
00047    return _name ;
00048 }

const PsSimulatedObject & PsAttribute::getOwner   const [virtual]
 

get the owner of this attribute

Definition at line 39 of file PsAttribute.cxx.

References _owner.

Referenced by PsUnInitialisedAttributeException::insertInStream().

00040 {
00041    return _owner ;
00042 }

virtual void PsAttribute::insertInStream ostream &    = cout const [pure virtual]
 

insert in a stream

Implements PsFlowable.

Implemented in PsGenericControlParameter< Type, AncestorClass >, PsInput< Type >, PsInputAlias< Type >, and PsOutput< Type >.

virtual void PsAttribute::printDebuggingInformation ostream &    err const [pure virtual]
 

print any usefull debugging information for this attribute

Parameters:
err the output stream on which to print the debugging information

Implemented in PsAbstractInput< Type >, PsGenericControlParameter< Type, AncestorClass >, PsInput< Type >, PsInputAlias< Type >, and PsOutput< Type >.

void PsAttribute::touch   const [inline, protected]
 

Definition at line 69 of file PsAttribute.h.

References _owner, PsnObjectHandle::attributeRead(), and PsSimulatedObject::getObjectHandle().

Referenced by PsOutput< Type >::connectedMyself(), PsOutput< Type >::getDateOfLastExactValue(), PsOutput< Type >::getLastExactValue(), PsOutput< Type >::localGet(), and PsOutput< Type >::notifyConnectedSensitiveInputs().

00069          :
00070    inline void touch() const 
00071    {
00072       PsnObjectHandle * handle = _owner.getObjectHandle() ;
00073       if ( handle != NULL ) 
00074          // handle could will be null during contruction phase of the owner
00075          {
00076             handle->attributeRead() ;
00077          }
   }


Member Data Documentation

const PsName PsAttribute::_name [protected]
 

name of the attribute for the owner

Definition at line 85 of file PsAttribute.h.

Referenced by PsMomeOutput< Type >::get(), PsInput< Type >::get(), getName(), PsOutput< Type >::printDebuggingInformation(), PsSensitiveNotifyingInput< Type >::PsSensitiveNotifyingInput(), PsInputNT::registerMe(), PsMomeOutput< Type >::set(), and PsMomeOutput< Type >::~PsMomeOutput().

PsSimulatedObject& PsAttribute::_owner [protected]
 

a reference to the owner of this attribute

Definition at line 81 of file PsAttribute.h.

Referenced by PsOutputNT::connect(), PsInput< Type >::connect(), PsInput< Type >::connectToControlParameter(), PsOutput< Type >::empty(), PsMomeOutput< Type >::get(), PsInput< Type >::get(), PsOutput< Type >::getDateOfLastExactValue(), PsOutput< Type >::getLastExactValue(), getOwner(), PsOutput< Type >::localGet(), PsOutput< Type >::localInsert(), PsOutput< Type >::printDebuggingInformation(), PsInputAlias< Type >::printDebuggingInformation(), PsInput< Type >::printDebuggingInformation(), PsMomeOutput< Type >::PsMomeOutput(), PsInput< Type >::realConnect(), PsGenericControlParameter< Type, AncestorClass >::realSet(), PsInputNT::registerMe(), PsOutput< Type >::set(), PsMomeOutput< Type >::set(), PsGenericControlParameter< Type, AncestorClass >::set(), PsAbstractInput< Type >::setConnectable(), PsSensitiveNotifyingInput< Type >::signalChange(), PsOutput< Type >::suggest(), touch(), and PsMomeOutput< Type >::~PsMomeOutput().


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

Documentation generated on Mon Nov 25 15:25:52 2002

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