Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

ajas95

Can templates help generic object debugging?

This topic is 5100 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Basically, I have a system implemented where you can specify an address in memory, a type and a name and it will bring up a menu on-screen that allows you to view and manipulate the value at that address with the joystick. This works fine for absolute addresses, but what I really want to do is to build a debug template for an object class that specifies the interesting parameters using class member pointers... Then generate the on-screen controls for a specific object of that type just by passing the parameter template and an instance pointer. The problem is, I''ve been using void* to specify memory addresses, which has worked fine, but I''m not sure if it''s safe to simply treat the class member pointer as an offset and add it to an instance pointer cast to void*. Plus that''s ugly as hell anyway. So I got to thinking that if I really need the type information to use class member pointers, I should use templates, but I''m not quite sure how.

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!