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

#include <ExtensionFunctionsWhitelist.h>

Public Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 86 of file ExtensionFunctionsWhitelist.h.

Constructor & Destructor Documentation

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

Definition at line 88 of file ExtensionFunctionsWhitelist.h.

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

Member Function Documentation

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

Definition at line 95 of file ExtensionFunctionsWhitelist.h.

References args_.

Referenced by CodeGenerator::codegenFunctionOperCastArgs().

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

+ Here is the caller graph for this function:

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

Definition at line 96 of file ExtensionFunctionsWhitelist.h.

References args_.

96 { return args_; }
const std::vector< ExtArgumentType > args_
const std::string ExtensionFunction::getName ( bool  keep_suffix = true) const

Definition at line 458 of file ExtensionFunctionsWhitelist.cpp.

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

Referenced by CodeGenerator::codegenFunctionOper(), CodeGenerator::codegenFunctionOperCastArgs(), toString(), and toStringSQL().

458  {
459  return (keep_suffix ? name_ : drop_suffix(name_));
460 }

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

References ret_.

Referenced by CodeGenerator::codegenFunctionOper().

98 { return ret_; }
const ExtArgumentType ret_

+ Here is the caller graph for this function:

bool ExtensionFunction::isCPU ( ) const
inline

Definition at line 105 of file ExtensionFunctionsWhitelist.h.

References name_.

105  {
106  return (name_.find("_gpu_", name_.find("__")) == std::string::npos);
107  }
bool ExtensionFunction::isGPU ( ) const
inline

Definition at line 102 of file ExtensionFunctionsWhitelist.h.

References name_.

102  {
103  return (name_.find("_cpu_", name_.find("__")) == std::string::npos);
104  }
std::string ExtensionFunction::toString ( ) const

Definition at line 462 of file ExtensionFunctionsWhitelist.cpp.

References args_, getName(), ret_, anonymous_namespace{ExtensionFunctionsWhitelist.cpp}::serialize_type(), and ExtensionFunctionsWhitelist::toString().

462  {
463  return getName() + "(" + ExtensionFunctionsWhitelist::toString(args_) + ") -> " +
465 }
const std::vector< ExtArgumentType > args_
const std::string getName(bool keep_suffix=true) const
std::string serialize_type(const ExtArgumentType type, bool byval=true)
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 467 of file ExtensionFunctionsWhitelist.cpp.

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

467  {
468  return getName(/* keep_suffix = */ false) + "(" +
471 }
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 111 of file ExtensionFunctionsWhitelist.h.

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

const std::string ExtensionFunction::name_
private

Definition at line 110 of file ExtensionFunctionsWhitelist.h.

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

const ExtArgumentType ExtensionFunction::ret_
private

Definition at line 112 of file ExtensionFunctionsWhitelist.h.

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


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