Orfeo Toolbox  3.16
itkIndent.cxx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkIndent.cxx,v $
5  Language: C++
6  Date: $Date: 2009-02-05 19:04:58 $
7  Version: $Revision: 1.12 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  Portions of this code are covered under the VTK copyright.
13  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
14 
15  This software is distributed WITHOUT ANY WARRANTY; without even
16  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
17  PURPOSE. See the above copyright notices for more information.
18 
19 =========================================================================*/
20 #include "itkIndent.h"
21 #include "itkObjectFactory.h"
22 
23 #define ITK_STD_INDENT 2
24 #define ITK_NUMBER_OF_BLANKS 40
25 
26 namespace itk
27 {
28 
29 static const char blanks[ITK_NUMBER_OF_BLANKS+1] =
30 " ";
31 
35 Indent*
37 New()
38 {
39  return new Self;
40 }
41 
42 
47 Indent
48 Indent
50 {
51  int indent = m_Indent + ITK_STD_INDENT;
52  if ( indent > ITK_NUMBER_OF_BLANKS )
53  {
54  indent = ITK_NUMBER_OF_BLANKS;
55  }
56  return indent;
57 }
58 
62 std::ostream&
63 operator<<(std::ostream& os, const Indent& ind)
64 {
65  os << blanks + (ITK_NUMBER_OF_BLANKS-ind.m_Indent);
66  return os;
67 }
68 
69 } // end namespace itk

Generated at Sat Feb 2 2013 23:45:39 for Orfeo Toolbox with doxygen 1.8.1.1