CARMA C++
MonitorPointFilter.h
Go to the documentation of this file.
1 #ifndef CARMA_DBMS_MONITORPOINTFILTER_H
2 #define CARMA_DBMS_MONITORPOINTFILTER_H
3 
16 #include <string>
19 #include "carma/dbms/Table.h"
20 
21 namespace carma {
22 namespace dbms {
23 
24  class DBConnection;
25 
49 
50 public:
51 
88  (const uint& tagID, const carma::dbms::MonitorAverageType& averageType,
89  const carma::dbms::Filter * const filter,
90  const carma::dbms::DBConnection * const dbc = NULL);
91 
125  (const int& tagID, const carma::dbms::MonitorAverageType& averageType,
126  const carma::dbms::Filter * const filter,
127  const carma::dbms::MonitorPointDataType& dataType);
128 
130 
136 
141  virtual std::string name() const;
142 
148 
153  uint getTagID() const;
154 
155 protected:
156  uint tagID_;
157  const carma::dbms::DBConnection *dbc_;
158  // disallow default constructor
160  carma::dbms::MonitorAverageType averageType_;
161  static std::map<int,carma::dbms::MonitorPointDataType> tagIDToDataType_;
163  bool dataTypeHasBeenDetermined_;
164 
165  void validateFilter_();
166 
167  void initializeTagIDToDataTypeIfNecessary_() const;
168 
169  void makeTagID2DataTypeMap_(const carma::dbms::Table& table) const;
170 
171  carma::dbms::MonitorPointDataType determineDataType_();
172 
173  void init_();
174 
175 private:
180 };
181 }}
182 #endif // CARMA_DBMS_MONITORPOINTFILTER_H
183 
Represents an SQL query monitor point filter (part of a WHERE clause).
Class to mimic a db table The Table class is meant to mimic a database table.
Definition: Table.h:34
class to represent an SQL query multi-component filter (part of a WHERE clause) . ...
carma::dbms::MonitorAverageType getAverageType() const
get the average type of the filter
carma::dbms::MonitorPointDataType getDataType() const
get the data type
relationships between the monitor and dbms systems
abstract base class to represent an SQL query filter (part of a WHERE clause) .
Definition: Filter.h:25
MonitorAverageType
average type of the monitor[point,data file,table]
uint getTagID() const
get the tagID of this filter
an abstract class from which database queries may be launched.
Definition: DBConnection.h:46
virtual std::string name() const
get the class name of this filter for log messages etc.
MonitorPointDataType
type of the monitor point.
Table class.
represents an SQL query multi-component filter (part of a WHERE clause)