CARMA C++
TimeRangeFilter.h
Go to the documentation of this file.
1 #ifndef CARMA_DBMS_TIMERANGEFILTER_H
2 #define CARMA_DBMS_TIMERANGEFILTER_H
3 
16 #include <string>
21 
22 namespace carma {
23 namespace dbms {
24 
33 
34 public:
35 
56  TimeRangeFilter(const int& time1, const int& time2,
57  const carma::dbms::MonitorAverageType& averageType
58  =carma::dbms::FRAME_AVG,
59  const bool& includeTime1=false,
60  const bool& includeTime2=false,
61  const carma::dbms::TimeFilter::TimeColumnType colType
62  =carma::dbms::TimeFilter::FRAMECOUNT);
63 
64 
65  ~TimeRangeFilter();
66 
72 
78  std::vector<const carma::dbms::TimeFilter *> getChildren() const;
79 
80 
85  virtual std::string name() const;
86 
92  std::string getColumnName() const;
93 
94 protected:
95  // disallow default constructor
98  carma::dbms::TimeFilter::TimeColumnType colType_;
99 private:
104 };
105 
106 
107 class TimeRangeFilterException : public carma::util::ErrorException {
108 public:
109  TimeRangeFilterException (const char* msg,
110  const char* fileName = __FILE__,
111  const int lineNum = __LINE__)
112  : carma::util::ErrorException (msg, fileName, lineNum) {};
113 
114  TimeRangeFilterException (const std::string msg,
115  const char* fileName = __FILE__,
116  const int lineNum = __LINE__)
117  : carma::util::ErrorException (msg.c_str(), fileName, lineNum) {};
118 };
119 }}
120 #endif // CARMA_DBMS_TIMERANGEFILTER_H
121 
class to represent an SQL query multi-component filter (part of a WHERE clause) . ...
std::vector< const carma::dbms::TimeFilter * > getChildren() const
get the children of this filter.
Exception class for errors.
relationships between the monitor and dbms systems
carma::dbms::MonitorAverageType getAverageType() const
get the average type of the filter
MonitorAverageType
average type of the monitor[point,data file,table]
Exception class for errors The exception comes with a text string that can be printed or logged...
represents an SQL query time range filter (part of a WHERE clause This class represents a (closed) ti...
class to represent a simple time filter
std::string getColumnName() const
return the column name associated with the filter (frameCount or integrationID depeding on the averag...
virtual std::string name() const
get the class name for log messages etc.
represents an SQL query multi-component filter (part of a WHERE clause)