Fleet  0.0.9
Inference in the LOT
Public Types | Public Member Functions | Public Attributes | List of all members
Primitive< T, args > Class Template Reference

#include <Grammar.h>

Inheritance diagram for Primitive< T, args >:
PrePrimitive

Public Types

typedef std::decay< typename HeadIfReferenceElseT< T, args... >::type >::type GrammarReturnType
 

Public Member Functions

constexpr Primitive (const char *fmt, T(*_call)(args...), double _p=1.0)
 
template<typename V , typename P , typename L >
constexpr Primitive (const char *fmt, T(*_call)(args...), vmstatus_t _dispatch(V *, P *, L *), double _p=1.0)
 
template<typename V , typename P , typename L >
vmstatus_t VMScall (V *vms, P *pool, L *loader)
 This gets called by a VirtualMachineState to evaluate the primitive on some arguments. More...
 

Public Attributes

std::string format
 
T(* call )(args...)
 
void * dispatch
 
PrimitiveOp op
 
double p
 
bool is_dispatch
 

Additional Inherited Members

- Static Public Attributes inherited from PrePrimitive
static PrimitiveOp op_counter = 0
 

Detailed Description

template<typename T, typename... args>
class Primitive< T, args >

Author
piantado
Date
05/03/20

Member Typedef Documentation

§ GrammarReturnType

template<typename T, typename... args>
typedef std::decay<typename HeadIfReferenceElseT<T,args...>::type>::type Primitive< T, args >::GrammarReturnType

Constructor & Destructor Documentation

§ Primitive() [1/2]

template<typename T, typename... args>
constexpr Primitive< T, args >::Primitive ( const char *  fmt,
T(*)(args...)  _call,
double  _p = 1.0 
)
inline

§ Primitive() [2/2]

template<typename T, typename... args>
template<typename V , typename P , typename L >
constexpr Primitive< T, args >::Primitive ( const char *  fmt,
T(*)(args...)  _call,
vmstatus_t   _dispatchV *, P *, L *,
double  _p = 1.0 
)
inline

Member Function Documentation

§ VMScall()

template<typename T, typename... args>
template<typename V , typename P , typename L >
vmstatus_t Primitive< T, args >::VMScall ( V *  vms,
P *  pool,
L *  loader 
)
inline

This gets called by a VirtualMachineState to evaluate the primitive on some arguments.

Parameters
vms
pool
loader
Returns

Member Data Documentation

§ call

template<typename T, typename... args>
T(* Primitive< T, args >::call) (args...)

§ dispatch

template<typename T, typename... args>
void* Primitive< T, args >::dispatch

§ format

template<typename T, typename... args>
std::string Primitive< T, args >::format

§ is_dispatch

template<typename T, typename... args>
bool Primitive< T, args >::is_dispatch

§ op

template<typename T, typename... args>
PrimitiveOp Primitive< T, args >::op

§ p

template<typename T, typename... args>
double Primitive< T, args >::p

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