our
$VERSION
=
'0.014'
;
sub
new {
my
$self
=
$_
[0];
my
$type
=
ref
(
$self
) ||
$self
;
my
$this
=
bless
{},
$type
;
$this
->{tainted} = NO;
$this
->{callbacks} = new X3DCallbacks;
$this
->{parents} = new X3DParentHash;
$this
->{comments} = new X3DArray;
return
$this
;
}
sub
getTainted {
$_
[0]->{tainted} }
sub
setTainted {
my
(
$this
,
$value
) =
@_
;
return
if
$this
->{tainted} ==
$value
;
$this
->{tainted} =
$value
;
if
(
$value
) {
if
(
$this
->getParents ) {
$_
->setTainted(
$value
)
foreach
@{
$this
->getParents };
}
}
}
sub
getCallbacks {
$_
[0]->{callbacks} }
sub
processEvents {
my
(
$this
,
$time
) =
@_
;
$this
->{callbacks}->processEvents(
$this
,
defined
$time
?
$time
:
time
);
return
;
}
sub
getParents {
$_
[0]->{parents} }
sub
getComments {
wantarray
? @{
$_
[0]->{comments} } :
$_
[0]->{comments} }
sub
toString {
my
(
$this
) =
@_
;
my
$string
=
''
;
$string
.=
$this
->getType;
$string
.= X3DGenerator->tidy_space;
$string
.= X3DGenerator->open_brace;
$string
.= X3DGenerator->tidy_space;
$string
.= X3DGenerator->close_brace;
return
$string
;
}
sub
dispose { }
1;