]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/dll/example/mangled/my_cpp_plugin.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / dll / example / mangled / my_cpp_plugin.hpp
1 // Copyright 2016 Antony Polukhin.
2 //
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt
5 // or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7 #ifndef BOOST_DLL_MY_CPP_PLUGIN_API_HPP
8 #define BOOST_DLL_MY_CPP_PLUGIN_API_HPP
9
10 //[cppplug
11 #include <string>
12
13 namespace space {
14
15 class BOOST_SYMBOL_EXPORT my_plugin
16 {
17 std::string _name;
18 public:
19 std::string name() const;
20 float calculate(float x, float y);
21 int calculate(int, x, int y);
22 static std::size_t size();
23 my_plugin(const std::string & name);
24 my_plugin();
25 ~my_plugin_api();
26 static int value;
27 };
28
29 }
30 //]
31
32 std::string space::my_plugin_api::name() const {return _name;}
33 float space::my_plugin::calculate(float x, float y) {return x/y;}
34 int space::my_plugin::calculate(int, x, int y) {return x/y;}
35 std::size_t my_plugin::size() {return sizeof(my_plugin);}
36 space::my_plugin::my_plugin(const std::string & name) : _name(name) {}
37 space::my_plugin::my_plugin() : _name("Empty") {}
38 space::my_plugin::~my_plugin_api() {}
39 int space::my_plugin::value = 42;
40
41
42 #endif // BOOST_DLL_MY_PLUGIN_API_HPP
43