26#ifndef PDI_DATATYPE_TEMPLATE_H_
27#define PDI_DATATYPE_TEMPLATE_H_
31#include <unordered_map>
35#include <pdi/expression.h>
36#include <pdi/pdi_fwd.h>
Definition: datatype_template.h:43
virtual Datatype_sptr evaluate(Context &ctx) const =0
Creates a new datatype by resolving the value of all metadata references.
Datatype_template(PC_tree_t datatype_tree)
Creates datatype template.
const Attributes_map & attributes() const
Returns all attributes as a unordered map.
Attributes_map m_attributes
Definition: datatype_template.h:45
virtual ~Datatype_template()
Destroys the template.
static void load_basic_datatypes(Context &ctx)
Adds to the context the basic Array, Record, C and Fortran datatypes.
Datatype_template(const Attributes_map &attributes={})
Creates datatype template with given attributes.
static void load_user_datatypes(Context &ctx, PC_tree_t types_tree)
Adds to the context the user defined datatypes.
Expression attribute(const std::string &attribute_name) const
Returns attribute of given name as Expression.
Definition: expression.h:42
Definition: array_datatype.h:38
std::unordered_map< std::string, Expression > Attributes_map
Definition: datatype_template.h:40
std::shared_ptr< const Datatype > Datatype_sptr
Definition: pdi_fwd.h:78