GPC  v1.0.0-2516
Gorman Print Control
IJS Class Referencefinal
Collaboration diagram for IJS:

Classes

struct  RecBitmap
 The bitmap records are exactly 143 bytes (0x8f) in length. More...
 
struct  RecFont
 Font record is a total of 288 (0x120) bytes. More...
 
struct  RecFooter
 10-byte footer at the bottom of the file. More...
 
struct  RecGroup
 A 25-byte (0x19) record that appears before each bitmap group. More...
 
struct  RecJob
 A 127-byte (0x7f) record that appears at the start of every print job. More...
 

Public Member Functions

 IJS (void)
 Empty constructor. More...
 
 ~IJS (void)
 Destructor. More...
 
IJSload (const File &filename)
 Load the given .ijs file. More...
 
VStr warnings (void) const
 Get any warning messages that should be shown to the user. More...
 
std::string summary (void) const
 Summarize the .ijs as a text message for the user. More...
 

Public Attributes

VBytes contents
 The entire contents of the file is loaded into this vector. More...
 
std::vector< const RecJob * > jobs
 Even though this is a vector, we only support a single RecJob pointer per ijs file. More...
 
std::vector< const RecGroup * > groups
 The groups stored in this vector may be stored in a different order than what they appear in the ijs file. More...
 
std::vector< const RecBitmap * > bitmaps
 
std::vector< const RecFont * > fonts
 
std::vector< const RecFooter * > footers
 
File file
 .ijs file More...
 
size_t number_of_unknown_bytes
 Used to keep track of whether or not there were unrecognized bytes when the .IJS file was loaded. More...
 

Constructor & Destructor Documentation

◆ IJS()

IJS::IJS ( void  )

Empty constructor.

See also
load()

◆ ~IJS()

IJS::~IJS ( void  )

Destructor.

Member Function Documentation

◆ load()

IJS & IJS::load ( const File &  filename)

Load the given .ijs file.

Exceptions
Lox::Exceptionif the file is impossibly small (no content?)
Lox::Exceptionif the file cannot be read (permission problem?)
Lox::Exceptionif the file header is not a valid .ijs header

References contents, file, IJS::RecBitmap::group_number, groups, jobs, IJS::RecJob::long_filename, IJS::RecBitmap::long_filename, IJS::RecFont::long_filename, IJS::RecGroup::number_of_images, number_of_unknown_bytes, IJS::RecBitmap::short_filename, IJS::RecFont::short_filename, IJS::RecJob::short_name, IJS::RecBitmap::trigger_value, and IJS::RecJob::unknown1.

Referenced by PrintJob::load_ijs().

Here is the caller graph for this function:

◆ warnings()

VStr IJS::warnings ( void  ) const

Get any warning messages that should be shown to the user.

References contents, file, groups, jobs, and number_of_unknown_bytes.

Referenced by PrintJob::load_ijs(), and summary().

Here is the caller graph for this function:

◆ summary()

std::string IJS::summary ( void  ) const

Summarize the .ijs as a text message for the user.

References file, groups, jobs, and warnings().

Referenced by PrintJob::load_ijs().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ contents

VBytes IJS::contents

The entire contents of the file is loaded into this vector.

Referenced by load(), SessionComponentTransfer::run(), and warnings().

◆ jobs

std::vector<const RecJob*> IJS::jobs

Even though this is a vector, we only support a single RecJob pointer per ijs file.

Referenced by load(), summary(), and warnings().

◆ groups

std::vector<const RecGroup*> IJS::groups

The groups stored in this vector may be stored in a different order than what they appear in the ijs file.

When they're parsed, the groups are re-ordered so this vector contains the groups id #1, 2, 3, 4, ... while in the ijs file they sometimes appear out-of-order, such as #2, 3, 4, 1.

Referenced by load(), SessionComponent::paintCell(), summary(), and warnings().

◆ file

File IJS::file

◆ number_of_unknown_bytes

size_t IJS::number_of_unknown_bytes

Used to keep track of whether or not there were unrecognized bytes when the .IJS file was loaded.

Referenced by load(), and warnings().