#include <ContentTree.h>
Public Member Functions | |
ElementRef () | |
T & | GetElement () |
bool | IsValid () |
operator void * () | |
T * | operator-> () |
T & | operator* () |
Friends | |
class | ContentElement |
An ElementRef is a reference to a specific type of Layout::ContentElement, for example, Layout::TextRun. An instance of ElementRef is largely equivalent to an instance of tElement in terms of capability, the only difference being that the ElementRef can be invalid. As such, ElementRefs are used in cases where a method can return a ContentElement, but may also return an empty result, like ContentElement::AsTextRun.
Definition at line 39 of file ContentTree.h.
pdftron::Layout::ElementRef< T >::ElementRef | ( | ) |
Create an invalid ElementRef object.
T& pdftron::Layout::ElementRef< T >::GetElement | ( | ) |
Retrieves the underlying object of type T.
bool pdftron::Layout::ElementRef< T >::IsValid | ( | ) |
Checks if the reference can be dereferenced, i.e., points to an actual object.
pdftron::Layout::ElementRef< T >::operator void * | ( | ) |
Implements the Safe Bool Idiom so the reference can be checked for validity.
T& pdftron::Layout::ElementRef< T >::operator* | ( | ) |
Dereference operator to get the underlying object of type T.
T* pdftron::Layout::ElementRef< T >::operator-> | ( | ) |
Overloaded arrow operator to access the members of the object of type T.
|
friend |
Definition at line 41 of file ContentTree.h.