TopicList Class Referencefinal
Specify a list of topics to query. More...
#include <QueryOptions.hh>
Public Member Functions | |
TopicList (const std::set< std::string > &_topics={ }, const QualifiedTimeRange &_timeRange=QualifiedTimeRange::AllTime()) | |
Query for a list of topics over the specified time range (by default, all time). | |
TopicList (const std::string &_singleTopic, const QualifiedTimeRange &_timeRange=QualifiedTimeRange::AllTime()) | |
Query for a single topic over the specified time range (by default, all time). | |
TopicList (const TopicList &_other) | |
Copy constructor. | |
TopicList (TopicList &&_other) | |
Move constructor. | |
~TopicList () | |
Destructor. | |
std::vector< SqlStatement > | GenerateStatements (const Descriptor &_descriptor) const override |
Generate one or more SQL query statements to be used by the log file to produce a Batch of messages. | |
std::set< std::string > & | Topics () |
Topics of this TopicList. | |
const std::set< std::string > & | Topics () const |
Topics of this TopicList. | |
Public Member Functions inherited from QueryOptions | |
virtual | ~QueryOptions ()=default |
Virtual destructor. | |
Public Member Functions inherited from TimeRangeOption | |
TimeRangeOption (const QualifiedTimeRange &_timeRange) | |
Constructor that sets the initial time range option. | |
TimeRangeOption (const TimeRangeOption &_other) | |
Copy constructor. | |
TimeRangeOption (TimeRangeOption &&_other) | |
Move constructor. | |
~TimeRangeOption () | |
Destructor. | |
SqlStatement | GenerateTimeConditions () const |
Generate a SQL string to represent the time conditions. This should be appended to a SQL statement after a WHERE keyword. | |
QualifiedTimeRange & | TimeRange () |
Chosen time range. | |
const QualifiedTimeRange & | TimeRange () const |
Chosen time range. | |
Static Public Member Functions | |
template<typename Container > | |
static TopicList | Create (const Container &_topics, const QualifiedTimeRange &_timeRange=QualifiedTimeRange::AllTime()) |
Factory function that accepts any container type that can be passed through a range-for loop. This will insert the contents of _topics into a blank TopicList and then return it. | |
Static Public Member Functions inherited from QueryOptions | |
static SqlStatement | StandardMessageQueryClose () |
Get a standard ending to a SQL statement that will instruct the queries to be ordered by the time the messages were received by the logger. It will also end the statement with a semicolon. | |
static SqlStatement | StandardMessageQueryPreamble () |
Get a standard SQL statement preamble, from the SELECT keyword up to (but not including) the WHERE keyword. This preamble will make sure that the statement is formatted in a way that MsgIter will have the information it needs. | |
Detailed Description
Specify a list of topics to query.
Constructor & Destructor Documentation
◆ TopicList() [1/4]
TopicList | ( | const std::set< std::string > & | _topics = { } , |
const QualifiedTimeRange & | _timeRange = QualifiedTimeRange::AllTime() |
||
) |
Query for a list of topics over the specified time range (by default, all time).
- Parameters
-
[in] _topics The topics to include [in] _timeRange The time range to query over
◆ TopicList() [2/4]
TopicList | ( | const std::string & | _singleTopic, |
const QualifiedTimeRange & | _timeRange = QualifiedTimeRange::AllTime() |
||
) |
Query for a single topic over the specified time range (by default, all time).
- Parameters
-
[in] _singleTopic The one topic to query for [in] _timeRange The time range to query over
◆ TopicList() [3/4]
◆ TopicList() [4/4]
◆ ~TopicList()
~TopicList | ( | ) |
Destructor.
Member Function Documentation
◆ Create()
template<typename Container >
|
static |
Factory function that accepts any container type that can be passed through a range-for loop. This will insert the contents of _topics into a blank TopicList and then return it.
- Parameters
-
[in] _topics The topics to include [in] _timeRange The time range to query over
◆ GenerateStatements()
|
overridevirtual |
Generate one or more SQL query statements to be used by the log file to produce a Batch of messages.
- Parameters
-
[in] _descriptor A Descriptor to help form the SQL statements
- Returns
- One or more SQL statements.
Implements QueryOptions.
◆ Topics() [1/2]
std::set< std::string > & Topics | ( | ) |
◆ Topics() [2/2]
const std::set< std::string > & Topics | ( | ) | const |
The documentation for this class was generated from the following file: