IDS peak genericC++ v1.10.0
Loading...
Searching...
No Matches
peak_node_map.hpp
Go to the documentation of this file.
1
11#pragma once
12
13
15#include <peak/dll_interface/peak_dll_interface_util.hpp>
18
19#include <type_traits>
20#include <unordered_map>
21#include <algorithm>
22#include <cstdint>
23#include <functional>
24#include <iterator>
25#include <memory>
26#include <mutex>
27#include <string>
28#include <vector>
29
30
31namespace peak
32{
33namespace core
34{
35namespace nodes
36{
37
38class BooleanNode;
39class CategoryNode;
40class CommandNode;
41class EnumerationNode;
42class EnumerationEntryNode;
43class FloatNode;
44class IntegerNode;
45class Node;
46class RegisterNode;
47class StringNode;
48
49} // namespace nodes
50
51class Buffer;
52
60 : public InitOnce
61 , public std::enable_shared_from_this<NodeMap>
62{
63public:
65 using NodeFilterFunction = std::function<bool(const std::shared_ptr<const nodes::Node>& nodeToFilter)>;
66
73 {
74 public:
77 ScopedNodeMapLock(const ScopedNodeMapLock& other) = delete;
81
82 private:
83 friend NodeMap;
84 friend ClassCreator<ScopedNodeMapLock>;
85 explicit ScopedNodeMapLock(const std::shared_ptr<NodeMap>& nodeMap);
86 std::shared_ptr<NodeMap> m_nodeMap;
87 };
88
89 NodeMap() = delete;
90 ~NodeMap() = default;
91 NodeMap(const NodeMap& other) = delete;
92 NodeMap& operator=(const NodeMap& other) = delete;
93 NodeMap(NodeMap&& other) = delete;
94 NodeMap& operator=(NodeMap&& other) = delete;
95
105 bool HasNode(const std::string& name) const;
106
116 template <class NodeType, typename std::enable_if<std::is_base_of<nodes::Node, NodeType>::value, int>::type = 0>
117 bool HasNode(const std::string& name)
118 {
119 InitializeIfNecessary();
120 PEAK_NODE_HANDLE nodeHandle{ nullptr };
121 if (PEAK_C_ABI_PREFIX PEAK_NodeMap_FindNode(m_backendHandle, name.c_str(), name.size() + 1, &nodeHandle)
123 {
124 return false;
125 }
126
127 return std::dynamic_pointer_cast<NodeType>(m_nodesByName.at(name)) != nullptr;
128 }
129
143 std::shared_ptr<nodes::Node> FindNode(const std::string& name);
144
159 template <class NodeType, typename std::enable_if<std::is_base_of<nodes::Node, NodeType>::value, int>::type = 0>
160 std::shared_ptr<NodeType> FindNode(const std::string& name)
161 {
162 auto castedNode = std::dynamic_pointer_cast<NodeType>(FindNode(name));
163 if (!castedNode)
164 {
165 throw InvalidCastException("Invalid node cast!");
166 }
167
168 return castedNode;
169 }
170
182 std::shared_ptr<nodes::Node> TryFindNode(const std::string& name);
183
196 template <class NodeType, typename std::enable_if<std::is_base_of<nodes::Node, NodeType>::value, int>::type = 0>
197 std::shared_ptr<NodeType> TryFindNode(const std::string& name)
198 {
199 auto node = TryFindNode(name);
200 if(node == nullptr)
201 {
202 return nullptr;
203 }
204
205 auto castedNode = std::dynamic_pointer_cast<NodeType>(node);
206 if (!castedNode)
207 {
208 throw InvalidCastException("Invalid node cast!");
209 }
210
211 return castedNode;
212 }
213
221 void InvalidateNodes();
222
232 void PollNodes(int64_t elapsedTime_ms);
233
243 std::vector<std::shared_ptr<nodes::Node>> Nodes() const;
244
255 bool HasBufferSupportedChunks(const std::shared_ptr<Buffer>& buffer) const;
256
270 void UpdateChunkNodes(const std::shared_ptr<Buffer>& buffer);
271
282 bool HasEventSupportedData(const std::unique_ptr<Event>& event) const;
283
297 void UpdateEventNodes(const std::unique_ptr<Event>& event);
298
312 void StoreToFile(const std::string& filePath) const;
313
327 void LoadFromFile(const std::string& filePath);
328
347 std::unique_ptr<ScopedNodeMapLock> Lock();
348
359 {
360 return m_backendHandle;
361 }
362
363private:
364 std::shared_ptr<nodes::Node> NodeFromHandle(PEAK_NODE_HANDLE nodeHandle) const;
365
366 friend ClassCreator<NodeMap>;
367 explicit NodeMap(PEAK_NODE_MAP_HANDLE nodeMapHandle);
368 PEAK_NODE_MAP_HANDLE m_backendHandle;
369
370 void Initialize() const override;
371 mutable std::vector<std::shared_ptr<nodes::Node>> m_nodes;
372 mutable std::unordered_map<std::string, std::shared_ptr<nodes::Node>> m_nodesByName;
373};
374
375} /* namespace core */
376} /* namespace peak */
377
388
389
390/* Implementation */
391namespace peak
392{
393namespace core
394{
395
396inline NodeMap::NodeMap(PEAK_NODE_MAP_HANDLE nodeMapHandle)
397 : m_backendHandle(nodeMapHandle)
398 , m_nodes()
399 , m_nodesByName()
400{}
401
402inline bool NodeMap::HasNode(const std::string& name) const
403{
404 return QueryNumericFromCInterfaceFunction<PEAK_BOOL8>([&](PEAK_BOOL8* hasNode) {
405 return PEAK_C_ABI_PREFIX PEAK_NodeMap_GetHasNode(m_backendHandle, name.c_str(), name.size() + 1, hasNode);
406 }) > 0;
407}
408
409inline std::shared_ptr<nodes::Node> NodeMap::FindNode(const std::string& name)
410{
411 InitializeIfNecessary();
412
413 (void)QueryNumericFromCInterfaceFunction<PEAK_NODE_HANDLE>([&](PEAK_NODE_HANDLE* nodeHandle) {
415 m_backendHandle, name.c_str(), name.size() + 1, nodeHandle);
416 });
417
418 return m_nodesByName.at(name);
419}
420
421inline std::shared_ptr<nodes::Node> NodeMap::TryFindNode(const std::string& name)
422{
423 InitializeIfNecessary();
424
425 const auto cNodeHandle = QueryNumericFromCInterfaceFunction<PEAK_NODE_HANDLE>([&](PEAK_NODE_HANDLE* nodeHandle) {
427 m_backendHandle, name.c_str(), name.size() + 1, nodeHandle);
428 });
429
430 if(cNodeHandle == nullptr)
431 {
432 return nullptr;
433 }
434
435 return m_nodesByName.at(name);
436}
437
439{
440 CallAndCheckCInterfaceFunction(
441 [&] { return PEAK_C_ABI_PREFIX PEAK_NodeMap_InvalidateNodes(m_backendHandle); });
442}
443
444inline void NodeMap::PollNodes(int64_t elapsedTime_ms)
445{
446 CallAndCheckCInterfaceFunction(
447 [&] { return PEAK_C_ABI_PREFIX PEAK_NodeMap_PollNodes(m_backendHandle, elapsedTime_ms); });
448}
449
450inline std::vector<std::shared_ptr<nodes::Node>> NodeMap::Nodes() const
451{
452 InitializeIfNecessary();
453
454 return m_nodes;
455}
456
457inline bool NodeMap::HasEventSupportedData(const std::unique_ptr<Event>& event) const
458{
459 if (event == nullptr)
460 {
461 throw InvalidArgumentException("The given event is a nullptr!");
462 }
463
464 return QueryNumericFromCInterfaceFunction<PEAK_BOOL8>([&](PEAK_BOOL8* hasSupportedData) {
466 m_backendHandle, event->m_backendHandle, hasSupportedData);
467 }) > 0;
468}
469
470inline void NodeMap::UpdateEventNodes(const std::unique_ptr<Event>& event)
471{
472 if (event == nullptr)
473 {
474 throw InvalidArgumentException("The given event is a nullptr!");
475 }
476
477 CallAndCheckCInterfaceFunction(
478 [&] { return PEAK_C_ABI_PREFIX PEAK_NodeMap_UpdateEventNodes(m_backendHandle, event->m_backendHandle); });
479}
480
481inline void NodeMap::StoreToFile(const std::string& filePath) const
482{
483 CallAndCheckCInterfaceFunction([&] {
484 return PEAK_C_ABI_PREFIX PEAK_NodeMap_StoreToFile(m_backendHandle, filePath.c_str(), filePath.size() + 1);
485 });
486}
487
488inline void NodeMap::LoadFromFile(const std::string& filePath)
489{
490 InitializeIfNecessary();
491
492 CallAndCheckCInterfaceFunction([&] {
494 m_backendHandle, filePath.c_str(), filePath.size() + 1);
495 });
496}
497
498inline NodeMap::ScopedNodeMapLock::ScopedNodeMapLock(const std::shared_ptr<NodeMap>& nodeMap)
499 : m_nodeMap(nodeMap)
500{
501 CallAndCheckCInterfaceFunction(
502 [&] { return PEAK_C_ABI_PREFIX PEAK_NodeMap_Lock(m_nodeMap->m_backendHandle); });
503}
505{
506 CallAndCheckCInterfaceFunction(
507 [&] { return PEAK_C_ABI_PREFIX PEAK_NodeMap_Unlock(m_nodeMap->m_backendHandle); });
508}
509
510inline std::unique_ptr<NodeMap::ScopedNodeMapLock> NodeMap::Lock()
511{
512 return std::make_unique<ClassCreator<ScopedNodeMapLock>>(shared_from_this());
513}
514
515inline std::shared_ptr<nodes::Node> NodeMap::NodeFromHandle(PEAK_NODE_HANDLE nodeHandle) const
516{
517 auto nodeType = QueryNumericFromCInterfaceFunction<PEAK_NODE_TYPE>(
518 [&](PEAK_NODE_TYPE* _nodeType) { return PEAK_C_ABI_PREFIX PEAK_Node_GetType(nodeHandle, _nodeType); });
519
520 switch (nodeType)
521 {
523 auto integerNodeHandle = QueryNumericFromCInterfaceFunction<PEAK_INTEGER_NODE_HANDLE>(
524 [&](PEAK_INTEGER_NODE_HANDLE* _integerNodeHandle) {
525 return PEAK_C_ABI_PREFIX PEAK_Node_ToIntegerNode(nodeHandle, _integerNodeHandle);
526 });
527
528 return std::make_shared<ClassCreator<nodes::IntegerNode>>(
529 integerNodeHandle, std::const_pointer_cast<core::NodeMap>(shared_from_this()));
530 }
532 auto booleanNodeHandle = QueryNumericFromCInterfaceFunction<PEAK_BOOLEAN_NODE_HANDLE>(
533 [&](PEAK_BOOLEAN_NODE_HANDLE* _booleanNodeHandle) {
534 return PEAK_C_ABI_PREFIX PEAK_Node_ToBooleanNode(nodeHandle, _booleanNodeHandle);
535 });
536
537 return std::make_shared<ClassCreator<nodes::BooleanNode>>(
538 booleanNodeHandle, std::const_pointer_cast<core::NodeMap>(shared_from_this()));
539 }
541 auto commandNodeHandle = QueryNumericFromCInterfaceFunction<PEAK_COMMAND_NODE_HANDLE>(
542 [&](PEAK_COMMAND_NODE_HANDLE* _commandNodeHandle) {
543 return PEAK_C_ABI_PREFIX PEAK_Node_ToCommandNode(nodeHandle, _commandNodeHandle);
544 });
545
546 return std::make_shared<ClassCreator<nodes::CommandNode>>(
547 commandNodeHandle, std::const_pointer_cast<core::NodeMap>(shared_from_this()));
548 }
550 auto floatNodeHandle = QueryNumericFromCInterfaceFunction<PEAK_FLOAT_NODE_HANDLE>(
551 [&](PEAK_FLOAT_NODE_HANDLE* _floatNodeHandle) {
552 return PEAK_C_ABI_PREFIX PEAK_Node_ToFloatNode(nodeHandle, _floatNodeHandle);
553 });
554
555 return std::make_shared<ClassCreator<nodes::FloatNode>>(
556 floatNodeHandle, std::const_pointer_cast<core::NodeMap>(shared_from_this()));
557 }
559 auto stringNodeHandle = QueryNumericFromCInterfaceFunction<PEAK_STRING_NODE_HANDLE>(
560 [&](PEAK_STRING_NODE_HANDLE* _stringNodeHandle) {
561 return PEAK_C_ABI_PREFIX PEAK_Node_ToStringNode(nodeHandle, _stringNodeHandle);
562 });
563
564 return std::make_shared<ClassCreator<nodes::StringNode>>(
565 stringNodeHandle, std::const_pointer_cast<core::NodeMap>(shared_from_this()));
566 }
568 auto registerNodeHandle = QueryNumericFromCInterfaceFunction<PEAK_REGISTER_NODE_HANDLE>(
569 [&](PEAK_REGISTER_NODE_HANDLE* _registerNodeHandle) {
570 return PEAK_C_ABI_PREFIX PEAK_Node_ToRegisterNode(nodeHandle, _registerNodeHandle);
571 });
572
573 return std::make_shared<ClassCreator<nodes::RegisterNode>>(
574 registerNodeHandle, std::const_pointer_cast<core::NodeMap>(shared_from_this()));
575 }
577 auto categoryNodeHandle = QueryNumericFromCInterfaceFunction<PEAK_CATEGORY_NODE_HANDLE>(
578 [&](PEAK_CATEGORY_NODE_HANDLE* _categoryNodeHandle) {
579 return PEAK_C_ABI_PREFIX PEAK_Node_ToCategoryNode(nodeHandle, _categoryNodeHandle);
580 });
581
582 return std::make_shared<ClassCreator<nodes::CategoryNode>>(
583 categoryNodeHandle, std::const_pointer_cast<core::NodeMap>(shared_from_this()));
584 }
586 auto enumerationNodeHandle = QueryNumericFromCInterfaceFunction<PEAK_ENUMERATION_NODE_HANDLE>(
587 [&](PEAK_ENUMERATION_NODE_HANDLE* _enumerationNodeHandle) {
588 return PEAK_C_ABI_PREFIX PEAK_Node_ToEnumerationNode(nodeHandle, _enumerationNodeHandle);
589 });
590
591 return std::make_shared<ClassCreator<nodes::EnumerationNode>>(
592 enumerationNodeHandle, std::const_pointer_cast<core::NodeMap>(shared_from_this()));
593 }
595 auto enumerationEntryNodeHandle = QueryNumericFromCInterfaceFunction<PEAK_ENUMERATION_ENTRY_NODE_HANDLE>(
596 [&](PEAK_ENUMERATION_ENTRY_NODE_HANDLE* _enumerationEntryNodeHandle) {
598 nodeHandle, _enumerationEntryNodeHandle);
599 });
600
601 return std::make_shared<ClassCreator<nodes::EnumerationEntryNode>>(
602 enumerationEntryNodeHandle, std::const_pointer_cast<core::NodeMap>(shared_from_this()));
603 }
604 default: {
605 return std::make_shared<ClassCreator<nodes::Node>>(
606 nodeHandle, std::const_pointer_cast<core::NodeMap>(shared_from_this()));
607 }
608 }
609}
610
611inline void NodeMap::Initialize() const
612{
613 auto numNodes = QueryNumericFromCInterfaceFunction<size_t>([&](size_t* _numNodes) {
614 return PEAK_C_ABI_PREFIX PEAK_NodeMap_GetNumNodes(m_backendHandle, _numNodes);
615 });
616
617 for (size_t x = 0; x < numNodes; ++x)
618 {
619 auto nodeHandle = QueryNumericFromCInterfaceFunction<PEAK_NODE_HANDLE>(
620 [&](PEAK_NODE_HANDLE* _nodeHandle) {
621 return PEAK_C_ABI_PREFIX PEAK_NodeMap_GetNode(m_backendHandle, x, _nodeHandle);
622 });
623
624 auto node = NodeFromHandle(nodeHandle);
625
626 m_nodes.emplace_back(node);
627 m_nodesByName.emplace(node->Name(), node);
628 }
629}
630
631} /* namespace core */
632} /* namespace peak */
The exception thrown for passing an invalid argument to a function.
Definition peak_exception.hpp:74
The exception thrown for trying to apply an invalid cast.
Definition peak_exception.hpp:82
Holds a recursive lock on the NodeMap.
Definition peak_node_map.hpp:73
ScopedNodeMapLock(ScopedNodeMapLock &&other)=delete
ScopedNodeMapLock & operator=(ScopedNodeMapLock &&other)=delete
ScopedNodeMapLock & operator=(const ScopedNodeMapLock &other)=delete
ScopedNodeMapLock(const ScopedNodeMapLock &other)=delete
~ScopedNodeMapLock()
Definition peak_node_map.hpp:504
Represents a GenAPI node map.
Definition peak_node_map.hpp:62
PEAK_NODE_MAP_HANDLE Handle() const
Get the backend handle.
Definition peak_node_map.hpp:358
std::shared_ptr< nodes::Node > FindNode(const std::string &name)
Find a node with the given name.
Definition peak_node_map.hpp:409
bool HasNode(const std::string &name) const
Checks whether the node map contains a node with the given name.
Definition peak_node_map.hpp:402
bool HasEventSupportedData(const std::unique_ptr< Event > &event) const
Checks if the Event contains data corresponding to the NodeMap.
Definition peak_node_map.hpp:457
void StoreToFile(const std::string &filePath) const
Stores the values of streamable nodes to the file at the given file path.
Definition peak_node_map.hpp:481
bool HasNode(const std::string &name)
Checks whether the node map contains a node with the given name and type.
Definition peak_node_map.hpp:117
NodeMap & operator=(const NodeMap &other)=delete
std::unique_ptr< ScopedNodeMapLock > Lock()
Locks a recursive mutex on the NodeMap.
Definition peak_node_map.hpp:510
NodeMap(const NodeMap &other)=delete
void PollNodes(int64_t elapsedTime_ms)
Polls all nodes having a polling time.
Definition peak_node_map.hpp:444
std::shared_ptr< NodeType > TryFindNode(const std::string &name)
Tries to find a node with the given name and type.
Definition peak_node_map.hpp:197
std::vector< std::shared_ptr< nodes::Node > > Nodes() const
Returns the nodes.
Definition peak_node_map.hpp:450
std::function< bool(const std::shared_ptr< const nodes::Node > &nodeToFilter)> NodeFilterFunction
Definition peak_node_map.hpp:65
void UpdateChunkNodes(const std::shared_ptr< Buffer > &buffer)
Updates chunk information in the NodeMap.
Definition peak_buffer.hpp:915
void InvalidateNodes()
Invalidates all nodes.
Definition peak_node_map.hpp:438
std::shared_ptr< NodeType > FindNode(const std::string &name)
Find a node with the given name and type.
Definition peak_node_map.hpp:160
NodeMap(NodeMap &&other)=delete
void LoadFromFile(const std::string &filePath)
Loads the values of streamable nodes from the file at the given file path.
Definition peak_node_map.hpp:488
bool HasBufferSupportedChunks(const std::shared_ptr< Buffer > &buffer) const
Checks if the Buffer contains chunks corresponding to the NodeMap.
Definition peak_buffer.hpp:902
NodeMap & operator=(NodeMap &&other)=delete
void UpdateEventNodes(const std::unique_ptr< Event > &event)
Updates event information in the NodeMap.
Definition peak_node_map.hpp:470
std::shared_ptr< nodes::Node > TryFindNode(const std::string &name)
Tries to find a node with the given name.
Definition peak_node_map.hpp:421
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:33
PEAK_C_API PEAK_Node_ToEnumerationEntryNode(PEAK_NODE_HANDLE nodeHandle, PEAK_ENUMERATION_ENTRY_NODE_HANDLE *enumerationEntryNodeHandle)
Casts the given node to an enumeration entry node.
@ PEAK_NODE_TYPE_BOOLEAN
Definition peak_backend.h:287
@ PEAK_NODE_TYPE_FLOAT
Definition peak_backend.h:289
@ PEAK_NODE_TYPE_COMMAND
Definition peak_backend.h:288
@ PEAK_NODE_TYPE_CATEGORY
Definition peak_backend.h:292
@ PEAK_NODE_TYPE_ENUMERATION_ENTRY
Definition peak_backend.h:294
@ PEAK_NODE_TYPE_ENUMERATION
Definition peak_backend.h:293
@ PEAK_NODE_TYPE_STRING
Definition peak_backend.h:290
@ PEAK_NODE_TYPE_INTEGER
Definition peak_backend.h:286
@ PEAK_NODE_TYPE_REGISTER
Definition peak_backend.h:291
PEAK_C_API PEAK_NodeMap_GetNode(PEAK_NODE_MAP_HANDLE nodeMapHandle, size_t index, PEAK_NODE_HANDLE *nodeHandle)
Asks the given node map for the node with the given index.
PEAK_C_API PEAK_Node_ToRegisterNode(PEAK_NODE_HANDLE nodeHandle, PEAK_REGISTER_NODE_HANDLE *registerNodeHandle)
Casts the given node to a register node.
PEAK_C_API PEAK_NodeMap_UpdateEventNodes(PEAK_NODE_MAP_HANDLE nodeMapHandle, PEAK_EVENT_HANDLE eventHandle)
Updates event information in the node map.
PEAK_C_API PEAK_NodeMap_Lock(PEAK_NODE_MAP_HANDLE nodeMapHandle)
Locks a recursive mutex on the NodeMap.
struct PEAK_ENUMERATION_NODE * PEAK_ENUMERATION_NODE_HANDLE
Definition peak_backend.h:461
PEAK_C_API PEAK_NodeMap_GetHasEventSupportedData(PEAK_NODE_MAP_HANDLE nodeMapHandle, PEAK_EVENT_HANDLE eventHandle, PEAK_BOOL8 *hasSupportedData)
Checks if the event contains data corresponding to the node map.
struct PEAK_COMMAND_NODE * PEAK_COMMAND_NODE_HANDLE
Definition peak_backend.h:441
struct PEAK_STRING_NODE * PEAK_STRING_NODE_HANDLE
Definition peak_backend.h:449
PEAK_C_API PEAK_Node_ToBooleanNode(PEAK_NODE_HANDLE nodeHandle, PEAK_BOOLEAN_NODE_HANDLE *booleanNodeHandle)
Casts the given node to a boolean node.
struct PEAK_NODE * PEAK_NODE_HANDLE
Definition peak_backend.h:429
PEAK_C_API PEAK_Node_GetType(PEAK_NODE_HANDLE nodeHandle, PEAK_NODE_TYPE *type)
Asks the given node for its type.
int32_t PEAK_NODE_TYPE
Definition peak_backend.h:296
PEAK_C_API PEAK_Node_ToFloatNode(PEAK_NODE_HANDLE nodeHandle, PEAK_FLOAT_NODE_HANDLE *floatNodeHandle)
Casts the given node to a float node.
PEAK_C_API PEAK_NodeMap_GetHasNode(PEAK_NODE_MAP_HANDLE nodeMapHandle, const char *nodeName, size_t nodeNameSize, PEAK_BOOL8 *hasNode)
Checks whether the given node map contains a node with the given name.
PEAK_C_API PEAK_Node_ToIntegerNode(PEAK_NODE_HANDLE nodeHandle, PEAK_INTEGER_NODE_HANDLE *integerNodeHandle)
Casts the given node to an integer node.
PEAK_C_API PEAK_NodeMap_PollNodes(PEAK_NODE_MAP_HANDLE nodeMapHandle, int64_t elapsedTime_ms)
Tells the given node map to poll its nodes.
PEAK_C_API PEAK_NodeMap_StoreToFile(PEAK_NODE_MAP_HANDLE nodeMapHandle, const char *filePath, size_t filePathSize)
Tells the given node map to store the values of its streamable nodes to a file at the given file path...
struct PEAK_FLOAT_NODE * PEAK_FLOAT_NODE_HANDLE
Definition peak_backend.h:445
PEAK_C_API PEAK_Node_ToEnumerationNode(PEAK_NODE_HANDLE nodeHandle, PEAK_ENUMERATION_NODE_HANDLE *enumerationNodeHandle)
Casts the given node to an enumeration node.
PEAK_C_API PEAK_NodeMap_GetNumNodes(PEAK_NODE_MAP_HANDLE nodeMapHandle, size_t *numNodes)
Asks the given node map for its number of nodes.
PEAK_C_API PEAK_NodeMap_FindNode(PEAK_NODE_MAP_HANDLE nodeMapHandle, const char *nodeName, size_t nodeNameSize, PEAK_NODE_HANDLE *nodeHandle)
Tells the given node map to find a node with the given name.
PEAK_C_API PEAK_Node_ToCategoryNode(PEAK_NODE_HANDLE nodeHandle, PEAK_CATEGORY_NODE_HANDLE *categoryNodeHandle)
Casts the given node to a category node.
int8_t PEAK_BOOL8
Definition peak_backend.h:43
struct PEAK_NODE_MAP * PEAK_NODE_MAP_HANDLE
Definition peak_backend.h:425
struct PEAK_ENUMERATION_ENTRY_NODE * PEAK_ENUMERATION_ENTRY_NODE_HANDLE
Definition peak_backend.h:465
struct PEAK_CATEGORY_NODE * PEAK_CATEGORY_NODE_HANDLE
Definition peak_backend.h:457
struct PEAK_REGISTER_NODE * PEAK_REGISTER_NODE_HANDLE
Definition peak_backend.h:453
PEAK_C_API PEAK_Node_ToStringNode(PEAK_NODE_HANDLE nodeHandle, PEAK_STRING_NODE_HANDLE *stringNodeHandle)
Casts the given node to a string node.
PEAK_C_API PEAK_Node_ToCommandNode(PEAK_NODE_HANDLE nodeHandle, PEAK_COMMAND_NODE_HANDLE *commandNodeHandle)
Casts the given node to a command node.
@ PEAK_RETURN_CODE_SUCCESS
Definition peak_backend.h:334
PEAK_C_API PEAK_NodeMap_Unlock(PEAK_NODE_MAP_HANDLE nodeMapHandle)
Unlocks the recursive mutex on the NodeMap.
PEAK_C_API PEAK_NodeMap_InvalidateNodes(PEAK_NODE_MAP_HANDLE nodeMapHandle)
Tells the given node map to invalidate its nodes.
struct PEAK_BOOLEAN_NODE * PEAK_BOOLEAN_NODE_HANDLE
Definition peak_backend.h:437
struct PEAK_INTEGER_NODE * PEAK_INTEGER_NODE_HANDLE
Definition peak_backend.h:433
PEAK_C_API PEAK_NodeMap_LoadFromFile(PEAK_NODE_MAP_HANDLE nodeMapHandle, const char *filePath, size_t filePathSize)
Tells the given node map to load the values of its streamable nodes from a file at the given file pat...
PEAK_C_API PEAK_NodeMap_TryFindNode(PEAK_NODE_MAP_HANDLE nodeMapHandle, const char *nodeName, size_t nodeNameSize, PEAK_NODE_HANDLE *nodeHandle)
Tells the given node map to try to find a node with the given name.
#define PEAK_C_ABI_PREFIX
Definition peak_dll_defines.h:16