-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
correctly handles roxygen in cpp files
- Loading branch information
1 parent
14531db
commit c750115
Showing
12 changed files
with
249 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "cpp11/doubles.hpp" | ||
using namespace cpp11; | ||
|
||
// Test: not documented + documented | ||
|
||
// Not Roxygenised C++ function I | ||
[[cpp11::register]] double notroxcpp1_(double x) { | ||
double y = x + 1.0; | ||
return y; | ||
} | ||
|
||
/* roxygen start | ||
@title Roxygenise C++ function II | ||
@param x numeric value | ||
@description Dummy function to test roxygen2. It adds 2.0 to a double. | ||
@export | ||
@examples roxcpp2_(1.0) | ||
roxygen end */ | ||
[[cpp11::register]] double roxcpp2_(double x) { | ||
double y = x + 2.0; | ||
return y; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include "cpp11/doubles.hpp" | ||
using namespace cpp11; | ||
|
||
// Test: documented + documented | ||
|
||
/* roxygen start | ||
@title Roxygenise C++ function III | ||
@param x numeric value | ||
@description Dummy function to test roxygen2. It adds 3.0 to a double. | ||
@export | ||
@examples roxcpp3_(1.0) | ||
roxygen end */ | ||
[[cpp11::register]] double roxcpp3_(double x) { | ||
double y = x + 3.0; | ||
return y; | ||
} | ||
|
||
/* roxygen start | ||
@title Roxygenise C++ function IV | ||
@param x numeric value | ||
@description Dummy function to test roxygen2. It adds 4.0 to a double. | ||
@export | ||
@examples roxcpp4_(1.0) | ||
roxygen end */ | ||
[[cpp11::register]] double roxcpp4_(double x) { | ||
double y = x + 4.0; | ||
return y; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include "cpp11/doubles.hpp" | ||
using namespace cpp11; | ||
|
||
// Test: documented + not documented + documented | ||
|
||
/* roxygen start | ||
@title Roxygenise C++ function V | ||
@param x numeric value | ||
@description Dummy function to test roxygen2. It adds 5.0 to a double. | ||
@export | ||
@examples roxcpp5_(1.0) | ||
roxygen end */ | ||
[[cpp11::register]] double roxcpp5_(double x) { | ||
double y = x + 5.0; | ||
return y; | ||
} | ||
|
||
// Not Roxygenised C++ function VI | ||
[[cpp11::register]] double notroxcpp6_(double x) { | ||
double y = x + 6.0; | ||
return y; | ||
} | ||
|
||
/* roxygen start | ||
@title Roxygenise C++ function VII | ||
@param x numeric value | ||
@description Dummy function to test roxygen2. It adds 7.0 to a double. | ||
@export | ||
@examples roxcpp7_(1.0) | ||
roxygen end */ | ||
[[cpp11::register]] double roxcpp7_(double x) { | ||
double y = x + 7.0; | ||
return y; | ||
} |