Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Access to Outside Class Definition
#1
Can I access to public class that is defined in another file as public class?
To be more clear, suppose we're producing a bot - factory(somebotcategory, somebotcodefile).
If we want to get remote control to this bot, we need some public class with static member, that is ok, like in exercises.
But when we are working on code, there is no another bot code loaded, therefore compiler gives error.
Is there any way to get class definition from another file visible? I mean something like #include <someheader.h>.
#2
There is no include-like functionality. You just need to load a program with your class definition to some robot. Classes are public and available to other robots. If it's for exercises, you can simply load it to an additional program slot.
"After three days without programming, life becomes meaningless."
~The Tao of Programming
#3
It is for battle code, there is no other bot at the beginning.
#4
I wonder, what if I create a bot code with public class element and factory few bots with this code? That is naming conflict. But logically we should suppose that codes of the bots are just definitions, not instances and should be precompiled before start except factory method, that ruins all the logic. It allows runtime coding, therefore there is no way to precompile all code. Seems there is something like code interpreter not compiler.
Maybe communication via public classes is bad idea?


Forum Jump:


Users browsing this thread: 2 Guest(s)