|
wiRedPanda
Logic Circuit Simulator
|
Handler for IC (Integrated Circuit) commands. More...
#include <ICHandler.h>
Public Member Functions | |
| QJsonObject | handleCommand (const QString &command, const QJsonObject ¶ms, const QJsonValue &requestId) override |
| ICHandler (MainWindow *mainWindow, const MCPValidator *validator) | |
| Public Member Functions inherited from BaseHandler | |
| QString | availableInputPorts (GraphicElement *element) const |
| QString | availableOutputPorts (GraphicElement *element) const |
| BaseHandler (MainWindow *mainWindow, const MCPValidator *validator) | |
| QJsonObject | createErrorResponse (const QString &error, const QJsonValue &requestId=QJsonValue(), int code=JsonRpcError::InternalError) const |
| QJsonObject | createSuccessResponse (const QJsonObject &result={}, const QJsonValue &requestId=QJsonValue()) const |
| Scene * | currentScene () |
| const Scene * | currentScene () const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| bool | inputPortByLabel (GraphicElement *element, const QString &label, int &portIndex, QString &errorMsg) const |
| bool | outputPortByLabel (GraphicElement *element, const QString &label, int &portIndex, QString &errorMsg) const |
| template<typename Fn> | |
| QJsonObject | tryCommand (Fn &&fn, const QString &action, const QJsonValue &requestId=QJsonValue()) |
| Wraps fn in a try/catch, returning an error response on exception. | |
| GraphicElement * | validatedElement (const QJsonObject ¶ms, const QString ¶mName, QString &errorMsg) |
| Validates paramName in params, looks up the element, and returns it. | |
| bool | validateElementId (int elementId, const QString ¶mName, QString &errorMsg) const |
| bool | validateNonEmptyString (const QJsonValue &value, const QString ¶mName, QString &errorMsg) const |
| bool | validateNonNegativeInteger (const QJsonValue &value, const QString ¶mName, QString &errorMsg) const |
| bool | validateNumeric (const QJsonValue &value, const QString ¶mName, QString &errorMsg) const |
| bool | validateParameters (const QJsonObject ¶ms, const QStringList &required) const |
| bool | validatePortRange (GraphicElement *element, int portIndex, bool isOutput, const QString ¶mName, QString &errorMsg) const |
| bool | validatePositiveInteger (const QJsonValue &value, const QString ¶mName, QString &errorMsg) const |
| virtual | ~BaseHandler ()=default |
Additional Inherited Members | |
| Protected Member Functions inherited from BaseHandler | |
| QString | availablePorts (GraphicElement *element, bool isOutput) const |
| Protected Attributes inherited from BaseHandler | |
| MainWindow * | m_mainWindow |
| const MCPValidator * | m_validator |
Handler for IC (Integrated Circuit) commands.
Handles all IC-related MCP commands: creating an IC from the current circuit, instantiating an IC into the scene, listing available ICs, and embedding/extracting IC blobs.
Definition at line 16 of file ICHandler.h.
|
explicit |
Definition at line 34 of file ICHandler.cpp.
References BaseHandler::BaseHandler().
|
overridevirtual |
Implements BaseHandler.
Definition at line 39 of file ICHandler.cpp.
References BaseHandler::createErrorResponse(), and JsonRpcError::MethodNotFound.