Added jinja framework for templates and base templates for functions and docs
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* file: {{fun.name}}.cpp
|
||||
* author: A trusty code generator
|
||||
* date: {{time.strftime("%a, %d %b %Y %H:%M:%S", time.gmtime())}}
|
||||
*
|
||||
* This file was autogenerated, do not modify.
|
||||
* See LICENCE for full modification and redistribution details.
|
||||
* Copyright {{time.strftime("%Y", time.gmtime())}} The OpenCV Foundation
|
||||
*/
|
||||
#include "mex.h"
|
||||
#include "bridge.hpp"
|
||||
#include <vector>
|
||||
{% block includes %}
|
||||
{% endblock %}
|
||||
|
||||
/*
|
||||
* {{ fun.name }}
|
||||
* Main mex entry point
|
||||
* nlhs - number of return arguments
|
||||
* plhs - pointers to return arguments
|
||||
* nrhs - number of input arguments
|
||||
* prhs - pointers to input arguments
|
||||
*/
|
||||
void mexFunction(int nlhs, mxArray* plhs[],
|
||||
int nrhs, const mxArray* prhs[]) {
|
||||
|
||||
{% block argcheck %}
|
||||
{% endblock %}
|
||||
|
||||
{% block prebridge %}
|
||||
{% endblock %}
|
||||
|
||||
// parse the inputs and outputs
|
||||
std::vector<Bridge> blhs(plhs, plhs+nlhs);
|
||||
std::vector<Bridge> brhs(prhs, prhs+nrhs);
|
||||
|
||||
{% block postbridge %}
|
||||
{% endblock %}
|
||||
|
||||
// call the opencv function
|
||||
// [out =] namespace.fun(src1, ..., srcn, dst1, ..., dstn, opt1, ..., optn);
|
||||
{% block fcall %}
|
||||
{% endblock %}
|
||||
|
||||
{% block postfun %}
|
||||
{% endblock %}
|
||||
|
||||
{% block cleanup %}
|
||||
{% endblock %}
|
||||
}
|
Reference in New Issue
Block a user