File: attributes.cpp

package info (click to toggle)
rcpp 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,480 kB
  • sloc: cpp: 27,436; ansic: 7,778; sh: 53; makefile: 2
file content (37 lines) | stat: -rw-r--r-- 1,290 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <Rcpp.h>
using namespace Rcpp;

// include a dummy header file to test support for local includes
#include "attributes.hpp"

//' @param foo // don't do anything to this
//'     // or this
//' @param bar " // or this guy "
// [[Rcpp::export]] // this comment marks the following function for export
std::string comments_test( /// // "\""" some '"// more / // ///garbge"
    std::string msg = "Start a C++ line comment with the characters \"//\"" // "" \" ""
) { // """
    return msg;
}

std::string parse_declaration_test(std::string msg) {
    return msg;
}

// [[Rcpp::export]]
std::string parse_declaration_test(std::string msg = "Parse function declaration");

// [[Rcpp::export]]
std::string parse_default_values_with_str_parenthesis(const char* a = "(", const char* b= ")", std::string msg = "Parse function header with parenthis inside default string values.") {
	return msg;
}

// [[Rcpp::export]]
std::string parse_default_values_with_chr_parenthesis(char a = '(', char b= ')', std::string msg = "Parse function header with parenthis inside default char values.") {
	return msg;
}

// [[Rcpp::export]]
std::string parse_default_values_with_chr_backslash(char a = '\\', std::string msg = "Parse function header with backslash inside default char values.") {
	return msg;
}