本文整理汇总了C++中Staff::GetClef方法的典型用法代码示例。如果您正苦于以下问题:C++ Staff::GetClef方法的具体用法?C++ Staff::GetClef怎么用?C++ Staff::GetClef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Staff
的用法示例。
在下文中一共展示了Staff::GetClef方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TestCaseClef
/// Tests the Clef Functions
/// @return True if all tests were executed, false if not
bool StaffTestSuite::TestCaseClef()
{
//------Last Checked------//
// - Jan 5, 2005
// TEST CASE: IsValidClef
{
wxByte i = Staff::TREBLE_CLEF;
for (; i <= (Staff::BASS_CLEF + 1); i++)
TEST(wxString::Format(wxT("IsValidClef - %d"), i),
(Staff::IsValidClef(i) == (i <= Staff::BASS_CLEF))
);
}
// TEST CASE: SetClef
{
Staff staff;
wxByte i = Staff::TREBLE_CLEF;
for (; i <= (Staff::BASS_CLEF + 1); i++)
TEST(wxString::Format(wxT("SetClef - %d"), i),
(staff.SetClef(i) == (i <= Staff::BASS_CLEF)) &&
((i > Staff::BASS_CLEF) ? 1 : (staff.GetClef() == i))
);
}
return (true);
}
示例2: TestCaseConstructor
/// Tests the Constructors
/// @return True if all tests were executed, false if not
bool StaffTestSuite::TestCaseConstructor()
{
//------Last Checked------//
// - Jan 5, 2005
// TEST CASE: Default Constructor
{
Staff staff;
TEST(wxT("Default Constructor"),
(staff.GetClef() == Staff::DEFAULT_CLEF) &&
(staff.GetTablatureStaffType() == Staff::DEFAULT_TABLATURE_STAFF_TYPE) &&
(staff.GetStandardNotationStaffAboveSpacing() == Staff::DEFAULT_STANDARD_NOTATION_STAFF_ABOVE_SPACING) &&
(staff.GetStandardNotationStaffBelowSpacing() == Staff::DEFAULT_STANDARD_NOTATION_STAFF_BELOW_SPACING) &&
(staff.GetSymbolSpacing() == Staff::DEFAULT_SYMBOL_SPACING) &&
(staff.GetTablatureStaffBelowSpacing() == Staff::DEFAULT_TABLATURE_STAFF_BELOW_SPACING)
);
}
// TEST CASE: Primary Constructor
{
Staff staff(4, Staff::BASS_CLEF);
staff.m_positionArray[0].Add(new Position);
staff.m_positionArray[1].Add(new Position);
TEST(wxT("Copy Constructor"),
(staff.GetClef() == Staff::BASS_CLEF) &&
(staff.GetTablatureStaffType() == 4) &&
(staff.GetStandardNotationStaffAboveSpacing() == Staff::DEFAULT_STANDARD_NOTATION_STAFF_ABOVE_SPACING) &&
(staff.GetStandardNotationStaffBelowSpacing() == Staff::DEFAULT_STANDARD_NOTATION_STAFF_BELOW_SPACING) &&
(staff.GetSymbolSpacing() == Staff::DEFAULT_SYMBOL_SPACING) &&
(staff.GetTablatureStaffBelowSpacing() == Staff::DEFAULT_TABLATURE_STAFF_BELOW_SPACING)
);
}
// TEST CASE: Copy Constructor
{
Staff staff(4, Staff::BASS_CLEF);
staff.m_positionArray[0].Add(new Position);
staff.m_positionArray[1].Add(new Position);
Staff staff2(staff);
TEST(wxT("Copy Constructor"), staff == staff2);
}
return (true);
}
示例3: OnTestParseFile
//.........这里部分代码省略.........
{
}
wxByte beat1 = 0;
wxByte beat2 = 0;
wxByte beat3 = 0;
wxByte beat4 = 0;
timeSignature.GetBeamingPattern(beat1, beat2, beat3, beat4);
if (timeSignature.IsShown())
{
}
wxByte pulses = timeSignature.GetPulses();
const RehearsalSign& rehearsalSign = endBar.GetRehearsalSignConstRef();
if (rehearsalSign.IsSet())
{
wxInt8 letter = rehearsalSign.GetLetter();
wxString description = rehearsalSign.GetDescription();
}
}
// Parse the staves in the system
// In Power Tab Editor v1.7, staves can be accessed via the Section menu:
// Menu Section -> Attach Staff
// and by clicking the clef on the standard notation standard staff and
// by clicking the "TAB" clef on the tablature staff
wxUint32 staffIndex = 0;
wxUint32 staffCount = system->GetStaffCount();
for (; staffIndex < staffCount; staffIndex++)
{
Staff* staff = system->GetStaff(staffIndex);
wxCHECK2(staff != NULL, continue);
wxByte clef = staff->GetClef();
wxByte tablatureStaffType = staff->GetTablatureStaffType();
// Parse the positions in each voice
wxUint32 voice = 0;
for (; voice < NUM_STAFF_VOICES; voice++)
{
wxUint32 positionIndex = 0;
wxUint32 positionCount = staff->GetPositionCount(voice);
for (; positionIndex < positionCount; positionIndex++)
{
Position* position = staff->GetPosition(voice, positionIndex);
wxCHECK2(position != NULL, continue);
wxUint32 positionIndex = 0;
wxUint32 positionCount = staff->GetPositionCount(voice);
for (; positionIndex < positionCount; positionIndex++)
{
Position* position = staff->GetPosition(voice, positionIndex);
wxCHECK2(position != NULL, continue);
wxUint32 position2 = position->GetPosition();
wxByte durationType = position->GetDurationType();
if (position->HasIrregularGroupingTiming())
{
wxByte notesPlayed = 0;
wxByte notesPlayedOver = 0;
position->GetIrregularGroupingTiming(notesPlayed, notesPlayedOver);
}
wxByte previousBeamDurationType = position->GetPreviousBeamDurationType();
bool beamStart = position->IsBeamStart();
bool fractionalLeftBeam = position->HasFractionalLeftBeam();
bool fractionalRightBeam = position->HasFractionalRightBeam();