The SKIRT project
advanced radiative transfer for astrophysics
Static Public Member Functions | List of all members
XmlHierarchyCreator Class Referencefinal

#include <XmlHierarchyCreator.hpp>

Static Public Member Functions

static std::unique_ptr< ItemreadFile (const SchemaDef *schema, string filepath)
 
static std::unique_ptr< ItemreadString (const SchemaDef *schema, string contents, string description)
 

Detailed Description

This class offers static functions to load a SMILE dataset from a file or a string containing an XML serialization into a memory-based dataset representation.

Member Function Documentation

◆ readFile()

static std::unique_ptr< Item > XmlHierarchyCreator::readFile ( const SchemaDef schema,
string  filepath 
)
static

Creates a fresh memory representation of a SMILE dataset for the specified schema definition reflecting the XML serialization in the specified file, and returns a pointer to the root item of the hierarchy (handing over ownership for the complete hierarchy to the caller). If the hierarchy can't be created due to some error condition the function throws a fatal error.

◆ readString()

static std::unique_ptr< Item > XmlHierarchyCreator::readString ( const SchemaDef schema,
string  contents,
string  description 
)
static

Creates a fresh memory representation of a SMILE dataset for the specified schema definition reflecting the XML serialization in the specified contents string, and returns a pointer to the root item of the hierarchy (handing over ownership for the complete hierarchy to the caller). The description argument provides a human readable string to identify the contents string in error messages. If the hierarchy can't be created due to some error condition the function throws a fatal error.


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