The R Project SVN R

Rev

Rev 52863 | Rev 56184 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 52863 Rev 52903
Line 1... Line 1...
1
\name{stdRefClass-class}
1
\name{envRefClass-class}
2
\Rdversion{1.1}
2
\Rdversion{1.1}
3
\docType{class}
3
\docType{class}
4
\alias{stdRefClass-class}
4
\alias{envRefClass-class}
5
\alias{$,stdRefClass-method}
5
\alias{$,envRefClass-method}
6
\alias{$<-,stdRefClass-method}
6
\alias{$<-,envRefClass-method}
7
\alias{initialize,stdRefClass-method}
7
\alias{initialize,envRefClass-method}
8
 
8
 
9
\title{Class \code{"stdRefClass"}}
9
\title{Class \code{"envRefClass"}}
10
\description{
10
\description{
11
Support Class to Implement R Objects using Reference Semantics
11
Support Class to Implement R Objects using Reference Semantics
12
}
12
}
13
\section{NOTE:}{
13
\section{NOTE:}{
14
The software described here is an initial version.  The eventual goal
14
The software described here is an initial version.  The eventual goal
Line 46... Line 46...
46
object.
46
object.
47
The mechanism needs to be consistent with reference semantics; that
47
The mechanism needs to be consistent with reference semantics; that
48
is, changes made to the contents of an object are global, seen by any
48
is, changes made to the contents of an object are global, seen by any
49
code accessing that object, rather than only local to the function
49
code accessing that object, rather than only local to the function
50
call where the change takes place.
50
call where the change takes place.
51
As described below, class \code{stdRefClass} implements reference
51
As described below, class \code{envRefClass} implements reference
52
semantics through specialized use of \linkS4class{environment}
52
semantics through specialized use of \linkS4class{environment}
53
objects.
53
objects.
54
Other basic reference classes may use an interface to a language such
54
Other basic reference classes may use an interface to a language such
55
as Java or C++ using reference semantics for classes.
55
as Java or C++ using reference semantics for classes.
56
 
56
 
Line 73... Line 73...
73
arguments and should extract the corresponding field; an element for a
73
arguments and should extract the corresponding field; an element for a
74
set operation will be invoked with a single argument, the value to be
74
set operation will be invoked with a single argument, the value to be
75
assigned to the field.
75
assigned to the field.
76
The implementation needs to supply the object, since that is not an
76
The implementation needs to supply the object, since that is not an
77
argument in the method invocation.
77
argument in the method invocation.
78
The mechanism used currently by \code{stdRefClass} is described below.
78
The mechanism used currently by \code{envRefClass} is described below.
79
}
79
}
80
\section{Support Classes}{
80
\section{Support Classes}{
81
Two virtual classes are supplied to test for reference objects:
81
Two virtual classes are supplied to test for reference objects:
82
\code{is(x, "refClass")} tests whether \code{x} comes from a class
82
\code{is(x, "refClass")} tests whether \code{x} comes from a class
83
defined using the reference class mechanism described here;
83
defined using the reference class mechanism described here;