CVB++ 15.0
int_32_reg_node.hpp
1#pragma once
2
3#include "../global.hpp"
4
5#include "int_reg_node.hpp"
6
7namespace Cvb
8{
9 CVB_BEGIN_INLINE_NS
10 namespace GevServer
11 {
16 class Int32RegNode : public IntRegNode
17 {
18 public:
19 explicit Int32RegNode(HandleGuard<Node> &&guard)
20 : IntRegNode(std::move(guard))
21 {
22 }
23
37 static Int32RegNodePtr Create(const String &name, const GevServer::Namespace &nameSpace,
38 const std::int64_t &address)
39 {
40 String okName = EnsureNodeNameOnly(name);
41 return std::make_shared<Int32RegNode>(HandleGuard<Node>(
42 CExports::CreateGSInt32NodeTyped(okName.data(), static_cast<CExports::TGSNamespace>(nameSpace), address)));
43 }
44
56 static Int32RegNodePtr Create(const String &name, const GevServer::Namespace &nameSpace)
57 {
58 return Create(ParseName(name), nameSpace, -1);
59 }
60
78 static Int32RegNodePtr Create(const String &name, const std::int64_t &address)
79 {
80 return Create(ParseName(name), ParseNamespace(name), address);
81 }
82
97 static Int32RegNodePtr Create(const String &name)
98 {
99 return Create(ParseName(name), ParseNamespace(name));
100 }
101 };
102 } // namespace GevServer
103 CVB_END_INLINE_NS
104} // namespace Cvb
static Int32RegNodePtr Create(const String &name, const std::int64_t &address)
Creates a new int_32_reg_node with the given name .
Definition int_32_reg_node.hpp:78
static Int32RegNodePtr Create(const String &name, const GevServer::Namespace &nameSpace, const std::int64_t &address)
Creates a new int_32_reg_node with the given name and nameSpace .
Definition int_32_reg_node.hpp:37
static Int32RegNodePtr Create(const String &name, const GevServer::Namespace &nameSpace)
Creates a new int_32_reg_node with the given name , nameSpace and an automatically assigned address.
Definition int_32_reg_node.hpp:56
static Int32RegNodePtr Create(const String &name)
Creates a new int_32_reg_node with the given name and and automatically assigned address.
Definition int_32_reg_node.hpp:97
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 make_shared(T... args)
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:156
std::shared_ptr< Int32RegNode > Int32RegNodePtr
Convenience shared pointer for Int32RegNode.
Definition gevserver.hpp:117
@ String
Node is a string node (no reg).
Definition gevserver.hpp:177
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17