PrintCmd Class Reference

Inheritance diagram for PrintCmd:

Inheritance graph
[legend]
Collaboration diagram for PrintCmd:

Collaboration graph
[legend]

List of all members.


Detailed Description

virtual machine command for print() function

Definition at line 239 of file cmd.cc.


Public Member Functions

 PrintCmd (const Token &t, Value::VType type)
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_
Var var_

Constructor & Destructor Documentation

PrintCmd ( const Token t,
Value::VType  type 
) [inline]

Definition at line 241 of file cmd.cc.

References Value::type, Var::value, and var_.


Member Function Documentation

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

dump command to stream in human-readable format

Implements ICmd.

Definition at line 246 of file cmd.cc.

References StreamDecorator::C_LIGHT_RED, StreamDecorator::C_NO_COLOR, t_, Value::type, Var::value, and var_.

bool exec ( FncDefinition  )  [virtual]

execute command in the context of calling function

Implements ICmd.

Definition at line 783 of file cmd.cc.

References Value::doubleVal, Value::intVal, ValueStack::popToVar(), Value::stringVal, t_, Value::type, Value::V_DOUBLE, Value::V_INT, Value::V_STRING, Var::value, var_, FncDefinition::vm, and Vm::vmStack.

Here is the call graph for this function:


Member Data Documentation

Token t_ [private]

Definition at line 252 of file cmd.cc.

Referenced by exec(), and toStream().

Var var_ [private]

Definition at line 253 of file cmd.cc.

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


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