summaryrefslogtreecommitdiff
path: root/csharp/src/Ice/OutputBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/Ice/OutputBase.cs')
-rw-r--r--csharp/src/Ice/OutputBase.cs40
1 files changed, 20 insertions, 20 deletions
diff --git a/csharp/src/Ice/OutputBase.cs b/csharp/src/Ice/OutputBase.cs
index 5e5b2ac926b..147be419a10 100644
--- a/csharp/src/Ice/OutputBase.cs
+++ b/csharp/src/Ice/OutputBase.cs
@@ -27,7 +27,7 @@ public class OutputBase
indentSave_ = new Stack<int>();
separator_ = true;
}
-
+
public
OutputBase(TextWriter writer)
{
@@ -39,7 +39,7 @@ public class OutputBase
indentSave_ = new Stack<int>();
separator_ = true;
}
-
+
public
OutputBase(string s)
{
@@ -57,13 +57,13 @@ public class OutputBase
{
indentSize_ = indentSize;
}
-
+
virtual public void
setUseTab(bool useTab)
{
useTab_ = useTab;
- }
-
+ }
+
public virtual void
open(string s)
{
@@ -75,7 +75,7 @@ public class OutputBase
{
}
}
-
+
public virtual void
print(string s)
{
@@ -90,53 +90,53 @@ public class OutputBase
{
}
}
-
+
out_.Write(s);
}
-
+
public virtual void
inc()
{
indent_ += indentSize_;
}
-
+
public virtual void
dec()
{
Debug.Assert(indent_ >= indentSize_);
indent_ -= indentSize_;
}
-
+
public virtual void
useCurrentPosAsIndent()
{
indentSave_.Push(indent_);
indent_ = pos_;
}
-
+
public virtual void
zeroIndent()
{
indentSave_.Push(indent_);
indent_ = 0;
}
-
+
public virtual void
restoreIndent()
{
Debug.Assert(indentSave_.Count != 0);
indent_ = (int)indentSave_.Pop();
}
-
+
public virtual void
nl()
{
out_.WriteLine();
pos_ = 0;
separator_ = true;
-
+
int indent = indent_;
-
+
if(useTab_)
{
while(indent >= 8)
@@ -155,17 +155,17 @@ public class OutputBase
pos_ += indentSize_;
}
}
-
+
while(indent > 0)
{
--indent;
out_.Write(" ");
++pos_;
}
-
+
out_.Flush();
}
-
+
public virtual void
sp()
{
@@ -174,13 +174,13 @@ public class OutputBase
out_.WriteLine();
}
}
-
+
public virtual bool
valid()
{
return out_ != null;
}
-
+
protected internal TextWriter out_;
protected internal int pos_;
protected internal int indent_;