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

TFBaseSP Class Reference

#include <TFBase.h>

Inheritance diagram for TFBaseSP:

gutz::SmartPtrRef< TFGeneric > SimBase List of all members.

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 () const
virtual void setChanged ()

Serialization:

from SimBase You MUST override these pure virtual functions, they "should" do something usefull.

It is also nice if you declare a static std::istream &create(std::istream &is) const; function, to create a class from a stream. This is done on a per-concrete class basis.

These aren't pure virutal yet, but will be soon!

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

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


Public Types

typedef gutz::SmartPtrRef<
TFGeneric
btype
typedef SmartPtr< TFGenerictype

Public Member Functions

 TFBaseSP ()
 TFBaseSP (VolumeSP vol)
 TFBaseSP (TFGeneric *tf)
 TFBaseSP (const TFBaseSP &tfbsp)
 we are not really a reference, we are a double indirection thingy, not really a pointer pointer, not really a ref either.

TFBaseSPoperator= (const TFBaseSP &tfbsp)
virtual ~TFBaseSP ()
virtual int getChangeID ()
 if you are keeping track of changes yourself use this function, if you want to use this object as an observer, DO NOT use this one, use the functions below

bool tfChanged () const
 if you have one of thses objects, you don't need to keep track of the change id yourself.

void updateChanged ()
TFGenericgetPtr ()
TFGenericconst * getPtr () const
TFGenericoperator-> ()
TFGenericconst * operator-> () const
TFGenericoperator * ()
TFGenericconst & operator * () const
 operator T * ()
 Implicit conversion to T* (for function calls).

bool operator! () const
bool operator== (const TFGeneric *ptr) const
bool operator== (const SmartPtrRef &sp) const
bool operator!= (const TFGeneric *ptr) const
bool operator!= (const SmartPtrRef &sp) const
bool operator< (const SmartPtrRef &sp) const
 these may or maynot be what you want! be carefull

bool operator<= (const SmartPtrRef &sp) const
bool operator> (const SmartPtrRef &sp) const
bool operator>= (const SmartPtrRef &sp) const
bool isNull () const
 for convienence since if(mySP) is always true, use if(!myPtr.isNull())...


Protected Member Functions

void assign (type *ref)

Protected Attributes

int _lastChanged
type_ref
 Private from here down.

std::string _name_
 a text name for the object, SimBase

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


Member Typedef Documentation

typedef gutz::SmartPtrRef<TFGeneric> TFBaseSP::btype
 

Definition at line 161 of file TFBase.h.

typedef SmartPtr<TFGeneric > gutz::SmartPtrRef< TFGeneric >::type [inherited]
 

Definition at line 318 of file smartptr.h.


Constructor & Destructor Documentation

TFBaseSP::TFBaseSP  )  [inline]
 

Definition at line 163 of file TFBase.h.

References _lastChanged, gutz::SmartPtrRef< TFGeneric >::_ref, and getChangeID().

TFBaseSP::TFBaseSP VolumeSP  vol  )  [inline]
 

Definition at line 168 of file TFBase.h.

References _lastChanged, gutz::SmartPtrRef< TFGeneric >::_ref, and getChangeID().

TFBaseSP::TFBaseSP TFGeneric tf  )  [inline]
 

Definition at line 173 of file TFBase.h.

References _lastChanged, gutz::SmartPtrRef< TFGeneric >::_ref, and getChangeID().

TFBaseSP::TFBaseSP const TFBaseSP tfbsp  )  [inline]
 

we are not really a reference, we are a double indirection thingy, not really a pointer pointer, not really a ref either.

this means that we have to copy the pointer inside the ref for copy and assignment so that changes are reflected everywhere.

Definition at line 183 of file TFBase.h.

References _lastChanged, and gutz::SmartPtrRef< TFGeneric >::assign().

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

Definition at line 197 of file TFBase.h.


Member Function Documentation

void gutz::SmartPtrRef< TFGeneric >::assign type ref  )  [inline, protected, inherited]
 

add a reference to the new guy

deleting the old guy

just a dec most of the time

but if we are the last reference, nuke it

Definition at line 387 of file smartptr.h.

Referenced by operator=(), and TFBaseSP().

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 TFBaseSP::getChangeID  )  [inline, virtual]
 

if you are keeping track of changes yourself use this function, if you want to use this object as an observer, DO NOT use this one, use the functions below

Reimplemented from SimBase.

Definition at line 203 of file TFBase.h.

References _lastChanged, SimBase::getChangeID(), and SimBase::setChanged().

Referenced by TFBaseSP().

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.

TFGeneric const* gutz::SmartPtrRef< TFGeneric >::getPtr  )  const [inline, inherited]
 

Definition at line 330 of file smartptr.h.

TFGeneric * gutz::SmartPtrRef< TFGeneric >::getPtr  )  [inline, inherited]
 

Definition at line 329 of file smartptr.h.

bool gutz::SmartPtrRef< TFGeneric >::isNull  )  const [inline, inherited]
 

for convienence since if(mySP) is always true, use if(!myPtr.isNull())...

Definition at line 380 of file smartptr.h.

Referenced by TFItemVec::update().

TFGeneric const& gutz::SmartPtrRef< TFGeneric >::operator *  )  const [inline, inherited]
 

Definition at line 355 of file smartptr.h.

TFGeneric & gutz::SmartPtrRef< TFGeneric >::operator *  )  [inline, inherited]
 

Definition at line 354 of file smartptr.h.

gutz::SmartPtrRef< TFGeneric >::operator TFGeneric *  )  [inline, inherited]
 

Implicit conversion to T* (for function calls).

Definition at line 360 of file smartptr.h.

bool gutz::SmartPtrRef< TFGeneric >::operator!  )  const [inline, inherited]
 

Definition at line 367 of file smartptr.h.

bool gutz::SmartPtrRef< TFGeneric >::operator!= const SmartPtrRef< TFGeneric > &  sp  )  const [inline, inherited]
 

Definition at line 371 of file smartptr.h.

bool gutz::SmartPtrRef< TFGeneric >::operator!= const TFGeneric ptr  )  const [inline, inherited]
 

Definition at line 370 of file smartptr.h.

TFGeneric const* gutz::SmartPtrRef< TFGeneric >::operator->  )  const [inline, inherited]
 

Definition at line 347 of file smartptr.h.

TFGeneric * gutz::SmartPtrRef< TFGeneric >::operator->  )  [inline, inherited]
 

Definition at line 346 of file smartptr.h.

bool gutz::SmartPtrRef< TFGeneric >::operator< const SmartPtrRef< TFGeneric > &  sp  )  const [inline, inherited]
 

these may or maynot be what you want! be carefull

Definition at line 373 of file smartptr.h.

bool gutz::SmartPtrRef< TFGeneric >::operator<= const SmartPtrRef< TFGeneric > &  sp  )  const [inline, inherited]
 

Definition at line 374 of file smartptr.h.

TFBaseSP& TFBaseSP::operator= const TFBaseSP tfbsp  )  [inline]
 

Definition at line 189 of file TFBase.h.

References _lastChanged, gutz::SmartPtrRef< TFGeneric >::_ref, gutz::SmartPtrRef< TFGeneric >::assign(), and SimBase::setChanged().

bool gutz::SmartPtrRef< TFGeneric >::operator== const SmartPtrRef< TFGeneric > &  sp  )  const [inline, inherited]
 

Definition at line 369 of file smartptr.h.

bool gutz::SmartPtrRef< TFGeneric >::operator== const TFGeneric ptr  )  const [inline, inherited]
 

Definition at line 368 of file smartptr.h.

bool gutz::SmartPtrRef< TFGeneric >::operator> const SmartPtrRef< TFGeneric > &  sp  )  const [inline, inherited]
 

Definition at line 375 of file smartptr.h.

bool gutz::SmartPtrRef< TFGeneric >::operator>= const SmartPtrRef< TFGeneric > &  sp  )  const [inline, inherited]
 

Definition at line 376 of file smartptr.h.

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

unserialize

Reimplemented in SimCore, and VolRenBase.

Definition at line 94 of file simBase.h.

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

serialize

Reimplemented in SimCore, and VolRenBase.

Definition at line 92 of file simBase.h.

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

Definition at line 74 of file simBase.h.

References SimBase::_changed.

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

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

bool TFBaseSP::tfChanged  )  const [inline]
 

if you have one of thses objects, you don't need to keep track of the change id yourself.

use these functions to see if the tf has changed since the last time you called "updateChanged()"

Definition at line 215 of file TFBase.h.

References _lastChanged.

void TFBaseSP::updateChanged  )  [inline]
 

Definition at line 216 of file TFBase.h.

References _lastChanged.


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

int TFBaseSP::_lastChanged [protected]
 

Definition at line 219 of file TFBase.h.

Referenced by getChangeID(), operator=(), TFBaseSP(), tfChanged(), and updateChanged().

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

type* gutz::SmartPtrRef< TFGeneric >::_ref [protected, inherited]
 

Private from here down.

Definition at line 385 of file smartptr.h.

Referenced by operator=(), and TFBaseSP().


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