create wiki

go home go home
  1. about
  2. code
  3. wiki
  4. blog

Script Standalone

From Create Wiki

Jump to: navigation, search

It would be very nice if the Script engine was completely standalone.

There is just one problem: smart pointers. They are defined in Ref.h and Mem.h in Bindable. To fix this, the files somehow have to also be in Script. This poses problems, because other components need to be able to access them from Bindable, and some weirdness could result — especially if the files accidentally diverge.

The best thing to do might be to add some preprocessor macros which determine whether Script should use the files from Bindable or its own source tree. Everywhere that currently includes Bindable.h would include Memory.h, which would include, based on the preprocessor macro, which to use.

Spec and Engine, then, would turn that macro on. Script would leave it off. And somewhere, a (preferably somewhat automated) copy procedure would need to be set up to make sure that the two sources stay identical. Perhaps as an initial build step in Engine?

Personal tools