blob: eeae699dcbedd02fec1bfe92313c86376d0d525b (
plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
//
// C++ Interface: kmfiptablesscriptgenerator
//
// Description:
//
//
// Author: Christian Hubinger <chubinger@irrsinnig.org>, (C) 2004
//
// Copyright: See COPYING file that comes with this distribution
// License: GPL
//
#ifndef KMFPFSCRIPTGENERATOR_H
#define KMFPFSCRIPTGENERATOR_H
/**
@author Christian Hubinger
*/
// QT includes
#include <tqstring.h>
#include <tqobject.h>
#include <tqtextstream.h>
// KDE includes
#include <kparts/part.h>
#include <kparts/plugin.h>
#include <kparts/factory.h>
#include <kxmlgui.h>
namespace KMF {
class IPTable;
class KMFIPTDoc;
class KMFPFScriptGenerator{
public:
KMFPFScriptGenerator();
~KMFPFScriptGenerator();
const TQString& compile( KMFIPTDoc* );
private:
// Script Generating methods, acting on m_stream
void printScriptTableRules( IPTable *tbl );
void printScriptTableChainDefinition( IPTable *tbl );
void printScriptStartFunction();
void printScriptStopFunction();
void printScriptModuleLoad();
void printScriptHeader();
void printScriptExecLogic();
const TQString& printScriptDebug( const TQString&, bool newLine = true);
private: // DATA
KMFIPTDoc *m_iptDoc;
TQTextOStream *m_stream;
};
}
#endif
|