mirror of
https://review.haiku-os.org/haiku
synced 2025-02-02 11:46:25 +01:00
01293d6ed7
+ Added Priority() + Added Sniff() + Replaced ExprList typedef with plain old std::vector<Expr*> so I wouldn't forget what the hell kind of list I was working with. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@607 a95241bf-73f2-0310-859d-f6bbb57e9c96
42 lines
791 B
C++
42 lines
791 B
C++
//----------------------------------------------------------------------
|
|
// This software is part of the OpenBeOS distribution and is covered
|
|
// by the OpenBeOS license.
|
|
//---------------------------------------------------------------------
|
|
/*!
|
|
\file sniffer/Rule.h
|
|
Mime sniffer rule declarations
|
|
*/
|
|
#ifndef _sk_sniffer_rule_h_
|
|
#define _sk_sniffer_rule_h_
|
|
|
|
#include <SupportDefs.h>
|
|
#include <vector>
|
|
|
|
class BPositionIO;
|
|
|
|
namespace Sniffer {
|
|
|
|
class Expr;
|
|
|
|
class Rule {
|
|
public:
|
|
Rule();
|
|
~Rule();
|
|
|
|
status_t InitCheck() const;
|
|
|
|
double Priority() const;
|
|
bool Sniff(BPositionIO *data) const;
|
|
private:
|
|
friend class Parser;
|
|
|
|
void Unset();
|
|
void SetTo(double priority, std::vector<Expr*>* list);
|
|
|
|
double fPriority;
|
|
std::vector<Expr*> *fExprList;
|
|
};
|
|
|
|
}
|
|
|
|
#endif // _sk_sniffer_rule_h_
|