vtdata library
Public Member Functions | Protected Attributes | List of all members
vtSpeciesList Class Reference

Public Member Functions

bool ReadXML (const char *fname, vtString *msg=NULL)
 
bool WriteXML (const char *fname) const
 
bool WriteHTML (const char *fname) const
 
uint NumSpecies () const
 
vtPlantSpeciesGetSpecies (uint i) const
 
short GetSpeciesIdByName (const char *name) const
 
short GetSpeciesIdByCommonName (const char *name) const
 
void Append (vtPlantSpecies *pSpecies)
 
short FindSpeciesId (vtPlantSpecies *ps)
 
void Clear ()
 

Protected Attributes

vtArray< vtPlantSpecies * > m_Species
 

Detailed Description

A species list is a list of species.

Member Function Documentation

short vtSpeciesList::GetSpeciesIdByCommonName ( const char *  name) const

Find the index of a species by common name. Example:

short index = pSpeciesList->GetSpeciesIdByName("Coconut Palm");
Returns
The 0-based index, or -1 if not found.
short vtSpeciesList::GetSpeciesIdByName ( const char *  name) const

Find the index of a species by scientific name. Example:

short index = pSpeciesList->GetSpeciesIdByName("Cocos nucifera");
Returns
The 0-based index, or -1 if not found.