2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-20 14:42:21 +00:00
Files
fiber/libs/extension/benchmarks/hello_world_plain_old.cpp
Oliver Kowalke 39ec793737 initial checkin
2011-02-09 18:41:35 +01:00

38 lines
833 B
C++

/*
* Boost.Extension / hello_world_plain_old benchmark
* hello world plugin implemented in dl* style
*
* (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 "../examples/word.hpp"
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
# define EXPORT_DECL __declspec(dllexport)
#else
# define EXPORT_DECL
#endif
class world : public word
{
public:
virtual const char * get_val(){return "world!";}
};
class hello : public word
{
public:
virtual const char * get_val(){return "hello";}
};
extern "C" void EXPORT_DECL extension_export_words(word **h, word **w)
{
*h = new hello;
*w = new world;
}