Commit 7a870610 authored by miller86's avatar miller86

changing Init namespace to VisItInit

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@5378 18c085ea-50e0-402c-830e-de6fd14e8384
parent 1a64e508
......@@ -58,8 +58,8 @@
#include <ImproperUseException.h>
#include <DebugStream.h>
#include <Init.h>
#define ScalRen ((!strcmp(Init::GetComponentName(), "engine")) ? 1 : 0)
#include <VisItInit.h>
#define ScalRen ((!strcmp(VisItInit::GetComponentName(), "engine")) ? 1 : 0)
// ****************************************************************************
// Constructor: avtSurfaceAndWireframeRenderer
......
......@@ -46,7 +46,7 @@
#include <ConfiguratingSet.h>
#include <Colors.h>
#include <ExprGrammar.h>
#include <Init.h>
#include <VisItInit.h>
#include <InvalidExpressionException.h>
#include <ParseException.h>
#include <vector>
......@@ -607,7 +607,7 @@ ExprParser::Parse(const std::string &s)
if (errorMessageTarget == EMT_COMPONENT)
{
Init::ComponentIssueError(error);
VisItInit::ComponentIssueError(error);
}
else if (errorMessageTarget == EMT_CONSOLE)
{
......
......@@ -78,8 +78,8 @@ CPPFLAGS=-I. @CPPFLAGS@
##
## Files...
##
SRC=DebugStream.C Init.C VisItException.C TimingsManager.C PTY.C StackTimer.C
HDR=DebugStream.h Init.h VisItException.h TimingsManager.h PTY.h StackTimer.h
SRC=DebugStream.C VisItInit.C VisItException.C TimingsManager.C PTY.C StackTimer.C
HDR=DebugStream.h VisItInit.h VisItException.h TimingsManager.h PTY.h StackTimer.h
OBJ=$(SRC:.C=.o)
LIB=libmisc
......
......@@ -42,7 +42,7 @@
#include <VisItException.h>
#include <DebugStream.h>
#include <Init.h>
#include <VisItInit.h>
// ****************************************************************************
// Method: VisItException constructor
......@@ -89,7 +89,7 @@ VisItException::VisItException(const std::string &m)
filename = "Unknown";
std::string mtmp = std::string(m,0,16);
if (mtmp.find(':') == std::string::npos)
msg = std::string(Init::GetComponentName()) + ": " + m;
msg = std::string(VisItInit::GetComponentName()) + ": " + m;
else
{
if (mtmp.find("avtprep:") == 0 ||
......@@ -101,7 +101,7 @@ VisItException::VisItException(const std::string &m)
mtmp.find("viewer:") == 0)
msg = m;
else
msg = std::string(Init::GetComponentName()) + ": " + m;
msg = std::string(VisItInit::GetComponentName()) + ": " + m;
}
type = "VisItException";
line = -1;
......
......@@ -40,7 +40,7 @@
// Init.C //
// ************************************************************************* //
#include <Init.h>
#include <VisItInit.h>
#include <stdio.h>
#include <stdlib.h>
......@@ -128,7 +128,7 @@ NewHandler(void)
}
// ****************************************************************************
// Function: Init::Initialize
// Function: VisItInit::Initialize
//
// Purpose:
// Parse any common commandline arguments (e.g. "-debug N") and do
......@@ -208,7 +208,7 @@ NewHandler(void)
// ****************************************************************************
void
Init::Initialize(int &argc, char *argv[], int r, int n, bool strip, bool sigs)
VisItInit::Initialize(int &argc, char *argv[], int r, int n, bool strip, bool sigs)
{
// Return if Initialize has already been called.
if(initializeCalled)
......@@ -357,14 +357,14 @@ Init::Initialize(int &argc, char *argv[], int r, int n, bool strip, bool sigs)
}
// ****************************************************************************
// Function: Init::SetComponentName
// Function: VisItInit::SetComponentName
//
// Purpose: Sets the name of the component
//
// ****************************************************************************
void
Init::SetComponentName(const char *cname)
VisItInit::SetComponentName(const char *cname)
{
size_t len;
......@@ -377,7 +377,7 @@ Init::SetComponentName(const char *cname)
}
// ****************************************************************************
// Function: Init::GetComponentName
// Function: VisItInit::GetComponentName
//
// Purpose: Gets the name of the component. Defaults to name of the
// executable of it was not set.
......@@ -385,19 +385,19 @@ Init::SetComponentName(const char *cname)
// ****************************************************************************
const char *
Init::GetComponentName(void)
VisItInit::GetComponentName(void)
{
return (const char *) componentName;
}
// ****************************************************************************
// Function: Init::ComponentNameToID
// Function: VisItInit::ComponentNameToID
//
// Purpose: Return integer index of component name in list of all components
//
// ****************************************************************************
const int
Init::ComponentNameToID(const char *compName)
VisItInit::ComponentNameToID(const char *compName)
{
int n = sizeof(allComponentNames) / sizeof(allComponentNames[0]);
for (int i = 0; i < n; i++)
......@@ -409,13 +409,13 @@ Init::ComponentNameToID(const char *compName)
}
// ****************************************************************************
// Function: Init::ComponentNameToID
// Function: VisItInit::ComponentNameToID
//
// Purpose: Return name of component with given index in list of all components
//
// ****************************************************************************
const char*
Init::ComponentIDToName(const int id)
VisItInit::ComponentIDToName(const int id)
{
int n = sizeof(allComponentNames) / sizeof(allComponentNames[0]);
......@@ -426,35 +426,35 @@ Init::ComponentIDToName(const int id)
}
// ****************************************************************************
// Function: Init::IsComponent
// Function: VisItInit::IsComponent
//
// Purpose: Tests name of component against name passed as argument
//
// ****************************************************************************
bool
Init::IsComponent(const char *compName)
VisItInit::IsComponent(const char *compName)
{
if (strcmp(compName, Init::GetComponentName()) == 0)
if (strcmp(compName, VisItInit::GetComponentName()) == 0)
return true;
else
return false;
}
// ****************************************************************************
// Function: Init::GetExecutableName
// Function: VisItInit::GetExecutableName
//
// Purpose: Gets the name of the executable
//
// ****************************************************************************
const char *
Init::GetExecutableName(void)
VisItInit::GetExecutableName(void)
{
return (const char *) executableName;
}
// ****************************************************************************
// Function: Init::ComponentRegisterErrorFunction
// Function: VisItInit::ComponentRegisterErrorFunction
//
// Purpose:
// Registers an error function.
......@@ -465,7 +465,7 @@ Init::GetExecutableName(void)
// ****************************************************************************
void
Init::ComponentRegisterErrorFunction(ErrorFunction ef, void *args)
VisItInit::ComponentRegisterErrorFunction(ErrorFunction ef, void *args)
{
errorFunctionArgs = args;
errorFunction = ef;
......@@ -473,7 +473,7 @@ Init::ComponentRegisterErrorFunction(ErrorFunction ef, void *args)
// ****************************************************************************
// Function: Init::ComponentIssueError
// Function: VisItInit::ComponentIssueError
//
// Purpose:
// Issues an error message on that component.
......@@ -484,7 +484,7 @@ Init::ComponentRegisterErrorFunction(ErrorFunction ef, void *args)
// ****************************************************************************
void
Init::ComponentIssueError(const char *msg)
VisItInit::ComponentIssueError(const char *msg)
{
debug1 << "Error issued: " << msg << endl;
if (errorFunction != NULL)
......@@ -500,7 +500,7 @@ Init::ComponentIssueError(const char *msg)
// ****************************************************************************
// Method: Init::Finalize
// Method: VisItInit::Finalize
//
// Purpose:
// Calls cleanup functions before the application exits.
......@@ -525,7 +525,7 @@ Init::ComponentIssueError(const char *msg)
// ****************************************************************************
void
Init::Finalize(void)
VisItInit::Finalize(void)
{
// Return if Finalize has already been called.
if(finalizeCalled)
......
......@@ -37,7 +37,7 @@
*****************************************************************************/
// ************************************************************************* //
// Init.h //
// VisItInit.h //
// ************************************************************************* //
#ifndef INIT_H
......
......@@ -49,7 +49,7 @@
#include <ImproperUseException.h>
#include <InvalidDBTypeException.h>
#include <InvalidFilesException.h>
#include <Init.h>
#include <VisItInit.h>
#include <StringHelpers.h>
#include <avtDatabase.h>
......@@ -395,7 +395,7 @@ avtZipWrapperFileFormatInterface::Initialize(int procNum, int procCount,
char procNumStr[32];
SNPRINTF(procNumStr, sizeof(procNumStr), "_%04d", procNum);
tmpDir = tmpDir + "/visitzw_" + userName + "_" +
string(Init::GetComponentName()) +
string(VisItInit::GetComponentName()) +
(procCount > 1 ? string(procNumStr) : "");
debug5 << "ZipWrapper is using \"" << tmpDir << "\" as the temporary directory" << endl;
......@@ -588,7 +588,7 @@ avtZipWrapperFileFormatInterface::~avtZipWrapperFileFormatInterface()
// if this is the last instance we have, finalize the class too
if (objList.size() == 0)
{
debug5 << "Calling finalize on \"" << Init::GetComponentName() << "\"" << endl;
debug5 << "Calling finalize on \"" << VisItInit::GetComponentName() << "\"" << endl;
avtZipWrapperFileFormatInterface::Finalize();
}
}
......
......@@ -71,7 +71,7 @@
# endif
#endif
#include <IncompatibleVersionException.h>
#include <Init.h>
#include <VisItInit.h>
#include <InitVTK.h>
#include <LoadBalancer.h>
#include <LostConnectionException.h>
......@@ -386,12 +386,12 @@ Engine::Initialize(int *argc, char **argv[], bool sigs)
//
// Initialize error logging
//
Init::SetComponentName("engine");
Init::Initialize(*argc, *argv, PAR_Rank(), PAR_Size(), true, sigs);
VisItInit::SetComponentName("engine");
VisItInit::Initialize(*argc, *argv, PAR_Rank(), PAR_Size(), true, sigs);
#else
xfer = new Xfer;
Init::SetComponentName("engine");
Init::Initialize(*argc, *argv, 0,1, true, sigs);
VisItInit::SetComponentName("engine");
VisItInit::Initialize(*argc, *argv, 0,1, true, sigs);
#endif
//
......@@ -463,7 +463,7 @@ Engine::Finalize(void)
// Now null it out; in case the destructor actually *does* get called.
this->renderingDisplay = NULL;
Init::Finalize();
VisItInit::Finalize();
}
// ****************************************************************************
......@@ -1489,7 +1489,7 @@ Engine::ProcessCommandLine(int argc, char **argv)
// Made the engine an object.
//
// Mark C. Miller, Wed Jul 7 11:42:09 PDT 2004
// Made it PAR_Exit() in parallel and call Init::Finalize()
// Made it PAR_Exit() in parallel and call VisItInit::Finalize()
//
// ****************************************************************************
......@@ -1514,7 +1514,7 @@ Engine::AlarmHandler(int signal)
}
}
Init::Finalize();
VisItInit::Finalize();
#ifdef PARALLEL
PAR_Exit();
#endif
......
......@@ -39,7 +39,7 @@
#include <visitstream.h>
#include <VisItException.h>
#include <QvisGUIApplication.h>
#include <Init.h>
#include <VisItInit.h>
// ****************************************************************************
// Function: main
......@@ -91,8 +91,8 @@ main(int argc, char **argv)
TRY
{
// Initialize error logging.
Init::SetComponentName("gui");
Init::Initialize(argc, argv, 0, 1, false);
VisItInit::SetComponentName("gui");
VisItInit::Initialize(argc, argv, 0, 1, false);
TRY
{
......@@ -116,6 +116,6 @@ main(int argc, char **argv)
}
ENDTRY
Init::Finalize();
VisItInit::Finalize();
return retval;
}
......@@ -76,8 +76,8 @@ SILO_LIB=@SILO_LIB@
EXODUS_FLAGS=@EXODUS_FLAGS@
EXODUS_LIBS=@EXODUS_LIBS@
HDF4_FLAGS=@HDF4_FLAGS@
HDF4_LIBS=@HDF4_LIBS@
HDF4_INCLUDE=@HDF4_INCLUDE@
HDF4_LIB=@HDF4_LIB@
HDF5_INCLUDE=@HDF5_INCLUDE@
HDF5_LIB=@HDF5_LIB@
......
......@@ -39,6 +39,9 @@
/* Define if you have the GLEW library. */
#undef HAVE_LIBGLEW
/* Define if you have hdf4. */
#undef HAVE_LIBHDF4
/* Define if you have hdf5. */
#undef HAVE_LIBHDF5
......
../../common/siloobj/BoundaryList.h
\ No newline at end of file
../../common/siloobj_vtk_db/Database_VTK.h
\ No newline at end of file
../../common/siloobj/Field.h
\ No newline at end of file
../../common/siloobj_vtk_db/Field_VTK.h
\ No newline at end of file
../../common/misc/Init.h
\ No newline at end of file
../../common/siloobj/IntervalTree.h
\ No newline at end of file
../../common/siloobj_vtk_db/IntervalTree_VTK.h
\ No newline at end of file
../../common/siloobj/Material.h
\ No newline at end of file
../../common/siloobj/Mesh.h
\ No newline at end of file
../../common/siloobj_vtk_db/MeshTableOfContents.h
\ No newline at end of file
../../common/siloobj_vtk_db/Mesh_VTK.h
\ No newline at end of file
../../common/siloobj/OnionPeel.h
\ No newline at end of file
../../common/siloobj/SiloObjLib.h
\ No newline at end of file
../../common/siloobj_vtk_db/StateTableOfContents.h
\ No newline at end of file
../../common/siloobj/StructuredTopology.h
\ No newline at end of file
../../common/siloobj_vtk_db/TableOfContents.h
\ No newline at end of file
../../common/siloobj/TimeSequence.h
\ No newline at end of file
../../common/siloobj/UnstructuredTopology.h
\ No newline at end of file
../../common/siloobj_vtk_db/UnstructuredTopology_VTK.h
\ No newline at end of file
../../common/siloobj/Value.h
\ No newline at end of file
../../common/siloobj_vtk_db/Value_VTK.h
\ No newline at end of file
link ../../common/misc/VisItInit.h
\ No newline at end of file
../../common/siloobj/siloobj_exports.h
\ No newline at end of file
../../common/siloobj_vtk_db/siloobj_vtk_exports.h
\ No newline at end of file
......@@ -37,7 +37,7 @@
*****************************************************************************/
#include <LauncherApplication.h>
#include <Init.h>
#include <VisItInit.h>
#include <VisItException.h>
#include <DebugStream.h>
......@@ -64,8 +64,8 @@ main(int argc, char *argv[])
int retval = 0;
// Initialize error logging
Init::SetComponentName("launcher");
Init::Initialize(argc, argv);
VisItInit::SetComponentName("launcher");
VisItInit::Initialize(argc, argv);
debug1 << "VisIt component launcher started." << endl;
......
......@@ -37,7 +37,7 @@
*****************************************************************************/
#include <LauncherProxy.h>
#include <stdio.h>
#include <Init.h>
#include <VisItInit.h>
#include <ConnectionGroup.h>
#include <LostConnectionException.h>
......@@ -69,8 +69,8 @@ main(int argc, char *argv[])
std::string launchHost(argv[1]);
// Initialize error logging.
Init::SetComponentName("launcher");
Init::Initialize(argc, argv);
VisItInit::SetComponentName("launcher");
VisItInit::Initialize(argc, argv);
// Create a launcher proxy object.
LauncherProxy *launcher = new LauncherProxy;
......
......@@ -42,7 +42,7 @@
#include <MDServerApplication.h>
#include <DebugStream.h>
#include <TimingsManager.h>
#include <Init.h>
#include <VisItInit.h>
#include <InitVTKNoGraphics.h>
#include <avtDatabase.h>
#include <avtDatabaseFactory.h>
......@@ -153,8 +153,8 @@ main(int argc, char *argv[])
int retval = 0;
// Initialize error logging
Init::SetComponentName("mdserver");
Init::Initialize(argc, argv);
VisItInit::SetComponentName("mdserver");
VisItInit::Initialize(argc, argv);
InitVTKNoGraphics::Initialize();
avtDatabase::SetOnlyServeUpMetaData(true);
......@@ -191,7 +191,7 @@ main(int argc, char *argv[])
ENDTRY
debug1 << "MDSERVER exited." << endl;
Init::Finalize();
VisItInit::Finalize();
return retval;
}
......
......@@ -41,7 +41,7 @@
#include <HostProfile.h>
#include <string>
#include <unistd.h>
#include <Init.h>
#include <VisItInit.h>
#include <avtSIL.h>
#include <cstdlib>
......@@ -95,8 +95,8 @@ main(int argc, char *argv[])
}
// Initialize error logging.
Init::SetComponentName("mdserver");
Init::Initialize(argc, argv);
VisItInit::SetComponentName("mdserver");
VisItInit::Initialize(argc, argv);
MDServerProxy *mdserver = new MDServerProxy();
if(argc > 1)
......
......@@ -39,7 +39,7 @@
#ifndef avtOpenGLCurveRenderer
#include <avtOpenGLCurveRenderer.h>
#else
#include <Init.h>
#include <VisItInit.h>
#endif
#include <vtkPolyData.h>
......
......@@ -39,7 +39,7 @@
#ifndef avtOpenGLLabelRenderer
#include <avtOpenGLLabelRenderer.h>
#else
#include <Init.h>
#include <VisItInit.h>
#endif
#include <arial.h>
......
......@@ -45,7 +45,7 @@
#include <vector>
#include <Init.h>
#include <VisItInit.h>
#include <avtDatabase.h>
#include <avtDatabaseFactory.h>
......@@ -82,8 +82,8 @@ using std::vector;
int
main(int argc, char *argv[])
{
Init::SetComponentName("avtprep");
Init::Initialize(argc, argv, 0, 1, true);
VisItInit::SetComponentName("avtprep");
VisItInit::Initialize(argc, argv, 0, 1, true);
if (argc < 3)
{
......
......@@ -43,7 +43,7 @@
#include <DatabasePluginManager.h>
#include <DatabasePluginInfo.h>
#include <Init.h>
#include <VisItInit.h>
#include <ExprParser.h>
#include <ParsingExprList.h>
......@@ -215,7 +215,7 @@ int main(int argc, char *argv[])
{
int i;
Init::Initialize(argc, argv);
VisItInit::Initialize(argc, argv);
//
// Initialize the plugin readers.
......
......@@ -109,7 +109,7 @@
#include <MDServerProxy.h>
// Includes for plot and operator plugins
#include <Init.h>
#include <VisItInit.h>
#include <PlotPluginManager.h>
#include <OperatorPluginManager.h>
#include <PlotPluginInfo.h>
......@@ -572,8 +572,8 @@ main(int argc, char *argv[])
FILE *f = stdout;
// Initialize
Init::SetComponentName("visitprotocol");
Init::Initialize(argc, argv, 0, 1, true, true);
VisItInit::SetComponentName("visitprotocol");
VisItInit::Initialize(argc, argv, 0, 1, true, true);
// Initialize the plugin managers and load the info plugins.
PlotPluginManager plotPlugins;
......@@ -637,7 +637,7 @@ main(int argc, char *argv[])
DeleteStateObjects(operators);
// Prepare for exit.
Init::Finalize();
VisItInit::Finalize();
return 0;
}
......@@ -87,7 +87,7 @@
#include <DebugStream.h>
#include <Init.h>
#include <VisItInit.h>
#include <algorithm>
#include <set>
......@@ -3242,7 +3242,7 @@ ViewerPlotList::NewPlot(int type, const EngineKey &ek,
// the active variable(s)
//
std::string newVarName = var;
if (var == Init::CatchAllMeshName)
if (var == VisItInit::CatchAllMeshName)
GetMeshVarNameForActivePlots(host, db, newVarName);
//
......
......@@ -82,7 +82,7 @@
#include <GlobalLineoutAttributes.h>
#include <HostProfile.h>
#include <HostProfileList.h>
#include <Init.h>
#include <VisItInit.h>
#include <InitVTK.h>
#include <InteractorAttributes.h>
#include <InvalidVariableException.h>
......@@ -8592,7 +8592,7 @@ ViewerSubject::GetProcessAttributes()
{
ProcessAttributes tmpAtts;
string componentName = Init::ComponentIDToName(GetViewerState()->GetViewerRPC()->GetIntArg1());
string componentName = VisItInit::ComponentIDToName(GetViewerState()->GetViewerRPC()->GetIntArg1());
if (componentName == "engine")
{
const std::string &hostName = GetViewerState()->GetViewerRPC()->GetProgramHost();
......
......@@ -9,7 +9,7 @@
#include <ViewerMethods.h>
#include <DebugStream.h>
#include <Init.h>
#include <VisItInit.h>
#include <InitVTK.h>
#include <PlotPluginManager.h>
#include <PlotPluginInfo.h>
......@@ -49,8 +49,8 @@ static void LogGlxAndXdpyInfo();
void
VisItViewer::Initialize(int *argc, char ***argv)
{
Init::SetComponentName("viewer");
Init::Initialize(*argc, *argv, 0, 1, false);
VisItInit::SetComponentName("viewer");
VisItInit::Initialize(*argc, *argv, 0, 1, false);
LogGlxAndXdpyInfo();
}
......@@ -76,7 +76,7 @@ VisItViewer::Finalize()
delete ViewerBase::GetPlotPluginManager();
delete ViewerBase::GetOperatorPluginManager();
Init::Finalize();
VisItInit::Finalize();
}
// ****************************************************************************
......@@ -100,7 +100,7 @@ VisItViewer::VisItViewer() : visitHome()
//
// Initialize the error logging.
//
Init::ComponentRegisterErrorFunction(ViewerErrorCallback, (void*)viewer);
VisItInit::ComponentRegisterErrorFunction(ViewerErrorCallback, (void*)viewer);
InitVTK::Initialize();
avtCallback::RegisterWarningCallback(ViewerWarningCallback,
(void*)viewer);
......
......@@ -315,7 +315,7 @@ protected:
};
///////////////////////////////////////////////////////////////////////////////
#include <Init.h>
#include <VisItInit.h>
#include <VisItException.h>
// ****************************************************************************
......@@ -340,8 +340,8 @@ int
main(int argc, char *argv[])
{
// Step 1: Initialize error logging.
Init::SetComponentName("proxyexample");
Init::Initialize(argc, argv, 0, 1, false);
VisItInit::SetComponentName("proxyexample");
VisItInit::Initialize(argc, argv, 0, 1, false);
// Step 2: Create the object and enter its Execute method.
PseudocolorVis vis;
......@@ -355,7 +355,7 @@ main(int argc, char *argv[])
ENDTRY
// Step 3: Finalize to close error logging, etc.
Init::Finalize();
VisItInit::Finalize();
}
///////////////////////////////////////////////////////////////////////////////
......
......@@ -57,7 +57,7 @@
#include <GlobalLineoutAttributes.h>
#include <HostProfile.h>
#include <HostProfileList.h>
#include <Init.h>
#include <VisItInit.h>
#include <InteractorAttributes.h>
#include <KeyframeAttributes.h>
#include <LightList.h>
......
......@@ -282,7 +282,7 @@ main(int argc, char *argv[])
{
// Initialize python
Py_Initialize();
PyEval_InitThreads();
PyEval_VisItInit.hreads();
Py_SetProgramName(argv[0]);
PySys_SetArgv(argc, argv);
......
......@@ -73,7 +73,7 @@
#include <OperatorPluginInfo.h>