CConsoleBase implemented abstract class?
| Thu, 2008-04-10 12:23 | |
|
Hello, I am relatively new with using Symbian, so maybe there´s a simple answer to my question. Machiel |
|
| Thu, 2008-04-10 12:23 | |
|
Hello, I am relatively new with using Symbian, so maybe there´s a simple answer to my question. Machiel |
|
Forum posts: 30
It's not possible to instatiate a CConsoleBase object. If you have a look at console exe as created by Carbide it instatiates CConsole and not ConsoleBase like that:
TRAPD(createError, console = Console::NewL(KTextConsoleTitle, TSize(KConsFullScreen,KConsFullScreen)));
CConsole is a concrete implementation of CConsoleBase.
I don't think one would ever want to inherit a different concrete class from CConsoleBase, I don't see any reasons to do that.
But by design it's quite correct.
By having an abstract base class they are able to easily implement different consoles if they will have to. The functions which are virtual are those functions which would probably require different implementation on different consoles. Indeed, it's console-specific how to get a cursor position, get a keystroke etc.