[cig-commits] commit: Adding context as a param to VariableCondition_Register_At
Mercurial
hg at geodynamics.org
Mon Feb 1 15:32:13 PST 2010
changeset: 701:476ea49b3bc7
branch: pcu_rejig
user: JericoRevote
date: Tue Dec 01 12:42:04 2009 +1100
files: Base/Context/src/CompositeVC.c Base/Context/src/VariableCondition_Register.c Base/Context/src/VariableCondition_Register.h
description:
Adding context as a param to VariableCondition_Register_At
for each of the child's _Factory function that then calls its public _New function (passing the context).
diff -r 6137c145d96a -r 476ea49b3bc7 Base/Context/src/CompositeVC.c
--- a/Base/Context/src/CompositeVC.c Mon Nov 30 18:49:29 2009 +1100
+++ b/Base/Context/src/CompositeVC.c Tue Dec 01 12:42:04 2009 +1100
@@ -174,7 +174,7 @@ void _CompositeVC_ReadDictionary( void*
vcEntry = Dictionary_Entry_Value_GetElement(vcList, entry_I);
type = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(vcEntry, "type"));
dictionary = Dictionary_Entry_Value_AsDictionary(vcEntry);
- vc = VariableCondition_Register_CreateNew(variableCondition_Register, self->variable_Register,
+ vc = VariableCondition_Register_CreateNew( self->context, variableCondition_Register, self->variable_Register,
self->conFunc_Register, type, dictionary, self->data );
vc->cf = self->cf;
vc->_readDictionary( vc, dictionary );
@@ -205,7 +205,7 @@ void _CompositeVC_ReadDictionary( void*
vcEntry = Dictionary_Entry_Value_GetElement(vcList, entry_I);
type = Dictionary_Entry_Value_AsString(Dictionary_Entry_Value_GetMember(vcEntry, "type"));
dictionary = Dictionary_Entry_Value_AsDictionary(vcEntry);
- vc = VariableCondition_Register_CreateNew(variableCondition_Register, self->variable_Register,
+ vc = VariableCondition_Register_CreateNew( self->context, variableCondition_Register, self->variable_Register,
self->conFunc_Register, type, dictionary, self->data );
vc->_readDictionary( vc, dictionary );
CompositeVC_Add(self, vc, True);
diff -r 6137c145d96a -r 476ea49b3bc7 Base/Context/src/VariableCondition_Register.c
--- a/Base/Context/src/VariableCondition_Register.c Mon Nov 30 18:49:29 2009 +1100
+++ b/Base/Context/src/VariableCondition_Register.c Tue Dec 01 12:42:04 2009 +1100
@@ -210,16 +210,18 @@ VariableCondition_Register_Entry* _Varia
}
VariableCondition* VariableCondition_Register_CreateNew(
- void* variableCondition_Register,
- void* variable_Register,
- void* conFunc_Register,
- Type type,
- void* dictionary,
- void* data )
+ void* context,
+ void* variableCondition_Register,
+ void* variable_Register,
+ void* conFunc_Register,
+ Type type,
+ void* dictionary,
+ void* data )
{
VariableCondition_Register* self = (VariableCondition_Register*)variableCondition_Register;
return VariableCondition_Register_At( self, VariableCondition_Register_GetIndex( self, type ) )->factory(
+ (AbstractContext*)context,
(Variable_Register*)variable_Register,
(ConditionFunction_Register*)conFunc_Register,
(Dictionary*)dictionary,
diff -r 6137c145d96a -r 476ea49b3bc7 Base/Context/src/VariableCondition_Register.h
--- a/Base/Context/src/VariableCondition_Register.h Mon Nov 30 18:49:29 2009 +1100
+++ b/Base/Context/src/VariableCondition_Register.h Tue Dec 01 12:42:04 2009 +1100
@@ -42,7 +42,7 @@
/* Child classes must define these factories */
- typedef VariableCondition* (VariableCondition_Register_FactoryFunc) ( Variable_Register* variable_Register, ConditionFunction_Register* conFunc_Register, Dictionary* dictionary, void* data );
+ typedef VariableCondition* (VariableCondition_Register_FactoryFunc) ( AbstractContext* context, Variable_Register* variable_Register, ConditionFunction_Register* conFunc_Register, Dictionary* dictionary, void* data );
/** Textual name of this class */
@@ -125,12 +125,13 @@
/* Create a new instance of a type */
VariableCondition* VariableCondition_Register_CreateNew(
- void* variableCondition_Register,
- void* variable_Register,
- void* conFunc_Register,
- Type type,
- void* dictionary,
- void* data );
+ void* context,
+ void* variableCondition_Register,
+ void* variable_Register,
+ void* conFunc_Register,
+ Type type,
+ void* dictionary,
+ void* data );
#endif /* __Base_Automation_VariableCondition_Register_h__ */
More information about the CIG-COMMITS
mailing list