|
-
July 28th, 2009, 10:39 AM
#1
Input, Process, Output Pattern?
I am trying to create a class with the following generic methods: Input, Process, Output. The Process method is actually another abstract base class with a bunch of derived classes, all doing different processing. These Process classes will not change, nor are they expected to be derived further. The Input and Output methods have to customized and will be derived.
My current design is something like:
<pre>
class IO {
Stuff in(){}
void out( Stuff){}
}
class Process {
IO _io;
Process( IO io){ _io=io}
void doIt() {
Stuff s = _io.in();
do stuff;
_io.out( s);
}
}
</pre>
Is there another way to organize this?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|