00001 #ifndef __ARC_SEC_MATCH_FUNCTION_H__
00002 #define __ARC_SEC_MATCH_FUNCTION_H__
00003
00004 #include <arc/security/ArcPDP/fn/Function.h>
00005 #include <arc/ArcRegex.h>
00006
00007 namespace ArcSec {
00008
00009 #define NAME_REGEXP_STRING_MATCH "regexp-string-match"
00010 #define NAME_ANYURI_REGEXP_MATCH "anyURI-regexp-match"
00011 #define NAME_X500NAME_REGEXP_MATCH "x500Name-regexp-match"
00012
00014 class MatchFunction : public Function {
00015 public:
00016 MatchFunction(std::string functionName, std::string argumentType);
00017
00018 public:
00019 virtual AttributeValue* evaluate(AttributeValue* arg0, AttributeValue* arg1, bool check_id = true);
00020 virtual std::list<AttributeValue*> evaluate(std::list<AttributeValue*> args, bool check_id = true);
00022 static std::string getFunctionName(std::string datatype);
00023
00024 private:
00025 std::string fnName;
00026 std::string argType;
00027 };
00028
00029 }
00030
00031 #endif
00032