< Home

< Table of Contents

REFERENCE MANUAL

ComponentTree Class Reference

#include <sprk.h>

Inheritance diagram for ComponentTree:
Sprocket Object

Public Types

enum  ItemType {
  ItemType::None, ItemType::ExchangeComponent, ItemType::ExchangeModelFile, ItemType::ExchangeViewGroup,
  ItemType::ExchangeAnnotationViewGroup, ItemType::ExchangePMIGroup, ItemType::ExchangeModelGroup, ParasolidComponent,
  ParasolidModelFile
}
 
- Public Types inherited from Sprocket
enum  UpdateType { Synchronous, Asynchronous }
 

Public Member Functions

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 ()
 
HighlightOptionsKit GetHighlightOptions () const
 
ComponentTreeItemPtr GetRoot () const
 
virtual Type ObjectType () const
 
bool operator!= (ComponentTree const &in_that) const
 
ComponentTreeoperator= (ComponentTree const &in_that)
 
ComponentTreeoperator= (ComponentTree &&in_that)
 
bool operator== (ComponentTree const &in_that) const
 
void SetHighlightOptions (HighlightOptionsKit const &in_options)
 
void SetRoot (ComponentTreeItemPtr const &in_root)
 
- Public Member Functions inherited from Sprocket
 Sprocket (Sprocket &&in_that)
 
- Public Member Functions inherited from Object
virtual bool Empty () const
 
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (Type in_mask) const
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
Type Type () const
 

Additional Inherited Members

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

Detailed Description

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.

Member Enumeration Documentation

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.

Constructor & Destructor Documentation

ComponentTree::ComponentTree ( )

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

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.

Parameters
in_canvasThe Canvas to associate this ComponentTree with.
in_layerThe layer in the Canvas to associate this ComponentTree with.
ComponentTree::ComponentTree ( ComponentTree const &  in_that)

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

Parameters
in_thatThe source ComponentTree to copy.
ComponentTree::ComponentTree ( ComponentTree &&  in_that)

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

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

Member Function Documentation

virtual void ComponentTree::Assign ( ComponentTree const &  in_that)
virtual

Share the underlying smart-pointer of the ComponentTree source.

Parameters
in_thatThe ComponentTree source of the assignment.
Returns
A reference to this ComponentTree.
bool ComponentTree::Equals ( ComponentTree const &  in_that) const

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

Parameters
in_thatThe source ComponentTree to compare to this ComponentTree.
Returns
true if the objects reference the same impl, false otherwise.
virtual void ComponentTree::Flush ( )
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.

HighlightOptionsKit ComponentTree::GetHighlightOptions ( ) const

Gets the highlight options that will be used by this ComponentTree.

Returns
The highlight options that will be used by this ComponentTree.
ComponentTreeItemPtr ComponentTree::GetRoot ( ) const

Gets the root ComponentTreeItem for this ComponentTree.

Returns
The root ComponentTreeItem for this ComponentTree.
virtual Type ComponentTree::ObjectType ( ) const
inlinevirtual

This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.

Returns
The declared type of the object in question, which may differ from the true, underlying type.

Reimplemented from Object.

bool ComponentTree::operator!= ( ComponentTree const &  in_that) const

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

Parameters
in_thatThe source ComponentTree to compare to this ComponentTree.
Returns
true if the objects reference different impls, false otherwise.
ComponentTree& ComponentTree::operator= ( ComponentTree const &  in_that)

Share the underlying smart-pointer of the ComponentTree source.

Parameters
in_thatThe ComponentTree source of the assignment.
Returns
A reference to this ComponentTree.
ComponentTree& ComponentTree::operator= ( ComponentTree &&  in_that)

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

Parameters
in_thatAn rvalue reference to a ComponentTree to take the underlying object from.
Returns
A reference to this ComponentTree.
bool ComponentTree::operator== ( ComponentTree const &  in_that) const

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

Parameters
in_thatThe source ComponentTree to compare to this ComponentTree.
Returns
true if the objects reference the same impl, false otherwise.
void 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.

Parameters
in_optionsThe highlight options that will be used by this ComponentTree.
See also
ComponentTreeItem::Highlight
ComponentTreeItem::Unhighlight
ComponentPath::Highlight
ComponentPath::Unhighlight
void 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.

Parameters
in_rootThe root ComponentTreeItem for this ComponentTree.
See also
Flush
ComponentTreeItem::Expand

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