T O P I C R E V I E W |
gunvulture |
Posted - Jun 01 2006 : 1:57:26 PM I use #defines to provide easy access to systems in my engine. However, autocomplete flat out doesn't work on them. Here is an example:
template <typename T> class Singleton { <snip> static T& GetSingletonRef(Context* i_pForFutureUse) { return *s_pSingleton; } };
class EngineManager : public Singleton<EngineManager> { <snip> };
#define g_EngineManager EngineManager::GetSingletonRef(0)
Doing "g_EngineManager." shows no members at all.
Doing "g_EngineManager.SomeFunction(" shows a tooltip saying "#define g_EngineManager EngineManager::GetSingletonRef(0)"
Using VAX build 1445. |
3 L A T E S T R E P L I E S (Newest First) |
gunvulture |
Posted - Jun 04 2006 : 5:35:53 PM Ah that appears to be me last time as well. I forgot I already mentioned it, heh. |
swinefeaster |
Posted - Jun 02 2006 : 5:23:01 PM This is also considered bad programming practice by most developers... you should use polymorphism for this.
Regards,
swine |
feline |
Posted - Jun 01 2006 : 5:47:56 PM unfortunately VA does not try to support this sort of thing. it is possible to do some very strange things with macro's, so it is easy to imagine just how complicated this would quickly become.
see supports answer here: http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=4253 |