KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KICAD_DIFF::KICAD_DIFFER Class Referenceabstract

Abstract base for every per-document-type differ. More...

#include <kicad_differ.h>

Inheritance diagram for KICAD_DIFF::KICAD_DIFFER:
KICAD_DIFF::FP_LIB_DIFFER KICAD_DIFF::PCB_DIFFER KICAD_DIFF::SCH_DIFFER KICAD_DIFF::SYM_LIB_DIFFER

Classes

struct  OPTIONS
 

Public Member Functions

virtual ~KICAD_DIFFER ()
 
void SetOptions (const OPTIONS &aOptions)
 
const OPTIONSGetOptions () const
 
virtual DOCUMENT_DIFF Diff ()=0
 Produce a DOCUMENT_DIFF of the inputs the concrete differ was constructed with.
 

Protected Member Functions

 KICAD_DIFFER ()=default
 

Protected Attributes

OPTIONS m_options
 

Detailed Description

Abstract base for every per-document-type differ.

Concrete differs live with their document type (PCB_DIFFER in pcbnew, SCH_DIFFER in eeschema, etc.) so that the heavy includes stay confined to their kiface.

Lifetime model: callers construct a differ with already-parsed documents, configure it via SetOptions(), call Diff(), then discard. Differs do not cache results internally; re-running Diff() reproduces the same DOCUMENT_DIFF for the same inputs (deterministic).

Definition at line 47 of file kicad_differ.h.

Constructor & Destructor Documentation

◆ ~KICAD_DIFFER()

KICAD_DIFF::KICAD_DIFFER::~KICAD_DIFFER ( )
virtualdefault

◆ KICAD_DIFFER()

KICAD_DIFF::KICAD_DIFFER::KICAD_DIFFER ( )
protecteddefault

Member Function Documentation

◆ Diff()

virtual DOCUMENT_DIFF KICAD_DIFF::KICAD_DIFFER::Diff ( )
pure virtual

Produce a DOCUMENT_DIFF of the inputs the concrete differ was constructed with.

Must be deterministic for fixed inputs. Concrete differs sort their output by KIID_PATH so the JSON serialization is bit-stable across runs.

Implemented in KICAD_DIFF::FP_LIB_DIFFER, KICAD_DIFF::PCB_DIFFER, KICAD_DIFF::SCH_DIFFER, and KICAD_DIFF::SYM_LIB_DIFFER.

◆ GetOptions()

const OPTIONS & KICAD_DIFF::KICAD_DIFFER::GetOptions ( ) const
inline

Definition at line 67 of file kicad_differ.h.

References m_options.

◆ SetOptions()

void KICAD_DIFF::KICAD_DIFFER::SetOptions ( const OPTIONS & aOptions)
inline

Definition at line 66 of file kicad_differ.h.

References m_options.

Member Data Documentation

◆ m_options


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