]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/dll/example/tutorial4/static_plugin.cpp
1 // Copyright 2014 Renato Tegon Forti, Antony Polukhin.
2 // Copyright 2015-2019 Antony Polukhin.
4 // Distributed under the Boost Software License, Version 1.0.
5 // (See accompanying file LICENSE_1_0.txt
6 // or copy at http://www.boost.org/LICENSE_1_0.txt)
8 //[plugcpp_my_plugin_staic_impl
9 #include "static_plugin.hpp" // this is essential, BOOST_SYMBOL_ALIAS must be seen in this file
11 #include <boost/make_shared.hpp>
14 namespace my_namespace
{
16 class my_plugin_static
: public my_plugin_api
{
19 std::cout
<< "Constructing my_plugin_static" << std::endl
;
22 std::string
name() const {
26 float calculate(float x
, float y
) {
31 std::cout
<< "Destructing my_plugin_static" << std::endl
;
35 boost::shared_ptr
<my_plugin_api
> create_plugin() {
36 return boost::make_shared
<my_plugin_static
>();
39 } // namespace my_namespace