00001 #ifndef OFUNCTION_H 00002 #define OFUNCTION_H 00003 00004 #include <stdlib.h> 00005 #include <iostream> 00006 #include <vector> 00007 #include "common.h" 00008 00009 using namespace std; 00010 BOREALIS_NAMESPACE_BEGIN 00011 00012 class OFunction 00013 { 00014 00015 public: 00016 virtual ~OFunction() {} 00017 00018 virtual char* evaluate( char *tuple ) = 0; 00019 virtual char* evaluate( char *tuple1, char *tuple2 ) = 0; 00020 virtual int32 getReturnedSize() = 0; 00021 00022 virtual vector<int32> getReturnSizes() 00023 { // default, say for map boxes, is to return just the one output size 00024 return vector<int32>( 1, getReturnedSize() ); 00025 } 00026 }; 00027 00028 BOREALIS_NAMESPACE_END 00029 #endif // OFUNCTION_H