libmoost
/home/mhx/git/github/libmoost/test/pdl/test_interface.h
Go to the documentation of this file.
00001 /* vim:set ts=3 sw=3 sts=3 et: */
00028 #ifndef MOOST_PDL_TEST_INTERFACE_H__
00029 #define MOOST_PDL_TEST_INTERFACE_H__
00030 
00031 #include "../../include/moost/pdl/dynamic_class.h"
00032 
00033 #include <string>
00034 #include <iostream>
00035 
00036 extern "C" void pdl_test_event(const std::string& event);
00037 
00038 struct so_load_watcher
00039 {
00040    so_load_watcher(const std::string& name)
00041       : name(name)
00042    {
00043       pdl_test_event("load " + name);
00044    }
00045 
00046    ~so_load_watcher()
00047    {
00048       pdl_test_event("unload " + name);
00049    }
00050 
00051    const std::string name;
00052 };
00053 
00054 class my_test_interface : public moost::pdl::dynamic_class
00055 {
00056 public:
00057    virtual int do_it() = 0;
00058 };
00059 
00060 #endif