SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
smtk
task
json
jsonSubmitOperation.h
1
//=========================================================================
2
// Copyright (c) Kitware, Inc.
3
// All rights reserved.
4
// See LICENSE.txt for details.
5
//
6
// This software is distributed WITHOUT ANY WARRANTY; without even
7
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8
// PURPOSE. See the above copyright notice for more information.
9
//=========================================================================
10
#ifndef smtk_task_json_SubmitOperation_h
11
#define smtk_task_json_SubmitOperation_h
12
13
#include "smtk/task/SubmitOperation.h"
14
15
#include "nlohmann/json.hpp"
16
17
#include <exception>
18
#include <string>
19
20
namespace
smtk
21
{
22
namespace
task
23
{
24
25
// NB: SubmitOperation is serialized/deserialized by methods in smtk/task/json/jsonTask.h
26
// that use the Configurator to swizzle/unswizzle pointers held by tasks.
27
// This file just adds to_json/from_json methods for member variables of SubmitOperation
28
// and declares a functor to fetch a SubmitOperation from the Configurator.
29
30
void
SMTKCORE_EXPORT
31
from_json(
const
nlohmann::json& j, SubmitOperation::ParameterSpec& attributeSet);
32
void
SMTKCORE_EXPORT to_json(nlohmann::json& j,
const
SubmitOperation::ParameterSpec& attributeSet);
33
34
namespace
json
35
{
36
37
class
Helper;
38
39
struct
SMTKCORE_EXPORT
jsonSubmitOperation
40
{
41
Task::Configuration
operator()(
const
Task
* task,
Helper
& helper)
const
;
42
};
43
44
}
// namespace json
45
}
// namespace task
46
}
// namespace smtk
47
48
#endif // smtk_task_json_SubmitOperation_h
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition:
doc.h:33
smtk::task::Task::Configuration
nlohmann::json Configuration
Tasks are configured with arbitrary JSON objects, though this may change.
Definition:
Task.h:89
smtk::task::json::jsonSubmitOperation
Definition:
jsonSubmitOperation.h:39
smtk::task::json::Helper
A helper for serializing task configurations.
Definition:
Helper.h:36
smtk::task::Task
Task is a base class for all SMTK tasks.
Definition:
Task.h:73
Generated by
1.8.17