openModeller
Version 1.4.0
|
00001 00031 #ifndef _OCCURRENCES_READERHH_ 00032 #define _OCCURRENCES_READERHH_ 00033 00034 #include <openmodeller/om_defs.hh> 00035 #include <openmodeller/Occurrences.hh> 00036 #include <vector> 00037 00047 class dllexp OccurrencesReader 00048 { 00049 public: 00050 00053 virtual ~OccurrencesReader() {}; 00054 00058 virtual bool load() = 0; 00059 00065 virtual OccurrencesPtr getPresences( const char *groupId ); 00066 00072 virtual OccurrencesPtr getAbsences( const char *groupId ); 00073 00077 void printOccurrences( const std::string& msg="" ); 00078 00079 protected: 00080 00081 typedef std::vector<OccurrencesPtr> LstOccurrences; 00082 00095 int _addOccurrence( const char *id, const char *groupId, Coord lg, Coord lt, Scalar error, 00096 Scalar abundance, int num_attributes, Scalar *attributes ); 00097 00098 // List of presences by group name. 00099 LstOccurrences _presences; 00100 00101 // List of absences by group name. 00102 LstOccurrences _absences; 00103 00104 // Occurrences source 00105 char *_source; 00106 00107 // Coordinate System 00108 char *_coord_system; 00109 00110 // Protected Constructor because it is a abstract class (interface). 00111 OccurrencesReader() {}; 00112 00113 private: 00114 00127 int _addPresence( const char *id, const char *groupId, Coord lg, Coord lt, Scalar error, 00128 Scalar abundance, int num_attributes, Scalar *attributes ); 00129 00141 int _addAbsence( const char *id, const char *groupId, Coord lg, Coord lt, Scalar error, 00142 int num_attributes, Scalar *attributes ); 00143 }; 00144 00145 #endif 00146