CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csDebuggingGraph Class Reference

This is a static class that helps with debugging. More...

#include <debug.h>

List of all members.

Static Public Methods

void SetupGraph (iObjectRegistry *object_reg)
 Initialize the debugging graph. More...

void AddObject (iObjectRegistry *object_reg, void *object, bool scf, char *file, int linenr, char *description,...)
 Add a new object to the debug graph and link to its parent. More...

void AttachDescription (iObjectRegistry *object_reg, void *object, char *description,...)
 Attach a new description to an object in the graph. More...

void AttachType (iObjectRegistry *object_reg, void *object, char *type)
 Attach a type to an object in the graph. More...

void RemoveObject (iObjectRegistry *object_reg, void *object, char *file, int linenr)
 Remove an object from the debug tree. More...

void AddChild (iObjectRegistry *object_reg, void *parent, void *child)
 Add a child to an object. More...

void AddParent (iObjectRegistry *object_reg, void *child, void *parent)
 Add a parent to an object. More...

void RemoveChild (iObjectRegistry *object_reg, void *parent, void *child)
 Unlink a child from its parent. More...

void RemoveParent (iObjectRegistry *object_reg, void *child, void *parent)
 Unlink a parent from its child. More...

void Clear (iObjectRegistry *object_reg)
 Completely clear everything in the debug graph. More...

void Dump (iObjectRegistry *object_reg)
 Dump all the resulting graphs. More...

void Dump (iObjectRegistry *object_reg, void *object, bool reset_mark=true)
 Dump the graph containing the given object. More...


Detailed Description

This is a static class that helps with debugging.

It will register an object in the object registry that keeps track of allocations in a graph. Later on you can add/remove allocations from that graph.

Definition at line 82 of file debug.h.


Member Function Documentation

void csDebuggingGraph::AddChild iObjectRegistry   object_reg,
void *    parent,
void *    child
[static]
 

Add a child to an object.

void csDebuggingGraph::AddObject iObjectRegistry   object_reg,
void *    object,
bool    scf,
char *    file,
int    linenr,
char *    description,
...   
[static]
 

Add a new object to the debug graph and link to its parent.

If 'scf' is true 'object' is an iBase.

void csDebuggingGraph::AddParent iObjectRegistry   object_reg,
void *    child,
void *    parent
[static]
 

Add a parent to an object.

void csDebuggingGraph::AttachDescription iObjectRegistry   object_reg,
void *    object,
char *    description,
...   
[static]
 

Attach a new description to an object in the graph.

void csDebuggingGraph::AttachType iObjectRegistry   object_reg,
void *    object,
char *    type
[static]
 

Attach a type to an object in the graph.

void csDebuggingGraph::Clear iObjectRegistry   object_reg [static]
 

Completely clear everything in the debug graph.

void csDebuggingGraph::Dump iObjectRegistry   object_reg,
void *    object,
bool    reset_mark = true
[static]
 

Dump the graph containing the given object.

You should usually leave reset_mark alone. That's for internal use.

void csDebuggingGraph::Dump iObjectRegistry   object_reg [static]
 

Dump all the resulting graphs.

void csDebuggingGraph::RemoveChild iObjectRegistry   object_reg,
void *    parent,
void *    child
[static]
 

Unlink a child from its parent.

void csDebuggingGraph::RemoveObject iObjectRegistry   object_reg,
void *    object,
char *    file,
int    linenr
[static]
 

Remove an object from the debug tree.

void csDebuggingGraph::RemoveParent iObjectRegistry   object_reg,
void *    child,
void *    parent
[static]
 

Unlink a parent from its child.

void csDebuggingGraph::SetupGraph iObjectRegistry   object_reg [static]
 

Initialize the debugging graph.

Special note! In debug mode (CS_DEBUG) this function will put the pointer to the object registry in iSCF::object_reg. That way we can use this debugging functionality in places where the object registry is not available.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14