CLaygoLib#include "CLaygoLib.h"
The CLaygoLib class encapsulates dynamic loading of the LayGO
API libraries. There should be only one CLaygoLib object in
existence at any time. To enable dynamic loading, compile with the
preprocessor symbol LAYGODYNAMIC defined and create a CLaygoLib
object.
CLaygoLib simplifies dynamic loading into just 2 operations:
If a failure occurs loading the library, a CLaygoLibException is thrown.
This results in the library loading code shown below:
try
{
CLaygoLib laygoLib;
laygoLib.Load(CLaygoLib::LIB_STD);
Process();
laygoLib.Unload();
}
catch (CLaygoLibException & exception)
{
cout << "Failure loading "
<< exception.GetLibDescription()
<< " LayGO API Library '"
<< exception.GetLibName()
<< "': "
<< exception.GetErrorMessage()
<< "."
<< endl;
}