Having a class, that contains private
member function, I would like to mark as inline
(to explicitely mark my intent of hint that particular function may be inlined), but don't expose their implementation to an API consumer. For simplicity, it might look like:
Airplane.h
:
class Airplane
{
char manufacturer[80];
char mode[80];
// ...
public:
void autopilot_steer_left(int degree);
// ...
private:
// ...
inline bool validate_hydraulic_on_left_wing(); // secret, patent-based, etc.
};
Airplane.cpp
:
#include "Airplane.h"
// ...
void Airplane::autopilot_steer_left(int degree)
{
// ...
}
Where should I put definition of Airplane::validate_hydraulic_on_left_wing
? I know that common place is Airplane.h
(possibly inside class, so it is inline
implicitely), but this contradicts with my intent.