openModeller  Version 1.5.0
OccurrencesReader.hh
Go to the documentation of this file.
1 
31 #ifndef _OCCURRENCES_READERHH_
32 #define _OCCURRENCES_READERHH_
33 
34 #include <openmodeller/om_defs.hh>
36 #include <vector>
37 
47 class dllexp OccurrencesReader
48 {
49 public:
50 
53  virtual ~OccurrencesReader() {};
54 
58  virtual bool load() = 0;
59 
65  virtual OccurrencesPtr getPresences( const char *groupId );
66 
72  virtual OccurrencesPtr getAbsences( const char *groupId );
73 
77  void printOccurrences( const std::string& msg="" );
78 
79 protected:
80 
81  typedef std::vector<OccurrencesPtr> LstOccurrences;
82 
95  int _addOccurrence( const char *id, const char *groupId, Coord lg, Coord lt, Scalar error,
96  Scalar abundance, int num_attributes, Scalar *attributes );
97 
98  // List of presences by group name.
100 
101  // List of absences by group name.
103 
104  // Occurrences source
105  char *_source;
106 
107  // Coordinate System
109 
110  // Protected Constructor because it is a abstract class (interface).
112 
113 private:
114 
127  int _addPresence( const char *id, const char *groupId, Coord lg, Coord lt, Scalar error,
128  Scalar abundance, int num_attributes, Scalar *attributes );
129 
141  int _addAbsence( const char *id, const char *groupId, Coord lg, Coord lt, Scalar error,
142  int num_attributes, Scalar *attributes );
143 };
144 
145 #endif
146 
LstOccurrences _presences
double Scalar
Type of map values.
Definition: om_defs.hh:39
virtual ~OccurrencesReader()
std::vector< OccurrencesPtr > LstOccurrences
LstOccurrences _absences
double Coord
Type of map coordinates.
Definition: om_defs.hh:38
void printOccurrences(ostream &stream, ConstOccurrencesPtr occ)
Definition: om_sampler.cpp:354
static char error[256]
Definition: FileParser.cpp:42