boost::call_stack::call_stack
// In header: <boost/call_stack/stack.hpp> template<std::size_t MaxDepth> class call_stack { public: // types typedef unspecified base_type; typedef base_type::depth_type depth_type; typedef base_type::stack_type stack_type; typedef base_type::size_type size_type; typedef base_type::difference_type difference_type; typedef base_type::value_type value_type; // call_frame in disguise typedef base_type::const_reference const_reference; // const reference to a call_frame typedef base_type::const_iterator const_iterator; // const iterator yielding a call_frame typedef base_type::const_reverse_iterator const_reverse_iterator; // construct/copy/destruct call_stack(bool = false); call_stack(const call_stack &); call_stack& operator=(call_stack); // public member functions size_type depth() const; size_type size() const; size_type max_depth() const; size_type max_size() const; size_type capacity() const; bool empty() const; const_iterator begin() const; const_iterator end() const; const_iterator cbegin() const; const_iterator cend() const; const_reverse_iterator crbegin() const; const_reverse_iterator crend() const; const_reverse_iterator rbegin() const; const_reverse_iterator rend() const; const_reference operator[](size_type) const; const_reference at(size_type) const; bool operator==(const call_stack &) const; bool operator!=(const call_stack &) const; void swap(call_stack &); depth_type get_stack(); };
Platform-agnostic call stack information. A collection of call_frame. Use call_stack_info to render it in a human-readable form.
std::size_t MaxDepth
dictates the maximum number of frames that can be captured.
call_stack
public
construct/copy/destructcall_stack(bool capture = false);
By default, the constructor will not capture the run-time call stack when the object is constructed.
See Also:
get_stack() for an alternate way to capure the run-time stack after construction.
Parameters: |
|
call_stack(const call_stack & other);
call_stack& operator=(call_stack other);
call_stack
public member functionssize_type depth() const;
Depth of the captured run-time stack.
size_type size() const;
size_type max_depth() const;
Maximum depth of the call stack. If the run-time call stack is deeper than max_depth(), the captured information will be truncated.
size_type max_size() const;
size_type capacity() const;
bool empty() const;
const_iterator begin() const;
Returns: |
an iterator pointing to a call_frame. |
const_iterator end() const;
const_iterator cbegin() const;
const_iterator cend() const;
const_reverse_iterator crbegin() const;
const_reverse_iterator crend() const;
const_reverse_iterator rbegin() const;
const_reverse_iterator rend() const;
const_reference operator[](size_type idx) const;
Returns: |
a const reference to a call_frame. |
const_reference at(size_type idx) const;
bool operator==(const call_stack & other) const;
bool operator!=(const call_stack & other) const;
void swap(call_stack & other);
depth_type get_stack();
Capture the call stack at the place where get_stack() is called.