as

Navigation:  NxLib API > C++ Interface > NxLibItem >

as

Previous pageReturn to chapter overviewNext page

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.

Signatures

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

Parameters

returnCode

The error code returned when accessing the item.

Return Value

The item value in the type specified as template parameter.