Re: Performer and C++

New Message Reply Date view Thread view Subject view Author view

Nicolas Gauvin (nicolas++at++cae.ca)
Wed, 16 Apr 1997 09:40:08 -0400


On Apr 15, 2:38pm, Robert C Subr wrote:
> I am new at C++ and have a question concerning the PF shared arena. How do I
> setup my user classes so they are defined in the pfsharedarena when the
> operator new is used or deleted from the pfsharedarena when the operator
>-- End of excerpt from Robert C Subr

Deriving your class from a pfObject or a pfStruct or using the PFSTRUCT_DECLARE
macro explained in pfStruct.h will overload the new and delete operators for
shared arena.

class newClass: public pfObject
{
  ...
};

This also gives the features of pfObject to your class such as run-time type id
and reference counting.

or

class newClass {
  PFSTRUCT_DECLARE
};

This only overloads the new/delete operators.

-- 
Nicolas Gauvin			CAE Electronics Ltd., 8585 Cote De Liesse
Software Developer 		Saint-Laurent, Quebec, Canada, H4L-4X4
3-D Graphics Applications	tel: +1 514 341 2000 extension 2275
nicolas++at++cae.ca			fax: +1 514 340 5496
=======================================================================
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:04 PDT

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