Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

DviFileEvent Class Reference

Abstracts the contents of a DVI file. More...

#include <DviFile.h>

Inheritance diagram for DviFileEvent:

DviFileFontChange DviFilePage DviFilePostamble DviFilePreamble DviFileSetChar DviFileSetRule DviFileSpecial List of all members.

Public Types

enum  eventTypes {
  setchar, setrule, fontchange, special,
  page, preamble, postamble
}

Public Member Functions

virtual void debug () const
 Writes a representation of this event on cerr.
eventTypes type () const
 Gets the type of this event.
const unsigned char opcode () const
 Gets the underlying opcode which produced this event.
void release ()
 Release this event.

Static Public Member Functions

verbosities verbosity (const verbosities level)
 Sets the verbosity for DviFileEvent and its subclasses.

Protected Member Functions

 DviFileEvent (unsigned char opcode, eventTypes t, DviFile *dp=0)
 Creates a new event.

Static Protected Attributes

verbosities verbosity_ = normal

Detailed Description

Abstracts the contents of a DVI file.

All the features of a DVI file which calling code might be interested in are represented by one of the subclasses of this, and these are obtained in order by calling the DviFile#getEvent method on DviFile.

The design here is likely to be adjusted in future releases of this library. Although it is possible now, you should avoid constructing any of the subtypes DviFileEvent yourself, but use only those returned to you by DviFile#getEvent.

The documentation here concentrates on how the methods and variables here relate to the underlying quantities obtained from the DVI file. For fuller information on these, see the DVI standard.


Member Enumeration Documentation

enum DviFileEvent::eventTypes
 

Enumeration values:
setchar 
setrule 
fontchange 
special 
page 
preamble 
postamble 


Constructor & Destructor Documentation

DviFileEvent::DviFileEvent unsigned char  opcode,
eventTypes  t,
DviFile dp = 0
[protected]
 

Creates a new event.

Parameters:
opcode the DVI opcode which resulted in this event
t the type of this event
dp the DviFile it is associated with


Member Function Documentation

void DviFileEvent::debug  )  const [virtual]
 

Writes a representation of this event on cerr.

Reimplemented in DviFileSetChar, DviFileSetRule, DviFileFontChange, DviFileSpecial, DviFilePage, and DviFilePreamble.

const unsigned char DviFileEvent::opcode  )  const [inline]
 

Gets the underlying opcode which produced this event.

Returns:
the opcode

void DviFileEvent::release  ) 
 

Release this event.

Client code which has been given an event by DviFile#getEvent should call this method on that event when it has no further use for it. This releases or reclaims all resources associated with it. This may call delete on the associated object, so the client code should assume that it has done so, and make no further reference to the object.

eventTypes DviFileEvent::type  )  const [inline]
 

Gets the type of this event.

This information can also be obtained in a more object-oriented style by attempting a cast to the appropriate subtype, using, for example, dynamic_cast<DviFileSetChar *>(event_ptr).

Returns:
the type

verbosities DviFileEvent::verbosity const verbosities  level  )  [static]
 

Sets the verbosity for DviFileEvent and its subclasses.

Parameters:
level the desired verbosity
Returns:
the old verbosity


Member Data Documentation

verbosities DviFileEvent::verbosity_ = normal [static, protected]
 


The documentation for this class was generated from the following files:
Generated on Sun Aug 21 18:21:05 2005 for dvi2bitmap by doxygen 1.3.8