Os Libraries collection
Posted: Mon Feb 21, 2011 3:06 am
Hello Os Developers! I'm trying to collect (or rewrite) a set of classes which can be used in operating systems. I hope these classes are going to help you in your os coding.
All the classes must follow a set of rules:
The class should be as complete as possible ignoring only old and unused features (like all the varities of GDT types, use only Code, Data and TSS instead)
Good names to classes, functions and variables
Functions should be as short as possible and avoid side effects (low cyclomatic complexity)
Parameters shall be checked for correctness
Functions shall never return NULL or 0. We throw an exception instead
Often good code is better than comments and self-descriptive. However we use comments when code is not crystal clear.
Rigid style: tabs, braces on new line on the same column, one statement per line, spaces between if, while, for, etc and () but not between function name and parentesis.
Code must be portable (can be compiled on any compiler)*
The class itself should have few or none dipendences (class coupling).
Optionally we'll provide unit tests for the gTest framework to check the code.
I'm hosting classes at http://oslibs.altervista.org . Feel free to comment, to signale a bug or error, or suggest a new class.
Actually only some Gdt classes are available but I'm planning many others. Well... what do you think?
All the classes must follow a set of rules:
The class should be as complete as possible ignoring only old and unused features (like all the varities of GDT types, use only Code, Data and TSS instead)
Good names to classes, functions and variables
Functions should be as short as possible and avoid side effects (low cyclomatic complexity)
Parameters shall be checked for correctness
Functions shall never return NULL or 0. We throw an exception instead
Often good code is better than comments and self-descriptive. However we use comments when code is not crystal clear.
Rigid style: tabs, braces on new line on the same column, one statement per line, spaces between if, while, for, etc and () but not between function name and parentesis.
Code must be portable (can be compiled on any compiler)*
The class itself should have few or none dipendences (class coupling).
Optionally we'll provide unit tests for the gTest framework to check the code.
I'm hosting classes at http://oslibs.altervista.org . Feel free to comment, to signale a bug or error, or suggest a new class.
Actually only some Gdt classes are available but I'm planning many others. Well... what do you think?