int_64_reg_node.hpp
1 #pragma once
2 
3 #include "../global.hpp"
4 
5 #include "int_reg_node.hpp"
6 
7 namespace Cvb
8 {
9 CVB_BEGIN_INLINE_NS
10 namespace GevServer
11 {
16 class Int64RegNode : public IntRegNode
17 {
18 public:
19  Int64RegNode(HandleGuard<Node> &&guard) noexcept : IntRegNode(std::move(guard)) {}
20 
34  static Int64RegNodePtr Create(const String &name, const GevServer::Namespace &nameSpace, const std::int64_t &address)
35  {
36  String okName = EnsureNodeNameOnly(name);
37  return std::make_shared<Int64RegNode>(HandleGuard<Node>(
38  CExports::CreateGSInt64NodeTyped(okName.data(), static_cast<CExports::TGSNamespace>(nameSpace), address)));
39  }
40 
52  static Int64RegNodePtr Create(const String &name, const GevServer::Namespace &nameSpace)
53  {
54  return Create(ParseName(name), nameSpace, -1);
55  }
56 
74  static Int64RegNodePtr Create(const String &name, const std::int64_t &address)
75  {
76  return Create(ParseName(name), ParseNamespace(name), address);
77  }
78 
93  static Int64RegNodePtr Create(const String &name) { return Create(ParseName(name), ParseNamespace(name)); }
94 };
95 }
96 CVB_END_INLINE_NS
97 }
STL class.
static Int64RegNodePtr Create(const String &name, const GevServer::Namespace &nameSpace)
Creates a new Int64RegNode with the given name , nameSpace and an automatically assigned address.
Definition: int_64_reg_node.hpp:52
static String ParseName(const String &name)
Gets the name part of the given node name .
Definition: decl_node.hpp:606
static GevServer::Namespace ParseNamespace(const String &name)
Gets the Namespace from the given name .
Definition: decl_node.hpp:584
An Int64 IntRegNode node.
Definition: int_64_reg_node.hpp:16
Namespace
The possible name spaces a node can be in.
Definition: gevserver.hpp:147
static String EnsureNodeNameOnly(const String &name)
Throws if the given name has a namespace prefix.
Definition: decl_node.hpp:557
STL class.
Root namespace for the Image Manager interface.
Definition: version.hpp:11
Integer value register.
Definition: int_reg_node.hpp:19
static Int64RegNodePtr Create(const String &name, const GevServer::Namespace &nameSpace, const std::int64_t &address)
Creates a new Int64RegNode with the given name and nameSpace .
Definition: int_64_reg_node.hpp:34
static Int64RegNodePtr Create(const String &name, const std::int64_t &address)
Creates a new Int64RegNode with the given name .
Definition: int_64_reg_node.hpp:74
static Int64RegNodePtr Create(const String &name)
Creates a new Int64RegNode with the given name and and automatically assigned address.
Definition: int_64_reg_node.hpp:93