///<summary> /// Returns first repetition of PCE (Patient Charge Cost Center Exceptions) - creates it if necessary ///</summary> public PCE GetPCE() { PCE ret = null; try { ret = (PCE)this.GetStructure("PCE"); } 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); }
static void Main(string[] args) { Board board = new Board(64); board.PlacePCE(4, 7, new PCE()); board.PlacePCE(11, 2, new PCE()); board.PlacePCE(2, 47, new PCE()); board.PlacePCE(51, 37, new PCE()); if (board.IsLocationFilled(2, 47)) { var pce = board[2, 47]; } // Non-nulls only. Iterates over 4 items only foreach (var item in board.Pieces) { int i, j; board.GetPosition(item.Key, out i, out j); PCE pce = item.Value; // Do something with [i,j] PCE } }
/// <summary> /// Copies its data entries into PCE <see cref="imbSCI.Core.collection.PropertyCollectionExtended"/> /// </summary> /// <param name="useGroup">if set to <c>true</c> [use group].</param> /// <param name="useSerial">if set to <c>true</c> [use serial].</param> /// <param name="useCodename">if set to <c>true</c> [use codename].</param> /// <param name="PCE">The pce.</param> /// <returns></returns> public PropertyCollectionExtended sendToPCE(bool useGroup, bool useSerial, bool useCodename, PropertyCollectionExtended PCE = null) { if (PCE == null) { PCE = new PropertyCollectionExtended(); } PCE.name = GetType().Name.imbTitleCamelOperation(true); PCE.description = "Data report extracted from the web page"; string nn = ""; int c = 0; foreach (reportEntryBase re in Values) { nn = ""; if (useGroup) { nn += re.group.ToString(); } if (useSerial) { nn += re.serialNumber; } if (useCodename) { if (!string.IsNullOrEmpty(nn)) { nn += "_"; } nn += re.codename; } PCE.Add(re.codename, re.Value, re.fullname, re.groupName); } return(PCE); }
void decode(BitStream inStream) { id = inStream.readBits(32); //'ADIF' if (id != ADIF_ID) { throw new AACException("id != ADIF_ID: " + id); } copyrightIDPresent = inStream.readBool(); if (copyrightIDPresent) { for (int i = 0; i < 9; i++) { copyrightID[i] = (byte)inStream.readBits(8); } } originalCopy = inStream.readBool(); home = inStream.readBool(); bitstreamType = inStream.readBool(); bitrate = inStream.readBits(23); pceCount = inStream.readBits(4) + 1; pces = new PCE[pceCount]; adifBufferFullness = new int[pceCount]; for (int i = 0; i < pceCount; i++) { if (bitstreamType) { adifBufferFullness[i] = -1; } else { adifBufferFullness[i] = inStream.readBits(20); } pces[i] = new PCE(); pces[i].decode(inStream); } }
public void PlacePCE(int i, int j, PCE item) { pieces[size * i + j] = item; }
///<summary> ///Removes the given PCE ///</summary> public void RemovePCE(PCE toRemove) { this.RemoveStructure("PCE", toRemove); }