DGD Library
Version: 0.1.0.14 | Updated: Thu Aug 10 16:58:43 2006
Home
DGD News
FAQ
Code Documentation
DGD Installation Guide
Bugs-n-Features
DGD at Sourceforge.net
Download DGD
Subversion
Code Documentation
Documentation
Namespaces
Class Hierarchy
Class List
File List
Namespace Members
Functions
Globals
Tutorial
Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

dgDebugExtra.h File Reference

Set of useful macros for use with DGD . More...

Go to the source code of this file.

Defines

  • #define dgd_file   (char*)__FILE__ << "(" << __LINE__ <<") "
    Expands to constant string in format "filename(line)".

  • #define dgd_expand(s)   #s " = " << DGD::dgd << (s)
    Expands into expression in form "s = " << s.

  • #define dgd_expandp(s)   #s " = " << DGD::dgd << DGD::ptr(s)
    Expands into expression in form "s = " << *s assuming that the parameter is a pointer or iterator.

  • #define dgd_for(b, e)   DGD::dgd << DGD::dgd_make_sequence((b),(e))
    Expands into expression which is able to dump a sequence denoted by iterators b and e.

  • #define dgd_fors(b, e, s)   DGD::dgd << DGD::dgd_make_sequence((b),(e),(s))
    Expands into expression which is able to dump a sequence denoted by iterators b and e.

  • #define dgd_do(b)   DGD::dgd << DGD::dgd_make_circle((b))
    Expands into expression which is able to dump a circle denoted by circulator b.

  • #define dgd_dos(b, s)   DGD::dgd << DGD::dgd_make_circle((b),(s))
    Expands into expression which is able to dump a circle denoted by circulator b.

  • #define dgd_channel(name)   ((DGD::Debug::debug_factory->operator[](#name)))
    Expands into channel pointer given channel name.

  • #define dgd_trace(name, arg)
    Trace expand.

  • #define dgd_flush_all
    Flush all channels and files.

  • #define dgd_start_scope(c, text)
    Start global indented output scope.

  • #define dgd_scope(c, text)
    Start local indented output scope.

  • #define dgd_echo(text)
    Echo expand.

  • #define dgd_end_scope(c)
    Close the current scope.

  • #define dgd_end_scope_text(c, text)
    Close the current scope, output the given text before closing.


Detailed Description

Set of useful macros for use with DGD .


Define Documentation

#define dgd_file   (char*)__FILE__ << "(" << __LINE__ <<") "
 

Expands to constant string in format "filename(line)".

#define dgd_expand )    #s " = " << DGD::dgd << (s)
 

Expands into expression in form "s = " << s.

For example dgd_expand(a+b) will expand into "a+b = " << (a+b)

Parameters:
s any expression

#define dgd_expandp )    #s " = " << DGD::dgd << DGD::ptr(s)
 

Expands into expression in form "s = " << *s assuming that the parameter is a pointer or iterator.

Parameters:
s any pointer or iterator expression

#define dgd_forb,
 )    DGD::dgd << DGD::dgd_make_sequence((b),(e))
 

Expands into expression which is able to dump a sequence denoted by iterators b and e.

All elements of the dumped sequence are separated by spaces. Iterators b and e must be of same type and the value type of the sequence must have operator << ().

#define dgd_forsb,
e,
 )    DGD::dgd << DGD::dgd_make_sequence((b),(e),(s))
 

Expands into expression which is able to dump a sequence denoted by iterators b and e.

All elements of the dumped sequence are separated by string s. Iterators b and e must be of same type and the value type of the sequence must have operator << ().

#define dgd_do )    DGD::dgd << DGD::dgd_make_circle((b))
 

Expands into expression which is able to dump a circle denoted by circulator b.

All elements of the dumped circle are separated by spaces. The value type of the circle must have operator << ().

#define dgd_dosb,
 )    DGD::dgd << DGD::dgd_make_circle((b),(s))
 

Expands into expression which is able to dump a circle denoted by circulator b.

All elements of the dumped circle are separated by s. The value type of the circle must have operator << ().

#define dgd_channelname  )    ((DGD::Debug::debug_factory->operator[](#name)))
 

Expands into channel pointer given channel name.

Parameters:
name channel name. Note that there is no need in quoting the name each time the macro is used.

#define dgd_tracename,
arg  ) 
 

Trace expand.

Expands into expression equivalent to:

 DGD::channel& cnl = *DGD::Debug::debug_factory->operator[]( "name" );
 cnl << arg; 
Existence of the Debug factory and channel is checked before any output operation, as well as closed channel output.

#define dgd_flush_all
 

Flush all channels and files.

#define dgd_start_scopec,
text  ) 
 

Start global indented output scope.

This macro in conjunction with dgd_end_scope, dgd_echo, dgd_scope and dgd_end_scope_text is used to simplify use of DGD channels. Here indented scope is a indented "{...}" block. This macro creates local channel pointer and starts the indented scope. The indented scope must be ended with dgd_end_scope or dgd_end_scope_text. The global scope can contain any number of local scopes opened by dgd_scope.

#define dgd_scopec,
text  ) 
 

Start local indented output scope.

This macro starts local indented scope.

See also:
dgd_start_scope

dgd_end_scope

#define dgd_echotext  ) 
 

Echo expand.

This macro is similar to dgd_trace, but it can be called inside indented scope only.

See also:
dgd_start_scope

dgd_scope

dgd_end_scope

#define dgd_end_scope ) 
 

Close the current scope.

#define dgd_end_scope_textc,
text  ) 
 

Close the current scope, output the given text before closing.


Generated on Thu Aug 10 16:48:28 2006 for DGD Library by doxygen1.3

SourceForge.net Logo Powered by Mason Powered by Perl
Web design derived from Pasilda design found on www.oswd.org.
Copyright (c) 2002, 2003. Dimitry Kloper <kloper@users.sourceforge.net>