NorMIT-nav  22.09
An IGT application
cxIndent.cpp
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #include "cxIndent.h"
13 
14 namespace cx
15 {
16 
17 Indent::Indent() : mDetail(dNORMAL), mIndent(0) {}
18 
19 Indent::Indent(int ind, DETAIL det) : mDetail(det), mIndent(ind) {}
20 
22 
23 int Indent::getIndent() const { return mIndent; }
24 
25 vtkIndent Indent::getVtkIndent() const { return vtkIndent(mIndent); }
26 
28 {
29  return Indent(getIndent()+3, mDetail);
30 }
31 
33 {
34  return mDetail >=dDETAILS;
35 }
36 
38 {
39  return mDetail >=dNORMAL;
40 }
41 
42 ostream& operator<<(ostream &os, const Indent &val)
43 {
44  os << std::string(val.getIndent(), ' ').c_str();
45  return os;
46 }
47 
48 
49 }
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::Indent::getIndent
int getIndent() const
Definition: cxIndent.cpp:23
cx::Indent::mIndent
int mIndent
Definition: cxIndent.h:49
cx::Indent::stepDown
Indent stepDown() const
Definition: cxIndent.cpp:27
cx::Indent::~Indent
~Indent()
Definition: cxIndent.cpp:21
cx::Indent::Indent
Indent()
Definition: cxIndent.cpp:17
cx::Indent::includeNormal
bool includeNormal() const
Definition: cxIndent.cpp:37
cx::Indent::getVtkIndent
vtkIndent getVtkIndent() const
Definition: cxIndent.cpp:25
cx::Indent::DETAIL
DETAIL
Definition: cxIndent.h:31
cx::operator<<
std::ostream & operator<<(std::ostream &s, const IntBoundingBox3D &data)
Definition: cxBoundingBox3D.cpp:125
cx::Indent::includeDetails
bool includeDetails() const
Definition: cxIndent.cpp:32
cxIndent.h
cx::Indent::dDETAILS
@ dDETAILS
include printing of vtk objects
Definition: cxIndent.h:34
cx::Indent
Formatting class for debug printing of the ssc library.
Definition: cxIndent.h:28
cx::Indent::dNORMAL
@ dNORMAL
print all contents of ssc structures
Definition: cxIndent.h:33
cx::Indent::mDetail
DETAIL mDetail
how much info to print
Definition: cxIndent.h:48