#include <Keys.h>
Inheritance diagram for Key:
also declared in Key. Not really designed for speed :(
Definition at line 54 of file Keys.h.
Text object-name | |
from SimBase | |
std::string | getObjName () |
std::string | getName () |
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 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 | |
Key () | |
Construct. | |
Key (const std::string &name, int type, const KeyPair *subKeys=0, int nSubKeys=0) | |
virtual | ~Key () |
Construct. | |
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 | |
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 getDVec(). |
|
data type for integral 4 vectors
Definition at line 101 of file Keys.h. Referenced by GrinderKeys::addPConst(), and getIVec(). |
|
the key map
|
|
Definition at line 61 of file Keys.h. Referenced by getAllKeys(). |
|
|
|
feel free to invent your own types, start after KEY_LAST
|
|
Construct.
Definition at line 25 of file Keys.cpp. References gutz::vec4d, and gutz::vec4i. Referenced by addKey(), GrinderKeys::addPConst(), and Key(). |
|
Definition at line 35 of file Keys.cpp. References addKey(), Key(), KeySP, name, type, gutz::vec4d, and gutz::vec4i. |
|
Construct.
|
|
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 addKey(), KeyPair::key, Key(), and KeyPair::kn. |
|
add a key
Definition at line 92 of file Keys.cpp. References _keys, SimBase::derr(), and KeySPMapIter. |
|
delete a key, returns Null if key not found
Definition at line 114 of file Keys.cpp. References _keys, SimBase::derr(), KeySP, and KeySPMapIter. |
|
only prints in debug mode, -D_DEBUG Definition at line 130 of file simBase.h. References SimBase::_name_. |
|
|
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 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
|
|
for comparisons
|
|
get a specific key, returns Null key if not found
Definition at line 61 of file Keys.cpp. References _keys, SimBase::derr(), and KeySP. Referenced by GrinderKeys::env(), GrinderKeys::pconst(), GrinderKeys::pos(), and GrinderKeys::val(). |
|
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 _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 _op. |
|
text, may not always be valid
Definition at line 74 of file Keys.h. References _text. |
|
Definition at line 90 of file Keys.h. References _type. |
|
test if a key exists
Definition at line 130 of file Keys.cpp. References _keys. |
|
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 _dv. |
|
Definition at line 105 of file Keys.h. References _iv. |
|
set a specific key, returns Null if key not found
Definition at line 76 of file Keys.cpp. References _keys, SimBase::derr(), KeySP, and KeySPMapIter. |
|
Definition at line 47 of file simBase.h. References SimBase::_name_, and name. |
|
Reimplemented from SimBase. |
|
Definition at line 125 of file Keys.h. References _op. |
|
Definition at line 75 of file Keys.h. References _text. |
|
|
|
size of subKey map
Definition at line 128 of file Keys.h. References _keys. Referenced by GrinderKeys::addPConst(). |
|
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 135 of file Keys.h. Referenced by addKey(), delKey(), getAllKeys(), getKey(), hasKey(), setKey(), and size(). |
|
|
|
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(). |
|
|
|
|
|
|
|
|
|
|