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

Crank Class Reference

#include <Crank.h>

Inheritance diagram for Crank:

SimBase FPCrank VPCrank StupidFPCrank List of all members.

Detailed Description

specialized Crank base classes are defined at the bottom!!!

Definition at line 40 of file Crank.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 ()
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 Member Functions

virtual ~Crank ()
int getKind () const
 from <GrinderKinds.h>

virtual glift::VertexShaderSP getVertShader ()
 Vertex Shader.

virtual glift::PixelShaderSP getPixelShader ()
 Pixel Shader.

virtual glift::ProgShaderSP getShader ()
 a complete shader specification

int addMP (MetaProgSP m)
 add MP

int insertMP (int idx, MetaProgSP m)
 insert MP

void setMP (SNameType name, MetaProgSP m)
 get MP by name

void setMP (int idx, MetaProgSP m)
 set by index

MetaProgSP getMP (int idx)
 get by index

MetaProgSP getMP (SNameType name)
int getMPIdx (SNameType name)
 get index by name

int getMPIdx (MetaProgSP m)
 get index by reference

MetaProgSP delMP (int idx)
 del by index

MetaProgSP delMP (SNameType name)
 del by index

MetaProgSP delMP (MetaProgSP m)
 del by reference


Protected Member Functions

 Crank ()
 Crank (int kind)
 Crank (const Crank &c)
virtual bool checkKind (MetaProgSP m)
 the meta-prog vector, from management ^^^ false = valid kind, true = invalid kind

virtual void kindErr (const char *where=0)
 this prints when you have a bad kind...

bool mpsChanged ()
 check if any of the meta-progs changed

void addTape (TapeSPVec &v, TapeSP t)
 keep track of changes generic tape management

void insertTape (TapeSPVec &v, int i, TapeSP t)
 insert tape

void setTape (TapeSPVec &v, int i, TapeSP t)
 set tape

TapeSP getTape (TapeSPVec &v, int i)
 get tape

void delTape (TapeSPVec &v, int i)
 del tape, by index

void delTape (TapeSPVec &v, TapeSP t)
 del tape, by value

virtual GrinderKeysSP buildFPEnvKeys ()
 del tape, by value this function mostly adds keys defined in <EnvKeys.h>


Protected Attributes

gutz::arrayo1i _lastCh
MetaProgSPVec _mprogs
int _kind
std::string _name_
 a text name for the object, SimBase

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


Constructor & Destructor Documentation

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

Definition at line 42 of file Crank.h.

Crank::Crank  )  [inline, protected]
 

Definition at line 74 of file Crank.h.

References _kind, _lastCh, and GK_UNKNOWN.

Crank::Crank int  kind  )  [inline, protected]
 

Definition at line 75 of file Crank.h.

References _kind.

Crank::Crank const Crank c  )  [protected]
 


Member Function Documentation

int Crank::addMP MetaProgSP  m  ) 
 

add MP

Definition at line 39 of file Crank.cpp.

References _mprogs, checkKind(), and kindErr().

void Crank::addTape TapeSPVec v,
TapeSP  t
[protected]
 

keep track of changes generic tape management

Definition at line 208 of file Crank.cpp.

References t, and v.

Referenced by insertTape().

GrinderKeysSP Crank::buildFPEnvKeys  )  [protected, virtual]
 

del tape, by value this function mostly adds keys defined in <EnvKeys.h>

create keys

add environment keys

TODO: flesh this out will ya.

Definition at line 313 of file Crank.cpp.

References EnvKey.

virtual bool Crank::checkKind MetaProgSP  m  )  [inline, protected, virtual]
 

the meta-prog vector, from management ^^^ false = valid kind, true = invalid kind

Definition at line 85 of file Crank.h.

References _kind, GK_UNKNOWN, and gutz::SmartPtr< T >::isNull().

Referenced by addMP(), insertMP(), and setMP().

MetaProgSP Crank::delMP MetaProgSP  m  ) 
 

del by reference

Definition at line 194 of file Crank.cpp.

References delMP(), and getMPIdx().

MetaProgSP Crank::delMP SNameType  name  ) 
 

del by index

Definition at line 186 of file Crank.cpp.

References delMP(), getMPIdx(), and name.

MetaProgSP Crank::delMP int  idx  ) 
 

del by index

Definition at line 171 of file Crank.cpp.

References _mprogs, SimBase::derr(), getMP(), and MetaProgSP.

Referenced by delMP().

void Crank::delTape TapeSPVec v,
TapeSP  t
[protected]
 

del tape, by value

Definition at line 288 of file Crank.cpp.

References SimBase::derr(), t, TapeSPVecIter, and v.

void Crank::delTape TapeSPVec v,
int  i
[protected]
 

del tape, by index

Definition at line 271 of file Crank.cpp.

References SimBase::derr(), and v.

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(), delMP(), SourceObj::delOutput(), 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(), getMP(), getMPIdx(), SourceObj::getOutputN(), getTape(), AlgObj::inputsModified(), insertTape(), kindErr(), VolyCube::loadNrro(), VolyCube::readState(), Volytope::readState(), SourceObj::request(), DataObj::request_(), VolytopeVec::setField(), SourceObj::setForwardModified(), DataObj::setForwardModified(), TFGeneric::setImage(), AlgObj::setInputN(), Key::setKey(), setMP(), VolField::setNrro(), SourceObj::setOutputN(), 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().

int Crank::getKind  )  const [inline]
 

from <GrinderKinds.h>

Definition at line 45 of file Crank.h.

References _kind.

MetaProgSP Crank::getMP SNameType  name  ) 
 

Definition at line 118 of file Crank.cpp.

References getMP(), getMPIdx(), and name.

MetaProgSP Crank::getMP int  idx  ) 
 

get by index

Definition at line 108 of file Crank.cpp.

References _mprogs, SimBase::derr(), and MetaProgSP.

Referenced by delMP(), and getMP().

int Crank::getMPIdx MetaProgSP  m  ) 
 

get index by reference

Definition at line 148 of file Crank.cpp.

References _mprogs, SimBase::derr(), and MetaProgSPVecIter.

int Crank::getMPIdx SNameType  name  ) 
 

get index by name

Definition at line 126 of file Crank.cpp.

References _mprogs, SimBase::derr(), and name.

Referenced by delMP(), getMP(), and setMP().

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.

virtual glift::PixelShaderSP Crank::getPixelShader  )  [inline, virtual]
 

Pixel Shader.

Reimplemented in FPCrank, and StupidFPCrank.

Definition at line 52 of file Crank.h.

References glift::PixelShaderSP.

virtual glift::ProgShaderSP Crank::getShader  )  [inline, virtual]
 

a complete shader specification

Definition at line 56 of file Crank.h.

References glift::ProgShaderSP.

TapeSP Crank::getTape TapeSPVec v,
int  i
[protected]
 

get tape

Definition at line 255 of file Crank.cpp.

References SimBase::derr(), TapeSP, and v.

virtual glift::VertexShaderSP Crank::getVertShader  )  [inline, virtual]
 

Vertex Shader.

Reimplemented in VPCrank.

Definition at line 48 of file Crank.h.

References glift::VertexShaderSP.

int Crank::insertMP int  idx,
MetaProgSP  m
 

insert MP

Definition at line 53 of file Crank.cpp.

References _mprogs, checkKind(), kindErr(), and MetaProgSP.

void Crank::insertTape TapeSPVec v,
int  idx,
TapeSP  t
[protected]
 

insert tape

Definition at line 216 of file Crank.cpp.

References addTape(), SimBase::derr(), t, TapeSPVecIter, and v.

Referenced by setTape().

virtual void Crank::kindErr const char *  where = 0  )  [inline, protected, virtual]
 

this prints when you have a bad kind...

might want to print an err insteand of a derr

Definition at line 94 of file Crank.h.

References SimBase::derr().

Referenced by addMP(), insertMP(), and setMP().

bool Crank::mpsChanged  )  [protected]
 

check if any of the meta-progs changed

Definition at line 330 of file Crank.cpp.

References _lastCh, _mprogs, gutz::arrayo1i, and gutz::g_min().

Referenced by StupidFPCrank::getPixelShader().

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(), TFBaseSP::getChangeID(), TFBaseSP::operator=(), and TFGeneric::update().

void Crank::setMP int  idx,
MetaProgSP  m
 

set by index

Definition at line 90 of file Crank.cpp.

References _mprogs, checkKind(), SimBase::derr(), and kindErr().

void Crank::setMP SNameType  name,
MetaProgSP  m
 

get MP by name

Definition at line 71 of file Crank.cpp.

References _mprogs, checkKind(), SimBase::derr(), getMPIdx(), kindErr(), and name.

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 Crank::setTape TapeSPVec v,
int  i,
TapeSP  t
[protected]
 

set tape

Definition at line 238 of file Crank.cpp.

References SimBase::derr(), insertTape(), t, and v.


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 Crank::_kind [protected]
 

Definition at line 114 of file Crank.h.

Referenced by checkKind(), Crank(), and getKind().

gutz::arrayo1i Crank::_lastCh [protected]
 

Definition at line 100 of file Crank.h.

Referenced by Crank(), and mpsChanged().

MetaProgSPVec Crank::_mprogs [protected]
 

Definition at line 112 of file Crank.h.

Referenced by addMP(), delMP(), getMP(), getMPIdx(), StupidFPCrank::getPixelShader(), insertMP(), mpsChanged(), and setMP().

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


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