|
| virtual int | set (const char *key, enum RawData::Type type, void *value) CLASSIC_CCA_PURE |
| | Defines a new single-valued property or changes the value of an existing one.
|
| |
| virtual int | get (const char *key, enum RawData::Type type, void *valuePtr) CLASSIC_CCA_PURE |
| |
| virtual void | unset (const char *propName) CLASSIC_CCA_PURE |
| | Remove a key from the properties.
|
| |
| virtual int | setString (const char *key, const char *value) CLASSIC_CCA_PURE |
| | Defines a new string property or changes its value.
|
| |
| virtual const char * | getString (const char *key) CLASSIC_CCA_PURE |
| | Fetch a string value.
|
| |
| virtual void | getKeys (Argv *keylist) CLASSIC_CCA_PURE |
| | Produce a list of all the keys in an abstract container.
|
| |
| virtual | ~Port () |
| | obligatory virtual destructor
|
| |
Abstract control parameters and other string named data io interface.
This is a generic properties input/output Port. It may be backed by a shared database, a private database, or an instance of some numerical object, or anything else for that matter.
This is a Closed hash – one value (and value type) per key. Setting a new value and type for a key which has a value of another type already is an error.
As an example: If you have a solver that cares about the properties of a Matrix or Operator, simply : esi::Properties *p; err = mtx->getInterface("esi::Properties", (void *)p,msg); bool is_psym = false; if (err >= 0) { // <0 means no properties interface p. err2 = p->getBool("esi.P-Symmetric",psym); // ignore err2 is ok if esi.P-Symmetric unknown, nothing psym is returned unchanged. }
Implementation notes:
Since this version uses an enum-based type-checking scheme, access functions may return errors for data with types not supported on the given platform. It is probable that no 100% complete and native C compiler supported implementation will exist due to the breadth of possible types defined in RawData.h