/* * Boost.Extension / multilanguage hello world implementations * * (C) Copyright Mariano G. Consoni 2007 * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * See http://www.boost.org/ for latest version. */ #include #include "word_description.hpp" #include class world : public word { public: virtual const char * get_val(){return "world!";} }; class mundo : public word { public: virtual const char * get_val(){return "mundo!";} }; class monde : public word { public: virtual const char * get_val(){return "monde!";} }; class mondo : public word { public: virtual const char * get_val(){return "mondo!";} }; class hello : public word { public: virtual const char * get_val(){return "hello";} }; class hola : public word { public: virtual const char * get_val(){return "hola";} }; class bonjour : public word { public: virtual const char * get_val(){return "bonjour";} }; class buonasera : public word { public: virtual const char * get_val(){return "buonasera";} }; extern "C" void BOOST_EXTENSION_EXPORT_DECL extension_export_multilanguage_word(boost::extensions::factory_map & fm) { fm.get()[word_description("spanish", "hello")] .set(); fm.get()[word_description("spanish", "world!")] .set(); fm.get()[word_description("french", "hello")] .set(); fm.get()[word_description("french", "world!")] .set(); fm.get()[word_description("italian", "hello")] .set(); fm.get()[word_description("italian", "world!")] .set(); fm.get()[word_description("english", "hello")] .set(); fm.get()[word_description("english", "world!")] .set(); }