OEAddGlobalFragLibΒΆ

bool OEAddGlobalFragLib(const std::string &fraglib_filename,
                        bool replace=true)

Add a fragment library located at fraglib_filename to Omega’s global fragment library. If replace is true, previously existing fragments in the current global fraglib are replaced with the ones from fraglib_filename.

Unlike the fragment libraries loaded by OEOmega.AddFragLib, the global fragment library is accessible to all omega instances. It is most useful in the JAVA programming language to minimize memory usage when running multiple OEOmega instances in threads. Other languages have the default fragment library pre-loaded already.

If you use OEAddGlobalFragLib to load your fragment library, do not use OEOmega.AddFragLib, as this will load the fragment library only into that particular OEOmega instance.

Note

This function is not thread-safe and must be called before starting any threads.