diff options
Diffstat (limited to 'doxygen/man/man3/pirate7_Pirate.3')
-rw-r--r-- | doxygen/man/man3/pirate7_Pirate.3 | 223 |
1 files changed, 223 insertions, 0 deletions
diff --git a/doxygen/man/man3/pirate7_Pirate.3 b/doxygen/man/man3/pirate7_Pirate.3 new file mode 100644 index 0000000..1c07561 --- /dev/null +++ b/doxygen/man/man3/pirate7_Pirate.3 @@ -0,0 +1,223 @@ +.TH "pirate7::Pirate" 3 "Fri Sep 9 2011" "Cmd2" \" -*- nroff -*- +.ad l +.nh +.SH NAME +pirate7::Pirate \- +.SH SYNOPSIS +.br +.PP +.PP +Inherits \fBcmd2::Cmd\fP'\&. +.SS "Public Member Functions" + +.in +1c +.ti -1c +.RI "def \fBdefault\fP" +.br +.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 \fBdo_sing\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 "\fBdefault_to_shell\fP = True" +.br +.ti -1c +.RI "int \fBgold\fP = 3" +.br +.ti -1c +.RI "list \fBmultilineCommands\fP = ['sing']" +.br +.ti -1c +.RI "string \fBprompt\fP = 'arrr> '" +.br +.ti -1c +.RI "string \fBsettable\fP = '\fBsongcolor\fP Color to ``sing`` in (red/blue/green/cyan/magenta, bold, underline)'" +.br +.ti -1c +.RI "string \fBsongcolor\fP = 'blue'" +.br +.ti -1c +.RI "list \fBterminators\fP = \fBCmd\&.terminators\fP+['\&.\&.\&.']" +.br +.in -1c +.SH "Detailed Description" +.PP +Definition at line 4 of file pirate7\&.py'\&. +.SH "Member Function Documentation" +.PP +.SS "def pirate7::Pirate::default (self, line)" +.PP +Definition at line 7 of file pirate7\&.py'\&. +.PP +Referenced by cmd2::Cmd::_default()\&. +.PP +.nf +7 +8 def default(self, line): + print('What mean ye by '{0}'?'\&.format(line)) +.fi +.SS "def pirate7::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 12 of file pirate7\&.py'\&. +.PP +References pirate2::Pirate::gold, gold, pirate6::Pirate::gold, pirate5::Pirate::gold, pirate4::Pirate::gold, and pirate3::Pirate::gold\&. +.PP +.nf +12 +13 def do_drink(self, arg): +14 '''Drown your sorrrows in rrrum\&. +15 +16 drink [n] - drink [n] barrel[s] o' rum\&.''' +17 try: +18 self\&.gold -= int(arg) +19 except: +20 if arg: +21 print('''What's '{0}'? I'll take rrrum\&.'''\&.format(arg)) + self\&.gold -= 1 +.fi +.SS "def pirate7::Pirate::do_loot (self, arg)" +.PP +Definition at line 9 of file pirate7\&.py'\&. +.PP +References pirate2::Pirate::gold, gold, pirate6::Pirate::gold, pirate5::Pirate::gold, pirate4::Pirate::gold, and pirate3::Pirate::gold\&. +.PP +.nf +9 +10 def do_loot(self, arg): +11 'Seize booty from a passing ship\&.' + self\&.gold += 1 +.fi +.SS "def pirate7::Pirate::do_quit (self, arg)" +.PP +Reimplemented from \fBcmd2::Cmd\fP'\&. +.PP +Definition at line 33 of file pirate7\&.py'\&. +.PP +.nf +33 +34 def do_quit(self, arg): +35 print('Quiterrr!') + return True +.fi +.SS "def pirate7::Pirate::do_sing (self, arg)" +.PP +Definition at line 42 of file pirate7\&.py'\&. +.PP +References cmd2::Cmd::colorize(), and songcolor\&. +.PP +.nf +42 +43 def do_sing(self, arg): +44 print(self\&.colorize(arg, self\&.songcolor)) + +.fi +.SS "def pirate7::Pirate::postcmd (self, stop, line)" +.PP +Definition at line 25 of file pirate7\&.py'\&. +.PP +References pirate2::Pirate::gold, pirate3::Pirate::gold, pirate5::Pirate::gold, pirate6::Pirate::gold, pirate4::Pirate::gold, gold, pirate3::Pirate::initial_gold, pirate5::Pirate::initial_gold, pirate4::Pirate::initial_gold, initial_gold, and pirate6::Pirate::initial_gold\&. +.PP +Referenced by cmd2::Cmd::onecmd_plus_hooks()\&. +.PP +.nf +25 +26 def postcmd(self, stop, line): +27 if self\&.gold != self\&.initial_gold: +28 print('Now we gots {0} doubloons' +29 \&.format(self\&.gold)) +30 if self\&.gold < 0: +31 print('Off to debtorrr's prison\&.') +32 stop = True + return stop +.fi +.SS "def pirate7::Pirate::precmd (self, line)" +.PP +Definition at line 22 of file pirate7\&.py'\&. +.PP +References pirate2::Pirate::gold, gold, pirate4::Pirate::gold, pirate5::Pirate::gold, pirate6::Pirate::gold, pirate3::Pirate::gold, pirate3::Pirate::initial_gold, pirate4::Pirate::initial_gold, pirate5::Pirate::initial_gold, initial_gold, and pirate6::Pirate::initial_gold\&. +.PP +Referenced by cmd2::Cmd::onecmd_plus_hooks()\&. +.PP +.nf +22 +23 def precmd(self, line): +24 self\&.initial_gold = self\&.gold + return line +.fi +.SH "Member Data Documentation" +.PP +.SS "\fBpirate7::Pirate::default_to_shell\fP = True\fC [static]\fP" +.PP +Reimplemented from \fBcmd2::Cmd\fP'\&. +.PP +Definition at line 36 of file pirate7\&.py'\&. +.SS "int \fBpirate7::Pirate::gold\fP = 3\fC [static]\fP" +.PP +Definition at line 5 of file pirate7\&.py'\&. +.PP +Referenced by do_drink(), pirate8::Pirate::do_drink(), do_loot(), pirate8::Pirate::do_loot(), postcmd(), pirate8::Pirate::postcmd(), precmd(), and pirate8::Pirate::precmd()\&. +.SS "\fBpirate7::Pirate::initial_gold\fP" +.PP +Definition at line 22 of file pirate7\&.py'\&. +.PP +Referenced by postcmd(), pirate8::Pirate::postcmd(), pirate8::Pirate::precmd(), and precmd()\&. +.SS "list \fBpirate7::Pirate::multilineCommands\fP = ['sing']\fC [static]\fP" +.PP +Reimplemented from \fBcmd2::Cmd\fP'\&. +.PP +Definition at line 37 of file pirate7\&.py'\&. +.SS "string \fBpirate7::Pirate::prompt\fP = 'arrr> '\fC [static]\fP" +.PP +Reimplemented from \fBcmd2::Cmd\fP'\&. +.PP +Definition at line 6 of file pirate7\&.py'\&. +.SS "string \fBpirate7::Pirate::settable\fP = '\fBsongcolor\fP Color to ``sing`` in (red/blue/green/cyan/magenta, bold, underline)'\fC [static]\fP" +.PP +Reimplemented from \fBcmd2::Cmd\fP'\&. +.PP +Definition at line 40 of file pirate7\&.py'\&. +.SS "string \fBpirate7::Pirate::songcolor\fP = 'blue'\fC [static]\fP" +.PP +Definition at line 39 of file pirate7\&.py'\&. +.PP +Referenced by do_sing(), and pirate8::Pirate::do_sing()\&. +.SS "list \fBpirate7::Pirate::terminators\fP = \fBCmd\&.terminators\fP+['\&.\&.\&.']\fC [static]\fP" +.PP +Reimplemented from \fBcmd2::Cmd\fP'\&. +.PP +Definition at line 38 of file pirate7\&.py'\&. + +.SH "Author" +.PP +Generated automatically by Doxygen for Cmd2 from the source code'\&. |