Definition in file vsl_indent.cxx.
#include "vsl_indent.h"
#include <vcl_iostream.h>
#include <vcl_map.txx>
#include <vcl_utility.h>
Go to the source code of this file.
Typedefs | |
| typedef vcl_pair< int, int > | indent_data_type |
Functions | |
| indent_data_type * | indent_data (vcl_ostream &os) |
| void | vsl_indent_inc (vcl_ostream &os) |
| Increments current indent for given stream. | |
| void | vsl_indent_dec (vcl_ostream &os) |
| Decrements current indent for given stream. | |
| void | vsl_indent_set_tab (vcl_ostream &os, int t) |
| Set number of spaces per increment step. | |
| int | vsl_indent_tab (vcl_ostream &os) |
| Number of spaces per increment step. | |
| void | vsl_indent_clear (vcl_ostream &os) |
| Set indentation to zero. | |
| vcl_ostream & | operator<< (vcl_ostream &os, const vsl_indent &) |
| Outputs current indent to os. | |
| void | vsl_indent_clear_all_data () |
| Tidy up the internal indent map to remove potential memory leaks. | |
Variables | |
| const int | default_tab = 2 |
| typedef vcl_pair<int,int> indent_data_type |
Definition at line 15 of file vsl_indent.cxx.
| indent_data_type* indent_data | ( | vcl_ostream & | os | ) |
Definition at line 18 of file vsl_indent.cxx.
| vcl_ostream& operator<< | ( | vcl_ostream & | os, | |
| const vsl_indent & | ||||
| ) |
| void vsl_indent_clear | ( | vcl_ostream & | os | ) |
| void vsl_indent_clear_all_data | ( | ) |
Tidy up the internal indent map to remove potential memory leaks.
The details of indents for each stream are stored in a static map. When testing for memory leaks, this is flagged, creating lots of noise in the output of memory leak checkers. This call empties the map, removing the potential leak. Pragmatically it is called in the vsl_delete_all_loaders()
This should no longer be needed, since that static map was made a static inside the function indent_data() instead of a global one. - PVr. (B.t.w., purify on SGI's native compiler never showed a memory leak here.)
Definition at line 86 of file vsl_indent.cxx.
| void vsl_indent_dec | ( | vcl_ostream & | os | ) |
| void vsl_indent_inc | ( | vcl_ostream & | os | ) |
| void vsl_indent_set_tab | ( | vcl_ostream & | os, | |
| int | t | |||
| ) |
| int vsl_indent_tab | ( | vcl_ostream & | os | ) |
| const int default_tab = 2 |
Definition at line 13 of file vsl_indent.cxx.
1.5.1