Object Oriented Programming in C

Embedded software development is slowly moving towards object oriented analysis, design and programming. The introduction of object oriented technologies in some systems has not happened due to lack of C++ support on some platforms.

This article focuses on platforms where C++ compilers are not available. The developers working on these platforms should still be able to use object oriented analysis and design. When it comes to final code development they can use C.

The following sections cover an example of C++ code and its implementation in C.

C++ Source Code

Terminal Manager and Terminal C++ header and source files are shown below:

Terminal Manager

TerminalManager.hpp

TerminalManager.cpp

Terminal

Terminal.hpp

Terminal.cpp

Msg.hpp

C Source Code

Terminal Manager and Terminal C header and source files are shown below. The important points to note are:

TerminalManager

TerminalManager.h

TerminalManager.c

Terminal

Terminal.h

Terminal.c

Msg.h

Explore More