Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Compiler Index versus ID
MortenMacFly:
--- Quote from: Takeshi Miya on February 06, 2006, 07:16:22 pm ---If this makes it, can the lexers be indexed by a string instead of an ID also?
--- End quote ---
That's actually exactly my suggestion. For me an "ID" is a mixture of numbers and characters... ;-)
Anyway, I've had a look at killerbots' changes. It's quite a big patch but I guess I understood what's going on. I like the way he replaced the "direct indexing" with methods "Get/SetCompiler(By)Id". Thus the ID can be anything and still (if required) the old index to be backward compatible. Looks good to me, it's extensible and flexible.
I'm still trying to apply the path to the current SVN head but there have been really massive changes meanwhile... I guess when I've finished it won't work... A pity that it hasn't been applied any time earlier... :(
Morten.
MortenMacFly:
Replying to myself... :lol:
I just wanted to say that I have just realised that C::B now supports compiler ID's!!! That's absolutley fantastic!!! And I am not gonna tell you that I was still about to apply the patch of killerbot to my latest SVN version... You guys are too fast for me... that makes me feel small... :lol:
But honestly: A very BIG thank you ever so much!
Morten.
yop:
So GetCompilerIndex() has been replaced by GetCompilerID() and I can use CompilerFactory::GetCompiler(CompilerID) instead of CompilerFactory::Compilers[CompilerIndex] (this wasn't good at all ;) but I was using it :))? In general should I consider compiler index obsolete?
mandrav:
In short, yes.
GetCompilerIndex() is left there for accessing the compilers by an index number. But this is only for compiler selection comboboxes etc.
In regular code, compilers should be accessed by ID. This is an automatically set string uniquely identifying each compiler. This doesn't ever change.
Navigation
[0] Message Index
[*] Previous page
Go to full version