#include "UALClasses.h"
using namespace ItmNs;
int main(int argc, char *argv[])
{
int number = 10; //number of elements
//Create a new instance of database
ItmNs::Itm itm(123, 1, 123, 1);
itm.create(); //Create a new instance of database
ItmNs::Itm::equilibriumArray cpoArray = itm._equilibriumArray;
// allocate the CPO structures
cpoArray.array.resize(number);
//Fill some fields of the CPO arrayinstances
for(int k = 0; k < number; k++)
{
cpoArray(k).codeparam.parameters.assign("xmltoken");
//Never forget to store the time for time dependent CPOs!!
cpoArray(k).time = k;
}
//Now the CPO array is filled, we store in the database via method put()
cpoArray.put();
itm.close();
} |