+ /// a container for passing entries around
+ struct RowEntry {
+ RowType type;
+ union {
+ struct TextEntry text;// iff the type is text_entry
+ struct MathEntry math;// iff the type is row_entry
+ struct {} begindocument;// iff the type is begin_document
+ };
+ };
+
+ /// Encapsulates the paragraph and position for later use
+ static RowEntry textEntry(int id, pos_type pos);
+ /// Encapsulates a cell and position for later use
+ static RowEntry mathEntry(uid_type id, idx_type cell);
+ /// Denotes the beginning of the document
+ static RowEntry beginDocument();
+
+ /// Converts a CursorSlice into a RowEntry
+ static RowEntry rowEntryFromCursorSlice(CursorSlice const & slice);
+
+ static const TextEntry text_none;
+ static const RowEntry row_none;
+ /// Returns true if RowEntry is devoid of information
+ static bool isNone(RowEntry entry);
+ /// Returns true if TextEntry is devoid of information
+ static bool isNone(TextEntry entry);
+
+private: