#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();
ItmNs::Itm::equilibriumArray cpoArray = itm._equilibriumArray;
// allocate the CPO structures
cpoArray.array.resize(number);
//Fill someCPO fields of the CPO arrayinstances
for(int k = 0; k < number; k++)
{
cpoArray(k).codeparam.parameters.assign("xmltoken")x.y = VALUE;
//Never forgetDo tonot store theforget time for time dependent CPOs!!
cpoArray(k).time = kTIME;
}
//Now the CPO array is filled, we storeSave data in the database via method put()
cpoArray.put();
// Close the pulse file
itm.close();
} |