Exemplo n.º 1
0
ViewerPlotFactory::ViewerPlotFactory() : ViewerBase()
{

    PlotPluginManager *plotPluginMgr = GetPlotPluginManager();

    nTypes = plotPluginMgr->GetNEnabledPlugins();
    viewerPluginInfo  = new ViewerPlotPluginInfo*[nTypes];

    for (int i = 0; i < nTypes; ++i)
    {
        viewerPluginInfo[i]  = plotPluginMgr->GetViewerPluginInfo(
                                               plotPluginMgr->GetEnabledID(i));
    }
}
Exemplo n.º 2
0
void
VisItDataServerPrivate::Open(int argc, char *argv[])
{
    // Profile to launch the engine in serial on localhost. A parallel
    // launch would include more information in the MachineProfile and 
    // would set the parallel options in the LaunchProfile.
    MachineProfile localhost;
    LaunchProfile  lp;
    lp.SetProfileName("serial");
    lp.SetParallel(false);
    localhost.AddLaunchProfiles(lp);

    // Initialize
    VisItInit::SetComponentName("VisItDataServerPrivate");
    VisItInit::Initialize(argc, argv);

    //
    // Initialize the plugin managers and load the plugins.
    //
    plotPlugins.Initialize(PlotPluginManager::Scripting, false, pluginDir.c_str());
    operatorPlugins.Initialize(OperatorPluginManager::Scripting, false, pluginDir.c_str());
    LoadPluginsNow(plotPlugins);
    LoadPluginsNow(operatorPlugins);

    //
    // Create the mdserver
    //
    mdserver.Create(localhost);
    mdserver.GetMDServerMethods()->LoadPlugins();

    //
    // Create the engine
    //
    engine.Create(localhost);
}
Exemplo n.º 3
0
AttributeSubject *
VisItDataServerPrivate::CreatePlotAttributes(const std::string id)
{
    AttributeSubject *atts = NULL;
    ScriptingPlotPluginInfo *info = plotPlugins.GetScriptingPluginInfo(id);
    if(info != 0)
        atts = info->AllocAttributes();
    return atts;
}
AddPlotAction::AddPlotAction(ViewerWindow *win) : ViewerActionLogic(win),
    graphicalPlugins()
{
    //
    // Iterate through all of the loaded plot plugins and add a
    // choice for all of the ones that have icons.
    //
    ViewerPlotPluginInfo *info = 0;
    PlotPluginManager *pluginMgr = GetPlotPluginManager();
    for(int i = 0; i < pluginMgr->GetNEnabledPlugins(); ++i)
    {
        info = pluginMgr->GetViewerPluginInfo(pluginMgr->GetEnabledID(i));
        if(info)
        {
            if(!GetViewerProperties()->GetNowin() && info->XPMIconData() != 0)
            {
                // Record the plugin entry.
                graphicalPlugins.push_back(i);
            }
        }
    }
}