More...

Inheritance diagram for HPS.HCA.ModelTree:
HPS.Sprocket HPS.Object

Public Types

enum  ItemType { ItemType.None = 0, ItemType.Model = 1, ItemType.Node = 2 }
 Enumerates the types of items that can be contained in a ModelTree. More...
 

Public Member Functions

virtual void Assign (HPS.HCA.ModelTree in_that)
 Share the underlying smart-pointer of the ModelTree source. More...
 
override void Dispose ()
 
delegate void DtorDelegate (IntPtr cPtr)
 
override bool Equals (System.Object obj)
 
bool Equals (HPS.HCA.ModelTree in_that)
 Check if the source ModelTree points to the same underlying impl as this ModelTree. More...
 
virtual void Flush ()
 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. More...
 
HPS.Canvas GetCanvas ()
 
override int GetHashCode ()
 
HPS.HCA.Model GetHCAModel ()
 
HPS.HCA.ModelTreeItem GetRoot ()
 Gets the root ModelTreeItem for this ModelTree. More...
 
 ModelTree ()
 The default constructor creates an uninitialized ModelTree object. The Type() function will return Type.None. More...
 
 ModelTree (HPS.Canvas in_canvas, HPS.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. More...
 
 ModelTree (HPS.HCA.ModelTree in_that)
 The copy constructor creates a ModelTree object that shares the underlying smart-pointer of the source ModelTree. More...
 
delegate HPS.Type ModelTreeDelegate_0 (IntPtr cPtr)
 
delegate void ModelTreeDelegate_1 (IntPtr cPtr, IntPtr in_that)
 
delegate void ModelTreeDelegate_2 (IntPtr cPtr)
 
delegate void ModelTreeDelegate_3 (IntPtr cPtr)
 
delegate HPS.Type ModelTreeDelegate_4 (IntPtr cPtr)
 
delegate bool ModelTreeDelegate_5 (IntPtr cPtr)
 
delegate void ModelTreeDelegate_6 (IntPtr cPtr)
 
override HPS.Type ObjectType ()
 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). More...
 
virtual void OnHighlightUnhighlight ()
 
delegate void RemoveCacheItemDelegate (IntPtr cPtr)
 
void SetRoot (HPS.HCA.ModelTreeItem 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. More...
 
- Public Member Functions inherited from HPS.Sprocket
 Sprocket (HPS.Sprocket in_that)
 
- Public Member Functions inherited from HPS.Object
virtual bool Empty ()
 Indicates whether this object has any values set on it. More...
 
IntPtr GetClassID ()
 
IntPtr GetInstanceID ()
 Returns the object's database handle, which can be used to determine which instance of a class the object is. For example, controls are simply aliases for segment keys that group related functions. Therefore, a SegmentKey and all of its controls would return the same instance id. Different keys and controls will return the same value if they are backed by the same database resource. More...
 
bool HasType (HPS.Type in_mask)
 This function indicates whether this Object has the given Type mask. More...
 
 Object (HPS.Object that)
 
virtual void Reset ()
 Resets this object to its initial, uninitialized state. More...
 
virtual HPS.Type Type ()
 This function returns the true type of the underlying object. This function is useful for finding the type of smart pointer objects that have been cast to more generic types. More...
 

Static Public Member Functions

static bool operator!= (HPS.HCA.ModelTree a, HPS.HCA.ModelTree b)
 
static bool operator== (HPS.HCA.ModelTree a, HPS.HCA.ModelTree b)
 
- Static Public Member Functions inherited from HPS.Object
static IntPtr ClassID< T > ()
 

Protected Member Functions

override void deleteCptr ()
 
virtual bool DerivedClassHasMethod (string methodName, System.Type[] methodTypes)
 
override IntPtr GetNonDirectorClassID ()
 
virtual bool IsUserDerived ()
 

Protected Attributes

HandleRef sptr
 
- Protected Attributes inherited from HPS.Object
bool cMemOwn
 
HandleRef cptr
 

Static Protected Attributes

static Dictionary< IntPtr, ModelTreecachedObjects = new Dictionary<IntPtr, ModelTree>()
 
static Dictionary< IntPtr, WeakReference > cachedWeakRefs = new Dictionary<IntPtr, WeakReference>()
 
static ReaderWriterLockSlim mapLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion)
 

Detailed Description

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.

Member Enumeration Documentation

◆ 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.

Constructor & Destructor Documentation

◆ ModelTree() [1/3]

HPS.HCA.ModelTree.ModelTree ( )
inline

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

◆ ModelTree() [2/3]

HPS.HCA.ModelTree.ModelTree ( HPS.Canvas  in_canvas,
HPS.HCA.Model  hca_model 
)
inline

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
in_canvasThe Canvas to associate this ModelTree with.

◆ ModelTree() [3/3]

HPS.HCA.ModelTree.ModelTree ( HPS.HCA.ModelTree  in_that)
inline

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

Parameters
in_thatThe source ModelTree to copy.

Member Function Documentation

◆ Assign()

virtual void HPS.HCA.ModelTree.Assign ( HPS.HCA.ModelTree  in_that)
inlinevirtual

Share the underlying smart-pointer of the ModelTree source.

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

◆ Equals()

bool HPS.HCA.ModelTree.Equals ( HPS.HCA.ModelTree  in_that)
inline

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

Parameters
in_thatThe source ModelTree to compare to this ModelTree.
Returns
true if the objects reference the same impl, false otherwise.

◆ Flush()

virtual void HPS.HCA.ModelTree.Flush ( )
inlinevirtual

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()

HPS.HCA.ModelTreeItem HPS.HCA.ModelTree.GetRoot ( )
inline

Gets the root ModelTreeItem for this ModelTree.

Returns
The root ModelTreeItem for this ModelTree.

◆ ObjectType()

override HPS.Type HPS.HCA.ModelTree.ObjectType ( )
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.

◆ SetRoot()

void HPS.HCA.ModelTree.SetRoot ( HPS.HCA.ModelTreeItem  in_root)
inline

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
in_rootThe root ModelTreeItem for this ModelTree.

Flush

ModelTreeItem.Expand


The documentation for this class was generated from the following file:
  • internals/hps_sprk_hca/source/cs/HPS.HCA.cs