#include <sprk_hca.h>
|
bool | Empty () |
|
bool | Equals (Model const &other) const |
|
void | Hide (HPS::Canvas const &in_canvas, int64_t in_node_id) |
|
void | Highlight (HPS::Canvas const &in_canvas, HighlightOptionsKit const &in_highlight_options, int64_t in_node_id) |
|
void | Highlight (HPS::Canvas const &in_canvas, HighlightOptionsKit const &in_highlight_options, HPS::Int64Array const &in_node_ids) |
|
bool | IsHidden (int64_t in_node_id) |
|
bool | IsHighlighted (int64_t in_node_id) |
|
void | Isolate (HPS::Canvas const &in_canvas, int64_t in_node_id) |
|
| Model () |
|
| Model (HPS::Model const &in_model) |
|
| Model (Model const &that) |
|
| Model (Model &&that) |
|
void | OnHighlightUnhighlight () |
|
bool | operator!= (Model const &other) const |
|
Model & | operator= (Model &&other) |
|
bool | operator== (Model const &other) const |
|
bool | RequestNodeProperties (int64_t in_node_id, uint32_t &out_request_id) |
|
bool | RetrieveNodeProperties (uint32_t in_request_id, uint32_t in_timeout_ms, int64_t &out_node_id, bool &out_valid, HPS::UTF8Array &out_keys, HPS::UTF8Array &out_values) |
|
void | Show (HPS::Canvas const &in_canvas, int64_t in_node_id) |
|
void | ShowAll (HPS::Canvas const &in_canvas) |
|
bool | ShowNodeChildren (int64_t in_node_id, HPS::Int64Array &out_ids) |
|
bool | ShowNodeFromKeyPath (HPS::KeyPath const &in_key_path, int64_t &out_node_id) |
|
bool | ShowNodeName (int64_t in_node_id, HPS::UTF8 &out_name) |
|
bool | ShowNodeParent (int64_t in_node_id, int64_t &out_parent_id) |
|
bool | ShowRootNode (int64_t &out_node_id) |
|
void | Unhighlight (HPS::Canvas const &in_canvas, int64_t in_node_id) |
|
void | UnhighlightAll (HPS::Canvas const &in_canvas) |
|
void | Zoom (HPS::Canvas const &in_canvas, int64_t in_node_id) |
|
The Model class provides interactions with a HCA Model
◆ Model() [1/4]
HPS::HCA::Model::Model |
( |
| ) |
|
◆ Model() [2/4]
HPS::HCA::Model::Model |
( |
HPS::Model const & |
in_model | ) |
|
◆ Model() [3/4]
HPS::HCA::Model::Model |
( |
Model const & |
that | ) |
|
Copy constructor. This constructor creates an HCA::Model which shares the same resources of the source HCA::Model.
- Parameters
-
◆ Model() [4/4]
HPS::HCA::Model::Model |
( |
Model && |
that | ) |
|
The move constructor creates an HCA::Model by transferring the underlying object of the rvalue reference to this HCA::Model.
- Parameters
-
in_that | An rvalue reference to an HCA::Model to take the underlying object from. |
◆ Empty()
bool HPS::HCA::Model::Empty |
( |
| ) |
|
Checks the state of the Model.
- Returns
- true if this Model is uninitialized, false otherwise.
◆ Equals()
bool HPS::HCA::Model::Equals |
( |
Model const & |
other | ) |
const |
Check if the source Model is equivalent to this Model.
- Parameters
-
- Returns
- true if the objects are equivalent, false otherwise.
◆ Hide()
void HPS::HCA::Model::Hide |
( |
HPS::Canvas const & |
in_canvas, |
|
|
int64_t |
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.
- Parameters
-
in_canvas | The Canvas in which to hide the node. |
in_node_id | The ID of the node to be hidden |
◆ Highlight() [1/2]
Highlights the specified node under the given Canvas, using the options provided. throws HPS::InvalidObjectException is the Model is uninitialized.
- Parameters
-
in_canvas | The Canvas in which to highlight the node. |
in_highlight_options | The options to be used when highlighting in_node_id. |
in_node_id | The ID of the node to be highlighted |
◆ Highlight() [2/2]
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.
- Parameters
-
in_canvas | The Canvas in which to highlight the nodes. |
in_highlight_options | The options to be used when highlighting in_node_ids. |
in_node_ids | an array of node IDs to be highlighted |
◆ IsHidden()
bool HPS::HCA::Model::IsHidden |
( |
int64_t |
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.
- Parameters
-
in_node_id | The ID of the node to examine. |
- Returns
- true if the node is hidden, false otherwise.
◆ IsHighlighted()
bool HPS::HCA::Model::IsHighlighted |
( |
int64_t |
in_node_id | ) |
|
Checks whether the given node is currently highlighted. throws HPS::InvalidObjectException is the Model is uninitialized.
- Parameters
-
in_node_id | The ID of the node to examine. |
- Returns
- true if the node is highlighted, false otherwise.
◆ Isolate()
void HPS::HCA::Model::Isolate |
( |
HPS::Canvas const & |
in_canvas, |
|
|
int64_t |
in_node_id |
|
) |
| |
Shows only the specified node and hides the rest. throws HPS::InvalidObjectException is the Model is uninitialized.
- Parameters
-
in_canvas | The Canvas in which to isolate the node. |
in_node_id | The ID of the node to isolate. |
◆ OnHighlightUnhighlight()
void HPS::HCA::Model::OnHighlightUnhighlight |
( |
| ) |
|
◆ operator!=()
bool HPS::HCA::Model::operator!= |
( |
Model const & |
other | ) |
const |
Check if the source Model is not equivalent to this Model.
- Parameters
-
- Returns
- true if the objects are not equivalent, false otherwise.
◆ operator=()
Model& HPS::HCA::Model::operator= |
( |
Model && |
other | ) |
|
Copies the source Model into this Model.
- Parameters
-
other | The source Model to copy. |
- Returns
- A reference to this Model.
◆ operator==()
bool HPS::HCA::Model::operator== |
( |
Model const & |
other | ) |
const |
Check if the source Model is equivalent to this Model.
- Parameters
-
- Returns
- true if the objects are equivalent, false otherwise.
◆ RequestNodeProperties()
bool HPS::HCA::Model::RequestNodeProperties |
( |
int64_t |
in_node_id, |
|
|
uint32_t & |
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.
- Parameters
-
in_node_id | the ID for the node whose properties should be collected. |
out_request_id | an ID which uniquely identifies this request |
- Returns
- true if the node's properties were gathered successfully, false otherwise.
◆ RetrieveNodeProperties()
bool HPS::HCA::Model::RetrieveNodeProperties |
( |
uint32_t |
in_request_id, |
|
|
uint32_t |
in_timeout_ms, |
|
|
int64_t & |
out_node_id, |
|
|
bool & |
out_valid, |
|
|
HPS::UTF8Array & |
out_keys, |
|
|
HPS::UTF8Array & |
out_values |
|
) |
| |
Retrieves previously requested properties throws HPS::InvalidObjectException is the Model is uninitialized. Before retrieving properties, you should request them, using RequestNodeProperties. This function waits for the requested property to become available If your model's properties are not changing, it is sufficient to call RequestNodeProperties just once for each node ID of interest. Each property is returned as a pair or key and value. The out_keys and out_values parameters are two parallel arrays containing respectively the key and value of each property.
- Parameters
-
in_request_id | a unique ID representing a request for properties. This value is obtained through a call to RequestNodeProperties. |
in_timeout_ms | the maximum amount of time to wait while trying to retrieve the node properties, specified in milliseconds. Passing 0 means that the function will wait indefinitely until it can retrieve the properties. |
out_node_id | the ID of the node for which properties are being returned. |
out_valid | whether the returned properties are valid. |
out_keys | the property keys. Each entry in this array corresponds to the entry at the same index in the out_values array. |
out_values | the property values. Each entry in this array corresponds to the entry at the same index in the out_keys array. |
- Returns
- true if the node's properties were retrieved successfully, false otherwise.
◆ Show()
void HPS::HCA::Model::Show |
( |
HPS::Canvas const & |
in_canvas, |
|
|
int64_t |
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.
- Parameters
-
in_canvas | The Canvas in which to show the node. |
in_node_id | The ID of the node to be shown |
◆ ShowAll()
void HPS::HCA::Model::ShowAll |
( |
HPS::Canvas const & |
in_canvas | ) |
|
◆ ShowNodeChildren()
bool HPS::HCA::Model::ShowNodeChildren |
( |
int64_t |
in_node_id, |
|
|
HPS::Int64Array & |
out_ids |
|
) |
| |
Shows the IDs of the children of the requested node. throws HPS::InvalidObjectException is the Model is uninitialized.
- Parameters
-
in_node_id | the ID for the node whose children should be shown |
out_ids | an array of IDs representing the children of in_node_id. |
- Returns
- true if the node's children were found successfully, false otherwise.
◆ ShowNodeFromKeyPath()
bool HPS::HCA::Model::ShowNodeFromKeyPath |
( |
HPS::KeyPath const & |
in_key_path, |
|
|
int64_t & |
out_node_id |
|
) |
| |
Given a KeyPath, the associated node ID is returned.
- Parameters
-
in_key_path | the key path for which a node ID is being requested |
out_node_id | the node ID that corresponds to in_key_path |
- Returns
- true if the node ID is associated to in_key_path, false otherwise.
◆ ShowNodeName()
bool HPS::HCA::Model::ShowNodeName |
( |
int64_t |
in_node_id, |
|
|
HPS::UTF8 & |
out_name |
|
) |
| |
Shows the name for the requested node. throws HPS::InvalidObjectException is the Model is uninitialized.
- Parameters
-
in_node_id | the ID for the node whose name should be shown |
out_name | the name of in_node_id, in the UTF8 locale. Might be an empty UTF8 object. |
- Returns
- true if the node name was found successfully, false otherwise.
◆ ShowNodeParent()
bool HPS::HCA::Model::ShowNodeParent |
( |
int64_t |
in_node_id, |
|
|
int64_t & |
out_parent_id |
|
) |
| |
Shows the ID of the parent of the requested node. throws HPS::InvalidObjectException is the Model is uninitialized.
- Parameters
-
in_node_id | the ID for the node whose parent should be shown |
out_parent_id | the ID representing the parent of in_node_id. Might be an empty array |
- Returns
- true if the node's parent was found successfully, false otherwise.
◆ ShowRootNode()
bool HPS::HCA::Model::ShowRootNode |
( |
int64_t & |
out_node_id | ) |
|
Shows the node ID for the root node of the Model. throws HPS::InvalidObjectException is the Model is uninitialized.
- Parameters
-
out_node_id | the node ID for the root node of the Model. |
- Returns
- true if the root node ID was found, false otherwise.
◆ Unhighlight()
void HPS::HCA::Model::Unhighlight |
( |
HPS::Canvas const & |
in_canvas, |
|
|
int64_t |
in_node_id |
|
) |
| |
Unhighlights the specified node under the given Canvas. throws HPS::InvalidObjectException is the Model is uninitialized.
- Parameters
-
in_canvas | The Canvas in which to unhighlight the node. |
in_node_id | The ID of the node to be unhighlighted |
◆ UnhighlightAll()
void HPS::HCA::Model::UnhighlightAll |
( |
HPS::Canvas const & |
in_canvas | ) |
|
◆ Zoom()
void HPS::HCA::Model::Zoom |
( |
HPS::Canvas const & |
in_canvas, |
|
|
int64_t |
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.
- Parameters
-
in_canvas | The Canvas in which to zoom to the node. |
in_node_id | The ID of the node to zoom to. |
The documentation for this class was generated from the following file: