[cig-commits] r3990 - in long/3D/Gale/trunk/src/StGermain: . Base/Automation/src Base/Foundation/src Base/IO/src

walter at geodynamics.org walter at geodynamics.org
Sun Jul 9 14:36:17 PDT 2006


Author: walter
Date: 2006-07-09 14:36:17 -0700 (Sun, 09 Jul 2006)
New Revision: 3990

Modified:
   long/3D/Gale/trunk/src/StGermain/
   long/3D/Gale/trunk/src/StGermain/Base/Automation/src/DocumentationComponentFactory.c
   long/3D/Gale/trunk/src/StGermain/Base/Automation/src/DocumentationComponentFactory.h
   long/3D/Gale/trunk/src/StGermain/Base/Automation/src/Stg_ComponentFactory.c
   long/3D/Gale/trunk/src/StGermain/Base/Automation/src/Stg_ComponentFactory.h
   long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/CommonRoutines.c
   long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/CommonRoutines.h
   long/3D/Gale/trunk/src/StGermain/Base/IO/src/Dictionary_Entry_Value.c
   long/3D/Gale/trunk/src/StGermain/Base/IO/src/Dictionary_Entry_Value.h
   long/3D/Gale/trunk/src/StGermain/Base/IO/src/shortcuts.c
   long/3D/Gale/trunk/src/StGermain/Base/IO/src/shortcuts.h
Log:
 r2494 at earth:  boo | 2006-07-09 14:30:53 -0700
  r2489 at earth (orig r3669):  PatrickSunter | 2006-07-06 19:52:03 -0700
  Fixing quite a few const-correctness issues in the
  ComponentFactory and Dictionary subsystems.
  
  Means you will no longer get annoying warnings about throwing
  away const status when you pass constant strings etc 
  into these functions.
  
  
 



Property changes on: long/3D/Gale/trunk/src/StGermain
___________________________________________________________________
Name: svk:merge
   - 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2475
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3668
   + 1ef209d2-b310-0410-a72d-e20c9eb0015c:/cig:2494
afb6c753-b9d0-0310-b4e7-dbd8d91cdd35:/trunk/StGermain:3669

Modified: long/3D/Gale/trunk/src/StGermain/Base/Automation/src/DocumentationComponentFactory.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/Automation/src/DocumentationComponentFactory.c	2006-07-09 07:17:03 UTC (rev 3989)
+++ long/3D/Gale/trunk/src/StGermain/Base/Automation/src/DocumentationComponentFactory.c	2006-07-09 21:36:17 UTC (rev 3990)
@@ -168,74 +168,74 @@
 /*--------------------------------------------------------------------------------------------------------------------------
 ** Functions
 */
-double _DocumentationComponentFactory_GetDouble( void* cf, Name componentName, Dictionary_Entry_Key key, double Default ) {
+double _DocumentationComponentFactory_GetDouble( void* cf, Name componentName, Dictionary_Entry_Key key, const double Default ) {
 	DocumentationComponentFactory* self = (DocumentationComponentFactory*) cf;
 	Journal_Printf( self->infoStream, "Parameter - Key '%s' - Type 'double' - ", key );
 	Journal_PrintValue( self->infoStream, Default );
 	return Default;
 }
 
-int _DocumentationComponentFactory_GetInt( void* cf, Name componentName, Dictionary_Entry_Key key, int Default ) {
+int _DocumentationComponentFactory_GetInt( void* cf, Name componentName, Dictionary_Entry_Key key, const int Default ) {
 	DocumentationComponentFactory* self = (DocumentationComponentFactory*) cf;
 	Journal_Printf( self->infoStream, "Parameter - Key '%s' - Type 'int' - ", key );
 	Journal_PrintValue( self->infoStream, Default );
 	return Default;
 }	
 
-unsigned int _DocumentationComponentFactory_GetUnsignedInt( void* cf, Name componentName, Dictionary_Entry_Key key, unsigned int Default ) {
+unsigned int _DocumentationComponentFactory_GetUnsignedInt( void* cf, Name componentName, Dictionary_Entry_Key key, const unsigned int Default ) {
 	DocumentationComponentFactory* self = (DocumentationComponentFactory*) cf;
 	Journal_Printf( self->infoStream, "Parameter - Key '%s' - Type 'unsigned int' - ", key );
 	Journal_PrintValue( self->infoStream, Default );
 	return Default;
 }	
 
-Bool _DocumentationComponentFactory_GetBool( void* cf, Name componentName, Dictionary_Entry_Key key, Bool Default ) {
+Bool _DocumentationComponentFactory_GetBool( void* cf, Name componentName, Dictionary_Entry_Key key, const Bool Default ) {
 	DocumentationComponentFactory* self = (DocumentationComponentFactory*) cf;
 	Journal_Printf( self->infoStream, "Parameter - Key '%s' - Type 'Bool' - ", key );
 	Journal_PrintBool( self->infoStream, Default );
 	return Default;
 }	
 
-char* _DocumentationComponentFactory_GetString( void* cf, Name componentName, Dictionary_Entry_Key key, char* Default ) {
+char* _DocumentationComponentFactory_GetString( void* cf, Name componentName, Dictionary_Entry_Key key, const char* Default ) {
 	DocumentationComponentFactory* self = (DocumentationComponentFactory*) cf;
 	Journal_Printf( self->infoStream, "Parameter - Key '%s' - Type 'string' - ", key );
 	Journal_PrintString( self->infoStream, Default );
-	return Default;
+	return (char*)Default;
 }
 
-double _DocumentationComponentFactory_GetRootDictDouble( void* cf, Dictionary_Entry_Key key, double Default ) {
+double _DocumentationComponentFactory_GetRootDictDouble( void* cf, Dictionary_Entry_Key key, const double Default ) {
 	DocumentationComponentFactory* self = (DocumentationComponentFactory*) cf;
 	Journal_Printf( self->infoStream, "Root Dictionary Parameter - Key '%s' - Type 'double' - ", key );
 	Journal_PrintValue( self->infoStream, Default );
 	return Default;
 }
 
-int _DocumentationComponentFactory_GetRootDictInt( void* cf, Dictionary_Entry_Key key, int Default ) {
+int _DocumentationComponentFactory_GetRootDictInt( void* cf, Dictionary_Entry_Key key, const int Default ) {
 	DocumentationComponentFactory* self = (DocumentationComponentFactory*) cf;
 	Journal_Printf( self->infoStream, "Root Dictionary Parameter - Key '%s' - Type 'int' - ", key );
 	Journal_PrintValue( self->infoStream, Default );
 	return Default;
 }	
 
-unsigned int _DocumentationComponentFactory_GetRootDictUnsignedInt( void* cf, Dictionary_Entry_Key key, unsigned int Default ) {
+unsigned int _DocumentationComponentFactory_GetRootDictUnsignedInt( void* cf, Dictionary_Entry_Key key, const unsigned int Default ) {
 	DocumentationComponentFactory* self = (DocumentationComponentFactory*) cf;
 	Journal_Printf( self->infoStream, "Root Dictionary Parameter - Key '%s' - Type 'unsigned int' - ", key );
 	Journal_PrintValue( self->infoStream, Default );
 	return Default;
 }	
 
-Bool _DocumentationComponentFactory_GetRootDictBool( void* cf, Dictionary_Entry_Key key, Bool Default ) {
+Bool _DocumentationComponentFactory_GetRootDictBool( void* cf, Dictionary_Entry_Key key, const Bool Default ) {
 	DocumentationComponentFactory* self = (DocumentationComponentFactory*) cf;
 	Journal_Printf( self->infoStream, "Root Dictionary Parameter - Key '%s' - Type 'Bool' - ", key );
 	Journal_PrintBool( self->infoStream, Default );
 	return Default;
 }	
 
-char* _DocumentationComponentFactory_GetRootDictString( void* cf, Dictionary_Entry_Key key, char* Default ) {
+char* _DocumentationComponentFactory_GetRootDictString( void* cf, Dictionary_Entry_Key key, const char* const Default ) {
 	DocumentationComponentFactory* self = (DocumentationComponentFactory*) cf;
 	Journal_Printf( self->infoStream, "Root Dictionary Parameter - Key '%s' - Type 'string' - ", key );
 	Journal_PrintString( self->infoStream, Default );
-	return Default;
+	return (char*)Default;
 }
 
 

Modified: long/3D/Gale/trunk/src/StGermain/Base/Automation/src/DocumentationComponentFactory.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/Automation/src/DocumentationComponentFactory.h	2006-07-09 07:17:03 UTC (rev 3989)
+++ long/3D/Gale/trunk/src/StGermain/Base/Automation/src/DocumentationComponentFactory.h	2006-07-09 21:36:17 UTC (rev 3990)
@@ -95,17 +95,17 @@
 	 * that this is a key that points to the root dictionary */
 	Dictionary_Entry_Value* _DocumentationComponentFactory_GetNumericalValue( void* cf, Name componentName, Dictionary_Entry_Key key, Dictionary_Entry_Value* defaultVal ) ;
 
-	double _DocumentationComponentFactory_GetDouble( void* cf, Name componentName, Dictionary_Entry_Key key, double defaultVal ) ;
-	int _DocumentationComponentFactory_GetInt( void* cf, Name componentName, Dictionary_Entry_Key key, int defaultVal ) ;
-	unsigned int _DocumentationComponentFactory_GetUnsignedInt( void* cf, Name componentName, Dictionary_Entry_Key key, unsigned int defaultVal);
-	Bool _DocumentationComponentFactory_GetBool( void* cf, Name componentName, Dictionary_Entry_Key key, Bool defaultVal ) ;
-	char* _DocumentationComponentFactory_GetString( void* cf, Name componentName, Dictionary_Entry_Key key, char* defaultVal ) ;
+	double _DocumentationComponentFactory_GetDouble( void* cf, Name componentName, Dictionary_Entry_Key key, const double defaultVal ) ;
+	int _DocumentationComponentFactory_GetInt( void* cf, Name componentName, Dictionary_Entry_Key key, const int defaultVal ) ;
+	unsigned int _DocumentationComponentFactory_GetUnsignedInt( void* cf, Name componentName, Dictionary_Entry_Key key, const unsigned int defaultVal);
+	Bool _DocumentationComponentFactory_GetBool( void* cf, Name componentName, Dictionary_Entry_Key key, const Bool defaultVal ) ;
+	char* _DocumentationComponentFactory_GetString( void* cf, Name componentName, Dictionary_Entry_Key key, const char* const defaultVal ) ;
 	
-	double _DocumentationComponentFactory_GetRootDictDouble( void* cf, Dictionary_Entry_Key key, double defaultVal ) ;
-	int _DocumentationComponentFactory_GetRootDictInt( void* cf, Dictionary_Entry_Key key, int defaultVal ) ;
-	unsigned int _DocumentationComponentFactory_GetRootDictUnsignedInt( void* cf, Dictionary_Entry_Key key, unsigned int defaultVal);
-	Bool _DocumentationComponentFactory_GetRootDictBool( void* cf, Dictionary_Entry_Key key, Bool defaultVal ) ;
-	char* _DocumentationComponentFactory_GetRootDictString( void* cf, Dictionary_Entry_Key key, char* defaultVal ) ;
+	double _DocumentationComponentFactory_GetRootDictDouble( void* cf, Dictionary_Entry_Key key, const double defaultVal ) ;
+	int _DocumentationComponentFactory_GetRootDictInt( void* cf, Dictionary_Entry_Key key, const int defaultVal ) ;
+	unsigned int _DocumentationComponentFactory_GetRootDictUnsignedInt( void* cf, Dictionary_Entry_Key key, const unsigned int defaultVal);
+	Bool _DocumentationComponentFactory_GetRootDictBool( void* cf, Dictionary_Entry_Key key, const Bool defaultVal ) ;
+	char* _DocumentationComponentFactory_GetRootDictString( void* cf, Dictionary_Entry_Key key, const char* defaultVal ) ;
 
 	Stg_Component* _DocumentationComponentFactory_ConstructByName( void* componentFactory, Name componentName, Type type, Bool isEssential ) ;
 	Stg_Component* _DocumentationComponentFactory_ConstructByKey( void* componentFactory, Name parentComponentName, Dictionary_Entry_Key componentKey, Type type, Bool isEssential ) ;

Modified: long/3D/Gale/trunk/src/StGermain/Base/Automation/src/Stg_ComponentFactory.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/Automation/src/Stg_ComponentFactory.c	2006-07-09 07:17:03 UTC (rev 3989)
+++ long/3D/Gale/trunk/src/StGermain/Base/Automation/src/Stg_ComponentFactory.c	2006-07-09 21:36:17 UTC (rev 3990)
@@ -430,22 +430,22 @@
 			_Stg_ComponentFactory_GetDictionaryValue( cf, componentName, key, 
 				Dictionary_Entry_Value_FromBool( defaultVal ) ) );
 }	
-char* Stg_ComponentFactory_GetString( void* cf, Name componentName, Dictionary_Entry_Key key, char* defaultVal ) {
+char* Stg_ComponentFactory_GetString( void* cf, Name componentName, Dictionary_Entry_Key key, const char* const defaultVal ) {
 	Stg_ComponentFactory* self = (Stg_ComponentFactory*)cf;
 	return self->getString( cf, componentName, key, defaultVal );
 }
-char* _Stg_ComponentFactory_GetString( void* cf, Name componentName, Dictionary_Entry_Key key, char* defaultVal ) {
+char* _Stg_ComponentFactory_GetString( void* cf, Name componentName, Dictionary_Entry_Key key, const char* const defaultVal ) {
 	return Dictionary_Entry_Value_AsString( 
 			_Stg_ComponentFactory_GetDictionaryValue( cf, componentName, key, 
 				Dictionary_Entry_Value_FromString( defaultVal ) ) );
 }
 
 
-double Stg_ComponentFactory_GetRootDictDouble( void* cf, Dictionary_Entry_Key key, double defaultVal ) {
+double Stg_ComponentFactory_GetRootDictDouble( void* cf, Dictionary_Entry_Key key, const double defaultVal ) {
 	Stg_ComponentFactory*    self              = (Stg_ComponentFactory*)cf;
 	return self->getRootDictDouble( self, key, defaultVal );
 }
-double _Stg_ComponentFactory_GetRootDictDouble( void* cf, Dictionary_Entry_Key key, double defaultVal ) {
+double _Stg_ComponentFactory_GetRootDictDouble( void* cf, Dictionary_Entry_Key key, const double defaultVal ) {
 	Stg_ComponentFactory*    self              = (Stg_ComponentFactory*)cf;
 	
 	Journal_PrintfL( self->infoStream, 2, "Getting double from root dictionary with key '%s' and default value '%g'\n",
@@ -454,11 +454,11 @@
 	assert( self->rootDict );
 	return Dictionary_GetDouble_WithDefault( self->rootDict, key, defaultVal );
 }
-int Stg_ComponentFactory_GetRootDictInt( void* cf, Dictionary_Entry_Key key, int defaultVal ) {
+int Stg_ComponentFactory_GetRootDictInt( void* cf, Dictionary_Entry_Key key, const int defaultVal ) {
 	Stg_ComponentFactory*    self              = (Stg_ComponentFactory*)cf;
 	return self->getRootDictInt( self, key, defaultVal );
 }
-int _Stg_ComponentFactory_GetRootDictInt( void* cf, Dictionary_Entry_Key key, int defaultVal ) {
+int _Stg_ComponentFactory_GetRootDictInt( void* cf, Dictionary_Entry_Key key, const int defaultVal ) {
 	Stg_ComponentFactory*    self              = (Stg_ComponentFactory*)cf;
 	
 	Journal_PrintfL( self->infoStream, 2, "Getting int from root dictionary with key '%s' and default value '%d'\n",
@@ -467,11 +467,11 @@
 	assert( self->rootDict );
 	return Dictionary_GetInt_WithDefault( self->rootDict, key, defaultVal );
 }	
-unsigned int Stg_ComponentFactory_GetRootDictUnsignedInt( void* cf, Dictionary_Entry_Key key, unsigned int defaultVal ) {
+unsigned int Stg_ComponentFactory_GetRootDictUnsignedInt( void* cf, Dictionary_Entry_Key key, const unsigned int defaultVal ) {
 	Stg_ComponentFactory*    self              = (Stg_ComponentFactory*)cf;
 	return self->getRootDictUnsignedInt( self, key, defaultVal );
 }
-unsigned int _Stg_ComponentFactory_GetRootDictUnsignedInt( void* cf, Dictionary_Entry_Key key, unsigned int defaultVal ) {
+unsigned int _Stg_ComponentFactory_GetRootDictUnsignedInt( void* cf, Dictionary_Entry_Key key, const unsigned int defaultVal ) {
 	Stg_ComponentFactory*    self              = (Stg_ComponentFactory*)cf;
 	
 	Journal_PrintfL( self->infoStream,2, "Getting unsigned int from root dictionary with key '%s' and default value '%u'\n",
@@ -480,11 +480,11 @@
 	assert( self->rootDict );
 	return Dictionary_GetUnsignedInt_WithDefault( self->rootDict, key, defaultVal );
 }	
-Bool Stg_ComponentFactory_GetRootDictBool( void* cf, Dictionary_Entry_Key key, Bool defaultVal ) {
+Bool Stg_ComponentFactory_GetRootDictBool( void* cf, Dictionary_Entry_Key key, const Bool defaultVal ) {
 	Stg_ComponentFactory*    self              = (Stg_ComponentFactory*)cf;
 	return self->getRootDictBool( self, key, defaultVal );
 }
-Bool _Stg_ComponentFactory_GetRootDictBool( void* cf, Dictionary_Entry_Key key, Bool defaultVal ) {
+Bool _Stg_ComponentFactory_GetRootDictBool( void* cf, Dictionary_Entry_Key key, const Bool defaultVal ) {
 	Stg_ComponentFactory*    self              = (Stg_ComponentFactory*)cf;
 	
 	Journal_PrintfL( self->infoStream, 2, "Getting Bool from root dictionary with key '%s' and default value '%s'\n",
@@ -493,11 +493,11 @@
 	assert( self->rootDict );
 	return Dictionary_GetBool_WithDefault( self->rootDict, key, defaultVal );
 }	
-char* Stg_ComponentFactory_GetRootDictString( void* cf, Dictionary_Entry_Key key, char* defaultVal ) {
+char* Stg_ComponentFactory_GetRootDictString( void* cf, Dictionary_Entry_Key key, const char* const defaultVal ) {
 	Stg_ComponentFactory*    self              = (Stg_ComponentFactory*)cf;
 	return self->getRootDictString( self, key, defaultVal );
 }
-char* _Stg_ComponentFactory_GetRootDictString( void* cf, Dictionary_Entry_Key key, char* defaultVal ) {
+char* _Stg_ComponentFactory_GetRootDictString( void* cf, Dictionary_Entry_Key key, const char* const defaultVal ) {
 	Stg_ComponentFactory*    self              = (Stg_ComponentFactory*)cf;
 
 	Journal_PrintfL( self->infoStream, 2, "Getting string from root dictionary with key '%s' and default value '%s'\n",

Modified: long/3D/Gale/trunk/src/StGermain/Base/Automation/src/Stg_ComponentFactory.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/Automation/src/Stg_ComponentFactory.h	2006-07-09 07:17:03 UTC (rev 3989)
+++ long/3D/Gale/trunk/src/StGermain/Base/Automation/src/Stg_ComponentFactory.h	2006-07-09 21:36:17 UTC (rev 3990)
@@ -42,49 +42,49 @@
 			void*                cf, 
 			Name                 componentName, 
 			Dictionary_Entry_Key key, 
-			double               defaultVal );
+			const double         defaultVal );
 	typedef int (Stg_ComponentFactory_GetIntFunc) ( 
 			void*                cf, 
 			Name                 componentName, 
 			Dictionary_Entry_Key key, 
-			int                  defaultVal );
+			const int            defaultVal );
 	typedef unsigned int (Stg_ComponentFactory_GetUnsignedIntFunc) (
 			void*                cf, 
 			Name                 componentName, 
 			Dictionary_Entry_Key key, 
-			unsigned int         defaultVal);
+			const unsigned int   defaultVal);
 	typedef Bool (Stg_ComponentFactory_GetBoolFunc) ( 
 			void*                cf, 
 			Name                 componentName, 
 			Dictionary_Entry_Key key, 
-			Bool                 defaultVal );
+			const Bool           defaultVal );
 	typedef char* (Stg_ComponentFactory_GetStringFunc) ( 
 			void*                cf, 
 			Name                 componentName, 
 			Dictionary_Entry_Key key, 
-			char*                defaultVal ) ;
+			const char*          defaultVal ) ;
 
 	
 	typedef double (Stg_ComponentFactory_GetRootDictDoubleFunc) (
 			void*                cf, 
 			Dictionary_Entry_Key key, 
-			double               defaultVal );
+			const double         defaultVal );
 	typedef int (Stg_ComponentFactory_GetRootDictIntFunc) ( 
 			void*                cf, 
 			Dictionary_Entry_Key key, 
-			int                  defaultVal );
+			const int            defaultVal );
 	typedef unsigned int (Stg_ComponentFactory_GetRootDictUnsignedIntFunc) (
 			void*                cf, 
 			Dictionary_Entry_Key key, 
-			unsigned int         defaultVal);
+			const unsigned int   defaultVal);
 	typedef Bool (Stg_ComponentFactory_GetRootDictBoolFunc) ( 
 			void*                cf, 
 			Dictionary_Entry_Key key, 
-			Bool                 defaultVal );
+			const Bool           defaultVal );
 	typedef char* (Stg_ComponentFactory_GetRootDictStringFunc) ( 
 			void*                cf, 
 			Dictionary_Entry_Key key, 
-			char*                defaultVal ) ;
+			const char*          defaultVal ) ;
 
 	typedef Stg_Component* (Stg_ComponentFactory_ConstructByNameFunc) ( 
 			void*                cf, 
@@ -207,27 +207,27 @@
 	 * that this is a key that points to the root dictionary */
 	Dictionary_Entry_Value* _Stg_ComponentFactory_GetNumericalValue( void* cf, Name componentName, Dictionary_Entry_Key key, Dictionary_Entry_Value* defaultVal ) ;
 
-	double Stg_ComponentFactory_GetDouble( void* cf, Name componentName, Dictionary_Entry_Key key, double defaultVal ) ;
-	double _Stg_ComponentFactory_GetDouble( void* cf, Name componentName, Dictionary_Entry_Key key, double defaultVal ) ;
-	int Stg_ComponentFactory_GetInt( void* cf, Name componentName, Dictionary_Entry_Key key, int defaultVal ) ;
-	int _Stg_ComponentFactory_GetInt( void* cf, Name componentName, Dictionary_Entry_Key key, int defaultVal ) ;
-	unsigned int Stg_ComponentFactory_GetUnsignedInt( void* cf, Name componentName, Dictionary_Entry_Key key, unsigned int defaultVal);
-	unsigned int _Stg_ComponentFactory_GetUnsignedInt( void* cf, Name componentName, Dictionary_Entry_Key key, unsigned int defaultVal);
-	Bool Stg_ComponentFactory_GetBool( void* cf, Name componentName, Dictionary_Entry_Key key, Bool defaultVal ) ;
-	Bool _Stg_ComponentFactory_GetBool( void* cf, Name componentName, Dictionary_Entry_Key key, Bool defaultVal ) ;
-	char* Stg_ComponentFactory_GetString( void* cf, Name componentName, Dictionary_Entry_Key key, char* defaultVal ) ;
-	char* _Stg_ComponentFactory_GetString( void* cf, Name componentName, Dictionary_Entry_Key key, char* defaultVal ) ;
+	double Stg_ComponentFactory_GetDouble( void* cf, Name componentName, Dictionary_Entry_Key key, const double defaultVal ) ;
+	double _Stg_ComponentFactory_GetDouble( void* cf, Name componentName, Dictionary_Entry_Key key, const double defaultVal ) ;
+	int Stg_ComponentFactory_GetInt( void* cf, Name componentName, Dictionary_Entry_Key key, const int defaultVal ) ;
+	int _Stg_ComponentFactory_GetInt( void* cf, Name componentName, Dictionary_Entry_Key key, const int defaultVal ) ;
+	unsigned int Stg_ComponentFactory_GetUnsignedInt( void* cf, Name componentName, Dictionary_Entry_Key key, const unsigned int defaultVal);
+	unsigned int _Stg_ComponentFactory_GetUnsignedInt( void* cf, Name componentName, Dictionary_Entry_Key key, const unsigned int defaultVal);
+	Bool Stg_ComponentFactory_GetBool( void* cf, Name componentName, Dictionary_Entry_Key key, const Bool defaultVal ) ;
+	Bool _Stg_ComponentFactory_GetBool( void* cf, Name componentName, Dictionary_Entry_Key key, const Bool defaultVal ) ;
+	char* Stg_ComponentFactory_GetString( void* cf, Name componentName, Dictionary_Entry_Key key, const char* const defaultVal ) ;
+	char* _Stg_ComponentFactory_GetString( void* cf, Name componentName, Dictionary_Entry_Key key, const char* const defaultVal ) ;
 
-	double Stg_ComponentFactory_GetRootDictDouble( void* cf, Dictionary_Entry_Key key, double defaultVal ) ;
-	double _Stg_ComponentFactory_GetRootDictDouble( void* cf, Dictionary_Entry_Key key, double defaultVal ) ;
-	int Stg_ComponentFactory_GetRootDictInt( void* cf, Dictionary_Entry_Key key, int defaultVal ) ;
-	int _Stg_ComponentFactory_GetRootDictInt( void* cf, Dictionary_Entry_Key key, int defaultVal ) ;
-	unsigned int Stg_ComponentFactory_GetRootDictUnsignedInt( void* cf, Dictionary_Entry_Key key, unsigned int defaultVal);
-	unsigned int _Stg_ComponentFactory_GetRootDictUnsignedInt( void* cf, Dictionary_Entry_Key key, unsigned int defaultVal);
-	Bool Stg_ComponentFactory_GetRootDictBool( void* cf, Dictionary_Entry_Key key, Bool defaultVal ) ;
-	Bool _Stg_ComponentFactory_GetRootDictBool( void* cf, Dictionary_Entry_Key key, Bool defaultVal ) ;
-	char* Stg_ComponentFactory_GetRootDictString( void* cf, Dictionary_Entry_Key key, char* defaultVal ) ;
-	char* _Stg_ComponentFactory_GetRootDictString( void* cf, Dictionary_Entry_Key key, char* defaultVal ) ;
+	double Stg_ComponentFactory_GetRootDictDouble( void* cf, Dictionary_Entry_Key key, const double defaultVal ) ;
+	double _Stg_ComponentFactory_GetRootDictDouble( void* cf, Dictionary_Entry_Key key, const double defaultVal ) ;
+	int Stg_ComponentFactory_GetRootDictInt( void* cf, Dictionary_Entry_Key key, const int defaultVal ) ;
+	int _Stg_ComponentFactory_GetRootDictInt( void* cf, Dictionary_Entry_Key key, const int defaultVal ) ;
+	unsigned int Stg_ComponentFactory_GetRootDictUnsignedInt( void* cf, Dictionary_Entry_Key key, const unsigned int defaultVal);
+	unsigned int _Stg_ComponentFactory_GetRootDictUnsignedInt( void* cf, Dictionary_Entry_Key key, const unsigned int defaultVal);
+	Bool Stg_ComponentFactory_GetRootDictBool( void* cf, Dictionary_Entry_Key key, const Bool defaultVal ) ;
+	Bool _Stg_ComponentFactory_GetRootDictBool( void* cf, Dictionary_Entry_Key key, const Bool defaultVal ) ;
+	char* Stg_ComponentFactory_GetRootDictString( void* cf, Dictionary_Entry_Key key, const char* defaultVal ) ;
+	char* _Stg_ComponentFactory_GetRootDictString( void* cf, Dictionary_Entry_Key key, const char* defaultVal ) ;
 
 	#define Stg_ComponentFactory_ConstructByName( cf, componentName, type, isEssential ) \
 		(type*) ( (Stg_ComponentFactory*) cf )->constructByName( cf, componentName, type ## _Type, isEssential )

Modified: long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/CommonRoutines.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/CommonRoutines.c	2006-07-09 07:17:03 UTC (rev 3989)
+++ long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/CommonRoutines.c	2006-07-09 21:36:17 UTC (rev 3990)
@@ -68,7 +68,7 @@
 	
 
 
-char* StG_Strdup( char* str ) {
+char* StG_Strdup( const char* const str ) {
 	int length;
 	char* result;
 

Modified: long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/CommonRoutines.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/CommonRoutines.h	2006-07-09 07:17:03 UTC (rev 3989)
+++ long/3D/Gale/trunk/src/StGermain/Base/Foundation/src/CommonRoutines.h	2006-07-09 21:36:17 UTC (rev 3990)
@@ -49,7 +49,7 @@
 	unsigned int StG_IntegerLength( int number );
 
 	/** StGermain's version of strdup() which uses Memory Module */
-	char* StG_Strdup( char* str );
+	char* StG_Strdup( const char* const str );
 
 	/** StGermain's version of asprintf which allocates enough space for a string before printing to it */
 	int Stg_asprintf( char** string, char* format, ... ) ;

Modified: long/3D/Gale/trunk/src/StGermain/Base/IO/src/Dictionary_Entry_Value.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/IO/src/Dictionary_Entry_Value.c	2006-07-09 07:17:03 UTC (rev 3989)
+++ long/3D/Gale/trunk/src/StGermain/Base/IO/src/Dictionary_Entry_Value.c	2006-07-09 21:36:17 UTC (rev 3990)
@@ -51,7 +51,7 @@
 static void Dictionary_Entry_Value_SetValueInt( Dictionary_Entry_Value* self, unsigned int value );
 static void Dictionary_Entry_Value_SetValueDouble( Dictionary_Entry_Value* self, double value );
 static void Dictionary_Entry_Value_SetValueUnsignedLong( Dictionary_Entry_Value* self, unsigned long value );
-static void Dictionary_Entry_Value_SetValueString( Dictionary_Entry_Value* self, char* value );
+static void Dictionary_Entry_Value_SetValueString( Dictionary_Entry_Value* self, const char* const value );
 static void Dictionary_Entry_Value_SetValueBool( Dictionary_Entry_Value* self, Bool value );
 static void Dictionary_Entry_Value_SetValueNewStruct( Dictionary_Entry_Value* self);
 static void Dictionary_Entry_Value_SetValueStruct( Dictionary_Entry_Value* self, void* value );
@@ -132,7 +132,7 @@
 	self->type = Dictionary_Entry_Value_Type_UnsignedLong;
 }
 
-Dictionary_Entry_Value* Dictionary_Entry_Value_FromString( char* value ) {
+Dictionary_Entry_Value* Dictionary_Entry_Value_FromString( const char* const value ) {
 	Dictionary_Entry_Value* self = Memory_Alloc( Dictionary_Entry_Value, "Entry Value String" );
 	
 	Dictionary_Entry_Value_InitFromString( self, value );
@@ -140,12 +140,12 @@
 	return self;
 }
 	
-void Dictionary_Entry_Value_InitFromString( Dictionary_Entry_Value* self, char* value ) {
+void Dictionary_Entry_Value_InitFromString( Dictionary_Entry_Value* self, const char* const value ) {
 	Dictionary_Entry_Value_SetValueString( self, value );
 	self->next = 0;
 }
 
-static void Dictionary_Entry_Value_SetValueString( Dictionary_Entry_Value* self, char* value ) {
+static void Dictionary_Entry_Value_SetValueString( Dictionary_Entry_Value* self, const char* const value ) {
 	self->as.typeString = StG_Strdup( value );
 	self->type = Dictionary_Entry_Value_Type_String;
 }

Modified: long/3D/Gale/trunk/src/StGermain/Base/IO/src/Dictionary_Entry_Value.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/IO/src/Dictionary_Entry_Value.h	2006-07-09 07:17:03 UTC (rev 3989)
+++ long/3D/Gale/trunk/src/StGermain/Base/IO/src/Dictionary_Entry_Value.h	2006-07-09 21:36:17 UTC (rev 3990)
@@ -115,8 +115,8 @@
 	void                    Dictionary_Entry_Value_InitFromUnsignedLong( Dictionary_Entry_Value* self, unsigned long value );
 	
 	/** Create a value from a string */
-	Dictionary_Entry_Value* Dictionary_Entry_Value_FromString( char* value );
-	void                    Dictionary_Entry_Value_InitFromString( Dictionary_Entry_Value* self, char* value );
+	Dictionary_Entry_Value* Dictionary_Entry_Value_FromString( const char* const value );
+	void                    Dictionary_Entry_Value_InitFromString( Dictionary_Entry_Value* self, const char* const value );
 	
 	/** Create a dictionary entry value of the specified type from the specified string */
 	Dictionary_Entry_Value* Dictionary_Entry_Value_FromStringTo( char* value, char type );

Modified: long/3D/Gale/trunk/src/StGermain/Base/IO/src/shortcuts.c
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/IO/src/shortcuts.c	2006-07-09 07:17:03 UTC (rev 3989)
+++ long/3D/Gale/trunk/src/StGermain/Base/IO/src/shortcuts.c	2006-07-09 21:36:17 UTC (rev 3990)
@@ -45,37 +45,37 @@
 #include "Journal.h"
 
 
-int Dictionary_GetUnsignedInt_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, unsigned int defaultVal ) {
+int Dictionary_GetUnsignedInt_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, const unsigned int defaultVal ) {
 	return	Dictionary_Entry_Value_AsUnsignedInt( 
 		Dictionary_GetDefault( dictionary, key, 
 		Dictionary_Entry_Value_FromUnsignedInt( defaultVal ) ) );
 }
 
-int Dictionary_GetInt_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, int defaultVal ) {
+int Dictionary_GetInt_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, const int defaultVal ) {
 	return	Dictionary_Entry_Value_AsInt( 
 		Dictionary_GetDefault( dictionary, key, 
 		Dictionary_Entry_Value_FromInt( defaultVal ) ) );
 }
-double Dictionary_GetDouble_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, double defaultVal ) {
+double Dictionary_GetDouble_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, const double defaultVal ) {
 	return	Dictionary_Entry_Value_AsDouble( 
 		Dictionary_GetDefault( dictionary, key, 
 		Dictionary_Entry_Value_FromDouble( defaultVal ) ) );
 }
 
-float Dictionary_GetFloat_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, float defaultVal ) {
+float Dictionary_GetFloat_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, const float defaultVal ) {
 	return	(float) Dictionary_Entry_Value_AsDouble( 
 		Dictionary_GetDefault( dictionary, key, 
 		Dictionary_Entry_Value_FromDouble( (double)defaultVal ) ) );
 }
 
 
-Bool Dictionary_GetBool_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, Bool defaultVal ) {
+Bool Dictionary_GetBool_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, const Bool defaultVal ) {
 	return	Dictionary_Entry_Value_AsBool( 
 		Dictionary_GetDefault( dictionary, key, 
 		Dictionary_Entry_Value_FromBool( defaultVal ) ) );
 }
 
-char* Dictionary_GetString_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, char* defaultVal ) {
+char* Dictionary_GetString_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, const char* const defaultVal ) {
 	return	Dictionary_Entry_Value_AsString( 
 		Dictionary_GetDefault( dictionary, key, 
 		Dictionary_Entry_Value_FromString( defaultVal ) ) );

Modified: long/3D/Gale/trunk/src/StGermain/Base/IO/src/shortcuts.h
===================================================================
--- long/3D/Gale/trunk/src/StGermain/Base/IO/src/shortcuts.h	2006-07-09 07:17:03 UTC (rev 3989)
+++ long/3D/Gale/trunk/src/StGermain/Base/IO/src/shortcuts.h	2006-07-09 21:36:17 UTC (rev 3990)
@@ -73,17 +73,17 @@
 	/* shortcuts to easily get a value from the dictionary, using a default
 	if not found, and converting it to the correct type */
 
-	int	Dictionary_GetUnsignedInt_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, unsigned int defaultVal );
+	int	Dictionary_GetUnsignedInt_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, const unsigned int defaultVal );
 	
-	int	Dictionary_GetInt_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, int defaultVal );
+	int	Dictionary_GetInt_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, const int defaultVal );
 
-	double	Dictionary_GetDouble_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, double defaultVal );
+	double	Dictionary_GetDouble_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, const double defaultVal );
 	
-	float	Dictionary_GetFloat_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, float defaultVal );
+	float	Dictionary_GetFloat_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, const float defaultVal );
 	
-	Bool	Dictionary_GetBool_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, Bool defaultVal );
+	Bool	Dictionary_GetBool_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, const Bool defaultVal );
 
-	char*	Dictionary_GetString_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, char* defaultVal );
+	char*	Dictionary_GetString_WithDefault( Dictionary* dictionary, Dictionary_Entry_Key key, const char* const defaultVal );
 
 	/** Wrapper to Dictionary_GetString_WithDefault which creates a string using sprintf */
 	char* Dictionary_GetString_WithPrintfDefault( Dictionary* dictionary, Dictionary_Entry_Key key, char* format, ... ) ;



More information about the cig-commits mailing list