Simbody
3.7
|
Namespace-scope utility function SimTK::readUnformatted<T>() reads the next whitespace-separated token(s) from a given stream and attempts to interpret them as a value of type T.
More...
Functions | |
bool | SimTK::readOneTokenUnformatted (std::istream &in, String &token) |
Read in the next whitespace-delimited token as a String, ignoring leading whitespace. More... | |
template<class T > | |
bool | SimTK::readUnformatted (std::istream &in, T &v) |
The default implementation of readUnformatted<T> reads in the next whitespace-separated token and then attempts to convert the whole thing into one value of type T. More... | |
template<class T > | |
bool | SimTK::readUnformatted (std::istream &in, negator< T > &v) |
Specialization for negator<T>: read as type T and convert. More... | |
template<class T > | |
bool | SimTK::readUnformatted (std::istream &in, std::complex< T > &v) |
Specialization for std::complex<T> (two space-separated T's). More... | |
template<class T > | |
bool | SimTK::readUnformatted (std::istream &in, conjugate< T > &v) |
Specialization for SimTK::conjugate<T> (same as std::complex<T>). More... | |
template<> | |
bool | SimTK::readUnformatted< String > (std::istream &in, String &v) |
Specialization for SimTK::String (just read token). More... | |
template<int M, class E , int S> | |
bool | readUnformatted (std::istream &in, Vec< M, E, S > &v) |
Specialize for Vec<M,E,S> to delegate to element type E, with spaces separating the elements. More... | |
template<int N, class E , int S> | |
bool | readUnformatted (std::istream &in, Row< N, E, S > &v) |
Specialize for Row<N,E,S> to delegate to element type E, with spaces separating the elements; format is same as Vec. More... | |
template<int M, int N, class E , int CS, int RS> | |
bool | readUnformatted (std::istream &in, Mat< M, N, E, CS, RS > &v) |
Specialize for Mat<M,N,E,CS,RS> delegating to Row<N,E,RS>. More... | |
template<int M, class E , int RS> | |
bool | readUnformatted (std::istream &in, SymMat< M, E, RS > &v) |
Specialize for SymMat<M,E,RS>. More... | |
Namespace-scope utility function SimTK::readUnformatted<T>() reads the next whitespace-separated token(s) from a given stream and attempts to interpret them as a value of type T.
|
inline |
Read in the next whitespace-delimited token as a String, ignoring leading whitespace.
The token is terminated by whitespace or eof and the terminating character is left in the stream. Failure to find any non-whitespace characters is treated as a failure. If we're successful at getting a token the function returns true; the stream may be good() or eof(). Otherwise this function returns false and the fail bit in the stream is also set.
|
inline |
The default implementation of readUnformatted<T> reads in the next whitespace-separated token and then attempts to convert the whole thing into one value of type T.
If that fails, or if the whole token isn't consumed, we return false and the fail bit is set in the stream.
|
inline |
Specialization for negator<T>: read as type T and convert.
|
inline |
Specialization for std::complex<T> (two space-separated T's).
|
inline |
Specialization for SimTK::conjugate<T> (same as std::complex<T>).
|
inline |
Specialization for SimTK::String (just read token).
|
related |
Specialize for Vec<M,E,S> to delegate to element type E, with spaces separating the elements.
|
related |
Specialize for Row<N,E,S> to delegate to element type E, with spaces separating the elements; format is same as Vec.
|
related |
Specialize for Mat<M,N,E,CS,RS> delegating to Row<N,E,RS>.
|
related |
Specialize for SymMat<M,E,RS>.
We require the whole matrix, then verify symmetry and assign to the output argument. We'll return false with the fail bit set in the stream if we get a Mat<M,M> but it isn't symmetric to a tight numerical tolerance.