Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vsl_indent.cxx File Reference


Detailed Description

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_typeindent_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 Documentation

typedef vcl_pair<int,int> indent_data_type
 

Definition at line 15 of file vsl_indent.cxx.


Function Documentation

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
 

Outputs current indent to os.

Definition at line 67 of file vsl_indent.cxx.

void vsl_indent_clear vcl_ostream &  os  ) 
 

Set indentation to zero.

Definition at line 62 of file vsl_indent.cxx.

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  ) 
 

Decrements current indent for given stream.

Definition at line 44 of file vsl_indent.cxx.

void vsl_indent_inc vcl_ostream &  os  ) 
 

Increments current indent for given stream.

Definition at line 38 of file vsl_indent.cxx.

void vsl_indent_set_tab vcl_ostream &  os,
int  t
 

Set number of spaces per increment step.

Definition at line 50 of file vsl_indent.cxx.

int vsl_indent_tab vcl_ostream &  os  ) 
 

Number of spaces per increment step.

Definition at line 56 of file vsl_indent.cxx.


Variable Documentation

const int default_tab = 2
 

Definition at line 13 of file vsl_indent.cxx.


Generated on Thu Jan 10 14:37:24 2008 for core/vsl by  doxygen 1.4.4