blob: 0a22df624f62df3ff4ec80b487a0902a224b0e1f [file] [log] [blame]
* Copyright (c) 2015 by Contributors
* \file export.h
* \brief Export module that takes charge of code generation and document
* Generation for functions exported from R-side
#include <Rcpp.h>
#include <string>
namespace mxnet {
namespace R {
/*! \brief exporter class*/
class Exporter {
* \brief Export the generated file into path.
* \param path The path to be exported.
static void Export(const std::string& path);
// intialize the Rcpp module
static void InitRcppModule();
// get the singleton of exporter
static Exporter* Get();
/*! \brief The scope of current module to export */
Rcpp::Module* scope_;
* \brief Get human readable roxygen style function information.
* \param name the name of function.
* \parma num_args number of arguments.
* \parma arg_names name of arguments
* \parma arg_type_infos type information of arguments.
* \param arg_descriptions descriptions of arguments.
* \param remove_dup Whether to remove duplications
std::string MakeDocString(mx_uint num_args,
const char **arg_names,
const char **arg_type_infos,
const char **arg_descriptions,
bool remove_dup = true);
} // namespace R
} // namespace mxnet