I have a simple CPP class storing some configuration of my project.

This class is stored using boost interprocess shared memory, and so can be accessed from different processes running on my server.

Now, I would like to run some tests on my program- so I wish to mock the functionality of my shared-memory-object.
In order to do that with gtest, I've created a base configuration class, which my mock class and my shared memory class will derive from.

In order to use gtest correctly, the base's class functions I would like to mock- **must be virtual**, but according to [boost documentation](https://stackoverflow.com/a/12969510/9623630), the shared memory **can't include virtual functions**, so it's kind of a deadlock.

Example of my Base class:

```
class Configuration {
protected:
    YAML::Node YmlFile_;
public:
    struct System {
    private:
        float num1;
        float num2;
    public:
        virtual ~System(){}
        virtual float GetNum1() const {
            return num1;
        }

        virtual float GetNum2() const {
            return num2;
        }
    struct Logs{
    private:
        float num3;
        float num4;
    public:
        virtual ~Logs(){}
        virtual float GetNum3() const {
            return num3;
        }

        virtual float GetNum4() const {
            return num4;
        }
    Logs logs;
    System system;
    virtual System* GetSystem(){}
    virtual Logs* GetLogs(){}

```

Where on the mocked class I wish to mock the functions to get the structs (GetSystem, GetLogs) and then mock their return values, but still having the ability to holds a 'real' derived class of Configuration that will be saved in the shared memory.

Any ideas..?