OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExtensionFunction Class Reference

#include <ExtensionFunctionsWhitelist.h>

Public Member Functions

 ExtensionFunction (const std::string &name, const std::vector< ExtArgumentType > &args, const ExtArgumentType ret, const bool is_runtime)
 
const std::string getName (bool keep_suffix=true) const
 
const std::vector
< ExtArgumentType > & 
getInputArgs () const
 
const ExtArgumentType getRet () const
 
std::string toString () const
 
std::string toStringSQL () const
 
std::string toSignature () const
 
bool isGPU () const
 
bool isCPU () const
 
bool isRuntime () const
 

Private Attributes

const std::string name_
 
const std::vector
< ExtArgumentType
args_
 
const ExtArgumentType ret_
 
const bool is_runtime_
 

Detailed Description

Definition at line 89 of file ExtensionFunctionsWhitelist.h.

Constructor & Destructor Documentation

ExtensionFunction::ExtensionFunction ( const std::string &  name,
const std::vector< ExtArgumentType > &  args,
const ExtArgumentType  ret,
const bool  is_runtime 
)
inline

Definition at line 91 of file ExtensionFunctionsWhitelist.h.

95  : name_(name), args_(args), ret_(ret), is_runtime_(is_runtime) {}
const std::vector< ExtArgumentType > args_
const ExtArgumentType ret_
string name
Definition: setup.in.py:72

Member Function Documentation

const std::vector<ExtArgumentType>& ExtensionFunction::getInputArgs ( ) const
inline

Definition at line 99 of file ExtensionFunctionsWhitelist.h.

References args_.

Referenced by CodeGenerator::codegenFunctionOperCastArgs(), and ThriftSerializers::to_thrift().

99 { return args_; }
const std::vector< ExtArgumentType > args_

+ Here is the caller graph for this function:

const std::string ExtensionFunction::getName ( bool  keep_suffix = true) const

Definition at line 507 of file ExtensionFunctionsWhitelist.cpp.

References anonymous_namespace{ExtensionFunctionsWhitelist.cpp}::drop_suffix(), and name_.

Referenced by CodeGenerator::codegenFunctionOper(), CodeGenerator::codegenFunctionOperCastArgs(), ExtensionFunctionsWhitelist::get_udfs_name(), ThriftSerializers::to_thrift(), toString(), and toStringSQL().

507  {
508  return (keep_suffix ? name_ : drop_suffix(name_));
509 }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const ExtArgumentType ExtensionFunction::getRet ( ) const
inline

Definition at line 100 of file ExtensionFunctionsWhitelist.h.

References ret_.

Referenced by CodeGenerator::codegenFunctionOper(), and ThriftSerializers::to_thrift().

100 { return ret_; }
const ExtArgumentType ret_

+ Here is the caller graph for this function:

bool ExtensionFunction::isCPU ( ) const
inline

Definition at line 110 of file ExtensionFunctionsWhitelist.h.

References name_.

110  {
111  return (name_.find("_gpu_", name_.find("__")) == std::string::npos);
112  }
bool ExtensionFunction::isGPU ( ) const
inline

Definition at line 106 of file ExtensionFunctionsWhitelist.h.

References name_.

106  {
107  return (name_.find("_cpu_", name_.find("__")) == std::string::npos);
108  }
bool ExtensionFunction::isRuntime ( ) const
inline

Definition at line 114 of file ExtensionFunctionsWhitelist.h.

References is_runtime_.

Referenced by ExtensionFunctionsWhitelist::get_udfs_name().

114 { return is_runtime_; }

+ Here is the caller graph for this function:

std::string ExtensionFunction::toSignature ( ) const

Definition at line 522 of file ExtensionFunctionsWhitelist.cpp.

References args_, ret_, and ExtensionFunctionsWhitelist::toString().

522  {
523  return "(" + ExtensionFunctionsWhitelist::toString(args_) + ") -> " +
525 }
const std::vector< ExtArgumentType > args_
const ExtArgumentType ret_
static std::string toString(const std::vector< ExtensionFunction > &ext_funcs, std::string tab="")

+ Here is the call graph for this function:

std::string ExtensionFunction::toString ( ) const

Definition at line 511 of file ExtensionFunctionsWhitelist.cpp.

References args_, getName(), ret_, and ExtensionFunctionsWhitelist::toString().

511  {
512  return getName() + "(" + ExtensionFunctionsWhitelist::toString(args_) + ") -> " +
514 }
const std::vector< ExtArgumentType > args_
const std::string getName(bool keep_suffix=true) const
const ExtArgumentType ret_
static std::string toString(const std::vector< ExtensionFunction > &ext_funcs, std::string tab="")

+ Here is the call graph for this function:

std::string ExtensionFunction::toStringSQL ( ) const

Definition at line 516 of file ExtensionFunctionsWhitelist.cpp.

References args_, getName(), ret_, and ExtensionFunctionsWhitelist::toStringSQL().

516  {
517  return getName(/* keep_suffix = */ false) + "(" +
520 }
const std::vector< ExtArgumentType > args_
const std::string getName(bool keep_suffix=true) const
const ExtArgumentType ret_
static std::string toStringSQL(const std::vector< ExtArgumentType > &sig_types)

+ Here is the call graph for this function:

Member Data Documentation

const std::vector<ExtArgumentType> ExtensionFunction::args_
private

Definition at line 118 of file ExtensionFunctionsWhitelist.h.

Referenced by getInputArgs(), toSignature(), toString(), and toStringSQL().

const bool ExtensionFunction::is_runtime_
private

Definition at line 120 of file ExtensionFunctionsWhitelist.h.

Referenced by isRuntime().

const std::string ExtensionFunction::name_
private

Definition at line 117 of file ExtensionFunctionsWhitelist.h.

Referenced by getName(), isCPU(), and isGPU().

const ExtArgumentType ExtensionFunction::ret_
private

Definition at line 119 of file ExtensionFunctionsWhitelist.h.

Referenced by getRet(), toSignature(), toString(), and toStringSQL().


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