Valid reference counting programming?

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Valid reference counting programming?

Post by Halifax »

Here is the background. I want to make a engine-wide change in which every single thing is affected so that it contains a method such playAudio() (that's a joke).

My question being, is this a good reference counting programming practice to change the reference counting class, and add in this method? Or should I find another method, such as implementing my engine-wide methods in another class, and having every class that inherits from IUnknown, also inherit from IStateWideChange?

(Really, I know at the end of the day I could do whatever I want, but I would just like to know which method is preferred.)
TheQuestion = 2B || !2B
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

I don't think you should change IReferenceCounted class because that class has a special purpose and should not exceed it by adding features (methods).
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

I guess you are correct, but I just find it a total waste of time to write another class, and then have to go through all the files and modify them to inherit from it. But it's okay I guess, I will just use 'find and replace'.
TheQuestion = 2B || !2B
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

I suggest you turn off your targeting computer and trust your instincts.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Post Reply