The MyEvaluator is a new class that will use the MySearch class to evaluate whether or not the entity in question is facing north
Header file:
#pragma once
namespace vrfAddConditionalExample
{
{
public:
public:
};
}
Implementation:
#include <vlutil/vlPrint.h>
namespace vrfAddConditionalExample
{
{
}
{
}
{
}
const MyEvaluator& orig)
{
if (this == &orig)
{
return *this;
}
return *this;
}
{
return new MyEvaluator(*this);
}
{
MyConditionalExpression* conditional =
dynamic_cast<MyConditionalExpression*>(condExpr);
if (!conditional)
{
DtWarn("DtAndEvaluator::evaluate() : invalid conditional expression\n");
DtWarn("The expression must be of type MyConditionalExpression\n");
return false;
}
if (simManager == NULL)
{
DtWarn("MyEvaluator::evaluate called without valid DtSimManager!");
return false;
}
if (objectManager == NULL)
{
DtWarn("MyEvaluator::evaluate cannot access DtVrfObjectManager\n");
return false;
}
return search.
search(initializeObjectToCheck(condExpr, conditional->entity(), plan),
object, simManager);
}
{
return new MyEvaluator();
}
}