X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTextClass.h;h=67293610ce67e44ed89c98dee94e7df06c9bf616;hb=42eb8a373a35da02c45c0d225d37f5d677ddfc2d;hp=51c42b06a226ef53b1ea35f292cb766bf72f31f8;hpb=ac6e5b871c934b853c775b1bbdf73a06df4ce5bd;p=lyx.git diff --git a/src/TextClass.h b/src/TextClass.h index 51c42b06a2..67293610ce 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; @@ -278,7 +289,6 @@ public: /// will invoke the layout object defined by name = 'CharStyle'. /// If that doesn't work either, an empty object returns (shouldn't /// happen). -- Idea JMarc, comment MV - /// InsetLayout const & insetLayout(docstring const & name) const; /// an empty inset layout for use as a default static InsetLayout const & emptyInsetLayout() { return empty_insetlayout_; } @@ -287,7 +297,6 @@ public: // accessors /////////////////////////////////////////////////////////////////// /// the list of floats defined in the document class - /// the list of floats defined in the document class FloatList const & floats() const { return floatlist_; } /// Counters & counters() const { return counters_; }