Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI_documentation_1_10.cc
Go to the documentation of this file.
1/*
2# <<BEGIN-copyright>>
3# Copyright 2019, Lawrence Livermore National Security, LLC.
4# This file is part of the gidiplus package (https://github.com/LLNL/gidiplus).
5# gidiplus is licensed under the MIT license (see https://opensource.org/licenses/MIT).
6# SPDX-License-Identifier: MIT
7# <<END-copyright>>
8*/
9
10#include "GIDI.hpp"
11
12namespace GIDI {
13
14namespace Documentation_1_10 {
15
16#define GIDI_nameChars "name"
17
18/*! \class Documentation
19 * This class supports storing **GNDS** 1.9 and 1.10 documentation.
20 */
21
22/*! \class Suite
23 * This is the GIDI::Suite class but with a different parse function.
24 */
25
26/* *********************************************************************************************************//**
27 ***********************************************************************************************************/
28
33
34/* *********************************************************************************************************//**
35 * Parse a GNDS 1.10 documentations node.
36 *
37 * @param a_node [in] The **HAPI::Node** to be parsed.
38 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
39 ***********************************************************************************************************/
40
41void Suite::parse( HAPI::Node const &a_node, SetupInfo &a_setupInfo ) {
42
43 for( HAPI::Node child = a_node.first_child( ); !child.empty( ); child.to_next_sibling( ) ) {
44 add( new Documentation( child, a_setupInfo, this ) );
45 }
46}
47
48/*! \class Documentation
49 */
50
51/* *********************************************************************************************************//**
52 *
53 * @param a_node [in] The **HAPI::Node** to be parsed.
54 * @param a_setupInfo [in] Information create my the Protare constructor to help in parsing.
55 * @param a_parent [in] The parent GIDI::Suite.
56 * @return
57 ***********************************************************************************************************/
58
60 Form( GIDI_documentationChars, FormType::generic, a_node.attribute_as_string( GIDI_nameChars ) ) {
61
62 m_label = a_node.attribute_as_string( GIDI_nameChars );
63 m_text = std::string( a_node.text().get() );
64}
65
66}
67
68}
#define GIDI_documentationChars
Definition GIDI.hpp:175
#define GIDI_documentations_1_10_Chars
Definition GIDI.hpp:176
#define GIDI_nameChars
Definition GIDI.hpp:195
#define LUPI_maybeUnused
Documentation(HAPI::Node const &a_node, SetupInfo &a_setupInfo, GIDI::Suite *a_parent)
void parse(HAPI::Node const &a_node, SetupInfo &a_setupInfo)
void add(Form *a_form)
bool empty() const
Definition HAPI_Node.cc:150
std::string attribute_as_string(const char *a_name) const
Definition HAPI.hpp:179
Node first_child() const
Definition HAPI_Node.cc:82
Text text() const
Definition HAPI_Node.cc:164
std::string const & get() const
Definition HAPI.hpp:84
Definition GIDI.hpp:32
FormType
Definition GIDI.hpp:118