v2.0.0
Loading...
Searching...
No Matches
MNALIB::MnaOpRegistry Class Reference

Operation registry for the MNA graph model. More...

#include <mna_op_registry.h>

Public Types

using OpFunc
 Operation implementation callback type.

Public Member Functions

void registerOp (const MnaOpSchema &schema)
bool hasOp (const QString &opType) const
MnaOpSchema schema (const QString &opType) const
QStringList registeredOps () const
void registerOpFunc (const QString &opType, OpFunc func)
OpFunc opFunc (const QString &opType) const
int loadRegistryFiles ()
QStringList missingOps (const QStringList &pipelineTools) const

Static Public Member Functions

static MnaOpRegistry & instance ()

Detailed Description

Operation registry for the MNA graph model.

Singleton catalog of all registered operation schemas.

Definition at line 68 of file mna_op_registry.h.

Member Typedef Documentation

◆ OpFunc

Initial value:
std::function<QVariantMap(const QVariantMap& inputs,
const QVariantMap& attributes)>

Operation implementation callback type.

Definition at line 72 of file mna_op_registry.h.

Member Function Documentation

◆ hasOp()

bool MnaOpRegistry::hasOp ( const QString & opType) const

Check if an operation type is registered.

Definition at line 82 of file mna_op_registry.cpp.

◆ instance()

MnaOpRegistry & MnaOpRegistry::instance ( )
static

Access the singleton instance.

Definition at line 67 of file mna_op_registry.cpp.

◆ loadRegistryFiles()

int MnaOpRegistry::loadRegistryFiles ( )

Load registry files from the standard resources/mna/ directory.

Searches upward from the application directory to find resources/mna/, then loads mna-registry.json and all drop-in files from mna-registry.d/.

Returns
Number of ops loaded, or 0 if no registry directory was found.

Definition at line 117 of file mna_op_registry.cpp.

◆ missingOps()

QStringList MnaOpRegistry::missingOps ( const QStringList & pipelineTools) const

Return op types referenced in a project that have no registered schema.

Parameters
[in]projectThe MNA project to check.
Returns
List of op type strings with no registered schema.

Definition at line 141 of file mna_op_registry.cpp.

◆ opFunc()

MnaOpRegistry::OpFunc MnaOpRegistry::opFunc ( const QString & opType) const

Get the implementation function for an operation type.

Definition at line 110 of file mna_op_registry.cpp.

◆ registeredOps()

QStringList MnaOpRegistry::registeredOps ( ) const

List all registered operation types.

Definition at line 96 of file mna_op_registry.cpp.

◆ registerOp()

void MnaOpRegistry::registerOp ( const MnaOpSchema & schema)

Register an operation schema.

Definition at line 75 of file mna_op_registry.cpp.

◆ registerOpFunc()

void MnaOpRegistry::registerOpFunc ( const QString & opType,
OpFunc func )

Register an implementation function for an operation type.

Definition at line 103 of file mna_op_registry.cpp.

◆ schema()

MnaOpSchema MnaOpRegistry::schema ( const QString & opType) const

Get the schema for an operation type.

Definition at line 89 of file mna_op_registry.cpp.


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