|
NSUNI/NSLAR Library a250670
|
Functions | |
| std::map< u16, std::set< std::string > > | nnl::action::GetAnimationNames (const ActionConfig &action_config) |
| Returns a map of animation IDs and names of all actions in which those animations were used. | |
| template<class... Ts, class Node> | |
| std::tuple< Ts... > | nnl::action::ReadArgs (std::size_t main_node_ind, const std::vector< Node > &nodes) |
| Extracts arguments from a series of nodes. | |
| template<class... Ts, class Node> | |
| void | nnl::action::WriteArgs (std::size_t main_node_ind, std::vector< Node > &nodes, const Ts &&... args) |
| Converts arguments to a series of nodes. | |
| template<class Node> | |
| std::size_t | nnl::action::NextNodeInd (std::size_t main_node_ind, const std::vector< Node > &nodes) |
| Calculates the absolute index of the next main node in a vector. | |
| std::map< u16, std::set< std::string > > nnl::action::GetAnimationNames | ( | const ActionConfig & | action_config | ) |
Returns a map of animation IDs and names of all actions in which those animations were used.
| action_config | An ActionConfig object containing actions. |
|
inline |
Calculates the absolute index of the next main node in a vector.
| Node | The type of the node (deduced). |
| main_node_ind | Index of the main node in a vector. |
| nodes | A vector that stores nodes. |
|
inline |
Extracts arguments from a series of nodes.
This function reads arguments from argument nodes of a given main node, taking alignment into account, and stores them in a tuple.
For example, given a node chain consisting of [{main}, {u16, u8, u8}, {f32}], 3 arguments can be extracted as follows:
| Ts | Types of the arguments to be extracted. |
| Node | The type of the node (deduced) |
| main_node_ind | Index of the main node in a vector of nodes from which to extract arguments. |
| nodes | A vector that stores nodes. |
|
inline |
Converts arguments to a series of nodes.
This function converts arguments to nodes, taking alignment into account. It will expand the provided vector of nodes if there's not enough space. For example, writing to a chain with a single [{main}] node can be done as follows:
If next_main_node is not 0, an error is thrown in case the write operation exceeds the existing memory region for arguments.
If next_main_node is 0, the value is updated to the correct number.
| Ts | Types of the arguments to be extracted. |
| Node | The type of the node. This can be deduced automatically. |
| main_node_ind | Index of the main node in a vector of nodes for which to write arguments. |
| nodes | A vector that stores nodes. |
| args | A variadic number of values to be converted to nodes. |