libalvalue  1.14.5
libalvalue

qi

ALValue is a variant used by ALCommon.

It is a recursive type. An ALValue can be:

#include <iostream>
#include <alvalue/alvalue.h>

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

API

Extras

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines