blob: 6505ae6f435bb475b399d38591d5f8e1a1b4fbd2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/*! \page components_smartobjects_types_repr Type value representation methods for SmartObjects
As alternative to the type casts NsSmartDeviceLink::NsSmartObjects::CSmartObject class defines set of usable methods that allow to represent object values as desired type. Use of these methods may change code style and readability but functionally it completely similar to the type casts of Smart Objects.
Example:
<pre>
NsSmartDeviceLink::NsSmartObjects::CSmartObject obj;
obj[0] = 1;
obj[1] = true;
obj[2] = 'a';
obj[3] = 3.14;
int i = obj[0].asInt();
char c = obj[1].asChar();
double d = obj[2].asDouble();
</pre>
*/
|