CVB++ 15.0
Loading...
Searching...
No Matches
chunk_float_reg_node.hpp
1#pragma once
2
3#include "../global.hpp"
4#include "float_reg_node.hpp"
5
6namespace Cvb
7{
8 CVB_BEGIN_INLINE_NS
9 namespace GevServer
10 {
11 class ChunkFloatRegNode
12 : public FloatRegNode
13 {
14 public:
15 explicit ChunkFloatRegNode(HandleGuard<Node> &&guard)
16 : FloatRegNode(std::move(guard))
17 {
18 }
19
20 static ChunkFloatRegNodePtr Create(const String &name, const GevServer::Namespace &nameSpace,
21 std::int64_t length)
22 {
23 String okName = EnsureNodeNameOnly(name);
24 return std::make_shared<ChunkFloatRegNode>(HandleGuard<Node>(CreateGSChunkFloatRegNodeTyped(okName.data(), static_cast<CExports::TGSNamespace>(nameSpace), length)));
25 }
26
27 static ChunkFloatRegNodePtr Create(const String &name, std::int64_t length)
28 {
29 return Create(ParseName(name), ParseNamespace(name), length);
30 }
31
32 std::int64_t Length() const
33 {
34 return GetInfoAsInt(NodeInfo::Length);
35 }
36
37 void SetLength(std::int64_t length)
38 {
39 SetInfoAsInt(NodeInfo::Length, length);
40 }
41 };
42 } // namespace GevServer
43 CVB_END_INLINE_NS
44} // namespace Cvb
Floating point value register.
Definition float_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
std::shared_ptr< ChunkFloatRegNode > ChunkFloatRegNodePtr
Convenience shared pointer for ChunkFloatRegNode.
Definition gevserver.hpp:157
@ Length
Accesses the register length of this register node.
Definition gevserver.hpp:276
@ String
Node is a string node (no reg).
Definition gevserver.hpp:218
Root namespace for the Image Manager interface.
Definition version.hpp:11