ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
NodeBuilder.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_NODE_BUILDER_H
17#define CPP_APP_NODE_BUILDER_H
18
19#include <vector>
20#include <string>
21
22#include "ImNode.h"
23
24namespace modelspace {
25 /** @brief Generate a list of mapped nodes and connections from json
26 *
27 * NodeBuilder receives a json file input with a list of nodes and connections
28 * and builds a list of nodes from it.
29 */
30 class NodeBuilder {
31 public:
32 /// @brief Default constructor. Does nothing
33 NodeBuilder() {}
34
35 /// @brief Default destructor. Does nothing
36 ~NodeBuilder() {}
37
38 /// @brief Load a list of nodes in from json file
39 /// @param filename The name of the json file to load from
40 /// @param node_key The json key at which nodes are stored. Default is no key ("")
41 /// @return Error code corresponding to success/failure
42 int parseNodeList(const std::string &filename, const std::string &node_key="");
43
44 /// @brief Return list of nodes
45 /// @return List of nodes
46 std::vector<ImNode>& nodeList() {return _node_list;}
47 protected:
48 std::vector<ImNode> _node_list;
49 };
50}
51
52#endif
Generate a list of mapped nodes and connections from json.
Definition NodeBuilder.h:30
NodeBuilder()
Default constructor. Does nothing.
Definition NodeBuilder.h:33
~NodeBuilder()
Default destructor. Does nothing.
Definition NodeBuilder.h:36
int parseNodeList(const std::string &filename, const std::string &node_key="")
Load a list of nodes in from json file.
Definition NodeBuilder.cpp:22
std::vector< ImNode > & nodeList()
Return list of nodes.
Definition NodeBuilder.h:46
Class to propagate CR3BP dynamics in characteristic units.
Definition ConfigurationWriter.cpp:18