From 04af00c98ea3ee11662f615c82bfa7131de2886f Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 13 Mar 2008 01:09:41 +0000 Subject: [PATCH] Comment. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23703 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/TextClass.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/TextClass.h b/src/TextClass.h index 51c42b06a2..80713d0bda 100644 --- a/src/TextClass.h +++ b/src/TextClass.h @@ -69,6 +69,17 @@ public: // typedefs /////////////////////////////////////////////////////////////////// /// The individual paragraph layouts comprising the document class + // NOTE Do NOT try to make this a container of Layout pointers, e.g., + // std::vector. This will lead to problems. The reason is + // that DocumentClass objects are generally created by copying a + // LayoutFile, which serves as a base for the DocumentClass. If the + // LayoutList is a container of pointers, then every DocumentClass + // that derives from a given LayoutFile (e.g., article) will SHARE + // a basic set of layouts. So if one Buffer were to modify a layout + // (say, Standard), that would modify that layout for EVERY Buffer + // that was based upon the same DocumentClass. (Of course, if you + // really, REALLY want to make LayoutList a vector, then + // you can implement custom assignment and copy constructors.) typedef std::vector LayoutList; /// The inset layouts available to this class typedef std::map InsetLayouts; -- 2.39.2