> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Example.cpp

Example helper functions.

```cpp theme={null}
//
// COPYRIGHT ANSYS. ALL RIGHTS RESERVED.
//
#include "Example.h"

namespace {
 ansys::dpf::DpfError
    LoadPlugin(const std::string &plugin,
 const std::string &pluginName)
    {
        std::string suffix;
        std::string prefix = "";
#ifdef LINUX
        suffix = ".so";
        prefix = "lib";
#else
        suffix = ".dll";
#endif

        std::string path_to_dll = prefix + plugin + suffix;
 char* mapdlName = (char*)path_to_dll.c_str();
 return ansys::dpf::core::loadDpfPlugin(mapdlName, pluginName);
    }
};

ansys::dpf::Examples::FuncPtrs &
ansys::dpf::Examples::GetExampleFuncs() {
 static FuncPtrs exampleFuncs;
 return exampleFuncs;
}

ansys::dpf::Examples::FuncNames &
ansys::dpf::Examples::GetExampleFuncsNames() {
 static FuncNames exampleFuncNames;
 return exampleFuncNames;
}

ansys::dpf::DpfError
ansys::dpf::Examples::LoadMAPDL()
{
 return LoadPlugin("mapdlOperatorsCore", "mapdl");
}
ansys::dpf::DpfError
ansys::dpf::Examples::LoadMESH()
{
 return LoadPlugin("meshOperatorsCore", "mesh");
}
```
