mirror of
https://gitlab.com/rnger/amath
synced 2025-10-06 02:49:59 +00:00
102 lines
2.0 KiB
Groff
102 lines
2.0 KiB
Groff
.TH "PromptStatement" 3 "Tue Jan 24 2017" "Version 1.6.2" "amath" \" -*- nroff -*-
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
PromptStatement \- Set prompt string\&.
|
|
|
|
.SH SYNOPSIS
|
|
.br
|
|
.PP
|
|
.PP
|
|
\fC#include <statements\&.h>\fP
|
|
.PP
|
|
Inherits \fBStatementNode\fP\&.
|
|
.SS "Public Member Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "\fBPromptStatement\fP (char *\fBprompt\fP)"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fB~PromptStatement\fP ()"
|
|
.br
|
|
.ti -1c
|
|
.RI "char * \fBExecute\fP ()"
|
|
.br
|
|
.in -1c
|
|
.SS "Private Attributes"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "char * \fBprompt\fP"
|
|
.br
|
|
.in -1c
|
|
.SS "Additional Inherited Members"
|
|
.SH "Detailed Description"
|
|
.PP
|
|
Set prompt string\&.
|
|
.PP
|
|
Definition at line 105 of file statements\&.h\&.
|
|
.SH "Constructor & Destructor Documentation"
|
|
.PP
|
|
.SS "PromptStatement::PromptStatement (char * prompt)"
|
|
|
|
.PP
|
|
Definition at line 97 of file statements\&.cpp\&.
|
|
.PP
|
|
References AllocAndCopy(), and prompt\&.
|
|
.PP
|
|
Referenced by Parser::ParsePromptStatement()\&.
|
|
.PP
|
|
.nf
|
|
98 {
|
|
99 AllocAndCopy(&this->prompt,prompt);
|
|
100 }
|
|
.fi
|
|
.SS "PromptStatement::~PromptStatement ()"
|
|
|
|
.PP
|
|
Definition at line 102 of file statements\&.cpp\&.
|
|
.PP
|
|
References prompt\&.
|
|
.PP
|
|
.nf
|
|
103 {
|
|
104 delete prompt;
|
|
105 }
|
|
.fi
|
|
.SH "Member Function Documentation"
|
|
.PP
|
|
.SS "char * PromptStatement::Execute ()\fC [virtual]\fP"
|
|
|
|
.PP
|
|
Implements \fBStatementNode\fP\&.
|
|
.PP
|
|
Definition at line 107 of file statements\&.cpp\&.
|
|
.PP
|
|
References CharBuffer::Append(), CharBuffer::CharBuffer(), CharBuffer::ClearAndCopy(), CharBuffer::GetString(), prompt, CharBuffer::RemoveTrailing(), and Program::SetPrompt()\&.
|
|
.PP
|
|
.nf
|
|
108 {
|
|
109 CharBuffer *buf = new CharBuffer();
|
|
110 buf->ClearAndCopy(prompt);
|
|
111 while(buf->RemoveTrailing(' '));
|
|
112 buf->Append(' ');
|
|
113 Program->SetPrompt(buf->GetString());
|
|
114 delete buf;
|
|
115 return (char*)EMPTYSTRING;
|
|
116 }
|
|
.fi
|
|
.SH "Member Data Documentation"
|
|
.PP
|
|
.SS "char* PromptStatement::prompt\fC [private]\fP"
|
|
|
|
.PP
|
|
Definition at line 112 of file statements\&.h\&.
|
|
.PP
|
|
Referenced by Execute(), PromptStatement(), and ~PromptStatement()\&.
|
|
|
|
.SH "Author"
|
|
.PP
|
|
Generated automatically by Doxygen for amath from the source code\&.
|