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

SourceObjIF Class Reference

#include <SourceObj.h>

Inheritance diagram for SourceObjIF:

AlgObj AlgObjIF SimModObjIF SimCore gutz::Counted SimBase SourceObj ColorMapper List of all members.

Detailed Description

Source Object interface A public interface to a Source object.

Definition at line 32 of file SourceObj.h.

Public Execute Interface

virtual void execute ()=0
 Execute if anything changed, only if it needs to.

virtual void force ()=0
 Execute no matter what!


Frame work interfaces NOT FOR GENERAL USE

users ignore these

virtual bool request (DataObjSP d)=0
 request interface


framework interfaces NOT FOR GENERAL USE.

do not call from user programs/modules

virtual void update_ (gutz::SmartPtr< DataObjIF > d)=0
 input data modified notification


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 Member Functions

virtual ~SourceObjIF ()
virtual unsigned int getNumOutputs () const=0
unsigned int getNumInputs () const
void update_ (DataObjSP d)
 update interface update when data changes

virtual void setForwardModified ()
 set going to be updated


Protected Member Functions

 SourceObjIF ()
 protected default construction

 SourceObjIF (unsigned int numInputs)
 Filter constructor chain.

virtual bool checkInputs ()
 true if data is current, false if not

virtual bool inputsModified ()
 check if we have modified inputs

virtual void execDef ()
 exectue on some changed data

void addInput (DataObjSP d)
 manipulate inputs

void delInput (DataObjSP d)
 Del Input.

bool isInput (const DataObjSP d) const
 isInput

void setNumInputs (int nInputs)
 SetNumInputs.

void setInputN (int inNum, DataObjSP d)
 Set Input "N".

DataObjIFgetInputN (int inNum)
 returns raw pointer to facilitate easier dynamic_cast<YOUR_DATA_TYPE>

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

bool _forwardUpdate
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


Constructor & Destructor Documentation

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

Definition at line 34 of file SourceObj.h.

SourceObjIF::SourceObjIF  )  [inline, protected]
 

protected default construction

Definition at line 64 of file SourceObj.h.

SourceObjIF::SourceObjIF unsigned int  numInputs  )  [inline, protected]
 

Filter constructor chain.

Definition at line 66 of file SourceObj.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 AlgObj::addInput DataObjSP  d  )  [protected, inherited]
 

manipulate inputs

Definition at line 182 of file AlgObj.cpp.

References SimBase::derr(), gutz::SmartPtr< DataObjIF >::isNull(), and AlgObj::setInputN().

bool AlgObj::checkInputs  )  [protected, virtual, inherited]
 

true if data is current, false if not

everything checked out so we must be ok

Definition at line 156 of file AlgObj.cpp.

References SimBase::derr(), and gutz::SmartPtr< DataObjIF >::isNull().

Referenced by AlgObj::execute(), SourceObj::force(), AlgObj::force(), SourceObj::request(), and AlgObj::update_().

void AlgObj::delInput DataObjSP  d  )  [protected, inherited]
 

Del Input.

Definition at line 195 of file AlgObj.cpp.

References SimBase::derr(), AlgObj::isInput(), and SimModObjSP.

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 void AlgObj::execDef  )  [inline, protected, virtual, inherited]
 

exectue on some changed data

Reimplemented in SourceObj, and ColorMapper.

Definition at line 108 of file AlgObj.h.

References SimBase::derr().

Referenced by AlgObj::execute(), and AlgObj::force().

virtual void SourceObjIF::execute  )  [pure virtual]
 

Execute if anything changed, only if it needs to.

Reimplemented from AlgObj.

Implemented in SourceObj.

virtual void SourceObjIF::force  )  [pure virtual]
 

Execute no matter what!

Reimplemented from AlgObj.

Implemented in SourceObj.

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().

DataObjIF * AlgObj::getInputN int  inNum  )  [protected, inherited]
 

returns raw pointer to facilitate easier dynamic_cast<YOUR_DATA_TYPE>

Definition at line 283 of file AlgObj.cpp.

References SimBase::derr(), and gutz::SmartPtr< DataObjIF >::getPtr().

Referenced by ColorMapper::execDef().

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

Definition at line 45 of file simBase.h.

References SimBase::_name_.

Referenced by MetaProg::operator<<().

unsigned int AlgObj::getNumInputs  )  const [inline, virtual, inherited]
 

Implements AlgObjIF.

Definition at line 73 of file AlgObj.h.

virtual unsigned int SourceObjIF::getNumOutputs  )  const [pure virtual]
 

Implemented in SourceObj.

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

Definition at line 44 of file simBase.h.

References string.

bool AlgObj::inputsModified  )  [protected, virtual, inherited]
 

check if we have modified inputs

Definition at line 137 of file AlgObj.cpp.

References SimBase::derr(), and gutz::SmartPtr< DataObjIF >::isNull().

Referenced by AlgObj::execute().

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 AlgObj::isInput const DataObjSP  d  )  const [protected, inherited]
 

isInput

Definition at line 224 of file AlgObj.cpp.

References gutz::SmartPtr< DataObjIF >::isNull().

Referenced by AlgObj::delInput().

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.

virtual bool SourceObjIF::request DataObjSP  d  )  [pure virtual]
 

request interface

Implemented in SourceObj.

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().

virtual void AlgObj::setForwardModified  )  [inline, virtual, inherited]
 

set going to be updated

Implements SimCore.

Reimplemented in SourceObj.

Definition at line 94 of file AlgObj.h.

References SimCore::_forward.

void AlgObj::setInputN int  inNum,
DataObjSP  d
[protected, inherited]
 

Set Input "N".

Definition at line 264 of file AlgObj.cpp.

References SimBase::derr(), gutz::SmartPtr< DataObjIF >::isNull(), AlgObj::setNumInputs(), and SimModObjSP.

Referenced by AlgObj::addInput(), and ColorMapper::setInput().

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

Definition at line 41 of file simCore.h.

References SimCore::_modified.

Referenced by EventData::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::EventData(), and GenDataObj_base< Nrro, gutz::SmartPtr< Nrro > >::GenDataObj_base().

void AlgObj::setNumInputs int  nInputs  )  [protected, inherited]
 

SetNumInputs.

nothing to do

create new input array

copy old inputs

nuke old input array

set new array

Definition at line 237 of file AlgObj.cpp.

Referenced by AlgObj::AlgObj(), and AlgObj::setInputN().

virtual void SimModObjIF::update_ gutz::SmartPtr< DataObjIF d  )  [pure virtual, inherited]
 

input data modified notification

void AlgObj::update_ DataObjSP  d  )  [virtual, inherited]
 

update interface update when data changes

must mark forward!!!

not forward no more

Implements AlgObjIF.

Definition at line 113 of file AlgObj.cpp.

References SimCore::_forward, SimCore::_modified, AlgObj::checkInputs(), and AlgObj::execute().


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().

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_().

bool SimModObjIF::_forwardUpdate [protected, inherited]
 

Definition at line 69 of file SimModObj.h.

Referenced by SimModObjIF::SimModObjIF().

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().

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