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

TFEltSP Class Reference

#include <TFElement.h>

Inheritance diagram for TFEltSP:

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

Detailed Description

a double indirection tf element.

Uses the SmartPtrRef interface so it behaves as a pointer to an element. Used mainly as an observer for objects that use Elements, keeps a changeID to compare against the referenced element's current changeID.

Definition at line 222 of file TFElement.h.

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<
TFElement
btype
typedef SmartPtr< TFElementtype

Public Member Functions

 TFEltSP (TFElement *e)
 TFEltSP (const TFEltSP &tfe)
TFEltSPoperator= (const TFEltSP &tfe)
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 elementChanged () const
 see if the element we reference changed

void updateChanged ()
 set the element unchanged

virtual ~TFEltSP ()
TFElementgetPtr ()
TFElementconst * getPtr () const
TFElementoperator-> ()
TFElementconst * operator-> () const
TFElementoperator * ()
TFElementconst & operator * () const
 operator T * ()
 Implicit conversion to T* (for function calls).

bool operator! () const
bool operator== (const TFElement *ptr) const
bool operator== (const SmartPtrRef &sp) const
bool operator!= (const TFElement *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

 TFEltSP ()
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<TFElement> TFEltSP::btype
 

Definition at line 225 of file TFElement.h.

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

Definition at line 318 of file smartptr.h.


Constructor & Destructor Documentation

TFEltSP::TFEltSP TFElement e  )  [inline]
 

Definition at line 227 of file TFElement.h.

TFEltSP::TFEltSP const TFEltSP tfe  )  [inline]
 

Definition at line 228 of file TFElement.h.

References _lastChanged, and getChangeID().

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

Definition at line 256 of file TFElement.h.

References _lastChanged.

TFEltSP::TFEltSP  )  [inline, protected]
 

Definition at line 259 of file TFElement.h.


Member Function Documentation

void gutz::SmartPtrRef< TFElement >::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.

References gutz::SmartPtrRef< T >::_ref, ref, and gutz::SmartPtrRef< T >::type.

Referenced by operator=().

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

bool TFEltSP::elementChanged  )  const [inline]
 

see if the element we reference changed

Definition at line 252 of file TFElement.h.

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

Definition at line 73 of file simBase.h.

References SimBase::_changed.

virtual int TFEltSP::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 243 of file TFElement.h.

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

Referenced by TFEltSP(), TFItem::TFItem(), and TFItem::update().

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.

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

Definition at line 330 of file smartptr.h.

References gutz::SmartPtrRef< T >::_ref.

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

Definition at line 329 of file smartptr.h.

References gutz::SmartPtrRef< T >::_ref.

Referenced by genTFItem(), TFItem::getTFPosCA(), and TFItem::setTFPosCA().

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

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

Definition at line 380 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

Referenced by TFItem::TFItem(), and TFItem::update().

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

Definition at line 355 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

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

Definition at line 354 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

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

Implicit conversion to T* (for function calls).

Definition at line 360 of file smartptr.h.

References gutz::SmartPtrRef< T >::_ref.

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

Definition at line 367 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

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

Definition at line 371 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

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

Definition at line 370 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

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

Definition at line 347 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

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

Definition at line 346 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

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

these may or maynot be what you want! be carefull

Definition at line 373 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

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

Definition at line 374 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

TFEltSP& TFEltSP::operator= const TFEltSP tfe  )  [inline]
 

Definition at line 231 of file TFElement.h.

References gutz::SmartPtrRef< TFElement >::assign().

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

Definition at line 369 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

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

Definition at line 368 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

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

Definition at line 375 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

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

Definition at line 376 of file smartptr.h.

References gutz::SmartPtrRef< T >::getPtr().

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 getChangeID(), TFBaseSP::getChangeID(), TFBaseSP::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().

void TFEltSP::updateChanged  )  [inline]
 

set the element unchanged

Definition at line 254 of file TFElement.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 TFEltSP::_lastChanged [protected]
 

Definition at line 260 of file TFElement.h.

Referenced by getChangeID(), TFEltSP(), updateChanged(), and ~TFEltSP().

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< TFElement >::_ref [protected, inherited]
 

Private from here down.

Definition at line 385 of file smartptr.h.


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