+#ifdef OCCT_NO_PLUGINS
+//! Mimic pload command by loading pre-defined set of statically linked plugins.
+static Standard_Integer Pload (Draw_Interpretor& theDI,
+ Standard_Integer theNbArgs,
+ const char** theArgVec)
+{
+ NCollection_IndexedMap<TCollection_AsciiString, TCollection_AsciiString> aPlugins;
+ for (Standard_Integer anArgIter = 1; anArgIter < theNbArgs; ++anArgIter)
+ {
+ TCollection_AsciiString anArg (theArgVec[anArgIter]);
+ anArg.UpperCase();
+ if (anArg == "DEFAULT")
+ {
+ aPlugins.Add ("TOPTEST");
+ }
+ else if (anArg == "MODELING")
+ {
+ aPlugins.Add ("TOPTEST");
+ }
+ else if (anArg == "VISUALIZATION")
+ {
+ aPlugins.Add ("AISV");
+ }
+ else if (anArg == "OCAFKERNEL")
+ {
+ aPlugins.Add ("DCAF");
+ }
+ else if (anArg == "DATAEXCHANGEKERNEL")
+ {
+ aPlugins.Add ("XSDRAW");
+ }
+ else if (anArg == "OCAF")
+ {
+ aPlugins.Add ("AISV");
+ aPlugins.Add ("DCAF");
+ }
+ else if (anArg == "DATAEXCHANGE")
+ {
+ aPlugins.Add ("XSDRAW");
+ aPlugins.Add ("XDEDRAW");
+ aPlugins.Add ("AISV");
+ }
+ else if (anArg == "XDE")
+ {
+ aPlugins.Add ("XSDRAW");
+ aPlugins.Add ("XDEDRAW");
+ }
+ else if (anArg == "ALL")
+ {
+ aPlugins.Add ("TOPTEST");
+ aPlugins.Add ("DCAF");
+ aPlugins.Add ("XSDRAW");
+ aPlugins.Add ("XDEDRAW");
+ aPlugins.Add ("AISV");
+ }
+ else
+ {
+ aPlugins.Add (anArg);
+ }
+ }
+
+ for (NCollection_IndexedMap<TCollection_AsciiString, TCollection_AsciiString>::Iterator aPluginIter (aPlugins);
+ aPluginIter.More(); aPluginIter.Next())
+ {
+ const TCollection_AsciiString& aPlugin = aPluginIter.Value();
+ if (aPlugin == "TOPTEST")
+ {
+ BOPTest::Factory (theDI);
+ }
+ else if (aPlugin == "DCAF")
+ {
+ DPrsStd::Factory (theDI);
+ }
+ else if (aPlugin == "AISV")
+ {
+ ViewerTest::Factory (theDI);
+ }
+ #if defined(HAVE_OPENGL)
+ else if (aPlugin == "GL"
+ || aPlugin == "OPENGL")
+ {
+ OpenGlTest::Factory (theDI);
+ }
+ #endif
+ #if defined(HAVE_GLES2)
+ else if (aPlugin == "GLES"
+ || aPlugin == "OPENGLES")
+ {
+ OpenGlTest::Factory (theDI);
+ }
+ #endif
+ else if (aPlugin == "XSDRAW")
+ {
+ XSDRAWSTLVRML::Factory (theDI);
+ }
+ else if (aPlugin == "XDEDRAW")
+ {
+ XDEDRAW::Factory (theDI);
+ }
+ //else if (aPlugin == "TOBJ") { TObjDRAW::Factory (theDI); }
+ //else if (aPlugin == "QACOMMANDS") { QADraw::Factory (theDI); }
+ else
+ {
+ theDI << "Error: unknown plugin '" << aPlugin << "'";
+ return 1;
+ }
+ }
+
+ return 0;
+}
+#endif
+