WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
ImNode.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) ATTX INC 2025. All Rights Reserved.
3 *
4 * This software and associated documentation (the "Software") are the
5 * proprietary and confidential information of ATTX INC. 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 INC.
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#include "imgui.h"
24
25#include "Connection.h"
26
27namespace warptwin {
39const std::vector<std::string> NODE_CATEGORIES = {
40 "Dynamics", "GN&C", "Assemblies", "Environment", "Power", "Sensors", "Actuators", "Initial States", "Visuals", "Logging", "Custom"};
41
43struct ImNode {
44 std::string name;
45
46 long unique_id;
47
48 int hidden = 0;
49
50 std::vector<Connection> inputs;
51
52 std::vector<Connection> outputs;
53
54 std::string class_type;
55
56 std::vector<ImNode> children;
57
59
60 std::string displayname;
61
62 std::string category;
63
64 ImVec2 location;
65
66 std::string default_config_name = "";
67
68 std::string py_module = "";
69
72 void fromJson(const nlohmann::json &j);
73
76 nlohmann::json toJson();
77
79 void dump();
80};
81
82} // namespace warptwin
83
84#endif
Class to propagate CR3BP dynamics in characteristic units.
Definition statistics.hpp:22
node_types_e
Node type definition to allow config writer to identify custom nodes.
Definition ImNode.h:29
@ MODEL
Simplified dynamics model representing motion in the circular restricted 3 body problem.
Definition ImNode.h:31
@ CESIUM_VIZ
Definition ImNode.h:37
@ FRAME
Definition ImNode.h:34
@ STANDARD
Definition ImNode.h:30
@ TEXT_NODE
Definition ImNode.h:33
@ SIM_EXEC
Definition ImNode.h:32
@ LOGGER
Definition ImNode.h:35
@ VIZKIT
Definition ImNode.h:36
const std::vector< std::string > NODE_CATEGORIES
Definition ImNode.h:39
Hold all data related to a visual node in the ImGUI UX.
Definition ImNode.h:43
std::vector< Connection > outputs
A list of all outputs from the node.
Definition ImNode.h:52
std::string displayname
The display name for the node.
Definition ImNode.h:60
ImVec2 location
Location of the node on the GUI canvas.
Definition ImNode.h:64
std::vector< Connection > inputs
A list of all inputs to the node.
Definition ImNode.h:50
std::string py_module
The module from which the ImNode is imported.
Definition ImNode.h:68
int hidden
Whether or not this node has been hidden in the GUI via deletion.
Definition ImNode.h:48
node_types_e node_type
Node type information – most will be STANDARD.
Definition ImNode.h:58
long unique_id
The unique ID of the node given by the ImGUI UX.
Definition ImNode.h:46
nlohmann::json toJson()
Create json object from Node.
Definition ImNode.cpp:72
std::string default_config_name
Assigned default configuration (empty if none).
Definition ImNode.h:66
std::string class_type
The type of the node's base class (model type or similar).
Definition ImNode.h:54
std::vector< ImNode > children
A list of all child nodes to this node.
Definition ImNode.h:56
std::string name
The name of the node.
Definition ImNode.h:44
std::string category
The category to which the node belongs.
Definition ImNode.h:62
void fromJson(const nlohmann::json &j)
Create Node object from json.
Definition ImNode.cpp:21
void dump()
Output all node information.
Definition ImNode.cpp:100