boost.png (6897 bytes) Home Libraries People FAQ More

PrevUpHomeNext

Class sourceloc

boost::stacktrack::sourceloc — build info class, holds information about a specific location (filename/line number) in the source code

Synopsis

#include <boost/stacktrack/location.hpp>

using namespace boost::stacktrack;

class sourceloc {
public:
  // construct/copy/destruct
  sourceloc(const char *, int, const char *);

  // public member functions
  std::string filename() const;
  std::string funcname() const;
  int linenumber() const;
  int filenumber() const;
};

Description

This class is used by the StackTrack macros to capture static instances representing a location in the source code

sourceloc construct/copy/destruct

  1. sourceloc(const char * filename, int linenum, const char * funcname);

    Parameters

    filename

    filename, typically from __FILE__

    funcname

    name of function (if known, from BOOST_CURRENT_FUNCTION)

    linenum

    line number, typically from __LINE__

sourceloc public member functions

  1. std::string filename() const;

    Returns: filename for location

  2. std::string funcname() const;

    Returns: filename for location

  3. int linenumber() const;

    Returns: line number for location

  4. int filenumber() const;

    Returns: file number for location

Copyright © 2005 James Fowler

PrevUpHomeNext