Foxit PDF SDK

Public Types | Public Member Functions | Static Public Member Functions | List of all members
foxit::addon::layoutrecognition::LRElement Class Reference
Inheritance diagram for foxit::addon::layoutrecognition::LRElement:

## Public Types
enum | ElementType { e_ElementTypeDocument = 0x0000, e_ElementTypeDocumentFragment = 0x0001, e_ElementTypePart = 0x0002, e_ElementTypeArt = 0x0101, e_ElementTypeSect = 0x0102, e_ElementTypeDiv = 0x0100, e_ElementTypeBlockQuote = 0x0103, e_ElementTypeCaption = 0x0104, e_ElementTypeTOC = 0x0105, e_ElementTypeTOCI = 0x0106, e_ElementTypeIndex = 0x0107, e_ElementTypeAside = 0x0108, e_ElementTypeTitle = 0x0109, e_ElementTypeFENote = 0x010A, e_ElementTypeNonStruct = 0x010F, e_ElementTypePrivate = 0x0110, e_ElementTypeParagraph = 0x0200, e_ElementTypeHeading = 0x0201, e_ElementTypeHeading1 = 0x0202, e_ElementTypeHeading2 = 0x0203, e_ElementTypeHeading3 = 0x0204, e_ElementTypeHeading4 = 0x0205, e_ElementTypeHeading5 = 0x0206, e_ElementTypeHeading6 = 0x0207, e_ElementTypeHeadingN = 0x0208, e_ElementTypeList = 0x0209, e_ElementTypeListItem = 0x020A, e_ElementTypeListLabel = 0x020B, e_ElementTypeListBody = 0x020C, e_ElementTypeTable = 0x020D, e_ElementTypeTableRow = 0x020E, e_ElementTypeTableHeaderCell = 0x020F, e_ElementTypeTableDataCell = 0x0210, e_ElementTypeTableHeaderGroup = 0x0211, e_ElementTypeTableBodyGroup = 0x0212, e_ElementTypeTableFootGroup = 0x0213, e_ElementTypeSpan = 0x0300, e_ElementTypeQuote = 0x0301, e_ElementTypeNote = 0x0302, e_ElementTypeReference = 0x0303, e_ElementTypeBibEntry = 0x0304, e_ElementTypeCode = 0x0305, e_ElementTypeLink = 0x0306, e_ElementTypeAnnot = 0x0307, e_ElementTypeRuby = 0x0308, e_ElementTypeRubyBase = 0x0309, e_ElementTypeRubyAnnot = 0x030A, e_ElementTypeRubyPunc = 0x030B, e_ElementTypeWarichu = 0x030C, e_ElementTypeWarichuText = 0x030D, e_ElementTypeWarichuPunc = 0x030E, e_ElementTypeEm = 0x030F, e_ElementTypeStrong = 0x0310, e_ElementTypeSub = 0x0311, e_ElementTypeFigure = 0x0400, e_ElementTypeFormula = 0x0401, e_ElementTypeForm = 0x0402, e_ElementTypeArtifact = 0x1000, e_ElementTypeTextObject = 0x80000001, e_ElementTypePathObject = 0x80000002, e_ElementTypeImageObject = 0x80000003, e_ElementTypeShadingObject = 0x80000004, e_ElementTypeFormObject = 0x80000005, e_ElementTypeContainerObject = 0x8000000C, e_ElementTypeAnnotObject = 0x8000000E, e_ElementTypePageObject = 0x8000000F, e_ElementTypeTextContent = 0xC0000001, e_ElementTypePathContent = 0xC0000002, e_ElementTypeImageContent = 0xC0000003, e_ElementTypeShadingContent = 0xC0000004, e_ElementTypeComplexContent = 0xC000000D, e_ElementTypeAnnotContent = 0xC000000E }
| Enumeration for standard structure types. More...

## Public Member Functions
| LRElement ()
| Constructor.
| LRElement (const LRElement &other)
| Constructor, with another base element object. More...
| ~LRElement ()
| Destructor.
ElementType | GetElementType ()
| Get element type. More...
bool | IsContentElement () const
| Check whether current object is content element or not. More...
bool | IsEmpty () const
| Check whether current object is empty or not. More...
bool | IsGraphicsObjectElement () const
| Check whether current object is graphics object element or not. More...
bool | IsStructureElement () const
| Check whether current object is structure element or not. More...
bool | operator!= (const LRElement &other) const
| Not equal operator. More...
LRElement & | operator= (const LRElement &other)
| Assign operator. More...
bool | operator== (const LRElement &other) const
| Equal operator. More...
String | StringifyType () const
| Convert type (enum value) of current element to a short and memorable string (text) representation. More...
Public Member Functions inherited from foxit::Base
FS_HANDLE | Handle () const
| Get the handle of current object. More...

## Static Public Member Functions
static String | StringifyElementType (ElementType type)
| Convert enum value of a specified element type to a short and memorable string (text) representation. More...

## Detailed Description

This class represents base layout recognition element.

## Member Enumeration Documentation

## ◆ ElementType

enum foxit::addon::layoutrecognition::LRElement::ElementType

Enumeration for standard structure types.

Values of this enumeration should be used alone. Please refer to description of "Standard Structure Types" in Section 10.7.3 of <PDF Reference 1.7> and in description of "Standard structure types" in Section 14.8.4 of <PDF Reference 2.0> for more details.

Enumerator
e_ElementTypeDocument | Structure element type: Document, which represents a complete document.
e_ElementTypeDocumentFragment | Structure element type: DocumentFragment (PDF 2.0), which represents a part of an original complete document.
e_ElementTypePart | Structure element type: Part, which represents a large-scale division of a document.
e_ElementTypeArt | Structure element type: Art, which means "Article" and represents a relatively self-contained body of text constituting a single narrative or exposition.
e_ElementTypeSect | Structure element type: Sect, which means "Section" and represents a container for grouping related content elements.
e_ElementTypeDiv | Structure element type: Div, which means "Division" and represents a generic block-level element or group of elements.
e_ElementTypeBlockQuote | Structure element type: BlockQuote, which means "Block quotation" and represents a portion of text consisting of one or more paragraphs attributed to someone other than the author of the surrounding text.
e_ElementTypeCaption | Structure element type: Caption, which represents a brief portion of text describing a table or figure.
e_ElementTypeTOC | Structure element type: TOC, which means "Table of contents" and represents a list made up of table of contents item entries and/or other nested table of contents entries.
e_ElementTypeTOCI | Structure element type: TOCI, which means "Table of contents item" and represents an individual member of a table of contents.
e_ElementTypeIndex | Structure element type: Index, which represents a sequence of entries containing identifying text accompanied by reference elements that point out occurrences of the specified text in the main body of a document.
e_ElementTypeAside | Structure element type: Aside (PDF 2.0), which represents content that is distinct from other content within its parent structure element.
e_ElementTypeTitle | Structure element type: Title (PDF 2.0), which represents content that is usually referred to as the title of a document or high-level devision of content.
e_ElementTypeFENote | Structure element type: FENote (PDF 2.0), which is used to markup footnotes and endnotes.
e_ElementTypeNonStruct | Structure element type: NonStruct, which means "Nonstructural element" and represents a grouping element having no inherent structural significance; it serves solely for grouping purposes.
e_ElementTypePrivate | Structure element type: Private, which means "Private element" and represents a grouping element containing private content belonging to the application producing it.
e_ElementTypeParagraph | Structure element type: P, which means "Paragraph" and represents a low-level division of text.
e_ElementTypeHeading | Structure element type: H, which means "Heading" and represents a label for a subdivision of a document's content. It should be the first child of the division that it heads.
e_ElementTypeHeading1 | Structure element type: H1, which represents heading with level 1.
e_ElementTypeHeading2 | Structure element type: H2, which represents heading with level 2.
e_ElementTypeHeading3 | Structure element type: H3, which represents heading with level 3.
e_ElementTypeHeading4 | Structure element type: H4, which represents heading with level 4.
e_ElementTypeHeading5 | Structure element type: H5, which represents heading with level 5.
e_ElementTypeHeading6 | Structure element type: H6, which represents heading with level 6.
e_ElementTypeHeadingN | Structure element type: Hn (PDF 2.0), which represents heading with level 7 or more.
e_ElementTypeList | Structure element type: L, which means "List" and represents a sequence of items of like meaning and importance.
e_ElementTypeListItem | Structure element type: LI, which means "List item" and represents an individual member of a list.
e_ElementTypeListLabel | Structure element type: Lbl, which means "Label" and represents a name or number that distinguishes a given item from others in the same list or other group of like items.
e_ElementTypeListBody | Structure element type: LBody, which means "List body" and reprsents the descriptive content of a list item.
e_ElementTypeTable | Structure element type: Table, which represents a two-dimensional layout of rectangular data cells, possibly having a complex substructure.
e_ElementTypeTableRow | Structure element type: TR, which means "Table row" and represents a row of headings or data in a table.
e_ElementTypeTableHeaderCell | Structure element type: TH, which means "Table header cell" and represents a table cell containing header text describing one or more rows or columns of the table.
e_ElementTypeTableDataCell | Structure element type: TD, which means "Table data cell" and represents a table cell containing data that is part of the table's content.
e_ElementTypeTableHeaderGroup | Structure element type: THead, which means "Table header row group" and represents a group of rows that constitute the header of a table.
e_ElementTypeTableBodyGroup | Structure element type: TBody, which means "Table body row group" and represents a group of rows that constitute the main body portion of a table.
e_ElementTypeTableFootGroup | Structure element type: TFoot, which means "Table footer row group" and represents a group of rows that constitute the footer of a table.
e_ElementTypeSpan | Structure element type: Span, which represents a generic inline portion of text having no particular inherent characteristics.
e_ElementTypeQuote | Structure element type: Quote, which means "Quotation" and represents an inline portion of text attributed to someone other than the author of the surrounding text.
e_ElementTypeNote | Structure element type: Note, which represents an item of explanatory text, such as a footnote or an endnote, that is referred to from within the body of the document.
e_ElementTypeReference | Structure element type: Reference, which represents a citation to content elsewhere in the document.
e_ElementTypeBibEntry | Structure element type: BibEntry, which means "Bibliography entry" and represents a reference identifying the external source of some cited content.
e_ElementTypeCode | Structure element type: Code, which represents a fragment of computer program text.
e_ElementTypeLink | Structure element type: Link, which represents an association between a portion of the ILSE's content and a corresponding link annotation or annotations.
e_ElementTypeAnnot | Structure element type: Annot, which means "Annotation" and represents an association between a portion of the ILSE's content and a corresponding PDF annotation.
e_ElementTypeRuby | Structure element type: Ruby, which represents the wrapper around the entire ruby assembly.
e_ElementTypeRubyBase | Structure element type: RB, which means "Ruby base text" and represents the full-size text to which the ruby annotation is applied.
e_ElementTypeRubyAnnot | Structure element type: RT, which means "Ruby annotation text" and represents the smaller-size text that is placed adjacent to the ruby base text.
e_ElementTypeRubyPunc | Structure element type: RP, which means "Ruby punctuation" and represents punctuation surrounding the ruby annotation text.
e_ElementTypeWarichu | Structure element type: Warichu, which represents the wrapper around the entire warichu assembly.
e_ElementTypeWarichuText | Structure element type: WT, which means "Warichu text" and represents the smaller-size text of a warichu comment that is formatted into two lines and placed between surrounding WP elements.
e_ElementTypeWarichuPunc | Structure element type: WP, which means "Warichu punctuation" and represents the punctuation that surrounds the WT text.
e_ElementTypeEm | Structure element type: Em (PDF 2.0), which means "Emphasis" and represents content for the purpose of emphasis.
e_ElementTypeStrong | Structure element type: Strong (PDF 2.0), which represents content for the purpose of strong importance, seriousness or urgency for its contents.
e_ElementTypeSub | Structure element type: Sub (PDF 2.0), which means "Sub-division of a block level element" and represents content typically perceived as a sub-division inside a block level structure element.
e_ElementTypeFigure | Structure element type: Figure, which represents an item of graphical content.
e_ElementTypeFormula | Structure element type: Formula, which represents a mathematical formula.
e_ElementTypeForm | Structure element type: Form, which represents a widget annotation representing an interactive form field.
e_ElementTypeArtifact | Structure element type: Artifact, which includes other Pagination, Layout, Page and Background artifacts.
e_ElementTypeTextObject | Structure element type: TextObject, which means text graphics object element.
e_ElementTypePathObject | Structure element type: PathObject, which means path graphics object element.
e_ElementTypeImageObject | Structure element type: ImageObject, which means image graphics object element.
e_ElementTypeShadingObject | Structure element type: ShadingObject, which means shading graphics object element.
e_ElementTypeFormObject | Structure element type: FormObject, which means form XObject graphics object element.
e_ElementTypeContainerObject | Structure element type: ContainerObject, which means container object element.
e_ElementTypeAnnotObject | Structure element type: AnnotObject, which means annotation object element.
e_ElementTypePageObject | Structure element type: PageObject, which means page object element.
e_ElementTypeTextContent | Structure element type: TextContent, which means text content element.
e_ElementTypePathContent | Structure element type: PathContent, which means path content element.
e_ElementTypeImageContent | Structure element type: ImageContent, which means image content element.
e_ElementTypeShadingContent | Structure element type: ShadingContent, which means shading content element.
e_ElementTypeComplexContent | Structure element type: ComplexContent, which means complex content element.
e_ElementTypeAnnotContent | Structure element type: AnnotContent, which means annotation content element.

## Constructor & Destructor Documentation

## ◆ LRElement()

foxit::addon::layoutrecognition::LRElement::LRElement | ( | const LRElement & | other | ) |

Constructor, with another base element object.

Parameters

  [in] | other | Another base element object.

## Member Function Documentation

## ◆ GetElementType()

ElementType foxit::addon::layoutrecognition::LRElement::GetElementType | ( |  | ) |

Get element type.

Returns
  Element type. Please refer to values starting from LRElement::e_ElementTypeDocument and this would be one of these values.

## ◆ IsContentElement()

bool foxit::addon::layoutrecognition::LRElement::IsContentElement | ( |  | ) | const

Check whether current object is content element or not.

Returns
  true means current object is content element, while false means current object is not content element.

## ◆ IsEmpty()

bool foxit::addon::layoutrecognition::LRElement::IsEmpty | ( |  | ) | const

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
  true means current object is empty, while false means not.

## ◆ IsGraphicsObjectElement()

bool foxit::addon::layoutrecognition::LRElement::IsGraphicsObjectElement | ( |  | ) | const

Check whether current object is graphics object element or not.

Returns
  true means current object is graphics object element, while false means current object is not graphics object element.

## ◆ IsStructureElement()

bool foxit::addon::layoutrecognition::LRElement::IsStructureElement | ( |  | ) | const

Check whether current object is structure element or not.

Returns
  true means current object is structure element, while false means current object is not structure element,

## ◆ operator!=()

bool foxit::addon::layoutrecognition::LRElement::operator!= | ( | const LRElement & | other | ) | const

Not equal operator.

Parameters

  [in] | other | Another base element object. This function will check if current object is not equal to this one.

Returns
  true means not equal, while false means equal.

## ◆ operator=()

LRElement& foxit::addon::layoutrecognition::LRElement::operator= | ( | const LRElement & | other | ) |

Assign operator.

Parameters

  [in] | other | Another base element object, whose value would be assigned to current object.

Returns
  Reference to current object itself.

## ◆ operator==()

bool foxit::addon::layoutrecognition::LRElement::operator== | ( | const LRElement & | other | ) | const

Equal operator.

Parameters

  [in] | other | Another base element object. This function will check if current object is equal to this one.

Returns
  true means equal, while false means not equal.

## ◆ StringifyElementType()

static String foxit::addon::layoutrecognition::LRElement::StringifyElementType | ( | ElementType | type | ) |
| static

Convert enum value of a specified element type to a short and memorable string (text) representation.

Parameters

  [in] | type | A specified element type. Please refer to values starting from LRElement::e_ElementTypeDocument and this should be one of these values.

Returns
  A string that represents the short and memorable string representation for specified type. If there is no short and memorable string representation or input type is an invalid enum value, this function would return an empty string.

## ◆ StringifyType()

String foxit::addon::layoutrecognition::LRElement::StringifyType | ( |  | ) | const

Convert type (enum value) of current element to a short and memorable string (text) representation.

Returns
  A short and memorable string that represents type of current element. If there is no short and memorable string, this function would return an empty string.