cgma
Option Strings

A few of the functions in iMesh support arbitrary options passed as a character string, called an 'Option String'. The format of and handling of an Option String is as follows...

1. Option Strings are INsensitive to case.

2. Each option in an Option String is pre-pended with the implementation name followed by a special character called the separator character.

3. The separator is a colon, ':'.

4. Multiple options existing in a single Option String are separated by a special character called the delimiter character.

5. The delimiter character is a space, ' '.

6. The effect of multiple options in a single Option String is INsensitive to order of occurrence in the string.

7. By default, implementations silently ignore any options that do not match on the implementation name part (everything before the separator character). This way, a caller may included options in a single string intended for multiple different implementations.

8. Implementations may (or may not) warn or error for option strings that match on implementation name part but are found to be in error for other reasons the implementation decides.

9. Whenever either the separator character, ':', or delimiter character, ' ', need to appear in an option, they must be escaped with the backslash character, '\'.

For example, consider the Options String

"grummp:silant FMDB:TwoPhaseIO moab:mpiio_hints\ foo\:bar"

In the above example, the space serves as the delimiter character between multiple options in the string. The colon serves as the implementation-name/option separator character. Because options are required to be insensitive to case, the caller is free to use case as a word separator as in 'TwoPhaseIO' and even in the implementation name, as in 'FMDB:', although 'fmdb:twophaseio' and 'fmdb:TWOPHASEIO' would all have the same effect. In the moab option, both the separator character and delimiter character appear in the option and so are pre-pended (e.g. escaped) with the backslash character.

GRUMMP will silently ignore the FMDB: and moab: options because they do NOT match on the implementation name part. However, GRUMMP may optionally error out, or warn or silently ignore 'grummp:silant' (it was supposed to be spelled 'silent') as an invalid option.

Note that iMesh itself currently does not define any options. In order to discover options a given implementation defines, users are directed to the developers of the respective implementations.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines