VIMOS DRS Reference Manual 2.9.3
|
Functions | |
void | deleteForsPAF (ForsPAF *paf) |
Destroy a PAF object. | |
ForsPAF * | newForsPAF (const char *name, const char *type, const char *id, const char *desc) |
Create a new PAF object. | |
int | forsPAFIsEmpty (const ForsPAF *paf) |
Check whether a PAF object is empty. | |
size_t | forsPAFGetSize (const ForsPAF *paf) |
Get the actual size of the given PAF object. | |
int | forsPAFIsValidName (const char *name) |
Verify that the given string is a valid PAF keyword. | |
int | forsPAFAppendBool (ForsPAF *paf, const char *name, int value, const char *comment) |
Append a boolean value to a PAF object. | |
int | forsPAFAppendInt (ForsPAF *paf, const char *name, int value, const char *comment) |
Append a integer value to a PAF object. | |
int | forsPAFAppendDouble (ForsPAF *paf, const char *name, double value, const char *comment) |
Append a double value to a PAF object. | |
int | forsPAFAppendString (ForsPAF *paf, const char *name, const char *value, const char *comment) |
Append a string value to a PAF object. | |
int | forsPAFWrite (ForsPAF *paf) |
Write a PAF object to a disk file. |
TBD
void deleteForsPAF | ( | ForsPAF * | paf | ) |
Destroy a PAF object.
paf | PAF object to destroy. |
The function deallocates all memory used for the PAF object paf.
int forsPAFAppendBool | ( | ForsPAF * | paf, |
const char * | name, | ||
int | value, | ||
const char * | comment | ||
) |
Append a boolean value to a PAF object.
paf | PAF object to which the record is appended. |
name | Parameter name. |
value | Parameter value. |
comment | Parameter description. |
EXIT_SUCCESS
if the record was successfully appended, or EXIT_FAILURE
otherwise.The function creates a new PAF record for the given name, value and comment and appends it to the record list of the PAF object paf.
int forsPAFAppendDouble | ( | ForsPAF * | paf, |
const char * | name, | ||
double | value, | ||
const char * | comment | ||
) |
Append a double value to a PAF object.
paf | PAF object to which the record is appended. |
name | Parameter name. |
value | Parameter value. |
comment | Parameter description. |
EXIT_SUCCESS
if the record was successfully appended, or EXIT_FAILURE
otherwise.The function creates a new PAF record for the given name, value and comment and appends it to the record list of the PAF object paf.
int forsPAFAppendInt | ( | ForsPAF * | paf, |
const char * | name, | ||
int | value, | ||
const char * | comment | ||
) |
Append a integer value to a PAF object.
paf | PAF object to which the record is appended. |
name | Parameter name. |
value | Parameter value. |
comment | Parameter description. |
EXIT_SUCCESS
if the record was successfully appended, or EXIT_FAILURE
otherwise.The function creates a new PAF record for the given name, value and comment and appends it to the record list of the PAF object paf.
int forsPAFAppendString | ( | ForsPAF * | paf, |
const char * | name, | ||
const char * | value, | ||
const char * | comment | ||
) |
Append a string value to a PAF object.
paf | PAF object to which the record is appended. |
name | Parameter name. |
value | Parameter value string. |
comment | Parameter description. |
EXIT_SUCCESS
if the record was successfully appended, or EXIT_FAILURE
otherwise.The function creates a new PAF record for the given name, value and comment and appends it to the record list of the PAF object paf.
size_t forsPAFGetSize | ( | const ForsPAF * | paf | ) |
Get the actual size of the given PAF object.
paf | PAF object to query. |
The function computes the actual size, i.e. the number of parmeter records, stored in the record list of the PAF object paf. Header entries do not contribute the size of a PAF object.
int forsPAFIsEmpty | ( | const ForsPAF * | paf | ) |
Check whether a PAF object is empty.
paf | PAF object to query. |
The function checks whether the record list of the PAF object paf contains any records.
int forsPAFIsValidName | ( | const char * | name | ) |
Verify that the given string is a valid PAF keyword.
name | Name string to verify. |
The function does a simple check on the given string. To be a valid PAF keyword the name should start with a letter, it should only contain upper case letters and it may not contain blanks.
int forsPAFWrite | ( | ForsPAF * | paf | ) |
Write a PAF object to a disk file.
paf | PAF object to save. |
EXIT_SUCCESS
if the object was successfully written to the file, otherwise EXIT_FAILURE
is returned.The function converts the PAF object into an ASCII file on disk, using the name used to create the PAF object as a file name for the disk file.
ForsPAF* newForsPAF | ( | const char * | name, |
const char * | type, | ||
const char * | id, | ||
const char * | desc | ||
) |
Create a new PAF object.
name | Parameter file name. |
type | Parameter file type. |
id | Parameter file identifier string. |
desc | Short description for the parameter file. |
The function allocates the memory for a PAF object and initializes the PAF object with the strings name, type, id and desc passed to the function, where id and desc may be omitted, i.e. NULL
maybe passed for id and/or desc. The argument name will be used as the file name in case the PAF object is written to a disk file.