tested LilyPond features.
copyright info
+Most music distributed with LilyPond was composed a long time ago, and
+do not have copyrights. Any exceptions are mentioned here.
+
=head2 F<cadenza.ly>
A cadenza to Mozart Horn concerto no. 3.
=head2 F<error.ly>
-Error messages, context errors.
+Features: Error messages, context errors.
=head2 F<fugue1.midi.ly>
String str()const;
void print() const;
void setpartial(Moment p);
+ String try_set_partial_str(Moment)const;
Moment barleft();
void set_meter(int,int);
- static int compare (Time_description&, Time_description&);
+ static int compare (const Time_description&, const Time_description&);
};
#include "compare.hh"
{
if (cadenza_b_ && !b) {
if (whole_in_measure_) {
- bars_i_ ++;
+ bars_i_ ++; // should do?
whole_in_measure_ = 0;
}
}
{
return!(whole_in_measure_);
}
+
+/**
+ retrieve error messages.
+ @return
+ error messages if not possible, "" if possible
+ */
+String
+Time_description::try_set_partial_str(Moment p)const
+{
+ if (when_)
+ return ("Partial measure only allowed at beginning.");
+ if (p<Rational(0))
+ return ("Partial must be non-negative");
+ if (p > whole_per_measure_)
+ return ("Partial measure too large");
+ return "";
+}
+
void
Time_description::setpartial(Moment p)
{
- if (when_)
- error_t ("Partial measure only allowed at beginning.", *this);
- if (p<Rational(0)||p > whole_per_measure_)
- error_t ("Partial measure has incorrect size", *this);
whole_in_measure_ = whole_per_measure_ - p;
}
}
int
-Time_description::compare(Time_description &t1, Time_description&t2)
+Time_description::compare(Time_description const &t1, Time_description const&t2)
{
int i = sign(t1.when_-t2.when_);