HPS::HCA::ModelTreeItem Class Referenceabstract

#include <sprk_hca.h>

Inheritance diagram for HPS::HCA::ModelTreeItem:
HPS::Sprocket HPS::Object

Public Member Functions

virtual ModelTreeItemPtr AddChild (int64_t in_node_id)=0
 
virtual void Assign (ModelTreeItem const &in_that)
 
virtual void Collapse ()
 
bool Equals (ModelTreeItem const &in_that) const
 
virtual void Expand ()
 
ModelTree::ItemType GetItemType () const
 
uint64_t GetNodeId () const
 
UTF8 GetTitle () const
 
ModelTreePtr GetTree () const
 
bool HasChildren () const
 
void Hide ()
 
void Highlight (HighlightOptionsKit const &in_highlight_options)
 
bool IsExpanded () const
 
bool IsHidden () const
 
bool IsHighlighted () const
 
void Isolate ()
 
 ModelTreeItem ()
 
 ModelTreeItem (ModelTreeItem const &in_that)
 
 ModelTreeItem (ModelTreeItem &&in_that)
 
 ModelTreeItem (ModelTreePtr const &in_tree, HCA::Model const &in_hca_model)
 
 ModelTreeItem (ModelTreePtr const &in_tree, int64_t in_node_id)
 
HPS::Type ObjectType () const
 
virtual void OnHighlightUnhighlight ()
 
virtual void OnShowHide ()
 
bool operator!= (ModelTreeItem const &in_that) const
 
ModelTreeItemoperator= (ModelTreeItem const &in_that)
 
ModelTreeItemoperator= (ModelTreeItem &&in_that)
 
bool operator== (ModelTreeItem const &in_that) const
 
bool RequestProperties (uint32_t &out_request_id)
 
void Show ()
 
void Unhighlight ()
 
void Zoom ()
 
- Public Member Functions inherited from HPS::Sprocket
Sprocket (Sprocket &&in_that)
 
- Public Member Functions inherited from HPS::Object
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)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
virtual HPS::Type Type () const
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::HCAModelTreeItem
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Additional Inherited Members

- Static Public Member Functions inherited from HPS::Object
template<typename T >
static intptr_t ClassID ()
 

Detailed Description

The ModelTreeItem class is a smart pointer which corresponds to an item or node in a tree object in a GUI toolkit, e.g., a TreeViewItem in WPF or an HTREEITEM in MFC. This class must be derived from to facilitate tree creation in the various GUI toolkits. It is used to represent items in a model browser.

Constructor & Destructor Documentation

◆ ModelTreeItem() [1/5]

HPS::HCA::ModelTreeItem::ModelTreeItem ( )

The default constructor creates an uninitialized ModelTreeItem object. The Type() function will return Type::None.

◆ ModelTreeItem() [2/5]

HPS::HCA::ModelTreeItem::ModelTreeItem ( ModelTreeItem const &  in_that)

The copy constructor creates a ModelTreeItem object that shares the underlying smart-pointer of the source ModelTreeItem.

Parameters
in_thatThe source ModelTreeItem to copy.

◆ ModelTreeItem() [3/5]

HPS::HCA::ModelTreeItem::ModelTreeItem ( ModelTreeItem &&  in_that)

The move constructor creates a ModelTreeItem by transferring the underlying object of the rvalue reference to this ModelTreeItem.

Parameters
in_thatAn rvalue reference to a ModelTreeItem to take the underlying object from.

◆ ModelTreeItem() [4/5]

HPS::HCA::ModelTreeItem::ModelTreeItem ( ModelTreePtr const &  in_tree,
HCA::Model const &  in_hca_model 
)

This constructor creates a ModelTreeItem suitable for acting as a root in a ModelTree.

Parameters
in_treeA pointer to the ModelTree which will contain this ModelTreeItem
in_hca_modelThe HCA::Model which will be assigned to this ModelTreeItem.

◆ ModelTreeItem() [5/5]

HPS::HCA::ModelTreeItem::ModelTreeItem ( ModelTreePtr const &  in_tree,
int64_t  in_node_id 
)

This constructor creates a ModelTreeItem which is not suitable for acting as a root in a ModelTree, but is suitable to be a ModelTreeItem under the root of the ModelTree. This constructor should be the one invoked in the overridden AddChild function.

Parameters
in_treeA pointer to the ModelTree which will contain this ModelTreeItem.
in_node_idThe node ID to be associated with this ModelTreeItem.

Member Function Documentation

◆ AddChild()

virtual ModelTreeItemPtr HPS::HCA::ModelTreeItem::AddChild ( int64_t  in_node_id)
pure virtual

This function is used to create a new ModelTreeItem to be the child of this ModelTreeItem. You will need to implement this function in your class which derives from HCA::ModelTreeItem. This function will be invoked if this ComponentTreeItem has children and Expand has been invoked on it. This function should contain any necessary calls to GUI toolkits to create the appropriate GUI elements. Additionally, since this function requires the creation of a derived ModelTreeItem, that derived ModelTreeItem should use the base constructor which is appropriate for creating non-root items.

Parameters
in_node_idThe node ID to be associated with the ModelTreeItem being added to the ModelTree.

◆ Assign()

virtual void HPS::HCA::ModelTreeItem::Assign ( ModelTreeItem const &  in_that)
virtual

Share the underlying smart-pointer of the ModelTreeItem source.

Parameters
in_thatThe ModelTreeItem source of the assignment.
Returns
A reference to this ModelTreeItem.

◆ Collapse()

virtual void HPS::HCA::ModelTreeItem::Collapse ( )
virtual

This function should be invoked when this ModelTreeItem needs to collapse. If this function is overridden, the overriding function should invoke this base function. Additionally, this function will always release all children for this ModelTreeItem when invoked.

◆ Equals()

bool HPS::HCA::ModelTreeItem::Equals ( ModelTreeItem const &  in_that) const

Check if the source ModelTreeItem points to the same underlying impl as this ModelTreeItem.

Parameters
in_thatThe source ModelTreeItem to compare to this ModelTreeItem.
Returns
true if the objects reference the same underlying data, false otherwise.

◆ Expand()

virtual void HPS::HCA::ModelTreeItem::Expand ( )
virtual

This function should be invoked when this ModelTreeItem needs to expand. If this function is overridden, the overriding function should invoke this base function. Additionally, this function will always repopulate the children for this ModelTreeItem when invoked.

◆ GetItemType()

ModelTree::ItemType HPS::HCA::ModelTreeItem::GetItemType ( ) const

Gets the item type for this ModelTreeItem. This is used to determine what type of data this ModelTreeItem represents in the ModelTree.

Returns
The item type for this ModelTreeItem.

◆ GetNodeId()

uint64_t HPS::HCA::ModelTreeItem::GetNodeId ( ) const

Returns the HCA node ID associated with this ModelTreeItem

Returns
The HCA node ID associated with this ModelTreeItem .

◆ GetTitle()

UTF8 HPS::HCA::ModelTreeItem::GetTitle ( ) const

Gets the title for this ModelTreeItem. This is the text that should be displayed for this ModelTreeItem in the ModelTree.

Returns
The title for this ModelTreeItem.

◆ GetTree()

ModelTreePtr HPS::HCA::ModelTreeItem::GetTree ( ) const

Gets the ModelTree associated with this ModelTreeItem. This provides a means of accessing the derived ModelTree by this ModelTreeItem if necessary.

Returns
The ModelTree associated with this ModelTreeItem.

◆ HasChildren()

bool HPS::HCA::ModelTreeItem::HasChildren ( ) const

Indicates whether this ModelTreeItem has any children.

Returns
true if this ModelTreeItem has children, false otherwise.

◆ Hide()

void HPS::HCA::ModelTreeItem::Hide ( )

Hides this ModelTreeItem it isn't already. Geometry associated with a hidden ModelTreeItem becomes invisible. Calling this function will result in a call to OnShowHide after the hide operation has taken place.

◆ Highlight()

void HPS::HCA::ModelTreeItem::Highlight ( HighlightOptionsKit const &  in_highlight_options)

Highlights this ModelTreeItem using the options specified. Calling this function will result in a call to OnHighlightUnhighlight after the highlight operation has taken place.

◆ IsExpanded()

bool HPS::HCA::ModelTreeItem::IsExpanded ( ) const

Indicates whether this ModelTreeItem is currently expanded.

Returns
true if this ModelTreeItem is expanded, false otherwise.

◆ IsHidden()

bool HPS::HCA::ModelTreeItem::IsHidden ( ) const

Indicates whether this ModelTreeItem is currently hidden.

Returns
true if this ModelTreeItem is hidden, false otherwise.

◆ IsHighlighted()

bool HPS::HCA::ModelTreeItem::IsHighlighted ( ) const

Indicates whether this ModelTreeItem is currently highlighted.

Returns
true if this ModelTreeItem is highlighted, false otherwise.

◆ Isolate()

void HPS::HCA::ModelTreeItem::Isolate ( )

Shows this ModelTreeItem and hides every other nodes in the tree, causing this item to become the only one visible. The camera will zoom to the isolated item. Calling this function will result in a call to OnShowHide for the item which is isolated, after the isolate operation has taken place.

◆ ObjectType()

HPS::Type HPS::HCA::ModelTreeItem::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.

◆ OnHighlightUnhighlight()

virtual void HPS::HCA::ModelTreeItem::OnHighlightUnhighlight ( )
virtual

This function will be invoked when this item becomes highlighted or unhighlighted. If you want something to happen when an item's highlight state changes you should provide an implementation for this function in your class which derives from HCA::ModelTreeItem. A common usage for this function is to make the text associated with highlighted items bold to indicate to users whether the item is highlighted or not at a glance.

◆ OnShowHide()

virtual void HPS::HCA::ModelTreeItem::OnShowHide ( )
inlinevirtual

This function will be invoked when this item becomes shown or hidden. If you want something to happen when an item becomes shown or hidden you should provide an implementation for this function in your class which derives from HCA::ModelTreeItem. A common usage for this function is to change the icon associated with the node to indicate to users whether the item is shown or hidden at a glance.

◆ operator!=()

bool HPS::HCA::ModelTreeItem::operator!= ( ModelTreeItem const &  in_that) const

Check if the source ModelTreeItem points to a different impl than this ModelTreeItem.

Parameters
in_thatThe source ModelTreeItem to compare to this ModelTreeItem.
Returns
true if the objects reference different underlying data, false otherwise.

◆ operator=() [1/2]

ModelTreeItem& HPS::HCA::ModelTreeItem::operator= ( ModelTreeItem const &  in_that)

Share the underlying smart-pointer of the ModelTreeItem source.

Parameters
in_thatThe ModelTreeItem source of the assignment.
Returns
A reference to this ModelTreeItem.

◆ operator=() [2/2]

ModelTreeItem& HPS::HCA::ModelTreeItem::operator= ( ModelTreeItem &&  in_that)

The move assignment operator transfers the underlying object of the rvalue reference to this ModelTreeItem.

Parameters
in_thatAn rvalue reference to a ModelTreeItem to take the underlying object from.
Returns
A reference to this ModelTreeItem.

◆ operator==()

bool HPS::HCA::ModelTreeItem::operator== ( ModelTreeItem const &  in_that) const

Check if the source ModelTreeItem points to the same underlying impl as this ModelTreeItem.

Parameters
in_thatThe source ModelTreeItem to compare to this ModelTreeItem.
Returns
true if the objects reference the same underlying data, false otherwise.

◆ Show()

void HPS::HCA::ModelTreeItem::Show ( )

Shows this ModelTreeItem it isn't already visible. Geometry associated with a shown ModelTreeItem becomes visible. Calling this function will result in a call to OnShowHide after the show operation has taken place.

◆ Unhighlight()

void HPS::HCA::ModelTreeItem::Unhighlight ( )

Removes all highlights from this ModelTreeItem. Calling this function will result in a call to OnHighlightUnhighlight after the unhighlight operation has taken place.

◆ Zoom()

void HPS::HCA::ModelTreeItem::Zoom ( )

Smoothly zooms the camera to focus on this item. The transition lasts half a second.


The documentation for this class was generated from the following file: