#ifndef cathlibcpp_hoistctdtp_H
#define cathlibcpp_hoistctdtp_H

// File:       hoistctdtp.h
// Author:     (c) Miles Sabin, 1997
// Purpose:    protocol class for hoisted constructors/destructors


#ifndef included_stddef_H
#define included_stddef_H
#include <stddef.h>                    // for size_t
#endif

#ifndef cathlibcpp_bool_H
#include "bool.h"
#endif

#ifndef cathlibcpp_config_H
#include "config.h"
#endif


class HoistConstructorDestructorProtocol
{
  public:

    // constructors
    HoistConstructorDestructorProtocol() {}
    virtual ~HoistConstructorDestructorProtocol();

    // accessors
    virtual void construct(void* at, void const* value) const = 0;
    virtual void destroy(void* at) const = 0;

    virtual void assign(void* lhs, void const* rhs) const = 0;

    virtual size_t size() const = 0;

  private:

    // not implemented
    HoistConstructorDestructorProtocol(HoistConstructorDestructorProtocol const&);
    HoistConstructorDestructorProtocol const& operator=(HoistConstructorDestructorProtocol const&);
};

#endif
