Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Andrew Bauer
VTK
Commits
e8fd5d97
Commit
e8fd5d97
authored
Aug 05, 1994
by
Will Schroeder
Browse files
ENH: Added argument to StartMethod/EndMethod functions.
parent
71431c65
Changes
7
Hide whitespace changes
Inline
Side-by-side
include/Filter.hh
View file @
e8fd5d97
...
...
@@ -24,20 +24,27 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
class
vlFilter
:
virtual
public
vlObject
{
public:
vlFilter
()
:
StartMethod
(
NULL
),
EndMethod
(
NULL
),
Updating
(
0
)
{}
;
vlFilter
();
~
vlFilter
()
{};
char
*
GetClassName
()
{
return
"vlFilter"
;};
void
PrintSelf
(
ostream
&
os
,
vlIndent
indent
);
// Abstract Interface:
// All filters must provide a method to update the visualization
// pipeline.
virtual
void
Update
()
=
0
;
void
SetStartMethod
(
void
(
*
f
)());
void
SetEndMethod
(
void
(
*
f
)());
void
SetStartMethod
(
void
(
*
f
)(
void
*
),
void
*
arg
);
void
SetEndMethod
(
void
(
*
f
)(
void
*
),
void
*
arg
);
protected:
virtual
void
Execute
()
{
vlErrorMacro
(
<<
"Execute is a Filter subclass responsability"
);};
char
Updating
;
void
(
*
StartMethod
)();
void
(
*
EndMethod
)();
void
(
*
StartMethod
)(
void
*
);
void
*
StartMethodArg
;
void
(
*
EndMethod
)(
void
*
);
void
*
EndMethodArg
;
vlTimeStamp
ExecuteTime
;
};
...
...
src/DataSetF.cc
View file @
e8fd5d97
...
...
@@ -49,10 +49,10 @@ void vlDataSetFilter::Update()
if
(
this
->
Input
->
GetMTime
()
>
this
->
GetMTime
()
||
this
->
GetMTime
()
>
this
->
ExecuteTime
)
{
if
(
this
->
StartMethod
)
(
*
this
->
StartMethod
)();
if
(
this
->
StartMethod
)
(
*
this
->
StartMethod
)(
this
->
StartMethodArg
);
this
->
Execute
();
this
->
ExecuteTime
.
Modified
();
if
(
this
->
EndMethod
)
(
*
this
->
EndMethod
)();
if
(
this
->
EndMethod
)
(
*
this
->
EndMethod
)(
this
->
EndMethodArg
);
}
}
...
...
src/Filter.cc
View file @
e8fd5d97
...
...
@@ -15,20 +15,32 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
#include "Filter.hh"
void
vlFilter
::
SetStartMethod
(
void
(
*
f
)
()
)
vlFilter
::
vlFilter
()
{
if
(
f
!=
this
->
StartMethod
)
this
->
StartMethod
=
NULL
;
this
->
StartMethodArg
=
NULL
;
this
->
EndMethod
=
NULL
;
this
->
EndMethodArg
=
NULL
;
this
->
Updating
=
0
;
}
void
vlFilter
::
SetStartMethod
(
void
(
*
f
)(
void
*
),
void
*
arg
)
{
if
(
f
!=
this
->
StartMethod
||
arg
!=
this
->
StartMethodArg
)
{
this
->
StartMethod
=
f
;
this
->
StartMethodArg
=
arg
;
this
->
Modified
();
}
}
void
vlFilter
::
SetEndMethod
(
void
(
*
f
)(
)
)
void
vlFilter
::
SetEndMethod
(
void
(
*
f
)(
void
*
),
void
*
arg
)
{
if
(
f
!=
this
->
EndMethod
)
if
(
f
!=
this
->
EndMethod
||
arg
!=
this
->
EndMethodArg
)
{
this
->
EndMethod
=
f
;
this
->
EndMethodArg
=
arg
;
this
->
Modified
();
}
}
...
...
src/PolyF.cc
View file @
e8fd5d97
...
...
@@ -26,10 +26,10 @@ void vlPolyFilter::Update()
if
(
this
->
Input
->
GetMTime
()
>
this
->
GetMTime
()
||
this
->
GetMTime
()
>
this
->
ExecuteTime
)
{
if
(
this
->
StartMethod
)
(
*
this
->
StartMethod
)();
if
(
this
->
StartMethod
)
(
*
this
->
StartMethod
)(
this
->
StartMethodArg
);
this
->
Execute
();
this
->
ExecuteTime
.
Modified
();
if
(
this
->
EndMethod
)
(
*
this
->
EndMethod
)();
if
(
this
->
EndMethod
)
(
*
this
->
EndMethod
)(
this
->
EndMethodArg
);
}
}
...
...
src/PtSetF.cc
View file @
e8fd5d97
...
...
@@ -51,10 +51,10 @@ void vlPointSetFilter::Update()
if
(
this
->
Input
->
GetMTime
()
>
this
->
GetMTime
()
||
this
->
GetMTime
()
>
this
->
ExecuteTime
)
{
if
(
this
->
StartMethod
)
(
*
this
->
StartMethod
)();
if
(
this
->
StartMethod
)
(
*
this
->
StartMethod
)(
this
->
StartMethodArg
);
this
->
Execute
();
this
->
ExecuteTime
.
Modified
();
if
(
this
->
EndMethod
)
(
*
this
->
EndMethod
)();
if
(
this
->
EndMethod
)
(
*
this
->
EndMethod
)(
this
->
EndMethodArg
);
}
}
...
...
src/SGridF.cc
View file @
e8fd5d97
...
...
@@ -51,10 +51,10 @@ void vlStructuredDataSetFilter::Update()
if
(
this
->
Input
->
GetMTime
()
>
this
->
GetMTime
()
||
this
->
GetMTime
()
>
this
->
ExecuteTime
)
{
if
(
this
->
StartMethod
)
(
*
this
->
StartMethod
)();
if
(
this
->
StartMethod
)
(
*
this
->
StartMethod
)(
this
->
StartMethodArg
);
this
->
Execute
();
this
->
ExecuteTime
.
Modified
();
if
(
this
->
EndMethod
)
(
*
this
->
EndMethod
)();
if
(
this
->
EndMethod
)
(
*
this
->
EndMethod
)(
this
->
EndMethodArg
);
}
}
...
...
src/StrPtsF.cc
View file @
e8fd5d97
...
...
@@ -48,10 +48,10 @@ void vlStructuredPointsFilter::Update()
if
(
this
->
Input
->
GetMTime
()
>
this
->
GetMTime
()
||
this
->
GetMTime
()
>
this
->
ExecuteTime
)
{
if
(
this
->
StartMethod
)
(
*
this
->
StartMethod
)();
if
(
this
->
StartMethod
)
(
*
this
->
StartMethod
)(
this
->
StartMethodArg
);
this
->
Execute
();
this
->
ExecuteTime
.
Modified
();
if
(
this
->
EndMethod
)
(
*
this
->
EndMethod
)();
if
(
this
->
EndMethod
)
(
*
this
->
EndMethod
)(
this
->
EndMethodArg
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment