Exemple #1
0
bool StaffType::operator==(const StaffType& st) const
      {
      if (!isSameStructure(st) || st._xmlName != _xmlName) {        // common to all type groups
            return false;
            }
      if (_group == StaffGroup::TAB) {                      // TAB-specific
            bool v = st._durationFontIdx  == _durationFontIdx
               && st._durationFontSize  == _durationFontSize
               && st._durationFontUserY == _durationFontUserY
               && st._fretFontIdx       == _fretFontIdx
               && st._fretFontSize      == _fretFontSize
               && st._fretFontUserY     == _fretFontUserY
               ;
            return v;
            }
      return true;
      }
int main(int argc, char *argv[])
{
	TreeNode *root1 = NULL;
	TreeNode *root2 = NULL;

	PreorderCreateBT(root1);
	PreorderCreateBT(root2);

	bool res = isSameStructure(root1, root2);

	if (res)
	{
		printf("the two binary tree are the same structure\n");
	}
	else
	{
		printf("the two bianry tree are not the same structure\n");
	}

	return 0;
}
Exemple #3
0
bool StaffType::isEqual(const StaffType& st) const
      {
      return isSameStructure(st)
         && st._name == _name;
      }