[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SOLVED] Re: [Fastcgipp-users] How to stream outside response()?
From: |
Goran |
Subject: |
[SOLVED] Re: [Fastcgipp-users] How to stream outside response()? |
Date: |
Mon, 11 May 2009 23:03:07 +0200 |
I've done it. No need for help regarding this prob.
Goran
Am Montag, den 11.05.2009, 18:45 +0200 schrieb address@hidden:
> Thanks you for your fast answer Eddi.
>
> But still I can't compile my example and/or find the failure. Can you (or
> someone else) take a look at my simplified code below?
>
> Goran
>
> ////////////// Page.hpp
>
> class Page
> {
> public:
> Page(Fastcgipp::Fcgistream<char, std::char_traits<char> > & o);
> virtual ~Page() {}
>
> public:
> void content();
>
> protected:
> Fastcgipp::Fcgistream<char, std::char_traits<char> > & o_;
> };
>
>
> Page::Page(Fastcgipp::Fcgistream<char, std::char_traits<char> > & o) :
> o_(o)
> {
> }
>
> void
> Page::content()
> {
> o_ << "Some stuff.\n";
> }
>
> ////////////// HtmlManager.hpp
>
> // global headers
> #include <fastcgi++/request.hpp>
>
> // local headers
> #include "Page.hpp"
>
> // class declaration
> class HtmlManager : public Fastcgipp::Request<char>
> {
> public:
> virtual ~HtmlManager() {}
>
> private:
> bool response();
> Page page(this->out);
> };
>
> bool
> HtmlManager::response()
> {
> // generate output
> page.content();
>
> return true;
> }
>
> ////////////// Main.cpp
>
> // global headers
> #include <fastcgi++/manager.hpp>
>
> // local headers
> #include "HtmlManager.hpp"
>
> int main()
> {
> Fastcgipp::Manager<HtmlManager> fcgi;
> fcgi.handler();
> }
>
>
>