Skip to content

ANSI-Christ/C-class-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C class system

class.h allow to create classes in C.

main.c contains 4 classes example and main.E contains code after preprocessing main.c.

Keywords:

  • constructor (may have parameters)
  • destructor (have empty list parameters)
  • extends (one parameter - base class)
  • abstract
  • public
  • private (invisible in childs)

All keywords are optional.

Creation starts with defining: #define CLASS_BEGIN__someName keyword,keyword,keyword

Then type must be genereted with calling: CLASS_END(someName);

Class can be compilled by calling: CLASS_COMPILE(someName)(keyword, ... ) Its unnesessary if you want only fields inheritance. CLASS_COMPILE know only constructor & destructor keywords.

constructor & destructor are consist of two parts: visible to user (by CLASS_BEGIN__someName) and hide (by CLASS_COMPILE).

About

C class system via macro

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published