HPS.HCA.Model
- class HPS.HCA.Model : public IDisposable
The Model class provides interactions with a HCAModel
Public Functions
- bool Empty ()
Checks the state of the Model.
- Return
true if this Model is uninitialized, false otherwise.
- bool Equals (HPS.HCA.Model other)
- void Hide (HPS.Canvas in_canvas, Int64 in_node_id)
Hides the specified node under the given Canvas. This makes the selected node invisible. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_canvas
The Canvas in which to hide the node.
- Param in_node_id
The ID of the node to be hidden
- void Highlight (HPS.Canvas in_canvas, HPS.HighlightOptionsKit in_highlight_options, Int64 in_node_id)
Highlights the specified node under the given Canvas, using the options provided. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_canvas
The Canvas in which to highlight the node.
- Param in_highlight_options
The options to be used when highlighting in_node_id.
- Param in_node_id
The ID of the node to be highlighted
- void Highlight (HPS.Canvas in_canvas, HPS.HighlightOptionsKit in_highlight_options, Int64[] in_node_ids)
Highlights the specified nodes under the given Canvas, using the options provided. All specified nodes will be highlighted using the same options. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_canvas
The Canvas in which to highlight the nodes.
- Param in_highlight_options
The options to be used when highlighting in_node_ids.
- Param in_node_ids
an array of node IDs to be highlighted
- bool IsHidden (Int64 in_node_id)
Checks whether the given node is currently Hidden as a result of a Hide or Isolate operation. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_node_id
The ID of the node to examine.
- Return
true if the node is hidden, false otherwise.
- bool IsHighlighted (Int64 in_node_id)
Checks whether the given node is currently highlighted. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_node_id
The ID of the node to examine.
- Return
true if the node is highlighted, false otherwise.
- void Isolate (HPS.Canvas in_canvas, Int64 in_node_id)
Shows only the specified node and hides the rest. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_canvas
The Canvas in which to isolate the node.
- Param in_node_id
The ID of the node to isolate.
- Model (HPS.HCA.Model that)
Copy constructor. This constructor creates an HCA.Model which shares the same resources of the source HCA.Model.
- Model (HPS.Model in_model)
- void OnHighlightUnhighlight ()
This convenience function performs the HCA.ModelTreeItem.OnHighlightUnhighlight function on the root item of the Model Tree See the description of HCA.ModelTreeItem.OnHighlightUnhighlight for more information.
- bool RequestNodeProperties (Int64 in_node_id, out UInt32 out_request_id)
Requests properties for the specified node. throws HPS.InvalidObjectException is the Model is uninitialized. When the request has been fulfilled, an event of type HCA.RequestIdEvent will be injected to the Database’s Event Dispatcher. Registering a handler to HCA.RequestIdEvent will allow the user to know when this request has completed. The value of HCA.RequestIdEvent.request_id object will match out_requested_id, returned by this function.
- Param in_node_id
the ID for the node whose properties should be collected.
- Param out_request_id
an ID which uniquely identifies this request
- Return
true if the node’s properties were gathered successfully, false otherwise.
- void Show (HPS.Canvas in_canvas, Int64 in_node_id)
Shows the specified node under the given Canvas. This makes the selected node visible. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_canvas
The Canvas in which to show the node.
- Param in_node_id
The ID of the node to be shown
- void ShowAll (HPS.Canvas in_canvas)
Shows all nodes in the model, under the specified Canvas. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_canvas
The Canvas in which to show the nodes.
- bool ShowNodeChildren (Int64 in_node_id, out Int64[] out_ids)
Shows the IDs of the children of the requested node. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_node_id
the ID for the node whose children should be shown
- Param out_ids
an array of IDs representing the children of in_node_id.
- Return
true if the node’s children were found successfully, false otherwise.
- bool ShowNodeFromKeyPath (HPS.KeyPath in_key_path, out Int64 out_node_id)
Given a KeyPath, the associated node ID is returned.
- Param in_key_path
the key path for which a node ID is being requested
- Param out_node_id
the node ID that corresponds to in_key_path
- Return
true if the node ID is associated to in_key_path, false otherwise.
- bool ShowNodeName (Int64 in_node_id, out string out_name)
Shows the name for the requested node. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_node_id
the ID for the node whose name should be shown
- Param out_name
the name of in_node_id, in the UTF8 locale. Might be an empty UTF8 object.
- Return
true if the node name was found successfully, false otherwise.
- bool ShowNodeParent (Int64 in_node_id, out Int64 out_parent_id)
Shows the ID of the parent of the requested node. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_node_id
the ID for the node whose parent should be shown
- Param out_parent_id
the ID representing the parent of in_node_id. Might be an empty array
- Return
true if the node’s parent was found successfully, false otherwise.
- bool ShowRootNode (out Int64 out_node_id)
Shows the node ID for the root node of the Model. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param out_node_id
the node ID for the root node of the Model.
- Return
true if the root node ID was found, false otherwise.
- void Unhighlight (HPS.Canvas in_canvas, Int64 in_node_id)
Unhighlights the specified node under the given Canvas. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_canvas
The Canvas in which to unhighlight the node.
- Param in_node_id
The ID of the node to be unhighlighted
- void UnhighlightAll (HPS.Canvas in_canvas)
Unhighlights all nodes in the model, under the specified Canvas. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_canvas
The Canvas in which to unhighlight the nodes.
- void Zoom (HPS.Canvas in_canvas, Int64 in_node_id)
Smoothly zooms the camera to focus on the specified node. The transition lasts half a second. throws HPS.InvalidObjectException is the Model is uninitialized.
- Param in_canvas
The Canvas in which to zoom to the node.
- Param in_node_id
The ID of the node to zoom to.