Re: Q: How to use pfList

New Message Reply Date view Thread view Subject view Author view

Mario Veraart (rioj7++at++fel.tno.nl)
Thu, 15 May 1997 16:28:29 +0200 (MET DST)


> I am a beginner in Performer programming.
> I am trying to use pfList class to build a list of a class.
> Using
> pfList::pfList(int eltSize, int listLength)
> I initialized a list and tried to add an item to the list using
> pfList::add(void* elt).
> But I got a segmentation error message. I cannot figure out why
> and Performer manuals don't seem to have any sample code on using
> pfList. Can somebody give me a pointer to a sample program
> or short sample code on how to use pfList?

If you read the manual page it shows

BUGS
     pfLists currently only support an element size of sizeof(void*).

So you can only put void* in the list. So you have to put pointers to your
class instances in the list and cast the pointer back when you retrieve
an element from the list.

Mario
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:14 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.