|
KiCad PCB EDA Suite
|
Base class for API handlers related to editor frames. More...
#include <api_handler_editor.h>
Public Member Functions | |
| API_HANDLER_EDITOR (EDA_BASE_FRAME *aFrame=nullptr) | |
| API_RESULT | Handle (ApiRequest &aMsg) |
| Attempt to handle the given API request, if a handler exists in this class for the message. | |
Protected Types | |
| typedef std::function< HANDLER_RESULT< ApiResponse >(ApiRequest &)> | REQUEST_HANDLER |
| A handler for outer messages (envelopes) that will unpack to inner messages and call a specific handler function. | |
Protected Member Functions | |
| HANDLER_RESULT< std::optional< KIID > > | validateItemHeaderDocument (const kiapi::common::types::ItemHeader &aHeader) |
| If the header is valid, returns the item container. | |
| HANDLER_RESULT< bool > | validateDocument (const DocumentSpecifier &aDocument) |
| virtual std::optional< ApiResponseStatus > | checkForBusy () |
| Checks if the editor can accept commands. | |
| HANDLER_RESULT< commands::BeginCommitResponse > | handleBeginCommit (const HANDLER_CONTEXT< commands::BeginCommit > &aCtx) |
| HANDLER_RESULT< commands::EndCommitResponse > | handleEndCommit (const HANDLER_CONTEXT< commands::EndCommit > &aCtx) |
| COMMIT * | getCurrentCommit (const std::string &aClientName) |
| virtual void | pushCurrentCommit (const std::string &aClientName, const wxString &aMessage) |
| HANDLER_RESULT< commands::CreateItemsResponse > | handleCreateItems (const HANDLER_CONTEXT< commands::CreateItems > &aCtx) |
| HANDLER_RESULT< commands::UpdateItemsResponse > | handleUpdateItems (const HANDLER_CONTEXT< commands::UpdateItems > &aCtx) |
| HANDLER_RESULT< commands::DeleteItemsResponse > | handleDeleteItems (const HANDLER_CONTEXT< commands::DeleteItems > &aCtx) |
| HANDLER_RESULT< commands::HitTestResponse > | handleHitTest (const HANDLER_CONTEXT< commands::HitTest > &aCtx) |
| virtual HANDLER_RESULT< commands::GetDocumentModifiedStateResponse > | handleGetDocumentModifiedState (const HANDLER_CONTEXT< commands::GetDocumentModifiedState > &aCtx) |
| HANDLER_RESULT< types::TitleBlockInfo > | handleGetTitleBlockInfo (const HANDLER_CONTEXT< commands::GetTitleBlockInfo > &aCtx) |
| HANDLER_RESULT< google::protobuf::Empty > | handleSetTitleBlockInfo (const HANDLER_CONTEXT< commands::SetTitleBlockInfo > &aCtx) |
| HANDLER_RESULT< types::PageSettings > | handleGetPageSettings (const HANDLER_CONTEXT< commands::GetPageSettings > &aCtx) |
| HANDLER_RESULT< types::PageSettings > | handleSetPageSettings (const HANDLER_CONTEXT< commands::SetPageSettings > &aCtx) |
| virtual std::unique_ptr< COMMIT > | createCommit ()=0 |
| Override this to create an appropriate COMMIT subclass for the frame in question. | |
| virtual types::DocumentType | thisDocumentType () const =0 |
| Override this to specify which document type this editor handles. | |
| virtual tl::expected< bool, ApiResponseStatus > | validateDocumentInternal (const DocumentSpecifier &aDocument) const =0 |
| virtual const EDA_IU_SCALE & | getIuScale () const |
| Returns the internal-unit scale that the concrete editor uses. | |
| virtual HANDLER_RESULT< ItemRequestStatus > | handleCreateUpdateItemsInternal (bool aCreate, const std::string &aClientName, const types::ItemHeader &aHeader, const google::protobuf::RepeatedPtrField< google::protobuf::Any > &aItems, std::function< void(commands::ItemStatus, google::protobuf::Any)> aItemHandler)=0 |
| virtual void | deleteItemsInternal (std::map< KIID, ItemDeletionStatus > &aItemsToDelete, const std::string &aClientName)=0 |
| virtual std::optional< EDA_ITEM * > | getItemFromDocument (const DocumentSpecifier &aDocument, const KIID &aId)=0 |
| virtual std::optional< TITLE_BLOCK * > | getTitleBlock (const DocumentSpecifier &aDocument) |
| virtual std::optional< PAGE_INFO > | getPageSettings (const DocumentSpecifier &aDocument) |
| virtual bool | setPageSettings (const DocumentSpecifier &aDocument, const PAGE_INFO &aPageInfo) |
| virtual wxString | getDrawingSheetFileName () |
| virtual void | setDrawingSheetFileName (const wxString &aFileName) |
| virtual void | onModified () |
| template<class RequestType, class ResponseType, class HandlerType> | |
| void | registerHandler (HANDLER_RESULT< ResponseType >(HandlerType::*aHandler)(const HANDLER_CONTEXT< RequestType > &)) |
| Registers an API command handler for the given message types. | |
Static Protected Member Functions | |
| static std::vector< KICAD_T > | parseRequestedItemTypes (const google::protobuf::RepeatedField< int > &aTypes) |
Protected Attributes | |
| std::map< std::string, std::pair< KIID, std::unique_ptr< COMMIT > > > | m_commits |
| std::set< std::string > | m_activeClients |
| EDA_BASE_FRAME * | m_frame |
| std::map< std::string, REQUEST_HANDLER > | m_handlers |
| Maps type name (without the URL prefix) to a handler method. | |
Static Protected Attributes | |
| static const wxString | m_defaultCommitMessage = _( "Modification from API" ) |
Private Member Functions | |
| template<typename MessageType> | |
| bool | tryUnpack (ApiRequest &aRequest, ApiResponse &aReply, MessageType &aDest) |
Base class for API handlers related to editor frames.
Definition at line 43 of file api_handler_editor.h.
|
protectedinherited |
A handler for outer messages (envelopes) that will unpack to inner messages and call a specific handler function.
Definition at line 76 of file api_handler.h.
| API_HANDLER_EDITOR::API_HANDLER_EDITOR | ( | EDA_BASE_FRAME * | aFrame = nullptr | ) |
Definition at line 33 of file api_handler_editor.cpp.
References API_HANDLER::API_HANDLER(), handleBeginCommit(), handleCreateItems(), handleDeleteItems(), handleEndCommit(), handleGetDocumentModifiedState(), handleGetTitleBlockInfo(), handleHitTest(), handleSetTitleBlockInfo(), handleUpdateItems(), m_frame, and API_HANDLER::registerHandler().
Referenced by API_HANDLER_BOARD::API_HANDLER_BOARD(), and API_HANDLER_SCH::API_HANDLER_SCH().
|
protectedvirtual |
Checks if the editor can accept commands.
Definition at line 218 of file api_handler_editor.cpp.
References m_frame.
Referenced by API_HANDLER_PCB::handleAddEmbeddedFiles(), API_HANDLER_BOARD::handleAddToSelection(), API_HANDLER_SCH::handleAddToSelection(), API_HANDLER_PCB::handleAddVariant(), API_HANDLER_SCH::handleAddVariant(), handleBeginCommit(), API_HANDLER_BOARD::handleClearSelection(), API_HANDLER_SCH::handleClearSelection(), API_HANDLER_PCB::handleCopyVariant(), API_HANDLER_SCH::handleCopyVariant(), handleCreateItems(), handleDeleteItems(), API_HANDLER_PCB::handleDeleteVariant(), API_HANDLER_SCH::handleDeleteVariant(), handleEndCommit(), API_HANDLER_BOARD::handleFlipItems(), API_HANDLER_BOARD::handleGetBoundingBox(), API_HANDLER_PCB::handleGetConnectedItems(), API_HANDLER_FOOTPRINT::handleGetItems(), API_HANDLER_PCB::handleGetItems(), API_HANDLER_SCH::handleGetItems(), API_HANDLER_BOARD::handleGetItemsById(), API_HANDLER_SCH::handleGetItemsById(), API_HANDLER_PCB::handleGetItemsByNet(), API_HANDLER_PCB::handleGetItemsByNetClass(), API_HANDLER_SCH::handleGetSchematicNetlist(), API_HANDLER_PCB::handleGetVariants(), API_HANDLER_SCH::handleGetVariants(), handleHitTest(), API_HANDLER_PCB::handleImportNetlist(), API_HANDLER_PCB::handleInjectDrcError(), API_HANDLER_BOARD::handleInteractiveMoveItems(), API_HANDLER_BOARD::handleParseAndCreateItemsFromString(), API_HANDLER_PCB::handlePlaceFootprintFromLibrary(), API_HANDLER_SCH::handlePlaceSymbolFromLibrary(), API_HANDLER_PCB::handleRefillZones(), API_HANDLER_BOARD::handleRemoveFromSelection(), API_HANDLER_SCH::handleRemoveFromSelection(), API_HANDLER_PCB::handleRenameVariant(), API_HANDLER_SCH::handleRenameVariant(), API_HANDLER_FOOTPRINT::handleRevertDocument(), API_HANDLER_PCB::handleRevertDocument(), API_HANDLER_SCH::handleRevertDocument(), API_HANDLER_BOARD::handleRunAction(), API_HANDLER_PCB::handleRunBoardJobExport3D(), API_HANDLER_PCB::handleRunBoardJobExportDrill(), API_HANDLER_PCB::handleRunBoardJobExportDxf(), API_HANDLER_PCB::handleRunBoardJobExportGencad(), API_HANDLER_PCB::handleRunBoardJobExportGerbers(), API_HANDLER_PCB::handleRunBoardJobExportIpc2581(), API_HANDLER_PCB::handleRunBoardJobExportIpcD356(), API_HANDLER_PCB::handleRunBoardJobExportODB(), API_HANDLER_PCB::handleRunBoardJobExportPdf(), API_HANDLER_PCB::handleRunBoardJobExportPng(), API_HANDLER_PCB::handleRunBoardJobExportPosition(), API_HANDLER_PCB::handleRunBoardJobExportPs(), API_HANDLER_PCB::handleRunBoardJobExportRender(), API_HANDLER_PCB::handleRunBoardJobExportStats(), API_HANDLER_PCB::handleRunBoardJobExportSvg(), API_HANDLER_SCH::handleRunSchematicJobExportBOM(), API_HANDLER_SCH::handleRunSchematicJobExportDxf(), API_HANDLER_SCH::handleRunSchematicJobExportNetlist(), API_HANDLER_SCH::handleRunSchematicJobExportPdf(), API_HANDLER_SCH::handleRunSchematicJobExportPng(), API_HANDLER_SCH::handleRunSchematicJobExportPs(), API_HANDLER_SCH::handleRunSchematicJobExportSvg(), API_HANDLER_PCB::handleSaveCopyOfDocument(), API_HANDLER_SCH::handleSaveCopyOfDocument(), API_HANDLER_PCB::handleSaveDocument(), API_HANDLER_SCH::handleSaveDocument(), API_HANDLER_BOARD::handleSetActiveLayer(), API_HANDLER_PCB::handleSetBoardEditorAppearanceSettings(), API_HANDLER_PCB::handleSetBoardOrigin(), API_HANDLER_PCB::handleSetBoardPlotSettings(), API_HANDLER_PCB::handleSetCurrentVariant(), API_HANDLER_SCH::handleSetCurrentVariant(), API_HANDLER_PCB::handleSetEmbeddedFiles(), API_HANDLER_PCB::handleSetVariantDescription(), API_HANDLER_SCH::handleSetVariantDescription(), API_HANDLER_BOARD::handleSetVisibleLayers(), handleUpdateItems(), and API_HANDLER_FOOTPRINT::validateAndGetFootprint().
|
protectedpure virtual |
Override this to create an appropriate COMMIT subclass for the frame in question.
Implemented in API_HANDLER_BOARD, and API_HANDLER_SCH.
Referenced by getCurrentCommit(), and handleBeginCommit().
|
protectedpure virtual |
Implemented in API_HANDLER_BOARD, and API_HANDLER_SCH.
Referenced by handleDeleteItems().
|
protected |
Definition at line 154 of file api_handler_editor.cpp.
References createCommit(), and m_commits.
Referenced by API_HANDLER_BOARD::deleteItemsInternal(), API_HANDLER_SCH::deleteItemsInternal(), API_HANDLER_BOARD::handleCreateUpdateItemsInternal(), API_HANDLER_SCH::handleCreateUpdateItemsInternal(), API_HANDLER_BOARD::handleFlipItems(), API_HANDLER_PCB::handleInjectDrcError(), API_HANDLER_BOARD::handleInteractiveMoveItems(), API_HANDLER_PCB::handlePlaceFootprintFromLibrary(), and API_HANDLER_SCH::handlePlaceSymbolFromLibrary().
|
inlineprotectedvirtual |
Reimplemented in API_HANDLER_PCB, and API_HANDLER_SCH.
Definition at line 141 of file api_handler_editor.h.
Referenced by handleGetPageSettings(), and handleSetPageSettings().
|
protectedpure virtual |
Implemented in API_HANDLER_BOARD, and API_HANDLER_SCH.
Referenced by handleHitTest().
|
inlineprotectedvirtual |
Returns the internal-unit scale that the concrete editor uses.
API wire coordinates are always in nanometers, so this scale drives conversion to the editor's native IU. Defaults to pcbIUScale; schematic-like editors must override.
Reimplemented in API_HANDLER_SCH.
Definition at line 119 of file api_handler_editor.h.
References pcbIUScale.
Referenced by handleHitTest().
|
inlineprotectedvirtual |
Reimplemented in API_HANDLER_PCB, and API_HANDLER_SCH.
Definition at line 137 of file api_handler_editor.h.
Referenced by handleGetPageSettings(), and handleSetPageSettings().
|
inlineprotectedvirtual |
Reimplemented in API_HANDLER_PCB, and API_HANDLER_SCH.
Definition at line 135 of file api_handler_editor.h.
Referenced by handleGetTitleBlockInfo(), and handleSetTitleBlockInfo().
|
inherited |
Attempt to handle the given API request, if a handler exists in this class for the message.
| aMsg | is a request to attempt to handle |
Definition at line 30 of file api_handler.cpp.
References m_handlers.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
protected |
Definition at line 50 of file api_handler_editor.cpp.
References checkForBusy(), HANDLER_CONTEXT< RequestMessageType >::ClientName, createCommit(), m_activeClients, m_commits, HANDLER_CONTEXT< RequestMessageType >::Request, and validateItemHeaderDocument().
Referenced by API_HANDLER_EDITOR().
|
protected |
Definition at line 235 of file api_handler_editor.cpp.
References checkForBusy(), HANDLER_CONTEXT< RequestMessageType >::ClientName, handleCreateUpdateItemsInternal(), HANDLER_CONTEXT< RequestMessageType >::Request, and result.
Referenced by API_HANDLER_EDITOR().
|
protectedpure virtual |
Implemented in API_HANDLER_BOARD, and API_HANDLER_SCH.
Referenced by handleCreateItems(), and handleUpdateItems().
|
protected |
Definition at line 289 of file api_handler_editor.cpp.
References checkForBusy(), HANDLER_CONTEXT< RequestMessageType >::ClientName, deleteItemsInternal(), HANDLER_CONTEXT< RequestMessageType >::Request, result, and validateItemHeaderDocument().
Referenced by API_HANDLER_EDITOR().
|
protected |
Definition at line 88 of file api_handler_editor.cpp.
References checkForBusy(), HANDLER_CONTEXT< RequestMessageType >::ClientName, m_activeClients, m_commits, pushCurrentCommit(), HANDLER_CONTEXT< RequestMessageType >::Request, and validateItemHeaderDocument().
Referenced by API_HANDLER_EDITOR().
|
protectedvirtual |
Reimplemented in API_HANDLER_PCB, and API_HANDLER_SCH.
Definition at line 379 of file api_handler_editor.cpp.
References m_frame, HANDLER_CONTEXT< RequestMessageType >::Request, and validateDocument().
Referenced by API_HANDLER_EDITOR().
|
protected |
Definition at line 499 of file api_handler_editor.cpp.
References getDrawingSheetFileName(), getPageSettings(), PAGE_INFO::GetSizeIU(), PAGE_INFO::GetType(), PAGE_INFO::IsCustom(), PAGE_INFO::IsPortrait(), kiapi::common::PackVector2(), pcbIUScale, HANDLER_CONTEXT< RequestMessageType >::Request, ToProtoEnum(), and validateDocument().
Referenced by API_HANDLER_PCB::API_HANDLER_PCB(), and API_HANDLER_SCH::API_HANDLER_SCH().
|
protected |
Definition at line 410 of file api_handler_editor.cpp.
References TITLE_BLOCK::GetComment(), TITLE_BLOCK::GetCompany(), TITLE_BLOCK::GetDate(), TITLE_BLOCK::GetRevision(), TITLE_BLOCK::GetTitle(), getTitleBlock(), HANDLER_CONTEXT< RequestMessageType >::Request, and validateDocument().
Referenced by API_HANDLER_EDITOR().
|
protected |
Definition at line 338 of file api_handler_editor.cpp.
References checkForBusy(), getItemFromDocument(), getIuScale(), HANDLER_CONTEXT< RequestMessageType >::Request, scale, kiapi::common::UnpackVector2(), and validateItemHeaderDocument().
Referenced by API_HANDLER_EDITOR().
|
protected |
Definition at line 533 of file api_handler_editor.cpp.
References FromProtoEnum(), getDrawingSheetFileName(), getPageSettings(), PAGE_INFO::GetSizeIU(), PAGE_INFO::GetType(), PAGE_INFO::IsCustom(), PAGE_INFO::IsPortrait(), onModified(), kiapi::common::PackVector2(), pcbIUScale, HANDLER_CONTEXT< RequestMessageType >::Request, PAGE_INFO::SetCustomHeightMils(), PAGE_INFO::SetCustomWidthMils(), setDrawingSheetFileName(), setPageSettings(), PAGE_INFO::SetType(), ToProtoEnum(), kiapi::common::UnpackVector2(), User, validateDocument(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by API_HANDLER_PCB::API_HANDLER_PCB(), and API_HANDLER_SCH::API_HANDLER_SCH().
|
protected |
Definition at line 450 of file api_handler_editor.cpp.
References getTitleBlock(), onModified(), HANDLER_CONTEXT< RequestMessageType >::Request, TITLE_BLOCK::SetComment(), TITLE_BLOCK::SetCompany(), TITLE_BLOCK::SetDate(), TITLE_BLOCK::SetRevision(), TITLE_BLOCK::SetTitle(), and validateDocument().
Referenced by API_HANDLER_EDITOR().
|
protected |
Definition at line 262 of file api_handler_editor.cpp.
References checkForBusy(), HANDLER_CONTEXT< RequestMessageType >::ClientName, handleCreateUpdateItemsInternal(), HANDLER_CONTEXT< RequestMessageType >::Request, and result.
Referenced by API_HANDLER_EDITOR().
|
inlineprotectedvirtual |
Reimplemented in API_HANDLER_PCB, and API_HANDLER_SCH.
Definition at line 145 of file api_handler_editor.h.
Referenced by handleSetPageSettings(), handleSetTitleBlockInfo(), and API_HANDLER_BOARD::pushCurrentCommit().
|
staticprotected |
Definition at line 393 of file api_handler_editor.cpp.
References FromProtoEnum(), and TYPE_NOT_INIT.
Referenced by API_HANDLER_SCH::handleGetItems(), API_HANDLER_SCH::handleGetSchematicNetlist(), and API_HANDLER_SCH::handleGetSelection().
|
protectedvirtual |
Reimplemented in API_HANDLER_BOARD.
Definition at line 166 of file api_handler_editor.cpp.
References m_activeClients, m_commits, and API_HANDLER::m_defaultCommitMessage.
Referenced by API_HANDLER_SCH::deleteItemsInternal(), API_HANDLER_SCH::handleCreateUpdateItemsInternal(), handleEndCommit(), API_HANDLER_SCH::handlePlaceSymbolFromLibrary(), and API_HANDLER_BOARD::pushCurrentCommit().
|
inlineprotectedinherited |
Registers an API command handler for the given message types.
When an API request matching the given type comes in, the handler will be called and its response will be packed into an envelope for sending back to the API client.
If the given message does not unpack into the request type, an envelope is returned with status AS_BAD_REQUEST, which probably indicates corruption in the message.
| RequestType | is a protobuf message type containing a command |
| ResponseType | is a protobuf message type containing a command response |
| HandlerType | is the implied type of the API_HANDLER subclass |
| aHandler | is the handler function for the given request and response types |
Definition at line 93 of file api_handler.h.
References HANDLER_CONTEXT< RequestMessageType >::ClientName, m_handlers, HANDLER_CONTEXT< RequestMessageType >::Request, and tryUnpack().
Referenced by API_HANDLER_BOARD::API_HANDLER_BOARD(), API_HANDLER_COMMON::API_HANDLER_COMMON(), API_HANDLER_EDITOR::API_HANDLER_EDITOR(), API_HANDLER_FOOTPRINT::API_HANDLER_FOOTPRINT(), API_HANDLER_LIBRARIES::API_HANDLER_LIBRARIES(), API_HANDLER_PCB::API_HANDLER_PCB(), and API_HANDLER_SCH::API_HANDLER_SCH().
|
inlineprotectedvirtual |
Reimplemented in API_HANDLER_PCB, and API_HANDLER_SCH.
Definition at line 143 of file api_handler_editor.h.
Referenced by handleSetPageSettings().
|
inlineprotectedvirtual |
Reimplemented in API_HANDLER_PCB, and API_HANDLER_SCH.
Definition at line 139 of file api_handler_editor.h.
Referenced by handleSetPageSettings().
|
protectedpure virtual |
Override this to specify which document type this editor handles.
Implemented in API_HANDLER_FOOTPRINT, API_HANDLER_PCB, and API_HANDLER_SCH.
Referenced by validateItemHeaderDocument().
|
inlineprivateinherited |
Definition at line 136 of file api_handler.h.
Referenced by registerHandler().
|
protected |
Definition at line 180 of file api_handler_editor.cpp.
References validateDocumentInternal().
Referenced by API_HANDLER_BOARD::getItemFromDocument(), API_HANDLER_SCH::getItemFromDocument(), API_HANDLER_PCB::handleAddEmbeddedFiles(), API_HANDLER_PCB::handleAddVariant(), API_HANDLER_SCH::handleAddVariant(), API_HANDLER_BOARD::handleCheckPadstackPresenceOnLayers(), API_HANDLER_PCB::handleCopyVariant(), API_HANDLER_SCH::handleCopyVariant(), API_HANDLER_PCB::handleDeleteVariant(), API_HANDLER_SCH::handleDeleteVariant(), API_HANDLER_BOARD::handleExpandTextVariables(), API_HANDLER_SCH::handleExpandTextVariables(), API_HANDLER_BOARD::handleGetActiveLayer(), API_HANDLER_PCB::handleGetBoardDesignRules(), API_HANDLER_BOARD::handleGetBoardEnabledLayers(), API_HANDLER_PCB::handleGetBoardLayerByName(), API_HANDLER_PCB::handleGetBoardLayerName(), API_HANDLER_PCB::handleGetBoardOrigin(), API_HANDLER_PCB::handleGetBoardPlotSettings(), API_HANDLER_PCB::handleGetCurrentVariant(), API_HANDLER_SCH::handleGetCurrentVariant(), API_HANDLER_PCB::handleGetCustomDesignRules(), handleGetDocumentModifiedState(), API_HANDLER_PCB::handleGetDocumentModifiedState(), API_HANDLER_SCH::handleGetDocumentModifiedState(), API_HANDLER_PCB::handleGetEmbeddedFiles(), API_HANDLER_BOARD::handleGetGraphicsDefaults(), API_HANDLER_PCB::handleGetNets(), API_HANDLER_BOARD::handleGetPadShapeAsPolygon(), handleGetPageSettings(), API_HANDLER_SCH::handleGetSchematicHierarchy(), API_HANDLER_SCH::handleGetSchematicNetlist(), API_HANDLER_BOARD::handleGetStackup(), handleGetTitleBlockInfo(), API_HANDLER_PCB::handleGetVariants(), API_HANDLER_SCH::handleGetVariants(), API_HANDLER_BOARD::handleGetVisibleLayers(), API_HANDLER_PCB::handleImportNetlist(), API_HANDLER_PCB::handleInjectDrcError(), API_HANDLER_BOARD::handleInteractiveMoveItems(), API_HANDLER_BOARD::handleParseAndCreateItemsFromString(), API_HANDLER_PCB::handleRefillZones(), API_HANDLER_PCB::handleRenameVariant(), API_HANDLER_SCH::handleRenameVariant(), API_HANDLER_FOOTPRINT::handleRevertDocument(), API_HANDLER_PCB::handleRevertDocument(), API_HANDLER_SCH::handleRevertDocument(), API_HANDLER_PCB::handleRunBoardJobExport3D(), API_HANDLER_PCB::handleRunBoardJobExportDrill(), API_HANDLER_PCB::handleRunBoardJobExportDxf(), API_HANDLER_PCB::handleRunBoardJobExportGencad(), API_HANDLER_PCB::handleRunBoardJobExportGerbers(), API_HANDLER_PCB::handleRunBoardJobExportIpc2581(), API_HANDLER_PCB::handleRunBoardJobExportIpcD356(), API_HANDLER_PCB::handleRunBoardJobExportODB(), API_HANDLER_PCB::handleRunBoardJobExportPdf(), API_HANDLER_PCB::handleRunBoardJobExportPng(), API_HANDLER_PCB::handleRunBoardJobExportPosition(), API_HANDLER_PCB::handleRunBoardJobExportPs(), API_HANDLER_PCB::handleRunBoardJobExportRender(), API_HANDLER_PCB::handleRunBoardJobExportStats(), API_HANDLER_PCB::handleRunBoardJobExportSvg(), API_HANDLER_SCH::handleRunSchematicJobExportBOM(), API_HANDLER_SCH::handleRunSchematicJobExportDxf(), API_HANDLER_SCH::handleRunSchematicJobExportNetlist(), API_HANDLER_SCH::handleRunSchematicJobExportPdf(), API_HANDLER_SCH::handleRunSchematicJobExportPng(), API_HANDLER_SCH::handleRunSchematicJobExportPs(), API_HANDLER_SCH::handleRunSchematicJobExportSvg(), API_HANDLER_PCB::handleSaveCopyOfDocument(), API_HANDLER_SCH::handleSaveCopyOfDocument(), API_HANDLER_PCB::handleSaveDocument(), API_HANDLER_SCH::handleSaveDocument(), API_HANDLER_BOARD::handleSaveDocumentToString(), API_HANDLER_SCH::handleSaveDocumentToString(), API_HANDLER_BOARD::handleSetActiveLayer(), API_HANDLER_PCB::handleSetBoardDesignRules(), API_HANDLER_PCB::handleSetBoardEnabledLayers(), API_HANDLER_PCB::handleSetBoardOrigin(), API_HANDLER_PCB::handleSetBoardPlotSettings(), API_HANDLER_PCB::handleSetCurrentVariant(), API_HANDLER_SCH::handleSetCurrentVariant(), API_HANDLER_PCB::handleSetCustomDesignRules(), API_HANDLER_PCB::handleSetEmbeddedFiles(), handleSetPageSettings(), handleSetTitleBlockInfo(), API_HANDLER_PCB::handleSetVariantDescription(), API_HANDLER_SCH::handleSetVariantDescription(), API_HANDLER_BOARD::handleSetVisibleLayers(), API_HANDLER_FOOTPRINT::validateAndGetFootprint(), and validateItemHeaderDocument().
|
protectedpure virtual |
Implemented in API_HANDLER_FOOTPRINT, API_HANDLER_PCB, and API_HANDLER_SCH.
Referenced by validateDocument(), and validateItemHeaderDocument().
|
protected |
If the header is valid, returns the item container.
Definition at line 189 of file api_handler_editor.cpp.
References result, thisDocumentType(), validateDocument(), and validateDocumentInternal().
Referenced by API_HANDLER_BOARD::handleAddToSelection(), API_HANDLER_SCH::handleAddToSelection(), handleBeginCommit(), API_HANDLER_BOARD::handleClearSelection(), API_HANDLER_SCH::handleClearSelection(), API_HANDLER_BOARD::handleCreateUpdateItemsInternal(), API_HANDLER_SCH::handleCreateUpdateItemsInternal(), handleDeleteItems(), handleEndCommit(), API_HANDLER_BOARD::handleFlipItems(), API_HANDLER_BOARD::handleGetBoundingBox(), API_HANDLER_PCB::handleGetConnectedItems(), API_HANDLER_FOOTPRINT::handleGetItems(), API_HANDLER_PCB::handleGetItems(), API_HANDLER_SCH::handleGetItems(), API_HANDLER_BOARD::handleGetItemsById(), API_HANDLER_SCH::handleGetItemsById(), API_HANDLER_PCB::handleGetItemsByNet(), API_HANDLER_PCB::handleGetItemsByNetClass(), API_HANDLER_BOARD::handleGetSelection(), API_HANDLER_SCH::handleGetSelection(), handleHitTest(), API_HANDLER_PCB::handlePlaceFootprintFromLibrary(), API_HANDLER_SCH::handlePlaceSymbolFromLibrary(), API_HANDLER_BOARD::handleRemoveFromSelection(), and API_HANDLER_SCH::handleRemoveFromSelection().
|
protected |
Definition at line 150 of file api_handler_editor.h.
Referenced by API_HANDLER_BOARD::deleteItemsInternal(), API_HANDLER_SCH::deleteItemsInternal(), handleBeginCommit(), API_HANDLER_BOARD::handleCreateUpdateItemsInternal(), API_HANDLER_SCH::handleCreateUpdateItemsInternal(), handleEndCommit(), API_HANDLER_BOARD::handleFlipItems(), API_HANDLER_PCB::handlePlaceFootprintFromLibrary(), API_HANDLER_SCH::handlePlaceSymbolFromLibrary(), and pushCurrentCommit().
|
protected |
Definition at line 148 of file api_handler_editor.h.
Referenced by getCurrentCommit(), handleBeginCommit(), handleEndCommit(), API_HANDLER_PCB::handleRevertDocument(), API_HANDLER_SCH::handleRevertDocument(), and pushCurrentCommit().
|
staticprotectedinherited |
Definition at line 131 of file api_handler.h.
Referenced by API_HANDLER_EDITOR::pushCurrentCommit().
|
protected |
Definition at line 152 of file api_handler_editor.h.
Referenced by API_HANDLER_EDITOR(), checkForBusy(), API_HANDLER_BOARD::checkForHeadless(), API_HANDLER_SCH::checkForHeadless(), API_HANDLER_BOARD::createCommit(), API_HANDLER_SCH::createCommit(), API_HANDLER_FOOTPRINT::frame(), API_HANDLER_PCB::frame(), API_HANDLER_SCH::frame(), API_HANDLER_BOARD::handleAddToSelection(), API_HANDLER_SCH::handleAddVariant(), API_HANDLER_BOARD::handleClearSelection(), API_HANDLER_SCH::handleCopyVariant(), API_HANDLER_SCH::handleCreateUpdateItemsInternal(), API_HANDLER_SCH::handleDeleteVariant(), API_HANDLER_BOARD::handleGetActiveLayer(), handleGetDocumentModifiedState(), API_HANDLER_BOARD::handleRemoveFromSelection(), API_HANDLER_SCH::handleRenameVariant(), API_HANDLER_BOARD::handleSetActiveLayer(), API_HANDLER_SCH::handleSetCurrentVariant(), API_HANDLER_BOARD::handleSetVisibleLayers(), API_HANDLER_SCH::onModified(), and API_HANDLER_SCH::setDrawingSheetFileName().
|
protectedinherited |
Maps type name (without the URL prefix) to a handler method.
Definition at line 129 of file api_handler.h.
Referenced by Handle(), and registerHandler().