EGSnrc C++ class library  Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
Public Member Functions | List of all members
EGS_BlockInput Class Reference

A class to represent an egsinp input block. More...

#include <egs_input_struct.h>

Inheritance diagram for EGS_BlockInput:

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_SingleInputaddSingleInput (string inputTag, bool isReq, const string desc, const vector< string > vals=vector< string >())
 Add a single input.
 
shared_ptr< EGS_BlockInputaddBlockInput (string blockTit, bool isReq=false)
 Add an input block to be nested inside this one.
 
shared_ptr< EGS_BlockInputaddBlockInput (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_SingleInputgetSingleInput (string inputTag)
 Get the input named inputTag.
 
shared_ptr< EGS_SingleInputgetSingleInput (string inputTag, string title)
 Get the input named inputTag from the input block title.
 
shared_ptr< EGS_BlockInputgetBlockInput (string title)
 Get the input block title.
 
void setParent (shared_ptr< EGS_BlockInput > par)
 Set the parent to be par.
 
shared_ptr< EGS_BlockInputgetParent ()
 Get the parent input block.
 
shared_ptr< EGS_BlockInputgetLibraryBlock (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_BlockInputgetDependencyBlock ()
 Get the dependency block (can be only one).
 
bool getDependencyBlockAnti ()
 Get whether or not the block dependency is an anti-dependency.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ EGS_BlockInput()

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.


The documentation for this class was generated from the following files: