#include <InputHandler.h>


Public Member Functions | |
| InputHandler (int, char **) | |
| ~InputHandler () | |
| void | init () | 
| void | initParamsFromDOM () | 
| map< string, string > | getGreenJobMap () | 
| string | getGreenPlugin (string) | 
| string | getLoadPlugin () | 
| string | getLoadPlugin (string) | 
| string | getLoadHistoryPlugin (string) | 
| string | getCrustalDecayPlugin (string) | 
| string | getKernelPlugin () | 
| string | getKernelPlugin (string) | 
| string | getOutputPlugin () | 
| string | getOutputPlugin (string) | 
| string | getFileName (string type) | 
| string | getResultFileName () | 
| int | getRegion (string direction) | 
| int | getGridSize () | 
| unsigned long int | getTimeSteps () | 
| unsigned long int | getTimeIncrement () | 
| DOMNode * | getExperiment () | 
| list< string > | getPostProcessorNameList () | 
| list< LoadFunctionElement * > | getLoadFunctionList () | 
| void | setXML (bool b) | 
| void | setList (bool b) | 
Private Member Functions | |
| void | readCommandline () | 
| void | initDOM () | 
| string | getAttributeValue (const XMLCh *parentNode, const XMLCh *elementNode, const XMLCh *elementName) | 
| string | getAttributeValueByName (const XMLCh *elementNode, const XMLCh *elementName, const XMLCh *name) | 
| void | initParamsFromDOM (DOMNode *node, multimap< string, ParamWrapper * >) | 
| void | initParamsFromDOMNodeList (DOMNodeList *, map< unsigned int, multimap< string, ParamWrapper * > >) | 
| bool | jobExists (string) | 
| bool | fileExists (string) | 
| InputHandler (const InputHandler &x) | |
Private Attributes | |
| int | argc | 
| char ** | argv | 
| bool | gotFile | 
| DOMElement * | rootElem | 
| DOMElement * | greenElem | 
| DOMElement * | loadElem | 
| DOMElement * | kernelElem | 
| InputHandler::InputHandler | ( | const InputHandler & | x | ) |  [private] | 
        
hidden copy constructor - we do not want to accidentially copy objects
| InputHandler::InputHandler | ( | int | , | |
| char ** | ||||
| ) | 
| InputHandler::~InputHandler | ( | ) | 
References crusde_debug().
| bool InputHandler::fileExists | ( | string | filename | ) |  [private] | 
        
Referenced by init().
| string InputHandler::getAttributeValue | ( | const XMLCh * | parentNode, | |
| const XMLCh * | elementNode, | |||
| const XMLCh * | attribute | |||
| ) |  [private] | 
        
extract's the value of an attribute and returns it:
<parentNode> <elementNode attribute="returnstring"> </parentNode>
the first parentNode found in the document is used. thus, it is expected to be unique.
| parentNode | ||
| elementNode | ||
| attribute | 
References crusde_debug(), and XMLHandler::doc.
Referenced by getGreenJobMap(), getKernelPlugin(), getLoadPlugin(), and getOutputPlugin().
| string InputHandler::getAttributeValueByName | ( | const XMLCh * | elementNode, | |
| const XMLCh * | elementName, | |||
| const XMLCh * | name | |||
| ) |  [private] | 
        
References XMLHandler::ATTR_name, crusde_debug(), XMLHandler::doc, and StrXML::xmlStr().
Referenced by getFileName(), getGridSize(), getRegion(), getResultFileName(), getTimeIncrement(), and getTimeSteps().
| string InputHandler::getCrustalDecayPlugin | ( | string | name | ) | 
| DOMNode * InputHandler::getExperiment | ( | ) | 
References XMLHandler::doc.
Referenced by SimulationCore::exec().
| string InputHandler::getFileName | ( | string | type | ) | 
References XMLHandler::ATTR_value, getAttributeValueByName(), t, XMLHandler::TAG_file, and StrXML::xmlStr().
| map< string, string > InputHandler::getGreenJobMap | ( | ) | 
References XMLHandler::ATTR_name, StrXML::cppStr(), crusde_debug(), crusde_error(), StrXML::cStr(), getAttributeValue(), XMLHandler::getElementByTagName(), i, SimulationCore::instance(), XMLHandler::TAG_green, XMLHandler::TAG_job, XMLHandler::TAG_plugin, and StrXML::xmlStr().
Referenced by SimulationCore::init().
| string InputHandler::getGreenPlugin | ( | string | name | ) | 
| int InputHandler::getGridSize | ( | ) | 
References XMLHandler::ATTR_value, g, getAttributeValueByName(), XMLHandler::TAG_parameter, and StrXML::xmlStr().
Referenced by SimulationCore::init().
| string InputHandler::getKernelPlugin | ( | string | name | ) | 
| string InputHandler::getKernelPlugin | ( | ) | 
| list< LoadFunctionElement * > InputHandler::getLoadFunctionList | ( | ) | 
returns a map that contains load functions. a load is mapped to a pair consiits load_history
References XMLHandler::ATTR_job, XMLHandler::ATTR_name, StrXML::cppStr(), crusde_debug(), crusde_info(), crusde_warning(), StrXML::cStr(), XMLHandler::getElementListByTagName(), i, jobExists(), LoadFunctionElement::setDecayJob(), LoadFunctionElement::setDecayName(), LoadFunctionElement::setHistoryJob(), LoadFunctionElement::setHistoryName(), XMLHandler::TAG_crustaldecay, XMLHandler::TAG_load, XMLHandler::TAG_loadfunction, XMLHandler::TAG_loadhistory, XMLHandler::TAG_plugin, and StrXML::xmlStr().
Referenced by SimulationCore::init().
| string InputHandler::getLoadHistoryPlugin | ( | string | name | ) | 
| string InputHandler::getLoadPlugin | ( | string | name | ) | 
| string InputHandler::getLoadPlugin | ( | ) | 
| string InputHandler::getOutputPlugin | ( | string | name | ) | 
| string InputHandler::getOutputPlugin | ( | ) | 
| list< string > InputHandler::getPostProcessorNameList | ( | ) | 
References XMLHandler::ATTR_name, StrXML::cppStr(), crusde_info(), XMLHandler::getElementByTagName(), i, XMLHandler::TAG_plugin, XMLHandler::TAG_postprocessor, and StrXML::xmlStr().
Referenced by SimulationCore::init().
| int InputHandler::getRegion | ( | string | direction | ) | 
References XMLHandler::ATTR_value, d, getAttributeValueByName(), XMLHandler::TAG_region, and StrXML::xmlStr().
Referenced by SimulationCore::init().
| string InputHandler::getResultFileName | ( | ) | 
References XMLHandler::ATTR_value, getAttributeValueByName(), r, XMLHandler::TAG_file, and StrXML::xmlStr().
Referenced by SimulationCore::outFile().
| unsigned long int InputHandler::getTimeIncrement | ( | ) | 
References XMLHandler::ATTR_value, getAttributeValueByName(), t, XMLHandler::TAG_parameter, and StrXML::xmlStr().
Referenced by SimulationCore::init().
| unsigned long int InputHandler::getTimeSteps | ( | ) | 
References XMLHandler::ATTR_value, getAttributeValueByName(), t, XMLHandler::TAG_parameter, and StrXML::xmlStr().
Referenced by SimulationCore::init().
| void InputHandler::init | ( | ) |  [virtual] | 
        
Implements XMLHandler.
References argc, argv, crusde_error(), crusde_warning(), fileExists(), gotFile, SimulationCore::instance(), n, readCommandline(), XMLHandler::readXML(), SimulationCore::setQuiet(), usage(), and XMLHandler::xmlFile.
Referenced by SimulationCore::init().
| void InputHandler::initDOM | ( | ) |  [private] | 
        
| void InputHandler::initParamsFromDOM | ( | ) | 
References crusde_debug(), XMLHandler::doc, s_parameters::green, initParamsFromDOMNodeList(), s_parameters::kernel, s_parameters::postprocessor, SimulationCore::s_params, XMLHandler::TAG_crustaldecay, XMLHandler::TAG_green, XMLHandler::TAG_kernel, XMLHandler::TAG_load, XMLHandler::TAG_loadhistory, XMLHandler::TAG_postprocessor, and StrXML::xmlStr().
Referenced by initParamsFromDOMNodeList().
| void InputHandler::initParamsFromDOM | ( | DOMNode * | node, | |
| multimap< string, ParamWrapper * > | registry | |||
| ) |  [private] | 
        
References XMLHandler::ATTR_name, XMLHandler::ATTR_value, crusde_debug(), crusde_error(), crusde_warning(), XMLHandler::TAG_parameter, and StrXML::xmlStr().
Referenced by SimulationCore::init().
| void InputHandler::initParamsFromDOMNodeList | ( | DOMNodeList * | nodelist, | |
| map< unsigned int, multimap< string, ParamWrapper * > > | registry | |||
| ) |  [private] | 
        
References initParamsFromDOM().
Referenced by initParamsFromDOM().
| bool InputHandler::jobExists | ( | string | job_name | ) |  [private] | 
        
References XMLHandler::ATTR_name, StrXML::cppStr(), crusde_warning(), XMLHandler::getElementListByTagName(), i, XMLHandler::TAG_job, and StrXML::xmlStr().
Referenced by getLoadFunctionList().
| void InputHandler::readCommandline | ( | ) |  [private] | 
        
| void InputHandler::setList | ( | bool | b | ) |  [inline] | 
        
| void InputHandler::setXML | ( | bool | b | ) |  [inline] | 
        
int InputHandler::argc [private] | 
        
Referenced by init(), and readCommandline().
char** InputHandler::argv [private] | 
        
Referenced by init(), and readCommandline().
bool InputHandler::gotFile [private] | 
        
Referenced by init().
DOMElement * InputHandler::greenElem [private] | 
        
DOMElement * InputHandler::kernelElem [private] | 
        
DOMElement * InputHandler::loadElem [private] | 
        
DOMElement* InputHandler::rootElem [private] | 
        
Reimplemented from XMLHandler.
 1.6.1-20091004