Boost logo

Boost :

From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2004-11-13 20:27:42


I have a couple of ideas about making function traces nicer:

1. Use of PP_SEQ interface to "parse" function name and arguments

    int X::foo(char* buf, size_t len)
    {
        BOOST_TRACE_MEM_FUN( (foo)(buf, len) );
        // ...
    }

Function name can be extracted with BOOST_PP_SEQ_ELEM(0, fn),
the arguments with BOOST_PP_SEQ_POP_FRONT(fn).

BOOST_TRACE_MEM_FUN macro could expand to:

    tracer tracer_line_N(this, "foo", "(buf, len)", resolve_args (buf, len));

2. In addition to text format, produce XML output. This opens up a
possibility for XSLT convertion to UML sequence and collaboration
diagrams (XMI).

-- 
Alexander Nasonov

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk