1 #ifndef CPPAD_CG_OPERATION_NODE_NAME_STREAMBUF_INCLUDED 2 #define CPPAD_CG_OPERATION_NODE_NAME_STREAMBUF_INCLUDED 34 using char_type =
typename std::streambuf::char_type;
35 using int_type =
typename std::streambuf::int_type;
36 using pos_type =
typename std::streambuf::pos_type;
45 throw CGException(
"Only one OperationNodeNameStreambuf can exist at a time in each thread");
48 throw CGException(
"CGOStreamFunc<Base>::FUNC already defined in this thread");
59 std::streamsize xsputn(
const char_type* s,
60 std::streamsize n)
override {
61 if (node_ !=
nullptr && n > 0) {
62 node_->
setName(std::string(s, n));
73 static std::ostream& registerNode(std::ostream& os,
76 BUF->node_ = c.getOperationNode();
void setName(const std::string &name)