Binary Comptability Flashcards

1
Q

What is binary compatibility?

A

A program using the older version of a header file continues to work with the newer versions of the header.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is source compatibility?

A

A program works when recompiled but not modifications to the source code are required.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a programs API?

A

Application Programming Interface: The functions, classes, types, etc, that are publicly defined in source code that components outside the program cant use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the application Binary interface do?

A

The same thing as an API but at a binary level.
- The binary interface between two components
- Defines how data structures and routines are accessed in machine code
- The outcome of the compilation process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is binary compatibility in terms of ABI?

A

Keeping the ABI consistent between builds of your program/library

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What can you do in order to be binary compatibile?

A
  • Add new non-virtual functions
  • Add new Enums
  • Reimplement an existing virtual function.
  • Add static members
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What cannot you do if you want to be binary comptabile?

A
  • Change existing function/class member signatures
  • Add a virtual function to a class without any, or add a virtual function a parent virtual class
  • Change the order of virtual functions.
  • Change template arguments
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the PImpI idiom?

A

An approach in which header files store the public API for our class.
A separate implementation-only class handled inner details. The API class stores a Pointer to this separate private implementation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the aim of PImpl?

A

To create a public API for your class that can be consistently defined in its header file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why do PImpl?

A

To avoid large recompilation especially for larger projects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly