#include <sprk.h>
Public Types | |
enum | ItemType { ItemType::None, ItemType::ExchangeComponent, ItemType::ExchangeModelFile, ItemType::ExchangeViewGroup, ItemType::ExchangeAnnotationViewGroup, ItemType::ExchangePMIGroup, ItemType::ExchangeModelGroup, ParasolidComponent, ParasolidModelFile, DWGComponent, DWGModelFile } |
Public Member Functions | |
void | AddHighlightOptions (HighlightOptionsKit const &in_options) |
virtual void | Assign (ComponentTree const &in_that) |
ComponentTree () | |
ComponentTree (Canvas const &in_canvas, size_t in_layer=0) | |
ComponentTree (ComponentTree const &in_that) | |
ComponentTree (ComponentTree &&in_that) | |
bool | Equals (ComponentTree const &in_that) const |
virtual void | Flush () |
HighlightOptionsKitArray | GetHighlightOptions () const |
ComponentTreeItemPtr | GetRoot () const |
virtual HPS::Type | ObjectType () const |
bool | operator!= (ComponentTree const &in_that) const |
ComponentTree & | operator= (ComponentTree const &in_that) |
ComponentTree & | operator= (ComponentTree &&in_that) |
bool | operator== (ComponentTree const &in_that) const |
void | SetHighlightOptions (HighlightOptionsKit const &in_options) |
void | SetHighlightOptions (HighlightOptionsKitArray const &in_options) |
void | SetHighlightOptions (size_t in_count, HighlightOptionsKit const in_options[]) |
void | SetRoot (ComponentTreeItemPtr const &in_root) |
![]() | |
Sprocket (HPS::Sprocket const &in_that)=default | |
Sprocket (Sprocket &&in_that) | |
![]() | |
virtual bool | Empty () const |
intptr_t | GetClassID () const |
intptr_t | GetInstanceID () const |
bool | HasType (HPS::Type in_mask) const |
Object (Object const &that) | |
Object (Object &&in_that) | |
Object & | operator= (Object const &other_object) |
Object & | operator= (Object &&in_that) |
virtual void | Reset () |
HPS::Type | Type () const |
Additional Inherited Members | |
![]() | |
template<typename T > | |
static intptr_t | ClassID () |
The ComponentTree class is a smart pointer which corresponds to a tree object in a GUI toolkit, e.g., a TreeView in WPF or a CTreeCtrl in MFC. This class can be derived from to facilitate tree creation in the various GUI toolkits. It is used to create a component or model browser.
|
strong |
Enumerates the types of items that can be contained in a ComponentTree.
Enumerator | |
---|---|
None |
No type. |
ExchangeComponent |
Item is an Exchange::Component. |
ExchangeModelFile |
Item is an Exchange::CADModel. |
ExchangeViewGroup |
Item is a collection of Exchange::Capture objects. |
ExchangeAnnotationViewGroup |
Item is a collection of Exchange::Capture objects which are annotation captures. |
ExchangePMIGroup |
Item is a collection of Exchange::Component objects representing PMI. |
ExchangeModelGroup |
Item is a collection of root Exchange::Component objects. |
HPS::ComponentTree::ComponentTree | ( | ) |
The default constructor creates an uninitialized ComponentTree object. The Type() function will return Type::None.
HPS::ComponentTree::ComponentTree | ( | Canvas const & | in_canvas, |
size_t | in_layer = 0 |
||
) |
This constructor creates a ComponentTree object associated with a Canvas and a layer. This constructor should be used to create a new ComponentTree object.
in_canvas | The Canvas to associate this ComponentTree with. |
in_layer | The layer in the Canvas to associate this ComponentTree with. |
HPS::ComponentTree::ComponentTree | ( | ComponentTree const & | in_that | ) |
The copy constructor creates a ComponentTree object that shares the underlying smart-pointer of the source ComponentTree.
in_that | The source ComponentTree to copy. |
HPS::ComponentTree::ComponentTree | ( | ComponentTree && | in_that | ) |
The move constructor creates a ComponentTree by transferring the underlying object of the rvalue reference to this ComponentTree.
in_that | An rvalue reference to a ComponentTree to take the underlying object from. |
void HPS::ComponentTree::AddHighlightOptions | ( | HighlightOptionsKit const & | in_options | ) |
Appends one highlight options kit to the array that will be used by this ComponentTree. These options are used to perform highlights of elements within the tree and to determine what items within the tree need to be marked as highlighted when highlights are performed by ComponentPath::Highlight. If the options kit requested is already part of the ComponentTree highlight options array, it will not be added to it.
in_options | The highlight options that will be used by this ComponentTree. |
|
virtual |
Share the underlying smart-pointer of the ComponentTree source.
in_that | The ComponentTree source of the assignment. |
bool HPS::ComponentTree::Equals | ( | ComponentTree const & | in_that | ) | const |
Check if the source ComponentTree points to the same underlying impl as this ComponentTree.
in_that | The source ComponentTree to compare to this ComponentTree. |
|
virtual |
Resets the root ComponentTreeItem for this ComponentTree. This will release the root ComponentTreeItem by this ComponentTree and set the root to a null pointer. If this function is overridden, the overriding function should invoke this base function.
HighlightOptionsKitArray HPS::ComponentTree::GetHighlightOptions | ( | ) | const |
Gets the highlight options that will be used by this ComponentTree.
ComponentTreeItemPtr HPS::ComponentTree::GetRoot | ( | ) | const |
Gets the root ComponentTreeItem for this ComponentTree.
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from HPS::Object.
bool HPS::ComponentTree::operator!= | ( | ComponentTree const & | in_that | ) | const |
Check if the source ComponentTree points to a different impl than this ComponentTree.
in_that | The source ComponentTree to compare to this ComponentTree. |
ComponentTree& HPS::ComponentTree::operator= | ( | ComponentTree const & | in_that | ) |
Share the underlying smart-pointer of the ComponentTree source.
in_that | The ComponentTree source of the assignment. |
ComponentTree& HPS::ComponentTree::operator= | ( | ComponentTree && | in_that | ) |
The move assignment operator transfers the underlying object of the rvalue reference to this ComponentTree.
in_that | An rvalue reference to a ComponentTree to take the underlying object from. |
bool HPS::ComponentTree::operator== | ( | ComponentTree const & | in_that | ) | const |
Check if the source ComponentTree points to the same underlying impl as this ComponentTree.
in_that | The source ComponentTree to compare to this ComponentTree. |
void HPS::ComponentTree::SetHighlightOptions | ( | HighlightOptionsKit const & | in_options | ) |
Sets the highlight options that will be used by this ComponentTree. These options are used to perform highlights of elements within the tree and to determine what items within the tree need to be marked as highlighted when highlights are performed by ComponentPath::Highlight. Calling this function replaces any highlight options previously set on this object.
in_options | The highlight options that will be used by this ComponentTree. |
void HPS::ComponentTree::SetHighlightOptions | ( | HighlightOptionsKitArray const & | in_options | ) |
Sets the highlight options that will be used by this ComponentTree. These options are used to perform highlights of elements within the tree and to determine what items within the tree need to be marked as highlighted when highlights are performed by ComponentPath::Highlight. Calling this function replaces any highlight options previously set on this object. All elements of the array should be unique. In the case of multiple identical elements, only the first unique one will be added.
in_options | An array of highlight options that will be used by this ComponentTree. |
void HPS::ComponentTree::SetHighlightOptions | ( | size_t | in_count, |
HighlightOptionsKit const | in_options[] | ||
) |
Sets the highlight options that will be used by this ComponentTree. These options are used to perform highlights of elements within the tree and to determine what items within the tree need to be marked as highlighted when highlights are performed by ComponentPath::Highlight. Calling this function replaces any highlight options previously set on this object. All elements of the array should be unique. In the case of multiple identical elements, only the first unique one will be added.
in_count | the number of highlight options kits in the in_options array |
in_options | An array of highlight options that will be used by this ComponentTree. |
void HPS::ComponentTree::SetRoot | ( | ComponentTreeItemPtr const & | in_root | ) |
Sets the root ComponentTreeItem for this ComponentTree. This object should be created on the heap and it should have been created with a ComponentTreeItem constructor which took a CADModel, otherwise an exception will be thrown. Additionally, if there was already an existing root for this ComponentTree, the Flush function will be invoked prior to setting this as the new root, and Expand will be invoked on the new root.
in_root | The root ComponentTreeItem for this ComponentTree. |