Hello,

I've been using SIP to wrap a closed source binary SDK for Linux I have, with 
quite a bit of success considering I don't know much of C++ (Kudos to the SIP 
team!).

Now I have a slight problem that I'm not sure to address so I'm wondring if 
someone could point me in the right direction.

I have the following signature:

LT_STATUS getDataByIndex(lt_uint32 index, const LTIMetadataRecord*& record) 
const;

Everything here is fine, except for that *& notation which I haven't come 
across before.

The example C++ code does something like this to use this method:

   for (i=0; i<numRecs; i++)
   {
      const LTIMetadataRecord* rec = NULL;
      sts = db.getDataByIndex(i, rec);
      ASSERT(LT_SUCCESS(sts));
      
      dumpRecord(*rec);
   }

The problem for me is that LTIMetadataRecord does NOT have constructors.  So 
I'm not sure what to pass getDataByIndex() for the second parameter.

I tried something like:

record = None
db.getDataByIndex(index, record)
print record

But "record" remains unchanged.  Of course, I can't create an instance of 
LTIMetadataRecord, so I'm not sure how else to go about this.

Any have an idea, or ideally, a recipe? (Or maybe there's an example of 
something like this in PyQT/PyKDE?)

Any help would be much appreciated!

Thanks in advance,

Jean-François Doyon
Data Dissemination Division | Division de la diffusion des données
Data Management and Dissemination Branch | Direction de la gestion et de la 
diffusion des données
Earth Sciences Sector | Secteur des sciences de la Terre
Natural Resources Canada | Ressources naturelles Canada
Ottawa, Canada K1A 0E9
[EMAIL PROTECTED]
Telephone | Téléphone 613-992-4902
Facsimile | Télécopieur 613-947-2410
Teletypewriter | Téléimprimeur 613-996-4397
Government of Canada | Gouvernement du Canada

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to