#include "DataTypes.h"
#include <xercesc/dom/DOM.hpp>
#include <fstream>
Functions | |
void | FillSpeciesSpecificValue (xercesc::DOMElement *p_oParent, char *cTagName, char *cSubTagName, floatVal *p_array, int iNumSpecies, clTreePopulation *p_oPop, bool bRequired) |
Fills species-specific float values from a DOM tree. | |
void | FillSpeciesSpecificValue (xercesc::DOMElement *p_oParent, char *cTagName, char *cSubTagName, intVal *p_array, int iNumSpecies, clTreePopulation *p_oPop, bool bRequired) |
Fills species-specific integer values from a DOM tree. | |
void | FillSpeciesSpecificValue (xercesc::DOMElement *p_oParent, char *cTagName, char *cSubTagName, boolVal *p_array, int iNumSpecies, clTreePopulation *p_oPop, bool bRequired) |
Fills species-specific boolean values from a DOM tree. | |
void | FillSpeciesSpecificValue (xercesc::DOMElement *p_oParent, char *cTagName, char *cSubTagName, float *p_fArray, clTreePopulation *p_oPop, bool bRequired) |
Fills species-specific float values from a DOM tree. | |
void | FillSpeciesSpecificValue (xercesc::DOMElement *p_oParent, char *cTagName, char *cSubTagName, int *p_iArray, clTreePopulation *p_oPop, bool bRequired) |
Fills species-specific integer values from a DOM tree. | |
short int | GetNodeSpeciesCode (xercesc::DOMNode *p_oDocNode, clTreePopulation *p_oPop) |
GetNodeSpeciesCode Translates a species string into a species number. | |
void | FillSingleValue (xercesc::DOMElement *p_oParent, char *cTagName, int *p_iValToFill, bool bRequired) |
Extracts a single integer value from a parsed XML file. | |
void | FillSingleValue (xercesc::DOMElement *p_oParent, char *cTagName, float *p_fValToFill, bool bRequired) |
Extracts a single float value from a parsed XML file. | |
void | FillSingleValue (xercesc::DOMElement *p_oParent, char *cTagName, char *p_cValToFill, int iMaxSize, bool bRequired) |
Extracts a single string value from a parsed XML file. | |
void | FillSingleValue (xercesc::DOMElement *p_oParent, char *cTagName, bool *p_bValToFill, bool bRequired) |
Extracts a single boolean value from a parsed XML file. |
They handle the extraction of data from parsed files.
Copyright 2003 Charles D. Canham.
|
Extracts a single boolean value from a parsed XML file. For those values which are not species-specific and have the following structure: <tag>value</tag> this function will extract the value and place it in a given variable. The element can be the child of another tag. This expects the values to come as either 1 (true) or 0 (false).
|
|
Extracts a single string value from a parsed XML file. For those values which are not species-specific and have the following structure: <tag>value</tag> this function will extract the value and place it in a given variable. The element can be the child of another tag.
|
|
Extracts a single float value from a parsed XML file. For those values which are not species-specific and have the following structure: <tag>value</tag> this function will extract the value and place it in a given variable. The element can be the child of another tag. This is currently not protected against overflow. I could not successfully trap for the error codes the documentation says are supposed to be set.
|
|
Extracts a single integer value from a parsed XML file. For those values which are not species-specific and have the following structure: <tag>value</tag> this function will extract the value and place it in a given variable. The element can be the child of another tag.
|
|
Fills species-specific integer values from a DOM tree. For those values which are species-specific and have the following structure in the XML document:
<parent_tag> This function will extract the values and place them in a given array. If the data isn't present in the document, the action taken depends on the value of the flag bRequired. If bRequired is false, and the data isn't there, the function simply exits. If bRequired is true, the function throws an error. In either case, if a value is not found for all species indicated, an error is thrown. This function provides a shortcut if you need values for every species and don't need to bother with the intVal array type. This function is currently not protected against overflow. I could not successfully trap for the error codes the documentation says are supposed to be set.
|
|
Fills species-specific float values from a DOM tree. For those values which are species-specific and have the following structure in the XML document:
<parent_tag> This function will extract the values and place them in a given array. If the data isn't present in the document, the action taken depends on the value of the flag bRequired. If bRequired is false, and the data isn't there, the function simply exits. If bRequired is true, the function throws an error. In either case, if a value is not found for all species indicated, an error is thrown. This function provides a shortcut if you need values for every species and don't need to bother with the floatVal array type. This function is currently not protected against overflow. I could not successfully trap for the error codes the documentation says are supposed to be set.
|
|
Fills species-specific boolean values from a DOM tree. For those values which are species-specific and have the following structure in the XML document:
<parent_tag> This function will extract the values and place them in a given array, matching species codes. If the data isn't present in the document, the action taken depends on the value of the flag bRequired. If bRequired is false, and the data isn't there, the function simply exits. If bRequired is true, the function throws an error. In either case, if a value is not found for all species indicated, an error is thrown. This expects the values to come as either 1 (true) or 0 (false). The function will only look for values for species matching codes that are pre-loaded into the arrays. The arrays must have had memory allocated and the species codes must be pre-loaded. Duplicate and invalid species from the XML file are screened out without failure.
|
|
Fills species-specific integer values from a DOM tree. For those values which are species-specific and have the following structure in the XML document:
<parent_tag> This function will extract the values and place them in a given array, matching species codes. If the data isn't present in the document, the action taken depends on the value of the flag bRequired. If bRequired is false, and the data isn't there, the function simply exits. If bRequired is true, the function throws an error. In either case, if a value is not found for all species indicated, an error is thrown. The function will only look for values for species matching codes that are pre-loaded into the arrays. The arrays must have had memory allocated and the species codes must be pre-loaded. Duplicate and invalid species from the XML file are screened out without failure.
|
|
Fills species-specific float values from a DOM tree. For those values which are species-specific and have the following structure in the XML document:
<parent_tag> This function will extract the values and place them in a given array, matching species codes. If the data isn't present in the document, the action taken depends on the value of the flag bRequired. If bRequired is false, and the data isn't there, the function simply exits. If bRequired is true, the function throws an error. In either case, if a value is not found for all species indicated, an error is thrown. The function will only look for values for species matching codes that are pre-loaded into the arrays. The arrays must have had memory allocated and the species codes must be pre-loaded. Duplicate and invalid species from the XML file are screened out without failure. This function is currently not protected against overflow. I could not successfully trap for the error codes the documentation says are supposed to be set.
|
|
GetNodeSpeciesCode Translates a species string into a species number. For those nodes that have an attribute named "species", this will extract the name of the species in that attribute and turn it into a code.
|