OmniSciDB  ca0c39ec8f
 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 113 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 115 of file ExtensionFunctionsWhitelist.h.

119  : 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 123 of file ExtensionFunctionsWhitelist.h.

References args_.

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

123 { 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 572 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().

572  {
573  return (keep_suffix ? name_ : drop_suffix(name_));
574 }

+ 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 124 of file ExtensionFunctionsWhitelist.h.

References ret_.

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

124 { return ret_; }
const ExtArgumentType ret_

+ Here is the caller graph for this function:

bool ExtensionFunction::isCPU ( ) const
inline

Definition at line 134 of file ExtensionFunctionsWhitelist.h.

References name_.

134  {
135  return (name_.find("_gpu_", name_.find("__")) == std::string::npos);
136  }
bool ExtensionFunction::isGPU ( ) const
inline

Definition at line 130 of file ExtensionFunctionsWhitelist.h.

References name_.

130  {
131  return (name_.find("_cpu_", name_.find("__")) == std::string::npos);
132  }
bool ExtensionFunction::isRuntime ( ) const
inline

Definition at line 138 of file ExtensionFunctionsWhitelist.h.

References is_runtime_.

Referenced by ExtensionFunctionsWhitelist::get_udfs_name().

138 { return is_runtime_; }

+ Here is the caller graph for this function:

std::string ExtensionFunction::toSignature ( ) const

Definition at line 587 of file ExtensionFunctionsWhitelist.cpp.

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

587  {
588  return "(" + ExtensionFunctionsWhitelist::toString(args_) + ") -> " +
590 }
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 576 of file ExtensionFunctionsWhitelist.cpp.

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

576  {
577  return getName() + "(" + ExtensionFunctionsWhitelist::toString(args_) + ") -> " +
579 }
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 581 of file ExtensionFunctionsWhitelist.cpp.

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

581  {
582  return getName(/* keep_suffix = */ false) + "(" +
585 }
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 142 of file ExtensionFunctionsWhitelist.h.

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

const bool ExtensionFunction::is_runtime_
private

Definition at line 144 of file ExtensionFunctionsWhitelist.h.

Referenced by isRuntime().

const std::string ExtensionFunction::name_
private

Definition at line 141 of file ExtensionFunctionsWhitelist.h.

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

const ExtArgumentType ExtensionFunction::ret_
private

Definition at line 143 of file ExtensionFunctionsWhitelist.h.

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


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