ContextGroupBy.h 842 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * ContextGroupBy.h
 *
 *  Created on: Mar 26, 2014
 *      Author: nek3d
 */

#ifndef CONTEXTGROUPBY_H_
#define CONTEXTGROUPBY_H_

#include "ContextBase.h"

class ContextGroupBy: public ContextBase {
public:
	ContextGroupBy();
	~ContextGroupBy();
	virtual bool parseCmdArgs(int argc, char **argv, int skipFirstArgs);
	virtual bool isValidState();

	bool printFullCols() const { return _printFullCols; }
	const QuickString &getGroupCols() const { return _groupStr; }
	bool ignoreCase() const { return _ignoreCase; }
	const QuickString &getDefaultHeader();

protected:
	QuickString _groupStr;
	QuickString _defaultHeader;
	bool _printFullCols;
	bool _ignoreCase;

	bool handle_g();
	bool handle_inheader();
	bool handle_outheader();
	bool handle_header();
	bool handle_full();
	bool handle_ignorecase();
};


#endif /* CONTEXTGROUPBY_H_ */