Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetAllParentsOfUnitDimension () const as constcontent owning UnitPeriods 
 | 
{ 
 | 
  Description: 'Returns all parents of the unit dimension' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Martijn May-30-2016 (created) 
 | 
     
 | 
    unitperiods := construct( UnitPeriods, constcontent ) 
 | 
     
 | 
    unitperiod := this.ParentOfUnitDimension(); 
 | 
     
 | 
    while( not isnull( unitperiod ) ) 
 | 
    { 
 | 
     unitperiods.Add( unitperiod ) 
 | 
     unitperiod := unitperiod.ParentOfUnitDimension() 
 | 
    } 
 | 
     
 | 
    return &unitperiods 
 | 
  *] 
 | 
} 
 |