'ODTONE - Open Dot Twenty One'

PrevUpHomeNext

Class checkpoint

odtone::checkpoint

Synopsis

// In header: </home/carlos/Projectos/odtone/inc/odtone/debug.hpp>


class checkpoint {
public:
  // construct/copy/destruct
  checkpoint(const char *, uint, const char *);
  ~checkpoint();

  // public static functions
  static checkpoint * top();

  // public member functions
  checkpoint * previous() const;
  const char * file() const;
  uint line() const;
  const char * expression() const;
  operator bool() const;
};

Description

Mechanism for debugging, which allows to follow the execution states of the application. It can be viewed as a linked list of checkpoints that maintains the execution states of the application. If a crash happens, the last checkpoint will point to its occurence.

checkpoint public construct/copy/destruct

  1. checkpoint(const char * file, uint line, const char * exp);

    Construct a checkpoint and add it to the checkpoint list.

    Parameters:

    exp

    expression of the checkpoint.

    file

    file name of the checkpoint.

    line

    line number of the checkpoint.

  2. ~checkpoint();

    Destruct a checkpoint and remove it from the checkpoint list.

checkpoint public static functions

  1. static checkpoint * top();

    Get the top checkpoint in the list.

    Returns:

    The top checkpoint in the list.

checkpoint public member functions

  1. checkpoint * previous() const;

    Get the previous checkpoint.

    Returns:

    The previous checkpoint.

  2. const char * file() const;

    Get the checkpoint's file name.

    Returns:

    The checkpoint's file name.

  3. uint line() const;

    Get the checkpoint's line number.

    Returns:

    The checkpoint's line number.

  4. const char * expression() const;

    Get the checkpoint's expression.

    Returns:

    The checkpoint's expression.

  5. operator bool() const;

PrevUpHomeNext