chen3feng / toft

C++ Base Library for serverside development
BSD 3-Clause "New" or "Revised" License
341 stars 160 forks source link

Why is HttpHandler's constructor private? #119

Closed huahang closed 10 years ago

huahang commented 10 years ago

It seems it's still not complete yet?

    namespace toft {

    class HttpHandler {
    private:
        HttpHandler();
    public:
        virtual ~HttpHandler() {}
        virtual void HandleRequest(const HttpRequest* req, HttpResponse* resp);
        virtual void HandleGet(const HttpRequest* req, HttpResponse* resp);
        virtual void HandlePost(const HttpRequest* req, HttpResponse* resp);
        virtual void HandlePut(const HttpRequest* req, HttpResponse* resp);
        virtual void HandleHead(const HttpRequest* req, HttpResponse* resp);
        virtual void HandleDelete(const HttpRequest* req, HttpResponse* resp);
        virtual void HandleOptions(const HttpRequest* req, HttpResponse* resp);
        virtual void HandleTrace(const HttpRequest* req, HttpResponse* resp);
        virtual void HandleConnect(const HttpRequest* req, HttpResponse* resp);
    protected:
        void MethodNotAllowed(const HttpRequest* req, HttpResponse* resp);
    private:
    };

    } // namespace toft
chen3feng commented 10 years ago

Not done yet……, should be protected.

huahang commented 10 years ago

I see.

chen3feng commented 10 years ago

:)