2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2016 Attila Molnar <attilamolnar@hush.com>
6 * This file is part of InspIRCd. InspIRCd is free software: you can
7 * redistribute it and/or modify it under the terms of the GNU General Public
8 * License as published by the Free Software Foundation, version 2.
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 class Stats::Row : public Numeric::Numeric
39 /** Source user of the STATS request
43 /** List of reply rows
45 std::vector<Row> rows;
47 /** Symbol indicating the type of this STATS request (usually a letter)
53 * @param src Source user of the STATS request, can be a local or remote user
54 * @param sym Symbol (letter) indicating the type of the request
56 Context(User* src, char sym)
62 /** Get the source user of the STATS request
63 * @return Source user of the STATS request
65 User* GetSource() const { return source; }
67 /** Get the list of reply rows
68 * @return List of rows generated as reply for the request
70 const std::vector<Row>& GetRows() const { return rows; }
72 /** Get the symbol (letter) indicating what type of STATS was requested
73 * @return Symbol specified by the requesting user
75 char GetSymbol() const { return symbol; }
77 /** Add a row to the reply list
78 * @param row Reply to add
80 void AddRow(const Row& row) { rows.push_back(row); }
82 template <typename T1>
83 void AddRow(unsigned int numeric, T1 p1)
90 template <typename T1, typename T2>
91 void AddRow(unsigned int numeric, T1 p1, T2 p2)
99 template <typename T1, typename T2, typename T3>
100 void AddRow(unsigned int numeric, T1 p1, T2 p2, T3 p3)
109 template <typename T1, typename T2, typename T3, typename T4>
110 void AddRow(unsigned int numeric, T1 p1, T2 p2, T3 p3, T4 p4)
120 template <typename T1, typename T2, typename T3, typename T4, typename T5>
121 void AddRow(unsigned int numeric, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5)
132 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
133 void AddRow(unsigned int numeric, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6)
145 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
146 void AddRow(unsigned int numeric, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6, T7 p7)
159 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
160 void AddRow(unsigned int numeric, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6, T7 p7, T8 p8)