getInt

Get an integer value held in the dictionary.

virtual int getInt(const string &key) = 0;

virtual int getInt(const string &key, int defaultValue) = 0;

Parameters

key: The key to be looked up in the dictionary.

defaultValue: The default value returned if the key is not present in the dictionary.

Return Value

An integer value.

Remarks

If the parameter key is not found the first variant throws a NoSuchValueException indicating the key.

Example

int port = getInt("portValue", 80);

See also: setInt

 

This topic was last updated on 2月 01, 2019, at 11:13:23 午前.

Eggplant icon Eggplant.io | Documentation Home | User Forums | Support | Copyright © 2019 Eggplant