Reads the item's value in a specified format. The format is given as type argument to the template. The template maps the C++ types std::string, int, double and bool to the member functions asString, asInt, asDouble and asBool.
Variants throwing exceptions on API errors:
template <typename T> T as() const
Variants returning API errors as int* parameter:
template <typename T> T as(int* returnCode) const
returnCode |
The error code returned when accessing the item. |
The item value in the type specified as template parameter.