MocoExtendProblem: Interface Between OpenSim and MATLAB for Rapidly Developing Direct Collocation Goals in Moco 1.1.0
add custom Moco goals to existing matlab scripts
mexplus Namespace Reference

MEX function arguments helper library. More...

Classes

class  InputArguments
 Utility to parse input arguments. More...
 
struct  MxArithmeticCompound
 
struct  MxArithmeticCompound< T, typename std::enable_if<(MxArithmeticType< typename T::value_type >::value) &&!(MxComplexType< T >::value), T >::type >
 
struct  MxArithmeticTy
 Traits for arithmetic types. More...
 
struct  MxArithmeticTy< T, typename std::enable_if<(std::is_floating_point< T >::value)||(MxIntTy< T >::value), T >::type >
 
struct  MxArithmeticType
 
struct  MxArithmeticType< T, typename std::enable_if< std::is_same< typename MxTypes< T >::array_type, mxNumeric >::value, T >::type >
 
class  MxArray
 mxArray object wrapper for data conversion and manipulation. More...
 
struct  MxCellCompound
 
struct  MxCellCompound< T, typename std::enable_if< MxCellType< typename T::value_type >::value, T >::type >
 
struct  MxCellType
 
struct  MxCellType< T, typename std::enable_if< std::is_same< typename MxTypes< T >::array_type, mxCell >::value, T >::type >
 
struct  MxCharCompound
 
struct  MxCharCompound< T, typename std::enable_if< MxCharType< typename T::value_type >::value, T >::type >
 
struct  MxCharTy
 Traits for mxChar-convertibles. More...
 
struct  MxCharTy< T, typename std::enable_if< std::is_same< typename std::remove_cv< T >::type, char >::value||std::is_same< typename std::remove_cv< T >::type, mxChar >::value||std::is_same< typename std::remove_cv< T >::type, wchar_t >::value, T >::type >
 
struct  MxCharType
 
struct  MxCharType< T, typename std::enable_if< std::is_same< typename MxTypes< T >::array_type, mxChar >::value, T >::type >
 
struct  MxComplexCompound
 
struct  MxComplexCompound< T, typename std::enable_if< MxComplexType< typename T::value_type >::value, T >::type >
 
struct  MxComplexOrArithmeticCompound
 
struct  MxComplexOrArithmeticCompound< T, typename std::enable_if< MxComplexCompound< T >::value||MxArithmeticCompound< T >::value, T >::type >
 
struct  MxComplexOrArithmeticType
 
struct  MxComplexOrArithmeticType< T, typename std::enable_if< MxArithmeticTy< T >::value, T >::type >
 
struct  MxComplexOrArithmeticType< T, typename std::enable_if< MxComplexType< T >::value, T >::type >
 
struct  MxComplexType
 
struct  MxComplexType< T, typename std::enable_if< std::is_same< typename MxTypes< T >::array_type, mxComplex >::value, T >::type >
 
struct  MxIntTy
 Traits for integer numerics. More...
 
struct  MxIntTy< T, typename std::enable_if< std::is_integral< T >::value &&!MxLogicalTy< T >::value &&!MxCharTy< T >::value, T >::type >
 
struct  MxLogicalCompound
 
struct  MxLogicalCompound< T, typename std::enable_if< MxLogicalType< typename T::value_type >::value, T >::type >
 
struct  MxLogicalTy
 Traits for mxLogical-convertibles. More...
 
struct  MxLogicalTy< T, typename std::enable_if< std::is_same< typename std::remove_cv< T >::type, bool >::value||std::is_same< typename std::remove_cv< T >::type, mxLogical >::value, T >::type >
 
struct  MxLogicalType
 
struct  MxLogicalType< T, typename std::enable_if< std::is_same< typename MxTypes< T >::array_type, mxLogical >::value, T >::type >
 
struct  MxTypes
 Traits for mxArray. More...
 
struct  MxTypes< T, typename std::enable_if< MxCharTy< T >::value, T >::type >
 
struct  MxTypes< T, typename std::enable_if< MxLogicalTy< T >::value, T >::type >
 
struct  MxTypes< T, typename std::enable_if< std::is_floating_point< T >::value &&sizeof(T)==4, T >::type >
 
struct  MxTypes< T, typename std::enable_if< std::is_floating_point< T >::value &&sizeof(T)==8, T >::type >
 
struct  MxTypes< T, typename std::enable_if< std::is_same< typename std::remove_cv< T >::type, std::complex< double > >::value, T >::type >
 
struct  MxTypes< T, typename std::enable_if< std::is_same< typename std::remove_cv< T >::type, std::complex< float > >::value, T >::type >
 
struct  MxTypes< T, typename std::enable_if< std::is_signed< T >::value &&MxIntTy< T >::value &&sizeof(T)==1, T >::type >
 
struct  MxTypes< T, typename std::enable_if< std::is_signed< T >::value &&MxIntTy< T >::value &&sizeof(T)==2, T >::type >
 
struct  MxTypes< T, typename std::enable_if< std::is_signed< T >::value &&MxIntTy< T >::value &&sizeof(T)==4, T >::type >
 
struct  MxTypes< T, typename std::enable_if< std::is_signed< T >::value &&MxIntTy< T >::value &&sizeof(T)==8, T >::type >
 
struct  MxTypes< T, typename std::enable_if< std::is_unsigned< T >::value &&MxIntTy< T >::value &&sizeof(T)==1, T >::type >
 
struct  MxTypes< T, typename std::enable_if< std::is_unsigned< T >::value &&MxIntTy< T >::value &&sizeof(T)==2, T >::type >
 
struct  MxTypes< T, typename std::enable_if< std::is_unsigned< T >::value &&MxIntTy< T >::value &&sizeof(T)==4, T >::type >
 
struct  MxTypes< T, typename std::enable_if< std::is_unsigned< T >::value &&MxIntTy< T >::value &&sizeof(T)==8, T >::type >
 
class  Operation
 Abstract operation class. More...
 
class  OperationCreator
 Base class for operation creators. More...
 
class  OperationCreatorImpl
 Implementation of the operation creator to be used as composition in an Operator class. More...
 
class  OperationFactory
 Factory class for operations. More...
 
class  OutputArguments
 Output arguments wrapper. More...
 
class  Session
 Key-value storage to make a stateful MEX function. More...
 

Typedefs

typedef bool OperationNameAdmitter(const std::string &name)
 

Functions

void CreateOperation (OperationNameAdmitter *admitter, OperationCreator *creator)
 Register a new creator in OperationFactory.
 

Detailed Description

MEX function arguments helper library.

MxTypes and other type traits for template.

Copyright 2014 Kota Yamaguchi.

Example: writing a MEX function that takes 2 input arguments and 1 optional flag, and returns one output.

% myFunction.m function result = myFunction(arg1, arg2, varargin)

// myFunction.cc #include "mexplus/arguments.h" using namespace std; using namespace mexplus; void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs) { InputArguments input(nrhs, prhs, 2, 1, "Flag"); OutputArguments output(nlhs, plhs, 1); vector<double> result = myFunction(input.get<vector<double> >(0), input.get<string>(1), input.get<int>("Flag", 0)); output.set(0, result); }

% Build

‍mex myFunction.cc src/mexplus/arguments.cc

Copyright 2014 Kota Yamaguchi.

Typedef Documentation

◆ OperationNameAdmitter

typedef bool OperationNameAdmitter(const std::string &name)

Function Documentation

◆ CreateOperation()

void CreateOperation ( OperationNameAdmitter * admitter,
OperationCreator * creator )
inline

Register a new creator in OperationFactory.

Register a new creator.

Here is the caller graph for this function: