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

#include <mna_project.h>

Public Types

typedef QSharedPointer< MnaProject > SPtr
typedef QSharedPointer< const MnaProject > ConstSPtr

Public Member Functions

 MnaProject ()
QJsonObject toJson () const
QCborMap toCbor () const

Static Public Member Functions

static MnaProject fromJson (const QJsonObject &json)
static MnaProject fromCbor (const QCborMap &cbor)
static MnaProject read (const QString &path)
static bool write (const MnaProject &project, const QString &path)

Public Attributes

QString name
QString description
QString mnaVersion
QDateTime created
QDateTime modified
QList< MnaSubject > subjects
QList< MnaNode > pipeline
QJsonObject extras

Static Public Attributes

static constexpr const char * CURRENT_SCHEMA_VERSION = "1.0"

Detailed Description

Top-level MNA project container. Holds subjects, pipeline steps, and project metadata.

Definition at line 65 of file mna_project.h.

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const MnaProject> MNALIB::MnaProject::ConstSPtr

Const shared pointer type.

Definition at line 69 of file mna_project.h.

◆ SPtr

typedef QSharedPointer<MnaProject> MNALIB::MnaProject::SPtr

Shared pointer type.

Definition at line 68 of file mna_project.h.

Constructor & Destructor Documentation

◆ MnaProject()

MnaProject::MnaProject ( )

Default constructor.

Definition at line 42 of file mna_project.cpp.

Member Function Documentation

◆ fromCbor()

MnaProject MnaProject::fromCbor ( const QCborMap & cbor)
static

Deserialize from QCborMap.

Parameters
[in]cborCBOR map as produced by toCbor().
Returns
The project; missing keys take default values and unknown keys go to extras.

Definition at line 140 of file mna_project.cpp.

◆ fromJson()

MnaProject MnaProject::fromJson ( const QJsonObject & json)
static

Deserialize from QJsonObject.

Parameters
[in]jsonJSON object as produced by toJson().
Returns
The project; missing keys take default values and unknown keys go to extras.

Definition at line 78 of file mna_project.cpp.

◆ read()

MnaProject MnaProject::read ( const QString & path)
static

Read an MNA project from file. Delegates to MnaIO.

Parameters
[in]pathPath to the .mna or .mnx file.
Returns
The deserialized MnaProject.

Definition at line 176 of file mna_project.cpp.

◆ toCbor()

QCborMap MnaProject::toCbor ( ) const

Serialize to QCborMap.

Returns
CBOR map with all project fields, subjects, pipeline nodes and preserved extras.

Definition at line 113 of file mna_project.cpp.

◆ toJson()

QJsonObject MnaProject::toJson ( ) const

Serialize to QJsonObject.

Returns
JSON object with all project fields, subjects, pipeline nodes and preserved extras.

Definition at line 51 of file mna_project.cpp.

◆ write()

bool MnaProject::write ( const MnaProject & project,
const QString & path )
static

Write an MNA project to file. Delegates to MnaIO.

Parameters
[in]projectThe project to write.
[in]pathPath to the .mna or .mnx file.
Returns
True if successful.

Definition at line 183 of file mna_project.cpp.

Member Data Documentation

◆ created

QDateTime MNALIB::MnaProject::created

Creation timestamp.

Definition at line 84 of file mna_project.h.

◆ CURRENT_SCHEMA_VERSION

const char* MNALIB::MnaProject::CURRENT_SCHEMA_VERSION = "1.0"
staticconstexpr

Current MNA schema version.

Definition at line 79 of file mna_project.h.

◆ description

QString MNALIB::MnaProject::description

Project description.

Definition at line 82 of file mna_project.h.

◆ extras

QJsonObject MNALIB::MnaProject::extras

Unknown keys preserved for lossless round-trip.

Definition at line 88 of file mna_project.h.

◆ mnaVersion

QString MNALIB::MnaProject::mnaVersion

MNA schema version.

Definition at line 83 of file mna_project.h.

◆ modified

QDateTime MNALIB::MnaProject::modified

Last modification timestamp.

Definition at line 85 of file mna_project.h.

◆ name

QString MNALIB::MnaProject::name

Project name.

Definition at line 81 of file mna_project.h.

◆ pipeline

QList<MnaNode> MNALIB::MnaProject::pipeline

Processing pipeline nodes.

Definition at line 87 of file mna_project.h.

◆ subjects

QList<MnaSubject> MNALIB::MnaProject::subjects

Subjects in the project.

Definition at line 86 of file mna_project.h.


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