public void each(ADJ adjustmentFunction) { int[] pos = new int[dimensions.Length]; for (int x = 0; x < pos.Length; x++) { pos[x] = 0; } eachhelper(pos, adjustmentFunction); }
///<summary> /// Returns first repetition of ADJ (Adjustment) - creates it if necessary ///</summary> public ADJ GetADJ() { ADJ ret = null; try { ret = (ADJ)this.GetStructure("ADJ"); } catch (HL7Exception e) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected error accessing data - this is probably a bug in the source code generator.", e); throw new System.Exception("An unexpected error ocurred", e); } return(ret); }
private void eachhelper(int[] position, ADJ adjustmentFunction) { adjustmentFunction(behindArray[getIdx(position)], position); position[0]++; bool done = false; for (int x = 0; !done && x < position.Length; x++) { if (position[x] == dimensions[x]) { position[x] = 0; if (x + 1 >= dimensions.Length) { return; } position[x + 1]++; eachhelper(position, adjustmentFunction); } } }
///<summary> ///Removes the given ADJ ///</summary> public void RemoveADJ(ADJ toRemove) { this.RemoveStructure("ADJ", toRemove); }