bes Updated for version 3.20.13
dmrpp::DMZ Class Reference

Interface to hide the DMR++ information storage format. More...

#include <DMZ.h>

Collaboration diagram for dmrpp::DMZ:
Collaboration graph

Public Member Functions

virtual void build_thin_dmr (libdap::DMR *dmr)
 populate the DMR instance as a 'thin DMR'
 
 DMZ ()=default
 Build a DMZ without simultaneously parsing an XML document.
 
 DMZ (const std::string &file_name)
 Build a DMZ object and initialize it using a DMR++ XML document.
 
virtual void load_attributes (libdap::BaseType *btp)
 
virtual void load_attributes (libdap::Constructor *constructor)
 
void parse_xml_doc (const std::string &filename)
 Build the DOM tree for a DMR++ XML document.
 
Attributes

These are functions specific to loading attributes. Originally intended to be part of a lazy-load scheme, this code is used to load attribute data into a 'thin DMR.' jhrg 11/23/21

virtual void load_attributes (libdap::D4Group *group)
 
virtual void load_all_attributes (libdap::DMR *dmr)
 

Friends

class DMZTest
 

Chunks

These are the functions specific to loading chunk data. They implement the lazy-load feature for DMR++ chunk information.

virtual void load_chunks (libdap::BaseType *btp)
 Load the chunk information into a variable.
 

Detailed Description

Interface to hide the DMR++ information storage format.

This class uses an XML library that uses the document text for all the string values (tag/element names, attribute names and values, etc.) so the text of the XML document must persist for as long as the xml_document object itself. For files, the class uses the pugixml load function.

Note
This class holds a pugi::xml_document and a shared_ptr<http::url> but does not define its own copy ctor or assignment operator, so copies of an instance of DMZ will share those objects

Definition at line 72 of file DMZ.h.

Constructor & Destructor Documentation

◆ DMZ() [1/2]

dmrpp::DMZ::DMZ ( )
default

Build a DMZ without simultaneously parsing an XML document.

◆ DMZ() [2/2]

dmrpp::DMZ::DMZ ( const std::string &  file_name)
explicit

Build a DMZ object and initialize it using a DMR++ XML document.

Parameters
file_nameThe DMR++ XML document to parse.
Exceptions
BESInternalErrorif file_name cannot be parsed

Definition at line 136 of file DMZ.cc.

Member Function Documentation

◆ build_thin_dmr()

void dmrpp::DMZ::build_thin_dmr ( libdap::DMR *  dmr)
virtual

populate the DMR instance as a 'thin DMR'

Note
Assume the DMZ holds valid DMR++ metadata.
Parameters
dmrPointer to a DMR instance that should be populated

Definition at line 578 of file DMZ.cc.

◆ load_all_attributes()

void dmrpp::DMZ::load_all_attributes ( libdap::DMR *  dmr)
virtual

Definition at line 883 of file DMZ.cc.

◆ load_attributes()

void dmrpp::DMZ::load_attributes ( libdap::D4Group *  group)
virtual

Definition at line 857 of file DMZ.cc.

◆ load_chunks()

void dmrpp::DMZ::load_chunks ( libdap::BaseType *  btp)
virtual

Load the chunk information into a variable.

Process the chunks, chunk, etc., elements from the DMR++ information. Once this is called, the variable's read() method should be able to read the data for this variable.

Parameters
btpThe variable

Definition at line 1161 of file DMZ.cc.

◆ parse_xml_doc()

void dmrpp::DMZ::parse_xml_doc ( const std::string &  file_name)

Build the DOM tree for a DMR++ XML document.

Parameters
file_name

Definition at line 146 of file DMZ.cc.

Friends And Related Function Documentation

◆ DMZTest

friend class DMZTest
friend

Definition at line 112 of file DMZ.h.


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