stage 3 of TimingData changes: changed external interface, enforce encapsulation more strictly

This commit is contained in:
Mark Cannon
2011-09-15 03:28:58 +00:00
parent c85f1f7053
commit 8099e25dcc
21 changed files with 1248 additions and 1720 deletions
+93
View File
@@ -24,6 +24,99 @@ void TimingSegment::Scale( int start, int length, int newLength )
SetRow( ScalePosition( start, length, newLength, this->GetRow() ) );
}
void TimingSegment::DebugPrint() const
{
LOG->Trace( "\tTimingSegment(%d [%f])", GetRow(), GetBeat() );
}
void BPMSegment::DebugPrint() const
{
LOG->Trace( "\t%s(%d [%f], %f)",
TimingSegmentTypeToString(GetType()).c_str(),
GetRow(), GetBeat(), GetBPM()
);
}
void StopSegment::DebugPrint() const
{
LOG->Trace( "\t%s(%d [%f], %f)",
TimingSegmentTypeToString(GetType()).c_str(),
GetRow(), GetBeat(), GetPause()
);
}
void DelaySegment::DebugPrint() const
{
LOG->Trace( "\t%s(%d [%f], %f)",
TimingSegmentTypeToString(GetType()).c_str(),
GetRow(), GetBeat(), GetPause()
);
}
void TimeSignatureSegment::DebugPrint() const
{
LOG->Trace( "\t%s(%d [%f], %d/%d)",
TimingSegmentTypeToString(GetType()).c_str(),
GetRow(), GetBeat(), GetNum(), GetDen()
);
}
void WarpSegment::DebugPrint() const
{
LOG->Trace( "\t%s(%d [%f], %d [%f])",
TimingSegmentTypeToString(GetType()).c_str(),
GetRow(), GetBeat(), GetLengthRows(), GetLengthBeats()
);
}
void LabelSegment::DebugPrint() const
{
LOG->Trace( "\t%s(%d [%f], %s)",
TimingSegmentTypeToString(GetType()).c_str(),
GetRow(), GetBeat(), GetLabel().c_str()
);
}
void TickcountSegment::DebugPrint() const
{
LOG->Trace( "\t%s(%d [%f], %d)",
TimingSegmentTypeToString(GetType()).c_str(),
GetRow(), GetBeat(), GetTicks()
);
}
void ComboSegment::DebugPrint() const
{
LOG->Trace( "\t%s(%d [%f], %d, %d)",
TimingSegmentTypeToString(GetType()).c_str(),
GetRow(), GetBeat(), GetCombo(), GetMissCombo()
);
}
void SpeedSegment::DebugPrint() const
{
LOG->Trace( "\t%s(%d [%f], %f, %f, %d)",
TimingSegmentTypeToString(GetType()).c_str(),
GetRow(), GetBeat(), GetRatio(), GetDelay(), GetUnit()
);
}
void ScrollSegment::DebugPrint() const
{
LOG->Trace( "\t%s(%d [%f], %f)",
TimingSegmentTypeToString(GetType()).c_str(),
GetRow(), GetBeat(), GetRatio()
);
}
void FakeSegment::DebugPrint() const
{
LOG->Trace( "\t%s(%d [%f], %d [%f])",
TimingSegmentTypeToString(GetType()).c_str(),
GetRow(), GetBeat(), GetLengthRows(), GetLengthBeats()
);
}
RString FakeSegment::ToString(int dec) const
{
RString str = "%.0" + IntToString(dec)