MADARA  3.4.1
madara::knowledge::Function Class Reference

This class stores a function definition. More...

#include <Functions.h>

Public Types

enum  Types {
  UNINITIALIZED = 0 , EXTERN_UNNAMED = 1 , EXTERN_NAMED = 2 , KARL_EXPRESSION = 3 ,
  PYTHON_CALLABLE = 4 , JAVA_CALLABLE = 5 , FUNCTOR = 6
}
 Types of functions supported. More...
 

Public Member Functions

 Function ()
 Default constructor. More...
 
 Function (boost::python::object &func)
 Constructor for function pointer. More...
 
 Function (const madara::expression::ExpressionTree &func)
 Constructor for KaRL expression. More...
 
 Function (const madara::knowledge::CompiledExpression &exp)
 Constructor for KaRL expression. More...
 
 Function (filters::RecordFilter *filter)
 Constructor for KaRL expression. More...
 
 Function (jobject &object)
 Constructor for java. More...
 
 Function (KnowledgeRecord(*func)(const char *, FunctionArguments &, Variables &))
 Constructor for function pointer. More...
 
 Function (KnowledgeRecord(*func)(FunctionArguments &, Variables &))
 Constructor for function pointer. More...
 
bool is_extern_named (void) const
 
bool is_extern_unnamed (void) const
 
bool is_functor (void) const
 
bool is_java_callable (void) const
 
bool is_karl_expression (void) const
 
bool is_python_callable (void) const
 
bool is_uninitialized (void) const
 

Public Attributes

knowledge::KnowledgeRecord(* extern_named )(const char *, FunctionArguments &, Variables &)
 
knowledge::KnowledgeRecord(* extern_unnamed )(FunctionArguments &, Variables &)
 
madara::expression::ExpressionTree function_contents
 
filters::RecordFilterfunctor
 
jobject java_object
 
boost::python::object python_function
 
int type
 

Detailed Description

This class stores a function definition.

Definition at line 45 of file Functions.h.

Member Enumeration Documentation

◆ Types

Types of functions supported.

Enumerator
UNINITIALIZED 
EXTERN_UNNAMED 
EXTERN_NAMED 
KARL_EXPRESSION 
PYTHON_CALLABLE 
JAVA_CALLABLE 
FUNCTOR 

Definition at line 51 of file Functions.h.

Constructor & Destructor Documentation

◆ Function() [1/8]

madara::knowledge::Function::Function ( )
inline

Default constructor.

Definition at line 65 of file Functions.h.

◆ Function() [2/8]

madara::knowledge::Function::Function ( KnowledgeRecord(*)(FunctionArguments &, Variables &)  func)
inline

Constructor for function pointer.

Definition at line 81 of file Functions.h.

◆ Function() [3/8]

madara::knowledge::Function::Function ( KnowledgeRecord(*)(const char *, FunctionArguments &, Variables &)  func)
inline

Constructor for function pointer.

Definition at line 97 of file Functions.h.

◆ Function() [4/8]

madara::knowledge::Function::Function ( const madara::expression::ExpressionTree func)
inline

Constructor for KaRL expression.

Definition at line 114 of file Functions.h.

◆ Function() [5/8]

madara::knowledge::Function::Function ( const madara::knowledge::CompiledExpression exp)
inline

Constructor for KaRL expression.

Definition at line 126 of file Functions.h.

◆ Function() [6/8]

madara::knowledge::Function::Function ( filters::RecordFilter filter)
inline

Constructor for KaRL expression.

Definition at line 140 of file Functions.h.

◆ Function() [7/8]

madara::knowledge::Function::Function ( jobject &  object)
inline

Constructor for java.

Definition at line 201 of file Functions.h.

◆ Function() [8/8]

madara::knowledge::Function::Function ( boost::python::object &  func)
inline

Constructor for function pointer.

Definition at line 220 of file Functions.h.

Member Function Documentation

◆ is_extern_named()

bool madara::knowledge::Function::is_extern_named ( void  ) const
inline

Definition at line 158 of file Functions.h.

◆ is_extern_unnamed()

bool madara::knowledge::Function::is_extern_unnamed ( void  ) const
inline

Definition at line 153 of file Functions.h.

◆ is_functor()

bool madara::knowledge::Function::is_functor ( void  ) const
inline

Definition at line 168 of file Functions.h.

◆ is_java_callable()

bool madara::knowledge::Function::is_java_callable ( void  ) const
inline

Definition at line 209 of file Functions.h.

◆ is_karl_expression()

bool madara::knowledge::Function::is_karl_expression ( void  ) const
inline

Definition at line 163 of file Functions.h.

◆ is_python_callable()

bool madara::knowledge::Function::is_python_callable ( void  ) const
inline

Definition at line 235 of file Functions.h.

◆ is_uninitialized()

bool madara::knowledge::Function::is_uninitialized ( void  ) const
inline

Definition at line 173 of file Functions.h.

Member Data Documentation

◆ extern_named

knowledge::KnowledgeRecord(* madara::knowledge::Function::extern_named) (const char *, FunctionArguments &, Variables &)

Definition at line 179 of file Functions.h.

◆ extern_unnamed

knowledge::KnowledgeRecord(* madara::knowledge::Function::extern_unnamed) (FunctionArguments &, Variables &)

Definition at line 183 of file Functions.h.

◆ function_contents

madara::expression::ExpressionTree madara::knowledge::Function::function_contents

Definition at line 187 of file Functions.h.

◆ functor

filters::RecordFilter* madara::knowledge::Function::functor

Definition at line 190 of file Functions.h.

◆ java_object

jobject madara::knowledge::Function::java_object

Definition at line 196 of file Functions.h.

◆ python_function

boost::python::object madara::knowledge::Function::python_function

Definition at line 240 of file Functions.h.

◆ type

int madara::knowledge::Function::type

Definition at line 193 of file Functions.h.


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