use exceptions in FML

This commit is contained in:
Eduardo Bart
2011-05-21 19:24:10 -03:00
parent c3e67fceb9
commit d7bc083014
14 changed files with 306 additions and 175 deletions

View File

@@ -86,10 +86,15 @@ inline std::ostream& operator<<(std::ostream& out, const TPoint<T>& point)
}
template <class T>
inline void operator>>(const FML::Node& node, TPoint<T>& point)
inline bool operator>>(const FML::Node& node, TPoint<T>& point)
{
*node.at(0) >> point.x;
*node.at(1) >> point.y;
T x, y;
if(node.readAt(0, &x) && node.readAt(1, &y)) {
point.x = x;
point.y = y;
return true;
}
return false;
}
#endif