[cig-commits] commit: Renamed Stg_Context_CheckType to Stg_Class_CompareType

Mercurial hg at geodynamics.org
Mon Feb 1 15:32:05 PST 2010


changeset:   694:04ed7ccb7ba8
branch:      pcu_rejig
user:        JericoRevote
date:        Wed Nov 18 16:02:21 2009 +1100
files:       Base/Automation/src/HierarchyTable.c Base/Automation/src/HierarchyTable.h libStGermain/src/main.c
description:
Renamed Stg_Context_CheckType to Stg_Class_CompareType
as this is a generic functionality that can be used to compare/check class types (not just context).


diff -r f9270c6ceb55 -r 04ed7ccb7ba8 Base/Automation/src/HierarchyTable.c
--- a/Base/Automation/src/HierarchyTable.c	Tue Nov 17 15:17:51 2009 +1100
+++ b/Base/Automation/src/HierarchyTable.c	Wed Nov 18 16:02:21 2009 +1100
@@ -126,7 +126,7 @@ void HierarchyTable_PrintChildren( void*
 	Stream_UnIndent( stream );
 }
 
-Bool Stg_Context_CheckType( const void* classPtr, Type possibleParentType ) {
+Bool Stg_Class_CompareType( const void* classPtr, Type possibleParentType ) {
 	Stg_Class* self = (Stg_Class*) classPtr;
 	/* Check if the pointer is null */
 	Journal_Firewall(
diff -r f9270c6ceb55 -r 04ed7ccb7ba8 Base/Automation/src/HierarchyTable.h
--- a/Base/Automation/src/HierarchyTable.h	Tue Nov 17 15:17:51 2009 +1100
+++ b/Base/Automation/src/HierarchyTable.h	Wed Nov 18 16:02:21 2009 +1100
@@ -98,8 +98,8 @@
 	#define Stg_CheckType( classPtr, possibleParentTypedef ) \
 		(possibleParentTypedef*) Stg_Class_CheckType( (classPtr), possibleParentTypedef ## _Type )
 
-	#define Stg_CheckContext( classPtr, possibleParentTypedef ) \
-		(possibleParentTypedef*) Stg_Context_CheckType( (classPtr), possibleParentTypedef ## _Type )
+	#define Stg_CompareType( classPtr, possibleParentTypedef ) \
+		(possibleParentTypedef*) Stg_Class_CompareType( (classPtr), possibleParentTypedef ## _Type )
 
 	#ifdef DEBUG
 		#define Stg_DCheckType Stg_CheckType
@@ -109,7 +109,7 @@
 	#endif
 
 	Stg_Class* Stg_Class_CheckType( const void* classPtr, Type possibleParentType );
-	Bool Stg_Context_CheckType( const void* classPtr, Type possibleParentType );
+	Bool Stg_Class_CompareType( const void* classPtr, Type possibleParentType );
 
 	void HierarchyTable_PrintParents( void* hierarchyTable, Type childType, Stream* stream ) ;
 	void HierarchyTable_PrintChildren( void* hierarchyTable, Type parentType, Stream* stream ) ;
diff -r f9270c6ceb55 -r 04ed7ccb7ba8 libStGermain/src/main.c
--- a/libStGermain/src/main.c	Tue Nov 17 15:17:51 2009 +1100
+++ b/libStGermain/src/main.c	Wed Nov 18 16:02:21 2009 +1100
@@ -89,7 +89,7 @@ Stg_ComponentFactory* stgMainConstruct( 
 	/* Also, this is a little hacky, as nothing is known about the other layers of StG or their associated contexts here */
 	for( component_I = 0; component_I < LiveComponentRegister_GetCount( cf->LCRegister ); component_I++ ) {
 		component = LiveComponentRegister_At( cf->LCRegister, component_I );
-		if( Stg_CheckContext( component, AbstractContext ) ) { 
+		if( Stg_CompareType( component, AbstractContext ) ) { 
 			Journal_Firewall( dictionary->count, Journal_Register( Error_Type, "Error Stream" ), 
 				 "Error in %s: The dictionary is empty, meaning no input parameters have been feed into your program. Perhaps you've forgot to pass any input files ( or command-line arguments ) in.\n", __func__); 	
 			context = (AbstractContext*)component;
@@ -143,7 +143,7 @@ void stgMainLoop( Stg_ComponentFactory* 
 	
 	for( component_i = 0; component_i < LiveComponentRegister_GetCount( cf->LCRegister ); component_i++ ) {
 		component = LiveComponentRegister_At( cf->LCRegister, component_i );
-		if( Stg_CheckContext( component, AbstractContext ) ) { 
+		if( Stg_CompareType( component, AbstractContext ) ) { 
 			context = (AbstractContext*)component;
 			AbstractContext_Dump( context );
 			Stg_Component_Execute( context, 0, True );



More information about the CIG-COMMITS mailing list