import { SourceMeasure } from "./SourceMeasure" ; import { Fraction } from "../../Common/DataObjects/Fraction" ; import { SourceStaffEntry } from "./SourceStaffEntry" ; /**
 * A [[VerticalSourceStaffEntryContainer]] contains the [[StaffEntry]]s at one timestamp through all the [[StaffLine]]s.
 */ export class VerticalSourceStaffEntryContainer { constructor ( parentMeasure , timestamp , size ) { this . timestamp = timestamp ; this . staffEntries = new Array ( size ) ; this . parentMeasure = parentMeasure ; } private timestamp : Fraction ; private staffEntries : SourceStaffEntry [ ] = [ ] ; private comments : Comment [ ] = [ ] ; private parentMeasure : SourceMeasure ; public $get$ ( index ) { return this . staffEntries [ index ] ; } public $set$ ( index , value ) { this . staffEntries [ index ] = value ; } public get Timestamp ( ) : Fraction { return this . timestamp ; } public set Timestamp ( value ) { this . timestamp = value ; } public get StaffEntries ( ) : SourceStaffEntry [ ] { return this . staffEntries ; } public set StaffEntries ( value ) { this . staffEntries = value ; } public get Comments ( ) : Comment [ ] { return this . comments ; } public set Comments ( value ) { this . comments = value ; } public get ParentMeasure ( ) : SourceMeasure { return this . parentMeasure ; } public set ParentMeasure ( value ) { this . parentMeasure = value ; } public getAbsoluteTimestamp ( ) { return Fraction . plus ( this . timestamp , this . parentMeasure . AbsoluteTimestamp ) ; } }