[cig-commits] commit: Adding a routine to get a string from a plugin dict.

Mercurial hg at geodynamics.org
Mon Feb 1 15:33:17 PST 2010


changeset:   750:b8203aa9fb79
branch:      pcu_rejig
user:        LukeHodkinson at localhost.localdomain
date:        Tue Dec 22 09:14:44 2009 +1100
files:       Base/Automation/src/Stg_ComponentFactory.c Base/Automation/src/Stg_ComponentFactory.h
description:
Adding a routine to get a string from a plugin dict.


diff -r c18ef39dbe21 -r b8203aa9fb79 Base/Automation/src/Stg_ComponentFactory.c
--- a/Base/Automation/src/Stg_ComponentFactory.c	Mon Dec 21 15:47:06 2009 +1100
+++ b/Base/Automation/src/Stg_ComponentFactory.c	Tue Dec 22 09:14:44 2009 +1100
@@ -911,6 +911,12 @@ Bool Stg_ComponentFactory_PluginGetBool(
                                                                 Dictionary_Entry_Value_FromBool( defaultVal ) ) );
 }
 
+char* Stg_ComponentFactory_PluginGetString( void* cf, void* codelet, Dictionary_Entry_Key key, const char* const defaultVal ) {
+	return Dictionary_Entry_Value_AsString( 
+            _Stg_ComponentFactory_PluginGetDictionaryValue( cf, codelet, key,
+                                                            Dictionary_Entry_Value_FromString( defaultVal ) ) );
+}
+
 Stg_Component* _Stg_ComponentFactory_ConstructByNameWithKeyFallback( 
 		void*			cf, 
 		Name 			parentComponentName, 
diff -r c18ef39dbe21 -r b8203aa9fb79 Base/Automation/src/Stg_ComponentFactory.h
--- a/Base/Automation/src/Stg_ComponentFactory.h	Mon Dec 21 15:47:06 2009 +1100
+++ b/Base/Automation/src/Stg_ComponentFactory.h	Tue Dec 22 09:14:44 2009 +1100
@@ -292,6 +292,8 @@
 
 	Bool Stg_ComponentFactory_PluginGetBool( void* cf, void *codelet, Dictionary_Entry_Key key, Bool defaultVal );
 
+        char* Stg_ComponentFactory_PluginGetString( void* cf, void* codelet, Dictionary_Entry_Key key, const char* const defaultVal );
+
 	#define Stg_ComponentFactory_ConstructByNameWithKeyFallback( \
 		cf, parentComponentName, componentTrialName, componentFallbackKey, type, isEssential, data ) \
 		(type*) ( (Stg_ComponentFactory*) cf )->constructByNameWithKeyFallback( \



More information about the CIG-COMMITS mailing list