IfCmd Class Reference

Inheritance diagram for IfCmd:

Inheritance graph
[legend]
Collaboration diagram for IfCmd:

Collaboration graph
[legend]

List of all members.


Detailed Description

if statement as virtual machine command

Definition at line 167 of file cmd.cc.


Public Member Functions

 IfCmd (const Token &t, PCmd ifCmd, PCmd elseCmd)
virtual void toStream (std::ostream &str) const
 dump command to stream in human-readable format
virtual bool exec (FncDefinition *fnc)
 execute command in the context of calling function

Private Attributes

Token t_
PCmd ifCmd_
PCmd elseCmd_

Constructor & Destructor Documentation

IfCmd ( const Token t,
PCmd  ifCmd,
PCmd  elseCmd 
) [inline]

Definition at line 169 of file cmd.cc.

References t_, and Token::text.


Member Function Documentation

virtual void toStream ( std::ostream &   )  const [inline, virtual]

dump command to stream in human-readable format

Implements ICmd.

Definition at line 174 of file cmd.cc.

References StreamDecorator::C_LIGHT_BLUE, StreamDecorator::C_LIGHT_RED, StreamDecorator::C_NO_COLOR, elseCmd_, ifCmd_, t_, and ICmd::toStream().

Here is the call graph for this function:

bool exec ( FncDefinition  )  [virtual]

execute command in the context of calling function

Implements ICmd.

Definition at line 726 of file cmd.cc.

References StreamDecorator::E_ERROR, StreamDecorator::E_NOTE, elseCmd_, Vm::fileName, ifCmd_, ValueStack::pop(), t_, Value::type, Value::V_BOOL, FncDefinition::vm, and Vm::vmStack.

Here is the call graph for this function:


Member Data Documentation

Token t_ [private]

Definition at line 187 of file cmd.cc.

Referenced by exec(), IfCmd(), and toStream().

PCmd ifCmd_ [private]

Definition at line 188 of file cmd.cc.

Referenced by exec(), and toStream().

PCmd elseCmd_ [private]

Definition at line 189 of file cmd.cc.

Referenced by exec(), and toStream().


The documentation for this class was generated from the following file:
Generated on Sat Jul 4 18:33:16 2009 for vyp08 (compiler and interpreter of VYP08 language) by  doxygen 1.5.4