On 14/12/06, Yang ZHONG <[EMAIL PROTECTED]> wrote:
if (seqProperty.isMany()) { int index = sequence->getListIndex(i); dob = dataObject->getList(seqProperty)[index]; } else { dob = dataObject->getDataObject(seqProperty); } might have an alternative: dob = sequence->getDataObject(i)
Correct. I recall making the same simplification in some code recently... can't remember where though ;-) The code in CopyHelper and SDOXMLWriter use the longer method but I'm sure dob = sequence->getDataObject(i) will work. Cheers, On 12/14/06, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:
> > I just committed in > cpp/sca/runtime/core/src/tuscany/sca/util/SDOUtils.cpp a rough > implementation of an SDOVisitor and an SDOUtils.accept(DataObject, > SDOVisitor...) method that I hope will be useful to navigate an SDO graph. > > This class is still very rough, but could some of our SDO experts take a > quick look at this code and see if it's on the right path to enumerate > and extract all the data under an SDO DataObject? > > There are probably many bugs, there is no support for recursion yet, but > I'd like to make sure that the algorithm will cover all the SDO patterns > with instance properties, lists, sequences, open content or not, etc. > that can exist under a DataObject. > > Thanks. > > -- > Jean-Sebastien > > -- > > Yang ZHONG
-- Pete