Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages | Examples

WT_Opcode Class Reference

#include <opcode.h>

Inheritance diagram for WT_Opcode:

Inheritance graph
[legend]
List of all members.

Detailed Description

A class representing an WHIP! opcode, also the base class for a WT_Optioncode.

Definition at line 27 of file opcode.h.

Public Types

enum  WT_Type
 Opcode type.

Public Member Functions

virtual int matching_paren_level () const
 Returns the previous parenthesis level.
virtual int size () const
 Returns the opcode size.
virtual WT_Byte const * token () const
 Returns a pointer to the opcode token.
virtual WT_Type type () const
 Returns the opcode type one of enum WT_Type.
virtual WT_Result skip_past_matching_paren (WT_File &file) const
 Causes the WT_File object to move its file pointer to te byte preceeding the closing parenthesis of this opcode.
WT_Result get_opcode (WT_File &file, WT_Boolean allow_sub_options=WD_False)
 Causes the file to read the next opcode from the data stream into this object.
WT_Objectobject_from_opcode (WT_Rendition &rend, WT_Result &result, WT_File &file) const
 Constructs an empty object from the current opcode.
WT_Boolean is_legal_opcode_character (WT_Byte byte) const
 Returns WD_Trye if (byte >= '!' && byte <= 'z' && byte != '(' && byte != ')').
WT_Boolean is_opcode_terminator (WT_Byte byte) const
 Returns WD_True if byte is a ( or a ) or a NULL, space, tab, linefeed or carriage return.
Construction


Member Function Documentation

WT_Result WT_Opcode::get_opcode WT_File file,
WT_Boolean  allow_sub_options = WD_False
 

Causes the file to read the next opcode from the data stream into this object.

Return values:
WT_Result::Success The operation was successful.

WT_Object* WT_Opcode::object_from_opcode WT_Rendition rend,
WT_Result result,
WT_File file
const
 

Constructs an empty object from the current opcode.

Return values:
WT_Object* A default object of the type specified by the curren topcode.
NULL The object could not be created. Check the result parameter.
Parameters:
rend  Input parameter: the current file rendition, typically file.rendition()
result  Output parameter: the result of the object creation effort.
file  Input parameter: the file being read.

virtual WT_Result WT_Opcode::skip_past_matching_paren WT_File file  )  const [virtual]
 

Causes the WT_File object to move its file pointer to te byte preceeding the closing parenthesis of this opcode.

Return values:
WT_Result::Success The operation was successful.


The documentation for this class was generated from the following file:
Generated on Tue May 17 12:08:01 2005 for Autodesk DWF Whip 2D Toolkit by  doxygen 1.4.1