]> git.lyx.org Git - features.git/commit
This is the last of the commits that hopes to enforce the distinction between "layout...
authorRichard Heck <rgheck@comcast.net>
Fri, 29 Feb 2008 02:45:33 +0000 (02:45 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 29 Feb 2008 02:45:33 +0000 (02:45 +0000)
commit2b3bd7b5f4a8815427d05c6cc6aaf25b6b8ffba5
treef7c2f4fc36b555ee71974329a4904dd5c4fa0ffc
parent8f3599f00d4b51d9ed8495ca1c7347f0eac7074a
This is the last of the commits that hopes to enforce the distinction between "layout files" and "document classes" that was introduced by the modules code. For the most part, these changes just refactor code from TextClass between: (a) a TextClass base class; (b) a LayoutFile subclass, which represents the information in a .layout file; and (c) a DocumentClass subclass, which represents the layout information associated with a Buffer---a LayoutFile plus Modules. Methods from TextClass have been apportioned between the three classes depending upon what is needed where, and signatures have been changed where necessary so that the right kind of class is required.

At this point, there are no simple TextClass objects in the main LyX code, and it is impossible to create them, since the TextClass constructor is protected. Only LayoutFile and DocumentClass objects can be constructed, and for the most part these are constructed only by their respective containers: BaseClassList and DocumentClassBundle. There is an exception: LayoutFile does have a public default constructor, but if anyone knows how to make it go away, please do.

There will be one or two more commits along these lines, but these will be simple renamings. For example, BaseClassList should be LayoutFileList.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23343 a592a061-630c-0410-9148-cb99ea01b6c8
19 files changed:
src/BaseClassList.cpp
src/BaseClassList.h
src/Buffer.cpp
src/BufferParams.cpp
src/BufferParams.h
src/LyXFunc.cpp
src/TextClass.cpp
src/TextClass.h
src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/GuiToolbar.h
src/insets/InsetCaption.cpp
src/insets/InsetCaption.h
src/insets/InsetCollapsable.cpp
src/tex2lyx/Context.cpp
src/tex2lyx/Context.h
src/tex2lyx/Makefile.am
src/tex2lyx/preamble.cpp
src/tex2lyx/tex2lyx.cpp
src/tex2lyx/tex2lyx.h