Lines Matching defs:to
56 // TODO: convert to constexpr in C++11, so that the above constants can be eliminated
86 // maps unit codes obtained from their abbreviations to their SVGLength unit indexes
234 double Unit::convert(double from_dist, Unit const *to) const
237 if (to->type == UNIT_TYPE_DIMENSIONLESS) {
238 return from_dist * to->factor;
242 if (type != to->type) {
247 return from_dist * factor / to->factor;
249 double Unit::convert(double from_dist, Glib::ustring const &to) const
251 return convert(from_dist, unit_table.getUnit(to));
253 double Unit::convert(double from_dist, char const *to) const
255 return convert(from_dist, unit_table.getUnit(to));
360 /* UNSAFE while passing around pointers to the Unit objects in this table
530 double Quantity::convert(double from_dist, Unit const *from, Unit const *to)
532 return from->convert(from_dist, to);
534 double Quantity::convert(double from_dist, Glib::ustring const &from, Unit const *to)
536 return convert(from_dist, unit_table.getUnit(from.c_str()), to);
538 double Quantity::convert(double from_dist, Unit const *from, Glib::ustring const &to)
540 return convert(from_dist, from, unit_table.getUnit(to.c_str()));
542 double Quantity::convert(double from_dist, Glib::ustring const &from, Glib::ustring const &to)
544 return convert(from_dist, unit_table.getUnit(from.c_str()), unit_table.getUnit(to.c_str()));
546 double Quantity::convert(double from_dist, char const *from, char const *to)
548 return convert(from_dist, unit_table.getUnit(from), unit_table.getUnit(to));
561 /** \fixme This is overly strict. I think we should change this to: