summaryrefslogtreecommitdiff
path: root/doxygen/man/man3/cmd2_OutputTrap.3
diff options
context:
space:
mode:
Diffstat (limited to 'doxygen/man/man3/cmd2_OutputTrap.3')
-rw-r--r--doxygen/man/man3/cmd2_OutputTrap.3114
1 files changed, 114 insertions, 0 deletions
diff --git a/doxygen/man/man3/cmd2_OutputTrap.3 b/doxygen/man/man3/cmd2_OutputTrap.3
new file mode 100644
index 0000000..8a1a739
--- /dev/null
+++ b/doxygen/man/man3/cmd2_OutputTrap.3
@@ -0,0 +1,114 @@
+.TH "cmd2::OutputTrap" 3 "Fri Sep 9 2011" "Cmd2" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+cmd2::OutputTrap \-
+.SH SYNOPSIS
+.br
+.PP
+.PP
+Inherits \fBcmd2::Borg\fP'\&.
+.SS "Public Member Functions"
+
+.in +1c
+.ti -1c
+.RI "def \fB__init__\fP"
+.br
+.ti -1c
+.RI "def \fBread\fP"
+.br
+.ti -1c
+.RI "def \fBtearDown\fP"
+.br
+.ti -1c
+.RI "def \fBwrite\fP"
+.br
+.in -1c
+.SS "Public Attributes"
+
+.in +1c
+.ti -1c
+.RI "\fBcontents\fP"
+.br
+.ti -1c
+.RI "\fBold_stdout\fP"
+.br
+.in -1c
+.SH "Detailed Description"
+.PP
+.PP
+.nf
+Instantiate an OutputTrap to divert/capture ALL stdout output. For use in unit testing.
+Call `tearDown()` to return to normal output..fi
+.PP
+
+.PP
+Definition at line 1459 of file cmd2\&.py'\&.
+.SH "Constructor & Destructor Documentation"
+.PP
+.SS "def cmd2::OutputTrap::__init__ (self)"
+.PP
+Definition at line 1462 of file cmd2\&.py'\&.
+.PP
+.nf
+1462
+1463 def __init__(self):
+1464 self\&.contents = ''
+1465 self\&.old_stdout = sys\&.stdout
+ sys\&.stdout = self
+.fi
+.SH "Member Function Documentation"
+.PP
+.SS "def cmd2::OutputTrap::read (self)"
+.PP
+Definition at line 1468 of file cmd2\&.py'\&.
+.PP
+References contents\&.
+.PP
+.nf
+1468
+1469 def read(self):
+1470 result = self\&.contents
+1471 self\&.contents = ''
+ return result
+.fi
+.SS "def cmd2::OutputTrap::tearDown (self)"
+.PP
+Definition at line 1472 of file cmd2\&.py'\&.
+.PP
+References contents, and old_stdout\&.
+.PP
+.nf
+1472
+1473 def tearDown(self):
+1474 sys\&.stdout = self\&.old_stdout
+1475 self\&.contents = ''
+
+.fi
+.SS "def cmd2::OutputTrap::write (self, txt)"
+.PP
+Definition at line 1466 of file cmd2\&.py'\&.
+.PP
+References contents\&.
+.PP
+.nf
+1466
+1467 def write(self, txt):
+ self\&.contents += txt
+.fi
+.SH "Member Data Documentation"
+.PP
+.SS "\fBcmd2::OutputTrap::contents\fP"
+.PP
+Definition at line 1462 of file cmd2\&.py'\&.
+.PP
+Referenced by read(), tearDown(), and write()\&.
+.SS "\fBcmd2::OutputTrap::old_stdout\fP"
+.PP
+Definition at line 1462 of file cmd2\&.py'\&.
+.PP
+Referenced by tearDown()\&.
+
+.SH "Author"
+.PP
+Generated automatically by Doxygen for Cmd2 from the source code'\&.