B.7 Changes in the Database

The Input Deck application interface supports several functions to perform changes inside the database, e.g., new items can be created and existing ones can be deleted. To create a new item the function ipdParseStringL is used which has two parameters.

void ipdParseStringL(const char *str,
                     bool       *OK);

The first parameter is a string which contains a valid statement in IDDL syntax. The parameter OK is set to true in case of success and to false in case of an error.

To set variables several functions are implemented.

bool ipdSetIntegerByName        (const char   *fullname,
                                 const long    integer);
bool ipdSetRealByName           (const char   *fullname,
                                 const double  re);
bool ipdSetRealQuantityByName   (const char   *fullname,
                                 double        re,
                                 const char   *unit);
bool ipdSetComplexByName        (const char   *fullname,
                                 const double  re,
                                 const double  im);
bool ipdSetComplexQuantityByName(const char   *fullname,
                                 const double  re,
                                 const double  im,
                                 const char   *unit);
bool ipdSetStringByName         (const char   *fullname,
                                 const char   *string);
bool ipdSetBooleanByName        (const char   *fullname,
                                 const bool    boolean);

The functions take the full name of the variable and a value. If the variable does not exist it is created otherwise it is overwritten. All functions return a boolean value indicating whether the operation has been successful or not.

Robert Klima 2003-02-06