- AttributeIntArrayPtr aStamps = aFieldFeature->intArray("stamps");
- for (int aStepIndex = 0; aStepIndex < aTables->tables(); aStepIndex++) {
- XAO::Step* aStep = aXaoField->addNewStep(aStepIndex);
- aStep->setStep(aStepIndex);
- int aStampIndex = aStamps->value(aStepIndex);
- aStep->setStamp(aStampIndex);
- int aNumElements = isWholePart ? aXaoField->countElements() : aTables->rows();
- int aNumComps = aTables->columns();
- std::set<int> aFilledIDs; // to fill the rest by defaults
- // omit default values first row
- for(int aRow = isWholePart ? 0 : 1; aRow < aNumElements; aRow++) {
- for(int aCol = 0; aCol < aNumComps; aCol++) {
- int anElementID = 0;
- if (!isWholePart) {
- // element index actually is the ID of the selection
- AttributeSelectionPtr aSelection = aSelectionList->value(aRow - 1);
-
- // complex conversion of reference id to element index
- int aReferenceID = aSelection->Id();
- std::string aReferenceString = XAO::XaoUtils::intToString(aReferenceID);
- anElementID =
- aXao.getGeometry()->getElementIndexByReference(aFieldDimension, aReferenceString);
- }