libmwaw_applepict2::OpCode Struct Reference

Internal and low level: a class to define each opcode and their arguments and read their data. More...

Inheritance diagram for libmwaw_applepict2::OpCode:
libmwaw_applepict1::OpCode

Public Types

typedef libmwaw_applepict1::OpCode parent

Public Member Functions

 OpCode (int id, char const *nm, DataType type1=WP_NONE, DataType type2=WP_NONE, DataType type3=WP_NONE, DataType type4=WP_NONE, DataType type5=WP_NONE)
 constructor
bool readData (MWAWInputStream &input, std::vector< Value > &listValue) const
 tries to read the data in the file
- Public Member Functions inherited from libmwaw_applepict1::OpCode
virtual ~OpCode ()
bool computeSize (MWAWInputStream &input, int &sz) const
 computes the size of the data

Additional Inherited Members

- Static Public Member Functions inherited from libmwaw_applepict1::OpCode
static bool readRect (MWAWInputStream &input, DataType type, Box2i &res)
 read a rectangles field
- Public Attributes inherited from libmwaw_applepict1::OpCode
int m_id
 the opCode
std::string m_name
 the opCode name
std::vector< DataTypem_types
 the different argument types
- Static Protected Member Functions inherited from libmwaw_applepict1::OpCode
static int getSize (MWAWInputStream &input, DataType type)
 returns the size of the next argument of type type.
static bool readValue (MWAWInputStream &input, DataType type, Value &val)
 reads a argument of type type, if successfull updates val.
static bool readInt (MWAWInputStream &input, DataType type, int &res)
 low level: reads a integer ( bytes or 2 bytes, signed or unsigned)
static bool readColor (MWAWInputStream &input, DataType type, MWAWColor &col)
 low level: reads a color argument
static bool readCColor (MWAWInputStream &input, DataType type, MWAWColor &col)
 low level: reads a color argument (version 2)
static bool readPattern (MWAWInputStream &input, DataType type, int(&pat)[8])
 low level: reads a pattern argument
static bool readPoint (MWAWInputStream &input, DataType type, Vec2i &res)
 low level: reads a point argument
static bool readPoly (MWAWInputStream &input, DataType type, Box2i &box, std::vector< Vec2i > &res)
 low level: reads a polygon argument
static bool readText (MWAWInputStream &input, DataType type, std::string &res)
 low level: reads a string argument

Detailed Description

Internal and low level: a class to define each opcode and their arguments and read their data.

Member Typedef Documentation

Constructor & Destructor Documentation

libmwaw_applepict2::OpCode::OpCode ( int  id,
char const *  nm,
DataType  type1 = WP_NONE,
DataType  type2 = WP_NONE,
DataType  type3 = WP_NONE,
DataType  type4 = WP_NONE,
DataType  type5 = WP_NONE 
)
inline

constructor

Parameters
idis the code of the opcode in the file
nmis the short name of the opcode
type1
type2
type3
type4
type5the type of the first, second, third arguments (if they exist)

Reimplemented from libmwaw_applepict1::OpCode.

Member Function Documentation

bool libmwaw_applepict2::OpCode::readData ( MWAWInputStream input,
std::vector< Value > &  listValue 
) const
inline

tries to read the data in the file

If the read is succefull, fills listValue with the read argument

Reimplemented from libmwaw_applepict1::OpCode.


The documentation for this struct was generated from the following file:

Generated on Wed May 22 2013 18:12:47 for libmwaw by doxygen 1.8.1.2