InputCmd Class Reference

Inheritance diagram for InputCmd:

Inheritance graph
[legend]
Collaboration diagram for InputCmd:

Collaboration graph
[legend]

List of all members.


Detailed Description

virtual machine command for input{int|double|string}() function

Definition at line 257 of file cmd.cc.


Public Member Functions

 InputCmd (const Token &t, Value::VType type, bool pushValue)
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_
Value::VType type_
bool pushValue_

Constructor & Destructor Documentation

InputCmd ( const Token t,
Value::VType  type,
bool  pushValue 
) [inline]

Definition at line 259 of file cmd.cc.


Member Function Documentation

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

dump command to stream in human-readable format

Implements ICmd.

Definition at line 263 of file cmd.cc.

References StreamDecorator::C_LIGHT_RED, StreamDecorator::C_NO_COLOR, t_, and type_.

bool exec ( FncDefinition  )  [virtual]

execute command in the context of calling function

Implements ICmd.

Definition at line 802 of file cmd.cc.

References ValueFactory::create(), StreamDecorator::E_ERROR, Vm::fileName, ValueStack::push(), pushValue_, t_, type_, Value::V_DOUBLE, Value::V_INT, Value::V_STRING, FncDefinition::vm, and Vm::vmStack.

Here is the call graph for this function:


Member Data Documentation

Token t_ [private]

Definition at line 269 of file cmd.cc.

Referenced by exec(), and toStream().

Value::VType type_ [private]

Definition at line 270 of file cmd.cc.

Referenced by exec(), and toStream().

bool pushValue_ [private]

Definition at line 271 of file cmd.cc.

Referenced by exec().


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