![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Collects a message with stream syntax for use in an exception. More...
#include <io.h>
Public Member Functions | |
| template<typename T > | |
| Msg & | operator<< (const T &v) |
| Appends a value to the message. | |
| Msg & | operator<< (std::ostream &(*manip)(std::ostream &)) |
| Appends a stream manipulator such as std::endl. | |
| std::string | str () const |
| The message built so far. | |
| operator std::string () const | |
| Implicit conversion so it can be passed straight to an exception. | |
Private Attributes | |
| std::ostringstream | d_oss |
| Message under construction. | |
Collects a message with stream syntax for use in an exception.
Validation in the library reports failure by throwing rather than by calling exit(), because exit() terminates the embedding process. Under the Python interface that ends the interpreter with no traceback. The checks already composed their message as std::cerr << a << b. This collects the same sequence into a std::string that an exception can carry.
|
inline |
|
inline |
|
inline |
|
inline |
The message built so far.
Definition at line 67 of file io.h.
References d_oss.
Referenced by material::PdState::computeParameters(), anonymous_namespace{materialUtil.cpp}::computeStateMxI(), and geom::createGeomObjectOld().
|
private |
Message under construction.
Definition at line 74 of file io.h.
Referenced by operator std::string(), operator<<(), operator<<(), and str().