openModeller  Version 1.5.0
TeOccurrences Class Reference

Read occurrences data of one or more group from a TeTable in a TeDataBase. More...

#include <TeOccurrences.hh>

Inheritance diagram for TeOccurrences:
Inheritance graph
Collaboration diagram for TeOccurrences:
Collaboration graph

Public Member Functions

 TeOccurrences (const char *source, const char *coordSystem)
 
 ~TeOccurrences ()
 
bool load ()
 
- Public Member Functions inherited from OccurrencesReader
virtual ~OccurrencesReader ()
 
virtual OccurrencesPtr getPresences (const char *groupId)
 
virtual OccurrencesPtr getAbsences (const char *groupId)
 
void printOccurrences (const std::string &msg="")
 

Static Public Member Functions

static OccurrencesReaderCreateOccurrencesReaderCallback (const char *source, const char *coordSystem)
 

Private Attributes

bool _loaded
 
TeDatabase * _db
 
TeStringParser_te_str_parser
 

Additional Inherited Members

- Protected Types inherited from OccurrencesReader
typedef std::vector
< OccurrencesPtr
LstOccurrences
 
- Protected Member Functions inherited from OccurrencesReader
int _addOccurrence (const char *id, const char *groupId, Coord lg, Coord lt, Scalar error, Scalar abundance, int num_attributes, Scalar *attributes)
 
 OccurrencesReader ()
 
- Protected Attributes inherited from OccurrencesReader
LstOccurrences _presences
 
LstOccurrences _absences
 
char * _source
 
char * _coord_system
 

Detailed Description

Read occurrences data of one or more group from a TeTable in a TeDataBase.

Table is read and stored as a linked list of objects from the Occurrences class.

Allow navigation through the object list.

Format:

The table must have 4 columns.

  • Columns 1 : Group name (string).
  • Column 2 : longitude (-180.0 <= lat <= 180.0).
  • Column 3 : latitude: (-90.0 <= long <= 90.0).
  • Column 4 : Group identifier (string).

Definition at line 61 of file TeOccurrences.hh.

Constructor & Destructor Documentation

TeOccurrences::TeOccurrences ( const char *  source,
const char *  coordSystem 
)

Constructor.

Parameters
sourceSource string from where to load occurrences.
coordSystemDefault coordinate system in WKT.

Definition at line 72 of file TeOccurrences.cpp.

References OccurrencesReader::_coord_system, _loaded, and OccurrencesReader::_source.

Referenced by CreateOccurrencesReaderCallback().

TeOccurrences::~TeOccurrences ( )

Destructor.

Definition at line 84 of file TeOccurrences.cpp.

Member Function Documentation

OccurrencesReader * TeOccurrences::CreateOccurrencesReaderCallback ( const char *  source,
const char *  coordSystem 
)
static

Return a new instance of TeOccurrences. OccurrencesFactory calls this function to build a new OccurrencesReader.

Definition at line 65 of file TeOccurrences.cpp.

References TeOccurrences().

Referenced by OccurrencesFactory::instance().

Here is the call graph for this function:

Member Data Documentation

TeDatabase* TeOccurrences::_db
private

Definition at line 91 of file TeOccurrences.hh.

Referenced by load().

bool TeOccurrences::_loaded
private

Definition at line 88 of file TeOccurrences.hh.

Referenced by load(), and TeOccurrences().

TeStringParser* TeOccurrences::_te_str_parser
private

Definition at line 94 of file TeOccurrences.hh.

Referenced by load().


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