Skip to main content
gamedev.net
🔒 Locked

Scripting Engine variables help.

Started by Cyberdrek 0 replies 1.3k views
Original Post
Cyberdrek
Cyberdrek
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 | ]
Cedric
Cedric
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]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.