1
|
|
###########################################################################/**
|
2
|
|
# @RdocClass RspCutDirective
|
3
|
|
# @alias RspEndcutDirective
|
4
|
|
# @alias RspCopyDirective
|
5
|
|
# @alias RspEndcopyDirective
|
6
|
|
# @alias RspPasteDirective
|
7
|
|
#
|
8
|
|
# @title "The RspCopyDirective class"
|
9
|
|
#
|
10
|
|
# \description{
|
11
|
|
# @classhierarchy
|
12
|
|
#
|
13
|
|
# An RspCutDirective and RspPasteDirective are
|
14
|
|
# @see "RspDirective" that will copy, cut, and paste a set of
|
15
|
|
# @see "RspConstruct":s.
|
16
|
|
# }
|
17
|
|
#
|
18
|
|
# @synopsis
|
19
|
|
#
|
20
|
|
# \arguments{
|
21
|
|
# \item{value}{A @character string.}
|
22
|
|
# \item{...}{Additional arguments passed to @see "RspDirective".}
|
23
|
|
# \item{.validate}{A @logical specifying whether the attributes should
|
24
|
|
# be validated or not.}
|
25
|
|
# }
|
26
|
|
#
|
27
|
|
# \section{Fields and Methods}{
|
28
|
|
# @allmethods
|
29
|
|
# }
|
30
|
|
#
|
31
|
|
# @author
|
32
|
|
#
|
33
|
|
# @keyword internal
|
34
|
|
#*/###########################################################################
|
35
|
|
setConstructorS3("RspCutDirective", function(value="cut", ..., .validate=TRUE) {
|
36
|
|
# Argument '.validate':
|
37
|
1
|
if (missing(.validate)) .validate <- !missing(value)
|
38
|
|
|
39
|
|
# Argument 'value':
|
40
|
1
|
value <- match.arg(value, choices=c("cut", "copy"))
|
41
|
|
|
42
|
1
|
this <- extend(RspDirective(value, ...), "RspCutDirective")
|
43
|
1
|
if (.validate) {
|
44
|
0
|
requireAttributes(this, c("name"))
|
45
|
|
}
|
46
|
1
|
this
|
47
|
|
})
|
48
|
|
|
49
|
|
setConstructorS3("RspEndcutDirective", function(value="endcut", ...) {
|
50
|
1
|
value <- match.arg(value, choices=c("endcut", "endcopy"))
|
51
|
1
|
extend(RspDirective(value, ...), "RspEndcutDirective")
|
52
|
|
})
|
53
|
|
|
54
|
|
setConstructorS3("RspCopyDirective", function(value="copy", ..., .validate=TRUE) {
|
55
|
|
# Argument '.validate':
|
56
|
1
|
if (missing(.validate)) .validate <- !missing(value)
|
57
|
|
|
58
|
1
|
extend(RspCutDirective(value, ..., .validate=.validate), "RspCopyDirective")
|
59
|
|
})
|
60
|
|
|
61
|
|
setConstructorS3("RspEndcopyDirective", function(value="endcopy", ...) {
|
62
|
1
|
extend(RspEndcutDirective(value, ...), "RspEndcopyDirective")
|
63
|
|
})
|
64
|
|
|
65
|
|
|
66
|
|
setConstructorS3("RspPasteDirective", function(value="paste", ...) {
|
67
|
1
|
this <- extend(RspDirective(value, ...), "RspPasteDirective")
|
68
|
1
|
if (!missing(value)) {
|
69
|
0
|
requireAttributes(this, c("name"))
|
70
|
|
}
|
71
|
1
|
this
|
72
|
|
})
|