🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Scripting Engine variables help.

Started by
0 comments, last by Cyberdrek 21 years, 10 months ago
Ok, the title might be a bit weird but that''s just what I need. I need to figure out how I''d go about implementing a variable system for my Scripting Engine( Oh and btw, the engine works fine, I just need to know how to implement the variables. ) I would prefer if they could have types but I know that it might mean alot of work so just about any GOOD and TOPIC related ideas would be appreciated. Off topic, anybody has a clue why I don''t have code completion when it comes to std::vector( especially since I get it for all the rest of STL )??? Thanks in advance. "DaHjajmajQa''jajHeghmeH!" Cyberdrek danielc@iquebec.com Founder Laval Linux /(bb|[^b]{2})/ that is the Question -- ThinkGeek.com Hash Bang Slash bin Slash Bash -- #!/bin/bash
[Cyberdrek | ]
Advertisement
Use a std::map to implement a symbol look-up table. The key is the name of the variable and the other thing (how is it called already?) would be an object containing the actual value of the variable. That object could even be polymorphic to accomodate the various types, but I'm not sure how hard this will be. I think you'd need a factory to deal with it.

Cédric

[edited by - cedricl on August 6, 2002 9:24:43 PM]

This topic is closed to new replies.

Advertisement