KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SERIALIZABLE Class Reference

Interface for objects that can be serialized to Protobuf messages. More...

#include <serializable.h>

Inheritance diagram for SERIALIZABLE:
BOARD_STACKUP EDA_ITEM BASE_SCREEN BOARD_ITEM DS_DRAW_ITEM_BASE DS_PROXY_UNDO_ITEM DS_PROXY_VIEW_ITEM EDIT_POINTS GBR_LAYOUT GERBER_DRAW_ITEM GERBER_FILE_IMAGE KIGFX::ORIGIN_VIEWITEM KIGFX::PREVIEW::ARC_ASSISTANT KIGFX::PREVIEW::RULER_ITEM KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM KIGFX::PREVIEW::TWO_POINT_ASSISTANT MY_DRAWING RATSNEST_VIEW_ITEM ROUTER_PREVIEW_ITEM ROUTER_STATUS_VIEW_ITEM SCHEMATIC SCH_ITEM TUNING_STATUS_VIEW_ITEM

Public Member Functions

virtual void Serialize (google::protobuf::Any &aContainer) const
 Serializes this object to the given Any message.
 
virtual bool Deserialize (const google::protobuf::Any &aContainer)
 Deserializes the given protobuf message into this object.
 

Detailed Description

Interface for objects that can be serialized to Protobuf messages.

Definition at line 35 of file serializable.h.

Member Function Documentation

◆ Deserialize()

virtual bool SERIALIZABLE::Deserialize ( const google::protobuf::Any &  aContainer)
inlinevirtual

Deserializes the given protobuf message into this object.

Parameters
aContaineris an Any which should have a concrete type matching this object
Returns
true if unpacking and deserialization succeeded

Reimplemented in SCH_LABEL, SCH_DIRECTIVE_LABEL, SCH_GLOBALLABEL, SCH_HIERLABEL, SCH_LINE, BOARD_STACKUP, FOOTPRINT, PAD, PCB_FIELD, PCB_SHAPE, PCB_TEXT, PCB_TRACK, PCB_ARC, and PCB_VIA.

Definition at line 53 of file serializable.h.

◆ Serialize()

virtual void SERIALIZABLE::Serialize ( google::protobuf::Any &  aContainer) const
inlinevirtual

Serializes this object to the given Any message.

The Any message's concrete type will be specific to the object in question.

Parameters
aContainerwill be filled with a message describing this object

Reimplemented in SCH_LABEL, SCH_DIRECTIVE_LABEL, SCH_GLOBALLABEL, SCH_HIERLABEL, SCH_LINE, BOARD_STACKUP, FOOTPRINT, PAD, PCB_FIELD, PCB_SHAPE, PCB_TEXT, PCB_TRACK, PCB_ARC, and PCB_VIA.

Definition at line 43 of file serializable.h.

Referenced by API_HANDLER_SCH::handleCreateUpdateItemsInternal(), and API_HANDLER_PCB::handleCreateUpdateItemsInternal().


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