[Rcpp-commits] r2096 - in pkg/Rcpp: . R inst/doc/Rcpp-modules man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Sep 10 13:01:00 CEST 2010
Author: romain
Date: 2010-09-10 13:01:00 +0200 (Fri, 10 Sep 2010)
New Revision: 2096
Added:
pkg/Rcpp/man/DollarNames-methods.Rd
Removed:
pkg/Rcpp/man/CppObjectS3-class.Rd
Modified:
pkg/Rcpp/INDEX
pkg/Rcpp/NAMESPACE
pkg/Rcpp/R/Module.R
pkg/Rcpp/R/Rcpp.package.skeleton.R
pkg/Rcpp/TODO
pkg/Rcpp/inst/doc/Rcpp-modules/Rcpp-modules.Rnw
pkg/Rcpp/man/CppObject-class.Rd
Log:
remove class C++ObjectS3, not needed in R 2.12.0
Modified: pkg/Rcpp/INDEX
===================================================================
--- pkg/Rcpp/INDEX 2010-09-10 10:25:22 UTC (rev 2095)
+++ pkg/Rcpp/INDEX 2010-09-10 11:01:00 UTC (rev 2096)
@@ -2,7 +2,6 @@
class
C++Function-class Class "C++Function"
C++Object-class c++ internal objects
-C++ObjectS3-class Class "C++ObjectS3"
Module Retrieves an Rcpp module
Module-class Rcpp modules
Rcpp-package R / C++ interface
Modified: pkg/Rcpp/NAMESPACE
===================================================================
--- pkg/Rcpp/NAMESPACE 2010-09-10 10:25:22 UTC (rev 2095)
+++ pkg/Rcpp/NAMESPACE 2010-09-10 11:01:00 UTC (rev 2096)
@@ -5,12 +5,12 @@
importFrom( utils, capture.output, assignInNamespace )
-exportClasses( Module, "C++Class", "C++Object", "C++ObjectS3", "C++Function" )
+exportClasses( Module, "C++Class", "C++Object", "C++Function" )
export( Module )
-exportMethods( new )
importFrom( utils, .DollarNames, prompt )
-S3method( .DollarNames, "C++ObjectS3" )
+S3method( .DollarNames, "C++Object" )
S3method( .DollarNames, "Module" )
exportMethods( prompt, show )
+exportMethods( new, .DollarNames )
Modified: pkg/Rcpp/R/Module.R
===================================================================
--- pkg/Rcpp/R/Module.R 2010-09-10 10:25:22 UTC (rev 2095)
+++ pkg/Rcpp/R/Module.R 2010-09-10 11:01:00 UTC (rev 2096)
@@ -17,7 +17,6 @@
setGeneric( "new" )
-setOldClass( "C++ObjectS3" )
## "Module" class as an environment with "pointer", "moduleName", and "packageName"
## Stands in for a reference class with those fields.
setClass( "Module", contains = "environment" )
@@ -30,8 +29,8 @@
module = "externalptr",
cppclass = "externalptr",
pointer = "externalptr"
- ),
- contains = "C++ObjectS3" )
+ )
+ )
setClass( "C++Function",
representation( pointer = "externalptr" ),
contains = "function"
@@ -131,9 +130,11 @@
}
} )
+setGeneric( ".DollarNames" )
.DollarNames.Module <- function(x, pattern){
grep( pattern , .Call( "Module__complete", x at pointer, PACKAGE = "Rcpp"), value = TRUE )
}
+setMethod( ".DollarNames", "Module", .DollarNames.Module )
new_CppObject_xp <- function(Class, ...){
xp <- .External( "class__newInstance", Class at module, Class at pointer, ..., PACKAGE = "Rcpp" )
@@ -263,9 +264,10 @@
.Call( "CppClass__complete" , xp , PACKAGE = "Rcpp" )
} )
-".DollarNames.C++ObjectS3" <- function( x, pattern ){
+".DollarNames.C++Object" <- function( x, pattern ){
grep( pattern, complete(x), value = TRUE )
}
+setMethod( ".DollarNames", "C++Object", `.DollarNames.C++Object` )
setGeneric( "functions", function(object, ...) standardGeneric( "functions" ) )
setMethod( "functions", "Module", function(object, ...){
Modified: pkg/Rcpp/R/Rcpp.package.skeleton.R
===================================================================
--- pkg/Rcpp/R/Rcpp.package.skeleton.R 2010-09-10 10:25:22 UTC (rev 2095)
+++ pkg/Rcpp/R/Rcpp.package.skeleton.R 2010-09-10 11:01:00 UTC (rev 2096)
@@ -95,7 +95,7 @@
}
if(isTRUE(module)){
- writeLines( 'importClassesFrom( Rcpp, "C++ObjectS3", "C++Object", "C++Class", "Module" )', ns )
+ writeLines( 'importClassesFrom( Rcpp, "C++Object", "C++Class", "Module" )', ns )
}
close( ns )
}
Modified: pkg/Rcpp/TODO
===================================================================
--- pkg/Rcpp/TODO 2010-09-10 10:25:22 UTC (rev 2095)
+++ pkg/Rcpp/TODO 2010-09-10 11:01:00 UTC (rev 2096)
@@ -36,17 +36,6 @@
overloading. Maybe we can do better than that. This might also need
R level dispatch (?selectMethod)
-
-R 2.12.0
-
- o Remove the C++ObjectS3 class as it is no longer needed:
- http://permalink.gmane.org/gmane.comp.lang.r.devel/24610
-
- o Order of classes in POSIXt: this currently is implemented internally
- with conditional compiling based on the version of R. The conditional
- compiling will disappear once we can depend on R 2.12.0 or greater
-
-
Syntactic sugar
o recycling : binary operators and math functions of 2 or more arguments
Modified: pkg/Rcpp/inst/doc/Rcpp-modules/Rcpp-modules.Rnw
===================================================================
--- pkg/Rcpp/inst/doc/Rcpp-modules/Rcpp-modules.Rnw 2010-09-10 10:25:22 UTC (rev 2095)
+++ pkg/Rcpp/inst/doc/Rcpp-modules/Rcpp-modules.Rnw 2010-09-10 11:01:00 UTC (rev 2096)
@@ -597,7 +597,7 @@
@
<<eval=FALSE>>=
-importClassesFrom( Rcpp, "C++ObjectS3", "C++Object", "C++Class", "Module" )
+importClassesFrom( Rcpp, "C++Object", "C++Class", "Module" )
@
Loading modules that are defined in a package is best placed inside the
Modified: pkg/Rcpp/man/CppObject-class.Rd
===================================================================
--- pkg/Rcpp/man/CppObject-class.Rd 2010-09-10 10:25:22 UTC (rev 2095)
+++ pkg/Rcpp/man/CppObject-class.Rd 2010-09-10 11:01:00 UTC (rev 2096)
@@ -14,11 +14,6 @@
Objects can be created by the \code{new} method of the
\linkS4class{C++Class} class.
}
-\section{Extends}{
- Class \code{"\linkS4class{C++ObjectS3}"}, directly.
- Class \code{"\linkS4class{oldClass}"}, by class "C++ObjectS3", distance 2.
-}
-
\section{Slots}{
\describe{
\item{\code{module}:}{external pointer to the module}
Deleted: pkg/Rcpp/man/CppObjectS3-class.Rd
===================================================================
--- pkg/Rcpp/man/CppObjectS3-class.Rd 2010-09-10 10:25:22 UTC (rev 2095)
+++ pkg/Rcpp/man/CppObjectS3-class.Rd 2010-09-10 11:01:00 UTC (rev 2096)
@@ -1,23 +0,0 @@
-\name{C++ObjectS3-class}
-\Rdversion{1.1}
-\docType{class}
-\alias{C++ObjectS3-class}
-
-\title{Class "C++ObjectS3"}
-\description{
- This class is used to allow S3 dispatch of \code{\link[utils]{.DollarNames}}
- which is an S3 generic. Rcpp defines an S3 method for the
- \code{"C++ObjectS3"} which dispatches internally to the appropriate method.
-}
-\section{Objects from the Class}{A virtual Class: No objects may be created from it.}
-\section{Extends}{
-Class \code{"\linkS4class{oldClass}"}, directly.
-}
-\section{Methods}{
-No methods defined with class "C++ObjectS3" in the signature.
-}
-\references{
-R-devel thread and workaround from John Chambers:
-\url{http://permalink.gmane.org/gmane.comp.lang.r.devel/24524}
-}
-\keyword{classes}
Added: pkg/Rcpp/man/DollarNames-methods.Rd
===================================================================
--- pkg/Rcpp/man/DollarNames-methods.Rd (rev 0)
+++ pkg/Rcpp/man/DollarNames-methods.Rd 2010-09-10 11:01:00 UTC (rev 2096)
@@ -0,0 +1,25 @@
+\name{.DollarNames-methods}
+\docType{methods}
+\alias{.DollarNames-methods}
+\alias{.DollarNames,ANY-method}
+\alias{.DollarNames,C++Object-method}
+\alias{.DollarNames,Module-method}
+\title{ completion }
+\description{
+ completion
+}
+\section{Methods}{
+\describe{
+
+\item{\code{signature(x = "ANY")}}{}
+
+\item{\code{signature(x = "C++Object")}}{
+completes fields and methods of C++ objects
+}
+
+\item{\code{signature(x = "Module")}}{
+completes functions and classes of modules
+}
+}}
+\keyword{methods}
+
More information about the Rcpp-commits
mailing list