clShortOutput Class Reference

Replicates the old-school tab-delimited text output file. More...

#include <OutputShort.h>

Inheritance diagram for clShortOutput:

clBehaviorBase clWorkerBase List of all members.

Public Member Functions

 clShortOutput (clSimManager *p_oSimManager)
 Constructor.
 ~clShortOutput ()
 Destructor.
void Action ()
 Collects data and writes the output file.

Protected Member Functions

void GetData (xercesc::DOMDocument *p_oDoc)
 Reads the desired options out of the parameter file.
void WriteFileHeader ()
 Writes output file header.
void ExtractTreeInfo (xercesc::DOMDocument *p_oDoc)
 Extracts the output data relating to tree saving.
void ExtractSubplotInfo (xercesc::DOMDocument *p_oDoc)
 Extracts the subplot data.
bool TestForSave (DOMElement *p_oParentElement, char *cNodeName)
 Tests to see if a given node exists and has an attribute called "save" equal to true.

Protected Attributes

char m_cFileName [MAX_FILENAME_SIZE]
 Output file name.
clShortOutput::stcTreeOutputInfomp_treeSettings
 Data structure for defining what tree output data to save An array of stcTreeOutputInfo's, one for each tree type that we're saving data for.
short int m_iNumTypesToSave
 Number of tree types that we're saving data for.
clShortOutput::stcSubplotInfomp_subplots
 Data structure for saving subplot data.An array of stcSubplotInfos, one for each subplot to save.
short int m_iNumSubplotsToSave
 Number of subplots we're saving data for.

Classes

struct  stcCoords
 Structure for holding coordinates. More...
struct  stcSubplotInfo
 Data structure for saving subplot data. More...
struct  stcTreeOutputInfo
 Data structure for defining what tree output data to save. More...

Detailed Description

Replicates the old-school tab-delimited text output file.

It's a shortcut if a detailed output file isn't what you need. It supports subplots - as many as you want.

This will save absolute and relative basal area and density for snags, adults, and saplings, and absolute density for seedlings.

The namestring of this behavior, and the name which it is called in the behavior list of the parameter file, is "short output".

Copyright 2004 Charles D. Canham.

Author:
Lora E. Murphy

Edit history:
-----------------
April 28, 2004 - Submitted as beta (LEM)
June 24, 2004 - Added snag support (LEM)
October 25, 2005 - Changed the way we search for trees (LEM)


Constructor & Destructor Documentation

clShortOutput::clShortOutput ( clSimManager p_oSimManager  ) 

Constructor.

Parameters:
p_oSimManager Sim Manager object.


Member Function Documentation

void clShortOutput::ExtractSubplotInfo ( xercesc::DOMDocument *  p_oDoc  )  [protected]

Extracts the subplot data.

Parameters:
p_oDoc DOM tree of parsed input file.

void clShortOutput::ExtractTreeInfo ( xercesc::DOMDocument *  p_oDoc  )  [protected]

Extracts the output data relating to tree saving.

Parameters:
p_oDoc DOM tree of parsed input file.

void clShortOutput::GetData ( xercesc::DOMDocument *  p_oDoc  )  [protected, virtual]

Reads the desired options out of the parameter file.

Parameters:
p_oDoc DOM tree of the parsed input file.

Implements clWorkerBase.

bool clShortOutput::TestForSave ( DOMElement *  p_oParentElement,
char *  cNodeName 
) [protected]

Tests to see if a given node exists and has an attribute called "save" equal to true.

Parameters:
p_oParentElement Pointer to the parent element of the node in question.
cNodeName Tag name of the node.
Returns:
True if the save attribute is true; if the node does not exist or is equal to false, false is returned.


Member Data Documentation

char clShortOutput::m_cFileName[MAX_FILENAME_SIZE] [protected]

Output file name.

If it already exists, new data is appended at the end

struct clShortOutput::stcSubplotInfo * clShortOutput::mp_subplots [protected]

Data structure for saving subplot data.An array of stcSubplotInfos, one for each subplot to save.

They get the same data saved as the plot as a whole.


The documentation for this class was generated from the following file:
Generated on Wed Nov 29 08:42:24 2006 for SORTIE Core C++ Documentation by  doxygen 1.4.7