Functions



DSParams

	public:

DSParams();

Create a new Params class.


process

	public:

BOOL process(int argc, char * argv[]);

This function parses the parameters that have been previously registered using setFlagSwitch or setStringSwitch. These are entered into the HashTable which this class extends. To obtain the value of a parameter after parsing, use getNumericValue for flag arguments and getPtrValue for string arguments. Data passed without a flag is entered with a key of 0.

Parameters

NameDescription
argcargc from main()
argvargv from main()
Result: Returns TRUE for success and FALSE for failure.

process

	public:

BOOL process(char * arg);

This function parses the parameters that have been previously registered using setFlagSwitch or setStringSwitch. These are entered into the HashTable which this class extends. To obtain the value of a parameter after parsing, use getNumericValue for flag arguments and getPtrValue for string arguments. Data passed without a flag is entered with a key of 0.

Parameters

NameDescription
argThe complete command line, which is all some OSes give you.
Result: Returns TRUE for success and FALSE for failure.

setFlagSwitch

	public:

BOOL setFlagSwitch(char c);

A flag argument is one which is either present or it isn't: a true/false combination. This function registers that the application knows how to handle the specified character as a flag parameter.

Parameters

NameDescription
cA character which is recognised as a flag argument.
Result: Returns TRUE for success and FALSE for failure.

setStringSwitch

	public:

BOOL setStringSwitch(char c);

A string argument is one which contains its own data: A filename or pathname, something where data is passed on the command line. This function registers that an application knows how to handle the specified character as a string parameter.

Parameters

NameDescription
cA character which is recognised as a string argument.
Result: Returns TRUE for success and FALSE for failure.

Generated with HeaderDoc - © 2000 Apple Computer, Inc. — (Last Updated 9/29/2003)