00001 #ifndef __ARC_SEC_EQUAL_FUNCTION_H__
00002 #define __ARC_SEC_EQUAL_FUNCTION_H__
00003
00004 #include <arc/security/ArcPDP/fn/Function.h>
00005
00006 namespace ArcSec {
00007
00008 #define NAME_STRING_EQUAL "string-equal"
00009 #define NAME_BOOLEAN_EQUAL "boolean-equal"
00010 #define NAME_INTEGER_EQUAL "integer-equal"
00011 #define NAME_DOUBLE_EQUAL "double-equal"
00012 #define NAME_DATE_EQUAL "date-equal"
00013 #define NAME_TIME_EQUAL "time-equal"
00014 #define NAME_DATETIME_EQUAL "datetime-equal"
00015 #define NAME_DURATION_EQUAL "duration-equal"
00016 #define NAME_PERIOD_EQUAL "period-equal"
00017
00018
00019 #define NAME_ANYURI_EQUAL "anyURI-equal"
00020 #define NAME_X500NAME_EQUAL "x500Name-equal"
00021 #define NAME_RFC822NAME_EQUAL "rfc822Name-equal"
00022 #define NAME_HEXBINARY_EQUAL "hexBinary-equal"
00023 #define NAME_BASE64BINARY_EQUAL "base64Binary-equal"
00024 #define NAME_IPADDRESS_EQUAL "ipAddress-equal"
00025 #define NAME_DNSNAME_EQUAL "dnsName-equal"
00026
00028 class EqualFunction : public Function {
00029 public:
00030 EqualFunction(std::string functionName, std::string argumentType);
00031
00032 public:
00033 virtual AttributeValue* evaluate(AttributeValue* arg0, AttributeValue* arg1, bool check_id = true);
00034 virtual std::list<AttributeValue*> evaluate(std::list<AttributeValue*> args, bool check_id = true);
00036 static std::string getFunctionName(std::string datatype);
00037
00038 private:
00039 std::string fnName;
00040 std::string argType;
00041
00042 };
00043
00044 }
00045
00046 #endif
00047