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

EventData Class Reference

#include <EventData.h>

Inheritance diagram for EventData:

DataObj DataObjIF SimCore gutz::Counted SimBase List of all members.

Detailed Description

a class for monkeying around with loops and such in

Definition at line 29 of file EventData.h.

Modified interface

bool isModified () const
void setModified (bool mod=true)

Serialization

TODO: should be pure virtual, SOON

virtual std::ostream & saveSelf (std::ostream &os)
 serialize

virtual std::istream & readSelf (std::istream &is)
 unserialize


Forward Modify interface, NOT FOR GENERAL USE.

framework interface.

bool isForwardModified ()
 is this thing aready marked for future update?


Text object-name

from SimBase

std::string getObjName ()
std::string getName ()
void setName (std::string name)
void setName (const char *name)

Debug prints

from SimBase: These print the object name with the error, mostly for convenience, but they are compiled to inline-no-op if you build in release mode

void derr (const char *when, const char *where=0) const
template<class T> void derr (const char *when, const char *where, const T stuff) const

Modification, AKA "changed"

from SimBase: id based, you can capture the current id for comparison later, if the id's don't match the class has been changed

virtual int getChangeID ()
virtual int getChangeID () const
virtual void setChanged ()

Public Types

enum  BASIC_EVENTS {
  FIRST = 1<<0, START = 1<<1, FORCE = 1<<2, CHECK = 1<<3,
  END = 1<<4, ERROR = 1<<5, OK = 1<<6, LAST = 1<<7
}
 the events are designed to be or'ed together, even though that may not be symantically consistant, but hey, that's up to you. More...


Public Member Functions

 EventData (int id=0, const char *name=0)
 Id could be anything.

virtual ~EventData ()
int getId () const
void setId (int id)
int getEvent () const
void setEvent (int event)
virtual void update_ ()
 Update Interface, propigates down the chain.

virtual bool request_ ()
 Request Interface, propigates down the chain.

virtual void setSource (gutz::SmartPtr< SourceObjIF > source)
 Source interface.

void addConsumer (gutz::SmartPtr< SimModObjIF > smo)
 Consumer interface.

void delConsumer (gutz::SmartPtr< SimModObjIF > smo)
gutz::SmartPtr< SimModObjIFgetConsumer (unsigned int i)
 get Consumer

bool isConsumer (const gutz::SmartPtr< SimModObjIF > smo) const
virtual void setForwardModified ()
 Framework interfaces, NOT FOR GENERAL USE, ...


Protected Member Functions

void updateConsumers ()
 Updates.

virtual void _incCount ()
 gutz::Counted interface, increment reference count by one.

virtual void _decCount ()
 gutz::Counted interface, decrement reference count by one.

virtual int _getCount () const
 gutz::Counted interface, get the current reference count.


Protected Attributes

int _id
int _event
gutz::SmartPtr< SourceObjIF_source
 who generated it?

gutz::SmartPtr< SimModObjIF > * _consumers
 who gets it?

int _nConsumers
bool _noForward
bool _modified
bool _forward
bool _updating
std::string _name_
 a text name for the object, SimBase

int _changed
 change id, incremented whenever setChanged is called, SimBase


Friends

class SmartPtr
class SmartPtrRef


Member Enumeration Documentation

enum EventData::BASIC_EVENTS
 

the events are designed to be or'ed together, even though that may not be symantically consistant, but hey, that's up to you.

Enumeration values:
FIRST  init maybe?
START  basically, exe if you can
FORCE  Go, damn it.
CHECK  Just check.
END  You are done.
ERROR  Something bad happened.
OK  ay-ok
LAST  custom events enumerate above this value

Definition at line 46 of file EventData.h.


Constructor & Destructor Documentation

EventData::EventData int  id = 0,
const char *  name = 0
[inline]
 

Id could be anything.

Definition at line 32 of file EventData.h.

References _id, id, name, and SimBase::setName().

virtual EventData::~EventData  )  [inline, virtual]
 

Definition at line 36 of file EventData.h.


Member Function Documentation

virtual void gutz::Counted::_decCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, decrement reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 54 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

virtual int gutz::Counted::_getCount  )  const [inline, protected, virtual, inherited]
 

gutz::Counted interface, get the current reference count.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr.

Definition at line 58 of file smartptr.h.

virtual void gutz::Counted::_incCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, increment reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 48 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

void DataObj::addConsumer gutz::SmartPtr< SimModObjIF smo  )  [virtual, inherited]
 

Consumer interface.

Implements DataObjIF.

void DataObj::delConsumer gutz::SmartPtr< SimModObjIF smo  )  [virtual, inherited]
 

Implements DataObjIF.

template<class T>
void SimBase::derr const char *  when,
const char *  where,
const T  stuff
const [inline, inherited]
 

only prints in debug mode, -D_DEBUG

Definition at line 130 of file simBase.h.

References SimBase::_name_.

void SimBase::derr const char *  when,
const char *  where = 0
const [inline, inherited]
 

only prints in debug mode, -D_DEBUG

Definition at line 113 of file simBase.h.

References SimBase::_name_.

Referenced by AlgObj::addInput(), Key::addKey(), SourceObj::addOutput(), VolShader::bindBlend(), VolField::checkDims(), VolFieldVec::checkField(), VolFieldVec::checkFields(), AlgObj::checkInputs(), AlgObj::delInput(), Key::delKey(), Crank::delMP(), SourceObj::delOutput(), Crank::delTape(), TFGeneric::eval(), SourceObj::execDef(), ColorMapper::execDef(), AlgObj::execDef(), AlgObj::execute(), SourceObj::force(), AlgObj::force(), VolField::genTexture(), TFGeneric::get2DMap(), DataObj::getConsumer(), VolFieldVec::getField(), AlgObj::getInputN(), Key::getKey(), Crank::getMP(), Crank::getMPIdx(), SourceObj::getOutputN(), Crank::getTape(), AlgObj::inputsModified(), Crank::insertTape(), Crank::kindErr(), VolyCube::loadNrro(), VolyCube::readState(), Volytope::readState(), SourceObj::request(), DataObj::request_(), VolytopeVec::setField(), SourceObj::setForwardModified(), DataObj::setForwardModified(), TFGeneric::setImage(), AlgObj::setInputN(), Key::setKey(), Crank::setMP(), VolField::setNrro(), SourceObj::setOutputN(), Crank::setTape(), Volume::update(), SourceObj::updateOutputs(), Volume::updateRectLin(), Volume::updateVolytopesRL(), VolyCube::VolyCube(), and Volytope::writeState().

virtual int SimBase::getChangeID  )  const [inline, virtual, inherited]
 

Definition at line 73 of file simBase.h.

References SimBase::_changed.

virtual int SimBase::getChangeID  )  [inline, virtual, inherited]
 

Reimplemented in TFGeneric, TFBaseSP, and TFEltSP.

Definition at line 72 of file simBase.h.

References SimBase::_changed.

Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), and TFGeneric::getChangeID().

SimModObjSP DataObj::getConsumer unsigned int  i  )  [virtual, inherited]
 

get Consumer

Implements DataObjIF.

Definition at line 217 of file DataObj.cpp.

References DataObj::_consumers, DataObj::_nConsumers, SimBase::derr(), and SimModObjSP.

int EventData::getEvent  )  const [inline]
 

Definition at line 56 of file EventData.h.

References _event.

int EventData::getId  )  const [inline]
 

Definition at line 38 of file EventData.h.

References _id.

std::string SimBase::getName  )  [inline, inherited]
 

Definition at line 45 of file simBase.h.

References SimBase::_name_.

Referenced by MetaProg::operator<<().

std::string SimBase::getObjName  )  [inline, inherited]
 

Definition at line 44 of file simBase.h.

References string.

bool DataObj::isConsumer const gutz::SmartPtr< SimModObjIF smo  )  const [virtual, inherited]
 

Implements DataObjIF.

bool SimCore::isForwardModified  )  [inline, inherited]
 

is this thing aready marked for future update?

Definition at line 63 of file simCore.h.

References SimCore::_forward.

bool SimCore::isModified  )  const [inline, inherited]
 

Definition at line 40 of file simCore.h.

References SimCore::_modified.

virtual std::istream& SimCore::readSelf std::istream &  is  )  [inline, virtual, inherited]
 

unserialize

Reimplemented from SimBase.

Definition at line 52 of file simCore.h.

bool DataObj::request_  )  [virtual, inherited]
 

Request Interface, propigates down the chain.

no reqests pass if we are forward modified

this is modified

see if source has work to do

nope source is good, so are we

hmm, can't go we aren't ready

not modified, not forward modified, must be good

Implements DataObjIF.

Definition at line 86 of file DataObj.cpp.

References SimCore::_forward, SimCore::_modified, DataObj::_source, DataObjSP, SimBase::derr(), and gutz::SmartPtr< SourceObjIF >::isNull().

virtual std::ostream& SimCore::saveSelf std::ostream &  os  )  [inline, virtual, inherited]
 

serialize

Reimplemented from SimBase.

Definition at line 50 of file simCore.h.

virtual void SimBase::setChanged  )  [inline, virtual, inherited]
 

Definition at line 74 of file simBase.h.

References SimBase::_changed.

Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), TFBaseSP::operator=(), and TFGeneric::update().

void EventData::setEvent int  event  )  [inline]
 

Definition at line 57 of file EventData.h.

References _event, FORCE, and SimCore::setModified().

void DataObj::setForwardModified  )  [virtual, inherited]
 

Framework interfaces, NOT FOR GENERAL USE, ...

ignore these

Implements SimCore.

Definition at line 249 of file DataObj.cpp.

References DataObj::_consumers, SimCore::_forward, DataObj::_nConsumers, DataObj::_noForward, SimBase::derr(), and gutz::SmartPtr< SimModObjIF >::isNull().

void EventData::setId int  id  )  [inline]
 

Definition at line 39 of file EventData.h.

References _id, and id.

void SimCore::setModified bool  mod = true  )  [inline, inherited]
 

Definition at line 41 of file simCore.h.

References SimCore::_modified.

Referenced by setEvent().

void SimBase::setName const char *  name  )  [inline, inherited]
 

Definition at line 47 of file simBase.h.

References SimBase::_name_, and name.

void SimBase::setName std::string  name  )  [inline, inherited]
 

Reimplemented in Key.

Definition at line 46 of file simBase.h.

References SimBase::_name_, and name.

Referenced by EventData(), and GenDataObj_base< Nrro, gutz::SmartPtr< Nrro > >::GenDataObj_base().

virtual void DataObj::setSource gutz::SmartPtr< SourceObjIF source  )  [virtual, inherited]
 

Source interface.

Implements DataObjIF.

void DataObj::update_  )  [virtual, inherited]
 

Update Interface, propigates down the chain.

derr("updateConsumer()");

Implements DataObjIF.

Definition at line 57 of file DataObj.cpp.

References DataObj::_consumers, SimCore::_forward, SimCore::_modified, DataObj::_nConsumers, SimCore::_updating, DataObjSP, and gutz::SmartPtr< SimModObjIF >::isNull().

void DataObj::updateConsumers  )  [protected, inherited]
 

Updates.

Definition at line 281 of file DataObj.cpp.


Friends And Related Function Documentation

friend class SmartPtr [friend, inherited]
 

Definition at line 40 of file smartptr.h.

Referenced by Nrro::NrroIter< T >::NrroIter().

friend class SmartPtrRef [friend, inherited]
 

Definition at line 41 of file smartptr.h.


Member Data Documentation

int SimBase::_changed [protected, inherited]
 

change id, incremented whenever setChanged is called, SimBase

Definition at line 103 of file simBase.h.

Referenced by SimBase::getChangeID(), SimBase::setChanged(), and SimBase::SimBase().

gutz::SmartPtr<SimModObjIF>* DataObj::_consumers [protected, inherited]
 

who gets it?

Definition at line 130 of file DataObj.h.

Referenced by DataObj::getConsumer(), DataObj::setForwardModified(), DataObj::update_(), and DataObj::~DataObj().

int EventData::_event [protected]
 

Definition at line 65 of file EventData.h.

Referenced by getEvent(), and setEvent().

bool SimCore::_forward [protected, inherited]
 

Definition at line 74 of file simCore.h.

Referenced by SourceObj::force(), AlgObj::force(), SimCore::isForwardModified(), SourceObj::request(), DataObj::request_(), SourceObj::setForwardModified(), DataObj::setForwardModified(), AlgObj::setForwardModified(), SimCore::SimCore(), DataObj::update_(), and AlgObj::update_().

int EventData::_id [protected]
 

Definition at line 64 of file EventData.h.

Referenced by EventData(), getId(), and setId().

bool SimCore::_modified [protected, inherited]
 

Definition at line 73 of file simCore.h.

Referenced by AlgObj::execute(), SourceObj::force(), AlgObj::force(), SimCore::isModified(), SourceObj::request(), DataObj::request_(), SimCore::setModified(), SimCore::SimCore(), DataObj::update_(), and AlgObj::update_().

std::string SimBase::_name_ [protected, inherited]
 

a text name for the object, SimBase

Definition at line 101 of file simBase.h.

Referenced by SimBase::derr(), SimBase::getName(), SimBase::setName(), and SimBase::SimBase().

int DataObj::_nConsumers [protected, inherited]
 

Definition at line 131 of file DataObj.h.

Referenced by DataObj::getConsumer(), DataObj::setForwardModified(), and DataObj::update_().

bool DataObj::_noForward [protected, inherited]
 

Definition at line 132 of file DataObj.h.

Referenced by DataObj::setForwardModified().

gutz::SmartPtr<SourceObjIF> DataObj::_source [protected, inherited]
 

who generated it?

Definition at line 127 of file DataObj.h.

Referenced by DataObj::request_().

bool SimCore::_updating [protected, inherited]
 

Definition at line 75 of file simCore.h.

Referenced by SimCore::SimCore(), DataObj::update_(), and SourceObj::updateOutputs().


The documentation for this class was generated from the following file:
Send questions, comments, and bug reports to:
jmk