Tag Archives: Interfaces

Templates and polymorphism

Technical Consultant at Feabhas Ltd
Glennan is an embedded systems and software engineer with over 20 years experience, mostly in high-integrity systems for the defence and aerospace industry.

He specialises in C++, UML, software modelling, Systems Engineering and process development.
Glennan Carnie

Introduction

Template functions and classes tend to cause consternation amongst programmers. The conversation tends to go something like this:

I understand the syntax of templates (although it’s ugly)
I get the idea of replacing function-like macros with template functions
I can see the application of template classes for containers
Most containers and generic functions are library code
I don’t write libraries
What’s the point of me using templates?

In this article we’re going to look at an application of templates beyond writing library code – replacing run-time polymorphism […]

Posted in C/C++ Programming | Tagged , , , , | 3 Comments

Overcoming Name Clashes in Multiple C++ Interfaces

Director at Feabhas Limited
Co-Founder and Director of Feabhas since 1995.
Niall has been designing and programming embedded systems for over 30 years. He has worked in different sectors, including aerospace, telecomms, government and banking.
His current interest lie in IoT Security and Agile for Embedded Systems.
Niall Cooling

Interfaces

One of our key design goals is to reduce coupling between objects and classes. By keeping coupling to a minimum a design is more resilient to change imposed by new feature requests or missing requirements[1].

An Interface represents an abstract service. That is, it is the specification of a set of behaviours (operations) that represent a problem that needs to be solved.

An Interface is more than a set of cohesive operations. The Interface can be thought of as a contract […]

Posted in C/C++ Programming, UML | Tagged , , , | 1 Comment