#include <sprk_hca.h>
|
static const HPS::Type | staticType = HPS::Type::HCAModelTree |
|
static const HPS::Type | staticType = HPS::Type::None |
|
|
template<typename T > |
static intptr_t | ClassID () |
|
The ModelTree 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 model browser.
◆ ItemType
Enumerates the types of items that can be contained in a ModelTree.
Enumerator |
---|
None | No type.
|
Model | Item is an HCA::Model.
|
Node | Item is an HCA::Node.
|
◆ ModelTree() [1/4]
HPS::HCA::ModelTree::ModelTree |
( |
| ) |
|
The default constructor creates an uninitialized ModelTree object. The Type() function will return Type::None.
◆ ModelTree() [2/4]
HPS::HCA::ModelTree::ModelTree |
( |
Canvas const & |
in_canvas, |
|
|
HCA::Model & |
hca_model |
|
) |
| |
This constructor creates a ModelTree object associated with a Canvas and a layer. This constructor should be used to create a new ModelTree object.
- Parameters
-
◆ ModelTree() [3/4]
HPS::HCA::ModelTree::ModelTree |
( |
ModelTree const & |
in_that | ) |
|
The copy constructor creates a ModelTree object that shares the underlying smart-pointer of the source ModelTree.
- Parameters
-
◆ ModelTree() [4/4]
HPS::HCA::ModelTree::ModelTree |
( |
ModelTree && |
in_that | ) |
|
The move constructor creates a ModelTree by transferring the underlying object of the rvalue reference to this ModelTree.
- Parameters
-
in_that | An rvalue reference to a ModelTree to take the underlying object from. |
◆ Assign()
virtual void HPS::HCA::ModelTree::Assign |
( |
ModelTree const & |
in_that | ) |
|
|
virtual |
Share the underlying smart-pointer of the ModelTree source.
- Parameters
-
in_that | The ModelTree source of the assignment. |
- Returns
- A reference to this ModelTree.
◆ Equals()
bool HPS::HCA::ModelTree::Equals |
( |
ModelTree const & |
in_that | ) |
const |
Check if the source ModelTree points to the same underlying impl as this ModelTree.
- Parameters
-
- Returns
- true if the objects reference the same impl, false otherwise.
◆ Flush()
virtual void HPS::HCA::ModelTree::Flush |
( |
| ) |
|
|
virtual |
Resets the root ModelTreeItem for this ModelTree. This will release the root ModelTreeItem by this ModelTree and set the root to a null pointer. If this function is overridden, the overriding function should invoke this base function.
◆ GetRoot()
ModelTreeItemPtr HPS::HCA::ModelTree::GetRoot |
( |
| ) |
const |
◆ ObjectType()
virtual HPS::Type HPS::HCA::ModelTree::ObjectType |
( |
| ) |
const |
|
inlinevirtual |
This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).
- Returns
- The declared type of the object in question, which may differ from the true, underlying type.
Reimplemented from HPS::Object.
◆ operator!=()
bool HPS::HCA::ModelTree::operator!= |
( |
ModelTree const & |
in_that | ) |
const |
Check if the source ModelTree points to a different impl than this ModelTree.
- Parameters
-
- Returns
- true if the objects reference different impls, false otherwise.
◆ operator=() [1/2]
Share the underlying smart-pointer of the ModelTree source.
- Parameters
-
in_that | The ModelTree source of the assignment. |
- Returns
- A reference to this ModelTree.
◆ operator=() [2/2]
The move assignment operator transfers the underlying object of the rvalue reference to this ModelTree.
- Parameters
-
in_that | An rvalue reference to a ModelTree to take the underlying object from. |
- Returns
- A reference to this ModelTree.
◆ operator==()
bool HPS::HCA::ModelTree::operator== |
( |
ModelTree const & |
in_that | ) |
const |
Check if the source ModelTree points to the same underlying impl as this ModelTree.
- Parameters
-
- Returns
- true if the objects reference the same impl, false otherwise.
◆ SetRoot()
void HPS::HCA::ModelTree::SetRoot |
( |
ModelTreeItemPtr const & |
in_root | ) |
|
Sets the root ModelTreeItem for this ModelTree. This object should be created on the heap and it should have been created with a ModelTreeItem constructor which took a CADModel, otherwise an exception will be thrown. Additionally, if there was already an existing root for this ModelTree, the Flush function will be invoked prior to setting this as the new root, and Expand will be invoked on the new root.
- Parameters
-
- See also
- Flush
-
ModelTreeItem::Expand
The documentation for this class was generated from the following file: