Bool lecode_tools_Init( int* argc, char** argv[] ) { /* This init function tells StGermain of all the component types, etc this module contributes. Because it can be linked at compile time or linked in by a toolbox at runtime, we need to make sure it isn't run twice (compiled in and loaded through a toolbox.*/ if( !ToolboxesManager_IsInitialised( stgToolboxesManager, "lecode_tools" ) ) { int tmp; char* directory; lecode_tools_Base_Init(argc, argv); Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); /* DO NOT CHANGE OR REMOVE */ tmp = Stream_GetPrintingRank( Journal_Register( InfoStream_Type, (Name)"Context" ) ); Stream_SetPrintingRank( Journal_Register( InfoStream_Type, (Name)"Context" ), 0 ); Journal_Printf( /* DO NOT CHANGE OR REMOVE */ Journal_Register( InfoStream_Type, (Name)"Context" ), "lecode_tools. Copyright (C) 2012 Monash University.\n" ); Stream_Flush( Journal_Register( InfoStream_Type, (Name)"Context" ) ); Stream_SetPrintingRank( Journal_Register( InfoStream_Type, (Name)"Context" ), tmp ); /* Add the lecode_tools path to the global xml path dictionary */ directory = Memory_Alloc_Array( char, 200, "xmlDirectory" ) ; sprintf(directory, "%s%s", LIB_DIR, "/StGermain" ); XML_IO_Handler_AddDirectory( "lecode_tools", directory ); Memory_Free(directory); /* Add the plugin path to the global plugin list */ ModulesManager_AddDirectory( "lecode_tools", LIB_DIR ); return True; }
Bool StGermainBase_Init( int* argc, char** argv[] ) { char* directory; int tmp; /* Initialise enough bits and pieces to get IO going */ BaseFoundation_Init( argc, argv ); BaseIO_Init( argc, argv ); /* Write out the copyright message */ Journal_Printf( Journal_Register( DebugStream_Type, "Context" ), "In: %s\n", __func__ ); tmp = Stream_GetPrintingRank( Journal_Register( InfoStream_Type, "Context" ) ); Stream_SetPrintingRank( Journal_Register( InfoStream_Type, "Context" ), 0 ); Stream_Flush( Journal_Register( InfoStream_Type, "Context" ) ); Stream_SetPrintingRank( Journal_Register( InfoStream_Type, "Context" ), tmp ); /* Initialise the remaining bits and pieces */ BaseContainer_Init( argc, argv ); BaseAutomation_Init( argc, argv ); BaseExtensibility_Init( argc, argv ); BaseContext_Init( argc, argv ); /* Add the StGermain path to the global xml path dictionary */ directory = Memory_Alloc_Array( char, 200, "xmlDirectory" ) ; sprintf( directory, "%s%s", LIB_DIR, "/StGermain" ); XML_IO_Handler_AddDirectory( "StGermain", directory ); Memory_Free( directory ); /* Add the plugin path to the global plugin list */ ModulesManager_AddDirectory( "StGermain", LIB_DIR ); return True; }
Bool Geothermal_Init( int* argc, char** argv[] ) { /* * This init function tells StGermain of all the component types, etc this module contributes. * Because it can be linked at compile time or linked in by a toolbox at runtime, we need to make * sure it isn't run twice (compiled in and loaded through a toolbox. */ if( !ToolboxesManager_IsInitialised( stgToolboxesManager, "Geothermal" ) ) { int tmp; char* directory; Geothermal_Base_Init(argc, argv); /* DO NOT CHANGE OR REMOVE */ Journal_Printf( Journal_Register( DebugStream_Type, (Name)"Context" ), "In: %s\n", __func__ ); tmp = Stream_GetPrintingRank( Journal_Register( InfoStream_Type, (Name)"Context" ) ); Stream_SetPrintingRank( Journal_Register( InfoStream_Type, (Name)"Context" ), 0 ); /* DO NOT CHANGE OR REMOVE */ Journal_Printf( Journal_Register( InfoStream_Type, (Name)"Context" ), "Geothermal (Bleeding Edge Geodynamics framework) Revision %s. Copyright (C) 2005 Monash University.\n", VERSION ); /* Add repo indentity info in the repo dictionary. */ Dictionary_Add( versionDict, "Geothermal", Dictionary_Entry_Value_FromString( VERSION ) ); Dictionary_Add( branchDict, "Geothermal", Dictionary_Entry_Value_FromString( BRANCH ) ); Dictionary_Add( pathDict, "Geothermal", Dictionary_Entry_Value_FromString( PATH ) ); Stream_Flush( Journal_Register( InfoStream_Type, (Name)"Context" ) ); Stream_SetPrintingRank( Journal_Register( InfoStream_Type, (Name)"Context" ), tmp ); /* Add the Geothermal path to the global xml path dictionary */ directory = Memory_Alloc_Array( char, 200, "xmlDirectory" ) ; sprintf(directory, "%s%s", LIB_DIR, "/StGermain" ); XML_IO_Handler_AddDirectory( "Geothermal", directory ); Memory_Free(directory); /* Add the plugin path to the global plugin list */ ModulesManager_AddDirectory( "Geothermal", LIB_DIR ); return True; }