Mantid
|
Read an XML definition of a Material and produce a new Material object. More...
#include <MaterialXMLParser.h>
Public Member Functions | |
Material | parse (Poco::XML::Element *node, const std::string &XMLFilePath="") const |
Takes a pointer to an XML node that is assumed to point at a "material" tag. More... | |
Material | parse (std::istream &istr) const |
Takes a stream that is assumed to contain a single complete material definition, reads the definition and produces a new Material object. More... | |
Static Public Attributes | |
static constexpr const char * | MATERIAL_TAG = "material" |
Read an XML definition of a Material and produce a new Material object.
Definition at line 25 of file MaterialXMLParser.h.
Material Mantid::Kernel::MaterialXMLParser::parse | ( | Poco::XML::Element * | element, |
const std::string & | XMLFilePath = "" |
||
) | const |
Takes a pointer to an XML node that is assumed to point at a "material" tag.
It reads the definition and produces a new Material object.
element | A pointer to an Element node that is a "material" tag |
XMLFilePath | path of the sample environment file where the material specification was read from (if any) |
Definition at line 194 of file MaterialXMLParser.cpp.
References Mantid::Kernel::MaterialBuilder::build(), Mantid::Kernel::MaterialBuilder::setAttenuationSearchPath(), and Mantid::Kernel::MaterialBuilder::setName().
Material Mantid::Kernel::MaterialXMLParser::parse | ( | std::istream & | istr | ) | const |
Takes a stream that is assumed to contain a single complete material definition, reads the definition and produces a new Material object.
If many definitions are present then the first one is read
istr | A reference to a stream |
Definition at line 147 of file MaterialXMLParser.cpp.
References MATERIAL_TAG, and parse().
Referenced by Mantid::DataHandling::Mantid3MFFileIO::loadMeshObject(), parse(), and Mantid::DataHandling::SampleEnvironmentSpecParser::parseMaterials().
|
staticconstexpr |
Definition at line 27 of file MaterialXMLParser.h.
Referenced by parse().