libalvalue  1.14
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
libalvalue

What is ALValue?

ALValue is a variant used by ALCommon.

It is a recursive type. An ALValue can be:

#include <iostream>
using namespace AL;
int main()
{
// Create an array of 2 ints and a string
ALValue val;
val.arrayPush(1);
val.arrayPush(2);
val.arrayPush("hello");
// For debugging purposes:
std::cout << "val: " << val.toString() << std::endl;
/*
Or:
ALValue val;
val.setSize(3);
val[0] = 1;
val[1] = 2;
val[2] = "hello";
*/
// Read two ints and a string from an ALValue:
int a, b;
std::string c;
a = (int) val[0];
b = (int) val[1];
c = (std::string) val[2];
std::cout << "a : " << a << std::endl
<< "b : " << b << std::endl
<< "c : " << c << std::endl;
return 0;
}

limitations

Reference

Extras