[PEAK] removing adaptions

Gabriel Jägenstedt gabriel.j at telia.com
Mon Oct 25 16:08:12 EDT 2004


Hi!

I've got a system that is meant to be adaptable to different languages.
I've tried several different approaches and have finaly found one that I
think fits the purpose. 

I only use protocols.

Each language that is supported has to create two things. An Interface
and a language module.

The language module provides ILang to show that it's a language and
IEnglish to show that it's the english language. 

Inside the module there resides different adapters EnglishParserAdapter
EnglishCommandAdapter and so on. 
I have gotten everything to work perfectly with a bit of directory
scanning, importing and adapting so that I can call lingo('english',
IParser) and this returns a parser that understands english.

Now comes the problem if one desides to support different languages
during sessions there is already another adapter in play. 
Is there a good way to disable an adapter? Or is my design faulty as per
usual =)

Much obliged.

-- 
//gabriel - a true believer



More information about the PEAK mailing list