sgns::sgprocessing::ProcessingManager¶
#include <ProcessingManager.hpp>
Public Types¶
| Name | |
|---|---|
| enum class | Error |
Public Functions¶
| Name | |
|---|---|
| ~ProcessingManager() | |
| outcome::result< uint64_t > | ParseBlockSize() |
| outcome::result< void > | CheckProcessValidity() |
| outcome::result< std::vector< uint8_t > > | Process(std::shared_ptr< boost::asio::io_context > ioc, std::vector< std::vector< uint8_t > > & chunkhashes, sgns::ModelNode & model) |
| void | RegisterProcessorFactory(const int & name, std::function< std::unique_ptr< ProcessingProcessor >()> factoryFunction) |
| sgns::SgnsProcessing | GetProcessingData() |
| outcome::result< size_t > | GetInputIndex(const std::string & input) |
| float | GetProgress() const |
| outcome::result< std::shared_ptr< ProcessingManager > > | Create(const std::string & jsondata) |
| bool | IsProcessingValid(const std::string & jsondata) Checks whether a processing json is valid by attempting to create a ProcessingManager instance with it. |
| bool | IsProcessingModelValid(const std::string & jsondata) Checks if a json encoded data contains a valid ModelNode structure by attempting to parse it. |
| outcome::result< sgns::ModelNode > | GetModelNodeFromJson(const std::string & jsondata) Gets the ModelNode structure parsed from a json string. |
Public Types Documentation¶
enum Error¶
| Enumerator | Value | Description |
|---|---|---|
| PROCESS_INFO_MISSING | 1 | |
| INVALID_JSON | 2 | |
| INVALID_BLOCK_PARAMETERS | 3 | |
| NO_PROCESSOR | 4 | |
| MISSING_INPUT | 5 | |
| INPUT_UNAVAIL | 6 |
Public Functions Documentation¶
function ~ProcessingManager¶
function ParseBlockSize¶
function CheckProcessValidity¶
function Process¶
outcome::result< std::vector< uint8_t > > Process(
std::shared_ptr< boost::asio::io_context > ioc,
std::vector< std::vector< uint8_t > > & chunkhashes,
sgns::ModelNode & model
)
function RegisterProcessorFactory¶
inline void RegisterProcessorFactory(
const int & name,
std::function< std::unique_ptr< ProcessingProcessor >()> factoryFunction
)
Parameters:
- name - Name of processor
- factoryFunction - Pointer to processor
Register an available processor
function GetProcessingData¶
Get Processing Data item which can be used to access any processing data, inputs, or params.
function GetInputIndex¶
Get input map Index
function GetProgress¶
Return: Progress percentage (0.0 to 100.0)
Get current processing progress
function Create¶
static outcome::result< std::shared_ptr< ProcessingManager > > Create(
const std::string & jsondata
)
function IsProcessingValid¶
Checks whether a processing json is valid by attempting to create a ProcessingManager instance with it.
Parameters:
- jsondata JSON string containing the processing data to validate.
Return: True if the processing is valid and a ProcessingManager instance can be created, false otherwise.
function IsProcessingModelValid¶
Checks if a json encoded data contains a valid ModelNode structure by attempting to parse it.
Parameters:
- jsondata JSON string containing the ModelNode data to validate.
Return: True if the json can be parsed into a ModelNode, false otherwise.
function GetModelNodeFromJson¶
Gets the ModelNode structure parsed from a json string.
Parameters:
- jsondata JSON string containing the ModelNode data to parse
Return: The ModelNode parsed from the json string, or an error if the json is invalid or the ModelNode structure cannot be parsed.
Updated on 2026-06-05 at 17:22:18 -0700