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