#if !defined(TMPLDLL_HPP)
#define TMPLDLL_HPP

#if defined(JUST_APP)
#define TMPL_DECLSPEC
#else
#ifdef TMPLDLL_EXPORTS
#define TMPL_DECLSPEC __declspec(dllexport)
#else
#define TMPL_DECLSPEC __declspec(dllimport)
#endif
#endif

class TMPL_DECLSPEC Base
{
    public:
        virtual bool BaseMethod() = 0;
};

template < class type_t >
class TMPL_DECLSPEC TmplDerived : public Base
{
    public:
        TmplDerived()
        {
            memset( &d_data, 0x0, sizeof(type_t) );
            ::OutputDebugString( "c-tor TmplDerived\n" );
        }

        ~TmplDerived()
        {
            ::OutputDebugString( "d-tor TmplDerived\n" );
        }

        bool BaseMethod()
        {
            ::OutputDebugString( "TmplDerived BaseMethod Implemented\n" );
            return true;
        }

        // type_t* operator->() { return &d_data; }

    private:
        type_t d_data;
};

class TMPL_DECLSPEC SimpleDerived : public Base
{
    public:
        SimpleDerived()
        {
            ::OutputDebugString( "c-tor SimpleDerived\n" );
        }


        ~SimpleDerived()
        {
            ::OutputDebugString( "d-tor SimpleDerived\n" );
        }


        bool BaseMethod()
        {
            ::OutputDebugString( "SimpleDerived BaseMethod Implemented\n" );
            return true;
        }

};

#endif /* TMPLDLL_HPP */