[Stormdos-develop] OOP and kernel
Status: Planning
Brought to you by:
exhu
|
From: Juras <yb...@tu...> - 2004-07-06 21:02:55
|
Hello stormdos-develop,
I've succeeded in my summer examination session (6 exams, uhfff!)
and ready to continue work for SD community ;)
I'm eager to use basic OOP via Pascal Objects (I don't mean standard units like
"objects" and any part of *Vision or Delphi classes).
We should not use extensively OOP where it is needed and where not.
We'd better write not a very clean, understandable mixed code but provide
extensive comments...
Well, OOP is good to define abstract layers
(memory or file mappings, linked lists, modules, image executables
etc.).
Now I work at "genutils" units, then I want to write a nice PE-Image
manipulating library, which will be able to relocate/fix-up images,
join sections, report imports/exports.
Then I want to write a utility which will convert
our kernel compiled as PE-Image into a MultiBoot plain image with
the neccesary header, so that we shall not need ELF-tools and Linux
target any more...
In basic units (my genutils) I'll implement abstract classes
OBaseObject (actually only with a virtual destructor) and OGenStream
to map any IO-related stuff to memory/buffer/driver data/file etc.
I also selected a modificated code style, i.e. the way to name variables and
functions, which I practise in my C++ programmes,
see:
===codestyle.txt===
CODE STYLE SAMPLE
~~~~~~~~~~~~~~~~~
typename
GlobalFunctionName()
gGlobalVariableName
mMemberName
methodName
local_function_name (which is not declared in Interface)
local_variable_name
g_local_variable_name (not declared in Interface, but global for the implementation part)
argument_variable_name
TTypeName
CClassName
OObjectName
PPointerTypeName
CONSTANT_NAME
DEFINE_NAME
pPointerVariable
p_pointer_variable
rVariableReference
r_argument_reference
r_local_reference
MLCC_TTypeName
MLCC_Function
while (condition)
if (condition)
enum TMyEnum
{
tmeEnumOption, tmeEnumOption2
}
Global Functions names:
ObjectAction
e.g. CursorDraw, FileOpen, FileClose...
===EOF codestyle.txt===
We've got a rather rainy and cool summer in Belarus :( So I have to spend almost
every day at home... :(
--
Best regards,
Juras mailto:yb...@tu...
|