sca-c-cpp message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: ISSUE 92: Multi-valued Property retrieval in C
- From: Bryan Aupperle <aupperle@us.ibm.com>
- To: sca-c-cpp@lists.oasis-open.org
- Date: Fri, 31 Jul 2009 11:14:21 -0400
As I was looking at this some more I
had an inspiration. Each of the SCAProperty<T> functions has
a value parameter that is a pointer to the appropriate type. Multi-valued
properties are held in arrays (we are not explicit about this yet, but
the definition of @Property annotation strongly suggest so). The
type of the property in the componentType file would specify the maximum
number of values for the property via a maxOccurs facet. So for a
multi-valued property, the value parameter would be the address of the
array, and SCAProperty<T> would populate the elements of the array
with the configured values (the stride of the array is based on <T>
and the maxLength facet in the case of strings or .size of struct resulting
from the default mapping in the case of complexTypes so the programmer
needs to exercise care if type conversion during property value retrieval).
This needs to be explained in section 2.3
The only interesting scenario that needs
further API clarification is if there are fewer configured values than
there are array elements (the componetType could prevent this by setting
minOccurs = maxOccurs). To handle this, I propose that when SCAProperty<T>
completes with a compCode of SCACC_OK that the returned value of reason
is the number of values set.
If this approach seems reasonable, I
will prepare a full proposal for our next call.
Bryan Aupperle, Ph.D.
STSM, WebSphere Enterprise Platform Software Solution Architect
Research Triangle Park, NC
+1 919-254-7508 (T/L 444-7508)
Internet Address: aupperle@us.ibm.com
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]