Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Static Public Member Functions | Private Attributes
ArcSec::EqualFunction Class Reference

Evaluate whether the two values are equal. More...

#include <EqualFunction.h>

Inheritance diagram for ArcSec::EqualFunction:
Inheritance graph
[legend]
Collaboration diagram for ArcSec::EqualFunction:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 EqualFunction (std::string functionName, std::string argumentType)
virtual AttributeValueevaluate (AttributeValue *arg0, AttributeValue *arg1, bool check_id=true)
 Evaluate two AttributeValue objects, and return one AttributeValue object.
virtual std::list
< AttributeValue * > 
evaluate (std::list< AttributeValue * > args, bool check_id=true)
 Evaluate a list of AttributeValue objects, and return a list of Attribute objects.

Static Public Member Functions

static std::string getFunctionName (std::string datatype)
 help function to get the FunctionName

Private Attributes

std::string fnName
std::string argType

Detailed Description

Evaluate whether the two values are equal.

Definition at line 28 of file EqualFunction.h.


Constructor & Destructor Documentation

ArcSec::EqualFunction::EqualFunction ( std::string  functionName,
std::string  argumentType 
)

Definition at line 37 of file EqualFunction.cpp.

                                                                           : Function(functionName, argumentType) {
  fnName = functionName;
  argType = argumentType;
}

Member Function Documentation

AttributeValue * ArcSec::EqualFunction::evaluate ( AttributeValue arg0,
AttributeValue arg1,
bool  check_id = true 
) [virtual]

Evaluate two AttributeValue objects, and return one AttributeValue object.

Implements ArcSec::Function.

Definition at line 42 of file EqualFunction.cpp.

                                                                                                {
  //TODO
  return new BooleanAttribute(arg0->equal(arg1, check_id));
}

Here is the call graph for this function:

std::list< AttributeValue * > ArcSec::EqualFunction::evaluate ( std::list< AttributeValue * >  args,
bool  check_id = true 
) [virtual]

Evaluate a list of AttributeValue objects, and return a list of Attribute objects.

Implements ArcSec::Function.

Definition at line 47 of file EqualFunction.cpp.

                                                                                             {
  AttributeValue* arg0 = NULL;
  AttributeValue* arg1 = NULL;
  std::list<AttributeValue*>::iterator it = args.begin();
  arg0 = *it; it++;
  if(it!= args.end()) arg1 = *it;
  AttributeValue* res = new BooleanAttribute(arg0->equal(arg1, check_id));
  std::list<AttributeValue*> ret;
  ret.push_back(res);
  return ret;
}

Here is the call graph for this function:

std::string ArcSec::EqualFunction::getFunctionName ( std::string  datatype) [static]

help function to get the FunctionName

Definition at line 14 of file EqualFunction.cpp.

                                                          {
  std::string ret;
  if (datatype ==  StringAttribute::getIdentifier()) ret = NAME_STRING_EQUAL;
  else if(datatype == BooleanAttribute::getIdentifier()) ret = NAME_BOOLEAN_EQUAL;
  //else if(datatype == IntegerAttribute::getIdentify()) ret = NAME_INTEGER_EQUAL;
  //else if(datatype == DoubleAttribute::getIdentify()) ret = NAME_DOUBLE_EQUAL;
  else if(datatype == DateAttribute::getIdentifier()) ret = NAME_DATE_EQUAL;
  else if(datatype == TimeAttribute::getIdentifier()) ret = NAME_TIME_EQUAL;
  else if(datatype == DateTimeAttribute::getIdentifier()) ret = NAME_DATETIME_EQUAL;
  else if(datatype == DurationAttribute::getIdentifier()) ret = NAME_DURATION_EQUAL;
  else if(datatype == PeriodAttribute::getIdentifier()) ret = NAME_PERIOD_EQUAL; 
  //else if(datatype == DayTimeDurationAttribute::getIdentify()) ret = NAME_DAYTIME_DURATION_EQUAL;
  //else if(datatype == YearMonthDurationAttribute::getIdentify()) ret = NAME_YEARMONTH_DURATION_EQUAL;
  else if(datatype == AnyURIAttribute::getIdentifier()) ret = NAME_ANYURI_EQUAL;
  else if(datatype == X500NameAttribute::getIdentifier()) ret = NAME_X500NAME_EQUAL;
  //else if(datatype == RFC822NameAttribute::getIdentify()) ret = NAME_RFC822NAME_EQUAL;
  //else if(datatype == HexBinaryAttribute::getIdentify()) ret = NAME_HEXBINARY_EQUAL;
  //else if(datatype == Base64BinaryAttribute::getIdentify()) ret = BASE64BINARY_EQUAL;
  //else if(datatype == IPAddressAttribute::getIdentify()) ret = NAME_IPADDRESS_EQUAL;
  //else if(datatype == DNSName::getIdentify()) ret = NAME_DNSNAME_EQUAL;
  return ret;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

std::string ArcSec::EqualFunction::argType [private]

Definition at line 40 of file EqualFunction.h.

std::string ArcSec::EqualFunction::fnName [private]

Definition at line 39 of file EqualFunction.h.


The documentation for this class was generated from the following files: