[Libreoffice] per-library types headers ...

Michael Meeks michael.meeks at novell.com
Tue Sep 27 01:55:23 PDT 2011

Hi guys,

	I'm still a tad annoyed by our compile times, and was wondering - has a
footypes.hxx header approach been tried in the past. This would add a
near complete set of forward declarations of classes, templates, etc.
necessary to use that library.

	I suspect (at the moment) that people tend to simply include the header
that creates whatever definition they care about in their headers
chaining them together into bulky masses of pulled in headers, rather
than whacking things like:

namespace com { namespace sun { namespace star { namespace uno {
	class Any;
	class Exception;
	template< typename > class Reference;
	template< typename > class Sequence;
	class XInterface;
} } } }
namespace rtl { class OUString; }

	into their headers to cut such chains (and who can blame them - that
seems much more readable). Though of course the base Reference class is
prolly something that we should have ~everywhere - with fwd. decls for
the interface classes themselves.

	Potentially, by switching to lazily including just the svxtypes.hxx (or
whatever) header ~everywhere, we could have a smaller, quicker to parse
code-base (pwrt. no in-lines that get actually compiled) as well as a
rather more bearable dependency tree.

	Did anyone research this sort of thing in the past ?



michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot

More information about the LibreOffice mailing list