On Mon, 2008-08-11 at 11:45 +0100, Andrew Stitcher wrote:
> On Fri, 2008-08-08 at 14:15 -0400, Steve Huston wrote:
> > I've been working on the C++ broker/client port to Windows. At this
> > point, I'm working on the broker and have a question on how the
> > authors would like me to handle something.
> > 
> > Right now, the broker is arranged as a main program (qpidd.cpp) that
> > links with a shared library (libqpidbroker, and common). The main
> > program is in cpp/src/qpidd.cpp and the libqpidbroker code is
> > primarily in cpp/src/qpid/broker
> > 
> > The qpidd.cpp program has a significant chunk of posix-specific code
> > that has to change for Windows. In particular, options processing and
> > daemon usage. I was thinking to do this:
> > 
> > - Split the posix-specific code out to qpidd_posix.cpp, and make a
> > qpidd_windows.cpp with the Windows-specific pieces.
> > 
> > - The split may be helped by something like qpidd.h so the different
> > platforms implement the same class/API.
> > 
> > At this point, I'm wondering if the qpidd.cpp and related files should
> > go down into cpp/src/qpid/broker, or if you want to keep them in
> > cpp/src still. Any thoughts?
> 
> The rule for file placement as it stands is currently that files follow
> their namespace. So given that qpidd.cpp really contains main() which
> can't be in any namespace it should be in cpp/src.
> 
> I think the correct solution to this problem is to figure out the
> correct platform dependent/platform independent code split and make the
> platform code appropriate facitilities in qpp/qpid/sys. However in the
> meantime splitting qpidd.cpp and leaving the resultant files in cpp/src
> would be fine until we figure out the best final resting places for the
> code.
> 
> My opinion only, Gordon or Alan might have different ideas.

Steve, I thought boost::program_options was portable to Windows, am I
wrong? The options themselves may be different on different platforms at
some point, so perhaps we should separate out the QpidOptions class and
split its implementation.

The Daemon class is already under broker, and could move to sys.

What else is posix specific in qpidd.cpp?

Reply via email to