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

Public Types

enum  ItemType { ItemType.None = 0, ItemType.Model = 1, ItemType.Node = 2 }
 

Public Member Functions

virtual void Assign (HPS.HCA.ModelTree in_that)
 
override void Dispose ()
 
delegate void DtorDelegate (IntPtr cPtr)
 
override bool Equals (System.Object obj)
 
bool Equals (HPS.HCA.ModelTree in_that)
 
virtual void Flush ()
 
HPS.Canvas GetCanvas ()
 
override int GetHashCode ()
 
HPS.HCA.Model GetHCAModel ()
 
HPS.HCA.ModelTreeItem GetRoot ()
 
 ModelTree ()
 
 ModelTree (HPS.Canvas in_canvas, HPS.HCA.Model hca_model)
 
 ModelTree (HPS.HCA.ModelTree in_that)
 
override HPS.Type ObjectType ()
 
delegate void RemoveCacheItemDelegate (IntPtr cPtr)
 
void SetRoot (HPS.HCA.ModelTreeItem in_root)
 
- Public Member Functions inherited from HPS.Sprocket
Sprocket (HPS.Sprocket in_that)
 
- Public Member Functions inherited from HPS.Object
virtual bool Empty ()
 
IntPtr GetClassID ()
 
IntPtr GetInstanceID ()
 
bool HasType (HPS.Type in_mask)
 
Object (HPS.Object that)
 
virtual void Reset ()
 
virtual HPS.Type Type ()
 

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 the specified HCA.Model. This constructor should be used to create a new ModelTree object.

Parameters
in_canvasThe Canvas to associate this ModelTree with.
hca_modelThe model 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 underlying data, 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.

◆ GetCanvas()

HPS.Canvas HPS.HCA.ModelTree.GetCanvas ( )
inline

Gets the Canvas associated with this ModelTree.

Returns
The Canvas associated with this ModelTree.

◆ GetHCAModel()

HPS.HCA.Model HPS.HCA.ModelTree.GetHCAModel ( )
inline

Gets the HCAModel associated with this ModelTree.

Returns
The HCAModel associated with this ModelTree.

◆ 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 an HCA.Model, 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 ModelTreeItem.Expand will be invoked on the new root.

Parameters
in_rootThe root ModelTreeItem for this ModelTree.
See also
Flush
ModelTreeItem.Expand

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