From: wolf Date: Tue, 5 Apr 2005 19:49:41 +0000 (+0000) Subject: Ad an input operator for Point objects. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34c631370b04e198aae51fcb56dd87320a85beac;p=dealii-svn.git Ad an input operator for Point objects. git-svn-id: https://svn.dealii.org/trunk@10359 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/point.h b/deal.II/base/include/base/point.h index 49139601fd..fda71c498a 100644 --- a/deal.II/base/include/base/point.h +++ b/deal.II/base/include/base/point.h @@ -377,7 +377,8 @@ Point operator * (const double factor, const Point &p) */ template inline -std::ostream & operator << (std::ostream &out, const Point &p) +std::ostream & operator << (std::ostream &out, + const Point &p) { for (unsigned int i=0; i &p) +/** + * Output operator for points. Print the elements consecutively, + * with a space in between. + */ +template +inline +std::istream & operator >> (std::istream &in, + Point &p) +{ + for (unsigned int i=0; i> p[i]; + + return in; +} + + + /** * Output operator for points of dimension 1. This is implemented * specialized from the general template in order to avoid a compiler