KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PDF_PLOTTER::XREF_TABLE Class Reference

The PDF cross-reference table. More...

#include <plotters_pslike.h>

Public Member Functions

void Reset ()
 
int Allocate ()
 Allocate a new PDF object handle.
 
bool IsValid (int aHandle) const
 Is the given PDF object handle in the table?
 
void SetOffset (int aHandle, long aOffset)
 Set the file offset for a given PDF object handle.
 
const std::vector< long > & Entries () const
 

Private Attributes

std::vector< long > m_offsets = { 0 }
 

Detailed Description

The PDF cross-reference table.

This is a table of file offsets for each PDF object "handle" (int)

Definition at line 605 of file plotters_pslike.h.

Member Function Documentation

◆ Allocate()

int PDF_PLOTTER::XREF_TABLE::Allocate ( )
inline

Allocate a new PDF object handle.

Object 0 is reserved by the PDF format and is never handed out.

You must fill in the file offset for this handle using SetOffset() before the object is useable.

Returns
The newly allocated handle.

Definition at line 622 of file plotters_pslike.h.

References m_offsets.

◆ Entries()

const std::vector< long > & PDF_PLOTTER::XREF_TABLE::Entries ( ) const
inline

Definition at line 651 of file plotters_pslike.h.

References m_offsets.

◆ IsValid()

bool PDF_PLOTTER::XREF_TABLE::IsValid ( int aHandle) const
inline

Is the given PDF object handle in the table?

Definition at line 631 of file plotters_pslike.h.

References m_offsets.

Referenced by SetOffset().

◆ Reset()

void PDF_PLOTTER::XREF_TABLE::Reset ( )
inline

Definition at line 608 of file plotters_pslike.h.

References m_offsets.

◆ SetOffset()

void PDF_PLOTTER::XREF_TABLE::SetOffset ( int aHandle,
long aOffset )
inline

Set the file offset for a given PDF object handle.

Parameters
aHandleThe PDF object handle.
aOffsetThe file offset where the object starts.

Definition at line 642 of file plotters_pslike.h.

References IsValid(), and m_offsets.

Member Data Documentation

◆ m_offsets

std::vector<long> PDF_PLOTTER::XREF_TABLE::m_offsets = { 0 }
private

Definition at line 657 of file plotters_pslike.h.

Referenced by Allocate(), Entries(), IsValid(), Reset(), and SetOffset().


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