#include <GrinderKeys.h>
Inheritance diagram for GrinderKeys:
Definition at line 30 of file GrinderKeys.h.
Text object-name | |
from SimBase | |
std::string | getName () |
void | setName (const char *name) |
std::string | getObjName () |
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 Types | |
typedef gutz::SmartPtr< Key > | KeySP |
the key map | |
typedef std::map< GKeyType, KeySP, __KeyMapCmp__ > | KeySPMap |
typedef KeySPMap::iterator | KeySPMapIter |
typedef gutz::vec4d | DVEC_TYPE |
data type for double 4 vectors | |
typedef gutz::vec4i | IVEC_TYPE |
data type for integral 4 vectors | |
enum | KEY_TYPES { UNKNOWN = 0, DEFINE = 1<<0, VALUE = 1<<1, VARIABLE = 1<<2, CONSTANT = 1<<3, FUNCTION = 1<<4, SCOPE = 1<<5, KEY_LAST = 1<<6 } |
feel free to invent your own types, start after KEY_LAST More... | |
Public Member Functions | |
GrinderKeys () | |
GrinderKeys (const std::string &name, int type, const KeyPair *subKeys=0, int nSubKeys=0) | |
virtual | GrinderKey () |
KeySP | env () const |
environment keys | |
KeySP | val () const |
data value keys | |
KeySP | pos () const |
data position keys | |
KeySP | pconst () const |
program constants | |
KeySP | addPConst (const GKeyType kn, const KeySP pconstKey) |
add pconst | |
KeySP | addPConst (const KeyPair pckp) |
int | pconstID (const KeySP pconstKey) |
get the program local parameter id of a key this is just stored in the IVec[0] of the key... | |
int | pconstID (GKeyType kn) |
pconst id | |
void | setTexture (int i, glift::SingleTexSP tex) |
textures set a texture, inserts null textures if it has to. | |
int | addTexture (glift::SingleTexSP tex) |
add returns the texture's index | |
glift::SingleTexSP | getTexture (int i) |
get returns a null sp if index is out of bounds | |
int | numTextures () |
size of texture vector | |
glift::SingleTexSPVec | getTextureVec () const |
get the whole vector of textures! | |
std::string | getName () const |
the key's name isn't the same as it's index into the key map. | |
void | setName (std::string name) |
std::string | getText () const |
text, may not always be valid | |
void | setText (std::string text) |
int | getType () const |
void | setType (int type) |
virtual DVEC_TYPE | getDVec () const |
for comparisons | |
virtual void | setDVec (DVEC_TYPE vec) |
virtual IVEC_TYPE | getIVec () const |
for comparisons | |
virtual void | setIVec (IVEC_TYPE vec) |
KeySPMap | getAllKeys () const |
these accessors will be null if there was an error, or un-found key, ie. | |
KeySP | getKey (const GKeyType kn) const |
get a specific key, returns Null key if not found | |
KeySP | setKey (const GKeyType kn, const KeySP key) |
set a specific key, returns Null if key not found | |
KeySP | addKey (const GKeyType kn, const KeySP key) |
add a key | |
KeySP | addKey (const KeyPair kp) |
KeySP | delKey (const GKeyType kn) |
delete a key, returns Null if key not found | |
bool | hasKey (const GKeyType kn) const |
test if a key exists | |
int | getOp () const |
operators, used for felt and sudo compiling | |
void | setOp (int op) |
int | size () |
size of subKey map | |
Public Attributes | |
const DVEC_TYPE | DVEC_UNUSED |
const IVEC_TYPE | IVEC_UNUSED |
Protected Member Functions | |
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 | |
glift::SingleTexSPVec | _textures |
std::string | _name |
std::string | _text |
int | _type |
int | _op |
KeySPMap | _keys |
DVEC_TYPE | _dv |
IVEC_TYPE | _iv |
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 |
|
data type for double 4 vectors
Definition at line 94 of file Keys.h. Referenced by Key::getDVec(). |
|
data type for integral 4 vectors
Definition at line 101 of file Keys.h. Referenced by addPConst(), and Key::getIVec(). |
|
the key map
Definition at line 60 of file Keys.h. Referenced by Key::delKey(), Key::getKey(), Key::Key(), and Key::setKey(). |
|
Definition at line 61 of file Keys.h. Referenced by Key::getAllKeys(). |
|
Definition at line 62 of file Keys.h. Referenced by Key::addKey(), Key::delKey(), and Key::setKey(). |
|
feel free to invent your own types, start after KEY_LAST
|
|
Definition at line 32 of file GrinderKeys.h. |
|
Definition at line 33 of file GrinderKeys.h. |
|
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(). |
|
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. |
|
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(). |
|
Definition at line 105 of file Keys.cpp. References Key::addKey(), KeyPair::key, Key::Key(), and KeyPair::kn. |
|
add a key
Definition at line 92 of file Keys.cpp. References Key::_keys, SimBase::derr(), and Key::KeySPMapIter. Referenced by Key::addKey(), and Key::Key(). |
|
Definition at line 72 of file GrinderKeys.cpp. References addPConst(), KeyPair::key, Key::Key(), and KeyPair::kn. |
|
add pconst
Definition at line 65 of file GrinderKeys.cpp. References Key::IVEC_TYPE, pconst(), and Key::size(). Referenced by addPConst(). |
|
add returns the texture's index
Definition at line 117 of file GrinderKeys.cpp. References _textures. |
|
delete a key, returns Null if key not found
Definition at line 114 of file Keys.cpp. References Key::_keys, SimBase::derr(), Key::KeySP, and Key::KeySPMapIter. |
|
only prints in debug mode, -D_DEBUG Definition at line 130 of file simBase.h. References SimBase::_name_. |
|
|
environment keys environment keys Definition at line 30 of file GrinderKeys.cpp. References EnvKey, Key::getKey(), and KeyPair::kn. |
|
these accessors will be null if there was an error, or un-found key, ie. retKey.isNull() == true a key may have sub keys, get them... Definition at line 110 of file Keys.h. References Key::_keys, and Key::KeySPMap. |
|
Definition at line 73 of file simBase.h. References SimBase::_changed. |
|
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(). |
|
for comparisons
Definition at line 97 of file Keys.h. References Key::_dv, and Key::DVEC_TYPE. |
|
for comparisons
Definition at line 104 of file Keys.h. References Key::_iv, and Key::IVEC_TYPE. |
|
get a specific key, returns Null key if not found
Definition at line 61 of file Keys.cpp. References Key::_keys, SimBase::derr(), and Key::KeySP. |
|
Definition at line 45 of file simBase.h. References SimBase::_name_. Referenced by MetaProg::operator<<(). |
|
the key's name isn't the same as it's index into the key map.
Definition at line 70 of file Keys.h. References Key::_name. |
|
Definition at line 44 of file simBase.h. References string. |
|
operators, used for felt and sudo compiling
Definition at line 124 of file Keys.h. References Key::_op. |
|
text, may not always be valid
Definition at line 74 of file Keys.h. References Key::_text. |
|
get returns a null sp if index is out of bounds
Definition at line 127 of file GrinderKeys.cpp. References _textures, and glift::SingleTexSP. |
|
get the whole vector of textures!
Definition at line 70 of file GrinderKeys.h. References _textures. |
|
Definition at line 90 of file Keys.h. References Key::_type. |
|
Definition at line 39 of file GrinderKeys.h. |
|
test if a key exists
Definition at line 130 of file Keys.cpp. References Key::_keys. |
|
size of texture vector
Definition at line 139 of file GrinderKeys.cpp. References _textures. |
|
program constants program constants Definition at line 57 of file GrinderKeys.cpp. References Key::getKey(), KeyPair::kn, and PConstKey. Referenced by addPConst(), and pconstID(). |
|
pconst id
Definition at line 80 of file GrinderKeys.cpp. References gutz::SmartPtr< T >::isNull(), and pconst(). |
|
get the program local parameter id of a key this is just stored in the IVec[0] of the key...
Definition at line 56 of file GrinderKeys.h. |
|
data position keys data position keys Definition at line 48 of file GrinderKeys.cpp. References Key::getKey(), KeyPair::kn, and TexCKey. |
|
unserialize
Reimplemented in SimCore, and VolRenBase. |
|
serialize
Reimplemented in SimCore, and VolRenBase. |
|
Definition at line 74 of file simBase.h. References SimBase::_changed. Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), TFBaseSP::operator=(), and TFGeneric::update(). |
|
Definition at line 98 of file Keys.h. References Key::_dv. |
|
Definition at line 105 of file Keys.h. References Key::_iv. |
|
set a specific key, returns Null if key not found
Definition at line 76 of file Keys.cpp. References Key::_keys, SimBase::derr(), Key::KeySP, and Key::KeySPMapIter. |
|
Definition at line 47 of file simBase.h. References SimBase::_name_, and name. |
|
Reimplemented from SimBase. Definition at line 71 of file Keys.h. References Key::_name, and name. |
|
Definition at line 125 of file Keys.h. References Key::_op. |
|
Definition at line 75 of file Keys.h. References Key::_text. |
|
textures set a texture, inserts null textures if it has to.
Definition at line 96 of file GrinderKeys.cpp. References _textures. |
|
Definition at line 91 of file Keys.h. References Key::_type, and type. |
|
size of subKey map
Definition at line 128 of file Keys.h. References Key::_keys. Referenced by addPConst(). |
|
data value keys data value keys Definition at line 39 of file GrinderKeys.cpp. References DataValKey, Key::getKey(), and KeyPair::kn. |
|
Definition at line 40 of file smartptr.h. Referenced by Nrro::NrroIter< T >::NrroIter(). |
|
Definition at line 41 of file smartptr.h. |
|
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(). |
|
Definition at line 137 of file Keys.h. Referenced by Key::getDVec(), and Key::setDVec(). |
|
Definition at line 138 of file Keys.h. Referenced by Key::getIVec(), and Key::setIVec(). |
|
Definition at line 135 of file Keys.h. Referenced by Key::addKey(), Key::delKey(), Key::getAllKeys(), Key::getKey(), Key::hasKey(), Key::setKey(), and Key::size(). |
|
Definition at line 131 of file Keys.h. Referenced by Key::getName(), and Key::setName(). |
|
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(). |
|
Definition at line 134 of file Keys.h. Referenced by Key::getOp(), and Key::setOp(). |
|
Definition at line 132 of file Keys.h. Referenced by Key::getText(), and Key::setText(). |
|
Definition at line 73 of file GrinderKeys.h. Referenced by addTexture(), getTexture(), getTextureVec(), numTextures(), and setTexture(). |
|
Definition at line 133 of file Keys.h. Referenced by Key::getType(), and Key::setType(). |
|
|
|
|