X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=include%2Fhfta%2Fbase_operator.h;h=99df8fadc701529bf4fa696991fbc588f1f856d6;hb=e981e864b812c938d3df8b555b6bb98bb89273e7;hp=f566ce3b2152baf02c3cff119358d3985873ce9d;hpb=07495effe193ca3f73c3bf0ce417068f9ac9dcdd;p=com%2Fgs-lite.git diff --git a/include/hfta/base_operator.h b/include/hfta/base_operator.h index f566ce3..99df8fa 100644 --- a/include/hfta/base_operator.h +++ b/include/hfta/base_operator.h @@ -1,56 +1,56 @@ -/* ------------------------------------------------ -Copyright 2014 AT&T Intellectual Property - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ------------------------------------------- */ - -#ifndef BASE_OPERATOR_H -#define BASE_OPERATOR_H - -#include "host_tuple.h" -#include -using namespace std; - -class base_operator -{ -protected: - unsigned int output_channel; - const char* op_name; -public: -// Tuple is presented to the operator. Output tuples -// returned in result - virtual int accept_tuple(host_tuple& tup, list& result) = 0; -// Flush output from the system - virtual int flush(list& result) = 0; -// Accept new query parameters - virtual int set_param_block(int sz, void * value) = 0; - virtual int get_temp_status(host_tuple& result) = 0; - virtual int get_blocked_status () = 0; - - base_operator(const char* name) { - output_channel = 0; - op_name = name; - } - - void set_output_channel(unsigned int channel) { - output_channel = channel; - } - -// Operator's memory footprint in bytes (estimate for the main structures - hash tables, etc ) - virtual unsigned int get_mem_footprint() { return 0; } - - virtual const char* get_name() { return op_name; } - - virtual ~base_operator() {} -}; - -#endif // BASE_OPERATOR_H +/* ------------------------------------------------ +Copyright 2014 AT&T Intellectual Property + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ------------------------------------------- */ + +#ifndef BASE_OPERATOR_H +#define BASE_OPERATOR_H + +#include "host_tuple.h" +#include +using namespace std; + +class base_operator +{ +protected: + unsigned int output_channel; + const char* op_name; +public: +// Tuple is presented to the operator. Output tuples +// returned in result + virtual int accept_tuple(host_tuple& tup, list& result) = 0; +// Flush output from the system + virtual int flush(list& result) = 0; +// Accept new query parameters + virtual int set_param_block(int sz, void * value) = 0; + virtual int get_temp_status(host_tuple& result) = 0; + virtual int get_blocked_status () = 0; + + base_operator(const char* name) { + output_channel = 0; + op_name = name; + } + + void set_output_channel(unsigned int channel) { + output_channel = channel; + } + +// Operator's memory footprint in bytes (estimate for the main structures - hash tables, etc ) + virtual unsigned int get_mem_footprint() { return 0; } + + virtual const char* get_name() { return op_name; } + + virtual ~base_operator() {} +}; + +#endif // BASE_OPERATOR_H