You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/08/09 12:36:18 UTC

svn commit: r430029 - in /incubator/tuscany/cpp/sca: runtime/core/src/tuscany/sca/model/ModelLoader.cpp samples/BigBank/Accounts/AccountServiceImpl.componentType

Author: jsdelfino
Date: Wed Aug  9 03:36:18 2006
New Revision: 430029

URL: http://svn.apache.org/viewvc?rev=430029&view=rev
Log:
Load default property values from component types

Modified:
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp
    incubator/tuscany/cpp/sca/samples/BigBank/Accounts/AccountServiceImpl.componentType

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp?rev=430029&r1=430028&r2=430029&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/ModelLoader.cpp Wed Aug  9 03:36:18 2006
@@ -429,6 +429,8 @@
 
                     // Get the reference value
                     //Utils::printDO(refs[i], 0);
+                    //TODO this works but probably not the correct way to get
+                    // the simple content value of an element...
                     string refValue = refs[i]->getCString("value");
                     
                     composite->addWire(src, refValue);
@@ -524,9 +526,11 @@
                     }
 
                     const char* defaultValue = 0;
-                    if (props[i]->isSet("default"))
+                    if (props[i]->getSequence() != 0)
                     {
-                        defaultValue = props[i]->getCString("default");
+                        //TODO this works but probably not the correct way to get
+                        // the open content...
+                        defaultValue = props[i]->getSequence()->getCStringValue(0);
                     }
                     
                     component->addProperty(name, type, many, defaultValue);

Modified: incubator/tuscany/cpp/sca/samples/BigBank/Accounts/AccountServiceImpl.componentType
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/BigBank/Accounts/AccountServiceImpl.componentType?rev=430029&r1=430028&r2=430029&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/samples/BigBank/Accounts/AccountServiceImpl.componentType (original)
+++ incubator/tuscany/cpp/sca/samples/BigBank/Accounts/AccountServiceImpl.componentType Wed Aug  9 03:36:18 2006
@@ -30,7 +30,7 @@
 		<interface.cpp header="StockQuoteService.h"/>
 	</reference>
 
-	<property name="currency" type="xs:string"/>
+	<property name="currency" type="xs:string">USD</property>
 
 </componentType>
 	



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org