diff options
Diffstat (limited to 'doxygen/man/man3/pirate5_Pirate.3')
-rw-r--r-- | doxygen/man/man3/pirate5_Pirate.3 | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/doxygen/man/man3/pirate5_Pirate.3 b/doxygen/man/man3/pirate5_Pirate.3 new file mode 100644 index 0000000..f95fcde --- /dev/null +++ b/doxygen/man/man3/pirate5_Pirate.3 @@ -0,0 +1,145 @@ +.TH "pirate5::Pirate" 3 "Fri Sep 9 2011" "Cmd2" \" -*- nroff -*- +.ad l +.nh +.SH NAME +pirate5::Pirate \- +.SH SYNOPSIS +.br +.PP +.PP +Inherits Cmd'\&. +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "def \fBdo_drink\fP" +.br +.ti -1c +.RI "def \fBdo_loot\fP" +.br +.ti -1c +.RI "def \fBdo_quit\fP" +.br +.ti -1c +.RI "def \fBpostcmd\fP" +.br +.ti -1c +.RI "def \fBprecmd\fP" +.br +.in -1c +.SS "Public Attributes" + +.in +1c +.ti -1c +.RI "\fBinitial_gold\fP" +.br +.in -1c +.SS "Static Public Attributes" + +.in +1c +.ti -1c +.RI "int \fBgold\fP = 3" +.br +.in -1c +.SH "Detailed Description" +.PP +Definition at line 4 of file pirate5\&.py'\&. +.SH "Member Function Documentation" +.PP +.SS "def pirate5::Pirate::do_drink (self, arg)".PP +.nf +Drown your sorrrows in rrrum. + +drink [n] - drink [n] barrel[s] o' rum..fi +.PP + +.PP +Definition at line 9 of file pirate5\&.py'\&. +.PP +References pirate2::Pirate::gold, gold, pirate4::Pirate::gold, and pirate3::Pirate::gold\&. +.PP +.nf +9 +10 def do_drink(self, arg): +11 '''Drown your sorrrows in rrrum\&. +12 +13 drink [n] - drink [n] barrel[s] o' rum\&.''' +14 try: +15 self\&.gold -= int(arg) +16 except: +17 if arg: +18 print('''What's '{0}'? I'll take rrrum\&.'''\&.format(arg)) + self\&.gold -= 1 +.fi +.SS "def pirate5::Pirate::do_loot (self, arg)" +.PP +Definition at line 6 of file pirate5\&.py'\&. +.PP +References pirate2::Pirate::gold, gold, pirate4::Pirate::gold, and pirate3::Pirate::gold\&. +.PP +.nf +6 +7 def do_loot(self, arg): +8 'Seize booty from a passing ship\&.' + self\&.gold += 1 +.fi +.SS "def pirate5::Pirate::do_quit (self, arg)" +.PP +Definition at line 30 of file pirate5\&.py'\&. +.PP +.nf +30 +31 def do_quit(self, arg): +32 print('Quiterrr!') +33 return True + +.fi +.SS "def pirate5::Pirate::postcmd (self, stop, line)" +.PP +Definition at line 22 of file pirate5\&.py'\&. +.PP +References pirate2::Pirate::gold, pirate3::Pirate::gold, gold, pirate4::Pirate::gold, pirate3::Pirate::initial_gold, pirate4::Pirate::initial_gold, and initial_gold\&. +.PP +Referenced by cmd2::Cmd::onecmd_plus_hooks()\&. +.PP +.nf +22 +23 def postcmd(self, stop, line): +24 if self\&.gold != self\&.initial_gold: +25 print('Now we gots {0} doubloons' +26 \&.format(self\&.gold)) +27 if self\&.gold < 0: +28 print('Off to debtorrr's prison\&.') +29 stop = True + return stop +.fi +.SS "def pirate5::Pirate::precmd (self, line)" +.PP +Definition at line 19 of file pirate5\&.py'\&. +.PP +References pirate2::Pirate::gold, gold, pirate3::Pirate::gold, pirate4::Pirate::gold, pirate3::Pirate::initial_gold, initial_gold, and pirate4::Pirate::initial_gold\&. +.PP +Referenced by cmd2::Cmd::onecmd_plus_hooks()\&. +.PP +.nf +19 +20 def precmd(self, line): +21 self\&.initial_gold = self\&.gold + return line +.fi +.SH "Member Data Documentation" +.PP +.SS "int \fBpirate5::Pirate::gold\fP = 3\fC [static]\fP" +.PP +Definition at line 5 of file pirate5\&.py'\&. +.PP +Referenced by do_drink(), pirate7::Pirate::do_drink(), pirate8::Pirate::do_drink(), pirate6::Pirate::do_drink(), do_loot(), pirate7::Pirate::do_loot(), pirate8::Pirate::do_loot(), pirate6::Pirate::do_loot(), postcmd(), pirate8::Pirate::postcmd(), pirate7::Pirate::postcmd(), pirate6::Pirate::postcmd(), precmd(), pirate7::Pirate::precmd(), pirate8::Pirate::precmd(), and pirate6::Pirate::precmd()\&. +.SS "\fBpirate5::Pirate::initial_gold\fP" +.PP +Definition at line 19 of file pirate5\&.py'\&. +.PP +Referenced by postcmd(), pirate8::Pirate::postcmd(), pirate7::Pirate::postcmd(), pirate6::Pirate::postcmd(), precmd(), pirate7::Pirate::precmd(), pirate8::Pirate::precmd(), and pirate6::Pirate::precmd()\&. + +.SH "Author" +.PP +Generated automatically by Doxygen for Cmd2 from the source code'\&. |