dbg::source_pos Struct Reference

Data structure describing a position in the source file. More...

`#include <dbg.h>`

## Public Member Functions

| source_pos (line_no_t ln, func_name_t fn, file_name_t fl, dbg_source s)
| Creates a source_pos struct. More...
| source_pos ()
| A 'null' source_pos for 'no position specified'.

## Public Attributes

line_no_t | line
func_name_t | func
file_name_t | file
dbg_source | src

## Detailed Description

Data structure describing a position in the source file.

That is,

- The line number
- The function name (if the compiler supports this)
- The filename
- The dbg_soruce specified by DBG_SOURCE compilation parameter, if any (otherwise zero)

To create a source_pos for the current position, you can use the DBG_HERE convenience macro.

There is an empty constructor that allows you to create a source_pos that represents 'no position specified'.

This structure should only be used in dbg library API calls.

You can print a source_pos using the usual stream manipulator syntax.

Definition at line 431 of file dbg.h.

## Constructor & Destructor Documentation

## source_pos()

dbg::source_pos::source_pos | ( | line_no_t | ln,
|  | func_name_t | fn,
|  | file_name_t | fl,
|  | dbg_source | s
| ) |  |

inline

Creates a source_pos struct.

Use the DBG_HERE macro to call this constructor conveniently.

Definition at line 442 of file dbg.h.

: line(ln), func(fn), file(fl), src(s) {}

The documentation for this struct was generated from the following file:

- dbg.h