OptionalContentOrderArray Class Documentation
classOptionalContentOrderArray : OptionalContentOrderNodeNamespace:datalogics_interface
- Inherits from:
OptionalContentOrderNode
Detailed Description
Items in the Order array can be arranged into a tree structure; subarrays within the parent array form 'branches' of the tree. Each OptionalContentOrderArray may contain OptionalContentOrderLeafs or OptionalContentOrderArrays in a specific order; this order determines how they will appear in the 'Layers' control of the viewer.
By placing OptionalContentOrderArrays into a higher-level array, branches can be added to the tree. The 'Title' property is a string that will appear next to the expand/collapse branch control in a PDF Viewer 'Layers' panel.
Referenced by
Uses types
Constructor & Destructor Documentation
OptionalContentOrderArray
OptionalContentOrderArray(Document &doc)Parameters
doc: Document &The Document this OptionalContentOrderArray is being created in
Create an OptionalContentOrderArray with no title.
OptionalContentOrderArray
OptionalContentOrderArray(Document &doc, const std::string &title)Parameters
doc: Document &The Document this OptionalContentOrderArray is being created in
title: const std::string &
Create an OptionalContentOrderArray with no title.
OptionalContentOrderArray
OptionalContentOrderArray(OptionalContentOrderArray &&)Parameters
~OptionalContentOrderArray
~OptionalContentOrderArray()Member Function Documentation
add
voidadd(OptionalContentOrderNode &node)Parameters
node: OptionalContentOrderNode &The OptionalContentOrderNode to append to the Array
Returns:
voidAdds an OptionalContentOrderNode to the end of the Array.
get
std::unique_ptr< OptionalContentOrderNode >get(intindex)Parameters
index: intThe index at which to fetch an OptionalContentOrderNode.
Returns:
An OptionalContentOrderNode, or null if there is nothing at that index.Returns the OptionalContentOrderNode at the given index.
get_length
intget_length()Returns:
The number of nodes in this array.Gets the number of OptionalContentOrderNodes in this array.
get_title
std::stringget_title()Returns:
The title string of this OptionalContentOrderArray, or NULL if no title is set.This title will appear next to the expand/collapse control in the 'Layers' panel of a PDF Viewer.
insert
voidinsert(intindex, OptionalContentOrderNode &node)Parameters
index: intThe index at which to insert the Node
node: OptionalContentOrderNode &The OptionalContentOrderNode to insert in the Array
Returns:
voidInserts an OptionalContentOrderNode at the given index, displacing existing objects. All objects following this will have their index increased by one.
operator=
Parameters
Returns:
OptionalContentOrderArray &put
voidput(intindex, OptionalContentOrderNode &node)Parameters
index: intThe index at which to replace the existing Node
node: OptionalContentOrderNode &The OptionalContentOrderNode to place in the Array
Returns:
voidPuts an OptionalContentOrderNode at the given index, replacing the existing item. The index can be greater than the current length of the array; the array will be extended and the empty slots filled with null objects.
remove_at
voidremove_at(intindex)Parameters
index: intThe index of the OptionalContentOrderNode to remove
Returns:
voidRemoves the OptionalContentOrderNode at the given index. The length of the array is reduced by 1.
set_title
voidset_title(const std::string &title)Parameters
title: const std::string &The title string of this OptionalContentOrderArray, or NULL to remove the title.
Returns:
voidThis title will appear next to the expand/collapse control in the 'Layers' panel of a PDF Viewer. This field may be set to NULL to remove the title.
try_as
T *try_as(typename T)Parameters
: typename T
Returns:
T *Attempt to downcast this node to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match.
try_as
const T *try_as(typename T)Parameters
: typename T
Returns:
const T *Const overload of try_as(). Returns a const pointer, or nullptr.