115 {
116
117
118
119
120 float x, y, z;
121 char c;
122
123 is >> std::ws >> c;
124
125
126 if (is.fail() || c != '(' ) {
127 std::cerr
128 << "Could not find required opening parenthesis "
129 << "in input of a BasicVector3D<float>"
130 << std::endl;
131 return is;
132 }
133
134 is >> x >> std::ws >> c;
135 if (is.fail() || c != ',' ) {
136 std::cerr
137 << "Could not find x value and required trailing comma "
138 << "in input of a BasicVector3D<float>"
139 << std::endl;
140 return is;
141 }
142
143 is >> y >> std::ws >> c;
144 if (is.fail() || c != ',' ) {
145 std::cerr
146 << "Could not find y value and required trailing comma "
147 << "in input of a BasicVector3D<float>"
148 << std::endl;
149 return is;
150 }
151
152 is >> z >> std::ws >> c;
153 if (is.fail() || c != ')' ) {
154 std::cerr
155 << "Could not find z value and required close parenthesis "
156 << "in input of a BasicVector3D<float>"
157 << std::endl;
158 return is;
159 }
160
164 return is;
165 }