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