CVB++ 15.0
Loading...
Searching...
No Matches
chunk_int_reg_node.hpp
1#pragma once
2
3#include "../global.hpp"
4#include "int_reg_node.hpp"
5
6namespace Cvb
7{
8 CVB_BEGIN_INLINE_NS
9 namespace GevServer
10 {
11 class ChunkIntRegNode : public IntRegNode
12 {
13 public:
14 explicit ChunkIntRegNode(HandleGuard<Node> &&guard)
15 : IntRegNode(std::move(guard))
16 {
17 }
18
19 static ChunkIntRegNodePtr Create(const String &name, const GevServer::Namespace &nameSpace,
20 std::int64_t length)
21 {
22 String okName = EnsureNodeNameOnly(name);
23 return std::make_shared<ChunkIntRegNode>(HandleGuard<Node>(CExports::CreateGSChunkIntRegNodeTyped(okName.data(), static_cast<CExports::TGSNamespace>(nameSpace), length)));
24 }
25
26 static ChunkIntRegNodePtr Create(const String &name, std::int64_t length)
27 {
28 return Create(ParseName(name), ParseNamespace(name), length);
29 }
30
31 std::int64_t Length() const
32 {
33 return GetInfoAsInt(NodeInfo::Length);
34 }
35
36 void SetLength(std::int64_t length)
37 {
38 SetInfoAsInt(NodeInfo::Length, length);
39 }
40 };
41 } // namespace GevServer
42 CVB_END_INLINE_NS
43} // namespace Cvb
Integer value register.
Definition int_reg_node.hpp:24
static GevServer::Namespace ParseNamespace(const String &name)
Gets the Namespace from the given name .
Definition decl_node.hpp:591
static String EnsureNodeNameOnly(const String &name)
Throws if the given name has a namespace prefix.
Definition decl_node.hpp:564
static String ParseName(const String &name)
Gets the name part of the given node name .
Definition decl_node.hpp:611
T move(T... args)
Namespace for GevServer based device configuration.
Definition decl_int_swiss_knife_node.hpp:11
Namespace
The possible name spaces a node can be in.
Definition gevserver.hpp:197
@ Length
Accesses the register length of this register node.
Definition gevserver.hpp:276
std::shared_ptr< ChunkIntRegNode > ChunkIntRegNodePtr
Convenience shared pointer for ChunkIntRegNode.
Definition gevserver.hpp:153
@ String
Node is a string node (no reg).
Definition gevserver.hpp:218
Root namespace for the Image Manager interface.
Definition version.hpp:11