|
EGSnrc C++ class library
Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
|
A class to represent an egsinp input block. More...
#include <egs_input_struct.h>
Public Member Functions | |
| EGS_BlockInput (string blockTit, bool isReq=false, shared_ptr< EGS_BlockInput > par=nullptr) | |
| Construct a block input blockTit. More... | |
| void | setTitle (string blockTit) |
| Set the title of the block. | |
| string | getTitle () |
| Get the title of the block. | |
| void | setAppName (string appName) |
| Set the appName of the block. | |
| string | getAppName () |
| Get the application name of the block. | |
| shared_ptr< EGS_SingleInput > | addSingleInput (string inputTag, bool isReq, const string desc, const vector< string > vals=vector< string >()) |
| Add a single input. | |
| shared_ptr< EGS_BlockInput > | addBlockInput (string blockTit, bool isReq=false) |
| Add an input block to be nested inside this one. | |
| shared_ptr< EGS_BlockInput > | addBlockInput (shared_ptr< EGS_BlockInput > block) |
| Add an already defined input block to be nested inside this one. | |
| vector< shared_ptr< EGS_SingleInput > > | getSingleInputs () |
| Get a list of the inputs for this input block. | |
| vector< shared_ptr< EGS_SingleInput > > | getSingleInputs (string title) |
| Get a list of the inputs for the nested input block title. | |
| vector< shared_ptr< EGS_BlockInput > > | getBlockInputs () |
| Get a list of the nested input blocks for this input block. | |
| vector< shared_ptr< EGS_BlockInput > > | getBlockInputs (string title) |
| Get a list of the nested input blocks inside title. | |
| shared_ptr< EGS_SingleInput > | getSingleInput (string inputTag) |
| Get the input named inputTag. | |
| shared_ptr< EGS_SingleInput > | getSingleInput (string inputTag, string title) |
| Get the input named inputTag from the input block title. | |
| shared_ptr< EGS_BlockInput > | getBlockInput (string title) |
| Get the input block title. | |
| void | setParent (shared_ptr< EGS_BlockInput > par) |
| Set the parent to be par. | |
| shared_ptr< EGS_BlockInput > | getParent () |
| Get the parent input block. | |
| shared_ptr< EGS_BlockInput > | getLibraryBlock (string blockTitle, string libraryName) |
| Get the input block containing the library tag matching libraryName. | |
| bool | contains (string inputTag) |
| Check if this input block contains the input inputTag. | |
| void | addDependency (shared_ptr< EGS_SingleInput > inp, string val="", bool isAntiDependency=false) |
| Add a dependency of this input block on input inp being value val. | |
| void | addDependency (shared_ptr< EGS_BlockInput > block, bool isAntiDependency=false) |
| Add a dependency on an input block (there can only be one). | |
| vector< shared_ptr< EGS_SingleInput > > | getDependencyInp () |
| Get the input dependency. | |
| vector< string > | getDependencyVal () |
| Get the input dependency required value. | |
| vector< bool > | getDependencyAnti () |
| Get a list of whether or not these are anti-dependencies. | |
| shared_ptr< EGS_BlockInput > | getDependencyBlock () |
| Get the dependency block (can be only one). | |
| bool | getDependencyBlockAnti () |
| Get whether or not the block dependency is an anti-dependency. | |
A class to represent an egsinp input block.
The EGS_BlockInput class is used to represent an egsinp input block. An input block has a title, may have a parent that it is nested within, and may contain child single inputs and input blocks.
Definition at line 131 of file egs_input_struct.h.
| EGS_BlockInput::EGS_BlockInput | ( | string | blockTit, |
| bool | isReq = false, |
||
| shared_ptr< EGS_BlockInput > | par = nullptr |
||
| ) |
Construct a block input blockTit.
The input by the name blockTit is optional when isReq is false. If this block is always nested, specify the parent with par.
Definition at line 170 of file egs_input_struct.cpp.
1.9.1