A document can be divided into several pages. A paragraph is never split over two pages. If there is not enough room for it in the rest of the page, it is moved in full to the next page. Page
is a small class. Its task is to keep track of the first and last paragraph of a page.
class Page { public: Page(); Page(int iFirstParagraph, int iLastParagraph); int GetFirstParagraph() const {return m_iFirstParagraph;} int GetLastParagraph() const {return m_iLastParagraph;} void Serialize(CArchive& archive); private: int m_iFirstParagraph, m_iLastParagraph; };
Page
needs a default constructor beacuse its objects are stored in m_pageArray
in the document class.