ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
ImNode.h
1/******************************************************************************
2* Copyright (c) ATTX LLC 2024. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, LLC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX, LLC.
15******************************************************************************/
16#ifndef CPP_APP_IMNODE_H
17#define CPP_APP_IMNODE_H
18
19#include <string>
20#include <vector>
21
22#include "nlohmann/json.hpp"
23
24#include "Connection.h"
25
26namespace modelspace {
27 /// @brief Node type definition to allow config writer to identify custom nodes
28 enum node_types_e {
29 STANDARD = 0,
30 MODEL = 1,
31 SIM_EXEC = 2,
32 TEXT_NODE = 3,
33 FRAME = 4,
34 LOGGER = 5,
35 VIZKIT = 6
36 };
37
38 /** @brief Hold all data related to a visual node in the ImGUI UX */
39 struct ImNode {
40 std::string name; ///< The name of the node
41
42 long unique_id; ///< The unique ID of the node given by the ImGUI UX
43
44 int hidden = 0; ///< Whether or not this node has been hidden in the GUI via deletion
45
46 std::vector<Connection> inputs; ///< A list of all inputs to the node
47
48 std::vector<Connection> outputs; ///< A list of all outputs from the node
49
50 std::string class_type; ///< The type of the node's base class (model type or similar)
51
52 std::vector<ImNode> children; ///< A list of all child nodes to this node
53
54 /// @brief Node type information -- most will be STANDARD
56
57 /// @brief Create Node object from json
58 /// @param j The json object from which Node is created
59 void fromJson(const nlohmann::json &j);
60
61 /// @brief Create json object from Node
62 /// @return The json object from Node data
64
65 /// @brief Output all node information
66 void dump();
67 };
68
69}
70
71#endif
Class to propagate CR3BP dynamics in characteristic units.
Definition ConfigurationWriter.cpp:18
node_types_e
Node type definition to allow config writer to identify custom nodes.
Definition ImNode.h:28
Hold all data related to a visual node in the ImGUI UX.
Definition ImNode.h:39
std::vector< ImNode > children
A list of all child nodes to this node.
Definition ImNode.h:52
void fromJson(const nlohmann::json &j)
Create Node object from json.
Definition ImNode.cpp:19
node_types_e node_type
Node type information – most will be STANDARD.
Definition ImNode.h:55
std::string class_type
The type of the node's base class (model type or similar)
Definition ImNode.h:50
std::vector< Connection > outputs
A list of all outputs from the node.
Definition ImNode.h:48
nlohmann::json toJson()
Create json object from Node.
Definition ImNode.cpp:58
std::vector< Connection > inputs
A list of all inputs to the node.
Definition ImNode.h:46
int hidden
Whether or not this node has been hidden in the GUI via deletion.
Definition ImNode.h:44
long unique_id
The unique ID of the node given by the ImGUI UX.
Definition ImNode.h:42
std::string name
The name of the node.
Definition ImNode.h:40
void dump()
Output all node information.
Definition ImNode.cpp:79