kdenonbeta/kdedebian/kapture/libcapture
CVS commit by mornfall:
Add flags (hints) to groupers. Necessary for dynamic filter system.
M +1 -0 filters.h 1.12
M +3 -0 grouper.h 1.22
M +4 -0 groupermanager.h 1.2
--- kdenonbeta/kdedebian/kapture/libcapture/filters.h #1.11:1.12
@@ -42,4 +42,5 @@ namespace capture {
virtual void addNode (TreeNode *, TreeNode *);
virtual bool filterCondition (TreeNode *) = 0;
+ virtual unsigned flags () { return IsFilter; };
};
/* }}} */
--- kdenonbeta/kdedebian/kapture/libcapture/grouper.h #1.21:1.22
@@ -79,4 +79,5 @@ namespace capture {
public:
enum Position { First, BeforeLast, Last, Custom };
+ enum Flags { IsFilter = 0x1, IsGrouper = 0x2 };
virtual void setTreeFact (TreeFactory* f);
virtual void setNext (GrouperTNode *chain);
@@ -85,4 +86,5 @@ namespace capture {
GrouperFactory *creator () { return m_creator; };
virtual bool affected (long) { return false; };
+ virtual unsigned flags () { return 0; };
virtual ~Grouper () {};
@@ -139,4 +141,5 @@ namespace capture {
Grouper *instantiate ();
virtual bool affected (long);
+ virtual unsigned flags () { return m_inst ? m_inst -> flags () : 0; };
GrouperFactory (string type = "", const Param::Map& args = Param::Map ());
virtual ~GrouperFactory();
--- kdenonbeta/kdedebian/kapture/libcapture/groupermanager.h #1.1:1.2
@@ -23,4 +23,5 @@
#include <map>
#include <string>
+#include <list>
namespace capture {
@@ -30,4 +31,5 @@ namespace capture {
public:
typedef std::map <std::string, GrouperChain *> GrouperMap;
+ typedef std::list <std::string> StrList;
protected:
GrouperMap m_map;
@@ -37,4 +39,6 @@ namespace capture {
GrouperChain *getChain (std::string name);
void setupDefault ();
+ StrList listChains ();
+ StrList listFilters ();
// void save ();
// void load ();
Reply to: